Linked Questions

62 votes
4 answers
50k views

how to execute a command after resume from suspend?

I've got a script that is executed in order to have suspending/resuming working in my laptop. Then I have another series of xinput,xkbset and xmodmap commands that are executed when I initiate a ...
719016's user avatar
  • 6,217
3 votes
0 answers
1k views

Run script after wake up [duplicate]

I have a Toshiba notebook(Toshiba c50d a-133) and problems after waking up. When I close the lid Ubuntu go to sleep mode. After opening, it wakes up, but sometimes mouse and keyboard don't work. Then ...
Andre Nitschke's user avatar
0 votes
0 answers
22 views

I want to run a script after the comupter wakes up from sleep state [duplicate]

How do I remap the caps lock key? teaches how to disable the CapsLock key. I have written a script which applies the command setxkbmap -option caps:none as part of an autostart procedure. It works ...
Adalbert Hanßen's user avatar
96 votes
11 answers
81k views

Permanent xmodmap in Ubuntu 13.04

I cannot make xmodmap run on login in Ubuntu 13.04. I have searched around, including in askubuntu and all answers I found do not work. I have a file named .Xmodmap in my home folder which contains ...
Alexander Karatarakis's user avatar
31 votes
8 answers
38k views

Ubuntu changes sound device after suspend, how to fix?

So my setup currently is using a monitor plugged into my laptop via HDMI and using the speakers in that for audio not the inbuilt laptop ones. When the machine boots it uses HDMI by default, but I ...
MattJC's user avatar
  • 311
8 votes
5 answers
6k views

How do I disable laptop optical drive eject button and assign eject to a keyboard shortcut?

Note: Answer now updated to function under 19.04 I'm on 14.04 and accidentally open my cd/dvd/bluray drive about 20 times a day. I've looked at a few questions here which provided no working solution....
Insperatus's user avatar
  • 4,693
9 votes
1 answer
9k views

How do I switch the audio outputs of an audio device from CLI?

I'm trying to switch between the audio outputs of my video card from the command line. I'm able to do that via the GUI settings, as it's shown on the picture. How can I do this programmatically? On ...
pa4080's user avatar
  • 29.9k
3 votes
2 answers
4k views

How to run script after resuming from sleep?

I have a custom script (uses $DISPLAY) for setting up the extra buttons on my mouse. I want to run this script every time I log into the system. I have added the script as a Startup Application via ...
Naximus's user avatar
  • 131
0 votes
2 answers
7k views

iMac Late 2013 Audio Cirrus Logic CS4206 Issues

I have just switched from OSX to Xubuntu 14.04 on my iMac Late 2013. I've got everything running smooth, except for my freakin' audio card. It works occasionally for a few minutes and then it just ...
LinuxScientist's user avatar
3 votes
2 answers
4k views

Network manager must be restarted after wakeup in Ubuntu 15.04

Upgraded from Ubuntu 14.04 to 15.04 on my lenovo T410 a couple of weeks ago and I have been having some problems with my network connection ever since. Everything worked fine with 14.04, but now I am ...
Ando Randolini's user avatar
6 votes
1 answer
3k views

Battery status is slow to update

I have a 2008 MacBook Air (model A1237) with Ubuntu 16.04 LTS installed on it. I managed to solve some other problems, but I can't figure out how to find a solution to this one... Basically the ...
Brodino Caldo's user avatar
2 votes
2 answers
4k views

Ubuntu+wine, USB COM port issue. Simbolic link question

Good afternoon AskUbuntu community. I'm here to ask for a little help to better understand this great environment that i found out Ubuntu to be :) So let's start from the beginning. I have a old ...
Alessio 's user avatar
6 votes
1 answer
2k views

Execute script on every start, wakeup and activation!

I want to execute a script on every start up, wake up and activation. In the current setup the script is executed in: /etc/rc.local /lib/systemd/system-sleep It works so far, but if I reactivate my ...
YvanEhtNioj's user avatar
2 votes
0 answers
2k views

Ubuntu 14.04 Intel Brightness After Resume

I recently installed Ubuntu 14.04 on my Dell Inspiron laptop. Seeing that my hotkeys didn't work, I followed the instructions here and everything was going smooth. Except for when I close the lid to ...
SarTheFirst's user avatar
2 votes
1 answer
704 views

Laptop: Internal LCD does not get reactivated

Hi i have a ThinkPad T430 with an external monitor plugged into docking-station via VGA. When i close the lid and reopen it, my internal display stays black and does not get reactivated. I'm using a ...
cebor's user avatar
  • 185
0 votes
2 answers
1k views

Script not running on resume/wakeup in Ubuntu

I have a script named 999_thaw_flash.sh in my /etc/pm/sleep.d The script follows like this :- export DISPLAY=:0 #!/bin/bash case "{$1}" in resume|thaw) lynx --dump link1 >> file1 lynx --...
penta's user avatar
  • 354
1 vote
2 answers
325 views

Internet not working after switching wifi

I recently reinstalled my laptop with ubuntu gnome 16.10. I previously had 16.04 which was upgraded from 15.10, but this time I installed clean. My wifi-module works fine and I connect to networks ...
Rien Heuver's user avatar
1 vote
0 answers
487 views

Run Script on Resume/Wakeup

Sorry, I have to revisit this. All the methods recommended have not worked for me. I am unsure where my error is after multiple attempts. I have a Griffin Powemate that I use as an external volume ...
kellyvotrenom's user avatar
0 votes
0 answers
432 views

Use pm-suspend instead of suspend on lid close

From testing on my Ubuntu 20.04 Thinkpad P51 laptop (Quadro M1200 running proprietary driver 510.39.01), systemctl suspend will only suspend for a few seconds then wake again, while sudo pm-suspend ...
qwr's user avatar
  • 2,802
0 votes
1 answer
269 views

wakeup script not working with nmcli

I have following script saved it /lib/systemd/system-sleep/ directory, to run after every wake-up from suspend: #!/bin/bash if [ "$1" == "post" ]; then sleep 5 cni=$(ip link | grep "state UP" ...
mauek unak's user avatar
2 votes
0 answers
261 views

Wakeup script doesn't work

I have a script that remaps my keyboard. It executes as it should on login but doesn't work on resume. The command is xmodmap .Xmodmap or with full path: /usr/bin/xmodmap /home/arash/.Xmodmap. I've ...
arash's user avatar
  • 81
0 votes
1 answer
153 views

Help with script for wifi failure on wakeup with RT 2573 and 16.04LTS

I've been trying to find a solution for a problem I've been having with my laptop on 16.04 LTS for a few days now. I can only get the wifi to work after coming out of standby by typing these 2 lines ...
user620334's user avatar
1 vote
0 answers
117 views

Wifi won't connect after suspend Ubuntu 16.04 [duplicate]

I have an Thinkpad R61e that I've installed Ubuntu 16.04 LTS on. When the system suspends WiFi will not connect until I reboot. I've tried restarting network manager, but this does not correct the ...
nitjus4fun's user avatar
0 votes
1 answer
93 views

How can I open a browser tab after resuming from sleep?

I've bashed around on this one for awhile, no pun intended. I just want to open my todo list url in my browser every time my computer wakes from suspend. The command to do this normally is easy: xdg-...
MalcolmOcean's user avatar
0 votes
1 answer
88 views

How to send network reconnect message after coming back from sleep

I have my desktop and laptop, which I configure DHCP on my desktop ethernet and let my laptop connect to it. The issue is after my desktop wake up from sleep, both of them are UP but did not auto re-...
bizi's user avatar
  • 111
0 votes
0 answers
63 views

why does my script not run on wakeup

I've followed istructions found on Run Script on Wakeup? to do the following: I have a ASUS Zenbook and since I upgraded to 16.04, the wifi stays disconnected on resume. I wrote a script that I can ...
stdcerr's user avatar
  • 1,080