I need to disable everything related to having the netbook-server go into sleep/hibernate/shutdown. Spinning down the disks during inactivity is fine, but it is crucial that the machine remain in a state where it maintains connectivity over wi-fi (and the internet at large), as well as keep the USB subsystem up and operational (we're running a hardware modem off of it).
Context:
- The netbook is not phyiscally accessible (it is in Thailand, I am
not). - I have SSH access only
- It is running vanilla Ubuntu 10.04 32
Bit - It is a netbook of the Asus eeePC variety
Is that possible to do via the command line without causing significant/any downtime?
Best Answer
You can disable those power management features at various level.
Graphical User Interface level
In GNOME, you should edit the following file:
One section concerns the suspend function and the other the hibernate one. Each as a tag that you have to set to no:
Keyboard level
Now, to avoid the problem if the keyboard has some related keys for these features, you have to enter the following command:
Command line level
It would still be possible to trigger a suspend or hibernation from the command line, here is how to disable it.
We have to create an executable script in
/etc/pm/sleep.d/
that will cancel any hibernate or suspend actions.The content of this file should be:
Now make that file executable: