I accidentally clicked on the option "When power is critically low" under System Settings>Power. The original entry was blank, but the only two options after I clicked were Hibernate and Shutdown. I want to set it back to Suspend.
There is no option to suspend available.
You cannot suspend when power is critically low, to suspend you need power to save the session to RAM allowing you to resume quicker, if you loose power you loose the current suspend state.
Hibernate copys the current state to the hard drive, it is slower but you can turn off the power.
Shutdown is obvious - you will loose any data in the active session and have a new session on restart.
To change this setting back to suspend, use dconf-editor. Go to org.gnome.settings-daemon.plugins.power and change critical-battery-action to suspend.
Alternatively, in a terminal session use the command:
I don't have sufficient rep to edit or comment, so if anyone would care to, this is a comment/edit for AtomHeartFather's answer.
You may also change the values for what percent is considered low/critical battery using dconf-tools. In the same power section, modify the following values to the desired percentages.
Note: Special consideration goes to the
I had this problem.
I was extremely frustrated whenever my computer would blackout, while i was doing serious work.
I wrote a script to check the A/C Power sate every two minutes and hibernate when the power goes off. Please modify according to your battery's health. My battery could pnly work for two minutes after mains power outage.
I put the script in a file called
On 12.04 I used
Although sleepd is not packaged for Ubuntu 14.04, and has even been orphaned by its developer, it is possible to compile and install it yourself.
Installation on Ubuntu 12.04:
Edit the file
Then restart the daemon:
It also has options to stay awake if there is network activity, but these stopped working for me.
On my machine, apparently ACPI was not always reporting the temperature correctly, so I needed to add
(I had a weird bug on one laptop with 12.04 that the machine would wake up again immediately after suspending, but only if sleepd was suspending due to low battery, not due to idle time. I hope you won't have that experience too! The problem never happened under 14.04.)
There's a way to disable suspension / power off completely.
(in case it's showing critically low even at 100%)