My Ubuntu 11.10 desktop has an option to suspend when inactive (under System Settings > Power) but no option to hibernate. How can I hibernate it after a period of inactivity?
So for your case we would change the value for "sleep_type_ac" to hibernate when following the article. Hope this does the trick.
Simplified steps:
Open a terminal, and run gconf-editor or a short cut to run programs hit Alt+f2 and type gconf-editor this will open up the configuration editor
Find /apps/gnome-power-manager/actions/ by using the + icons and folders on the left sidebar, so first find "apps" then "gnome-power-manager" within the "apps" folder, and finally "actions" within that.
Within "actions" look for sleep_type_battery and sleep_type_ac in the main window. Which in your case the value would be set to suspend double click suspend and change it to hibernate for which one you want to set to hibernate.
and take note of the different values: there is a timeout and type for each of A/C power and battery power. The type is one of 'suspend' or 'hibernate'. The timeout is the number of seconds of inactivity before suspending.
In System Settings (gnome-control-center), choose power, and set the timeout to some unique value; I chose 2 hours (7200 seconds), since both battery-timeout and ac-timeout were set to disabled (0) previously.
Now, run the command in step 1 again. Check which timeout changed. For my desktop computer it was the battery timeout, so pay close attention.
Modify the "sleep" type which corresponds to the timeout you modified in step 2. Since step 2 modified the timeout for battery, I modified the sleep type for battery.
$ gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-type 'hibernate'
I'd imagine since its a desktop it sleeps instead of hibernates, it looks like laptop users have the opposite problem,
Sleep Instead of Hibernate When Idle
So for your case we would change the value for "sleep_type_ac" to hibernate when following the article. Hope this does the trick.
Simplified steps:
Open a terminal, and run
gconf-editor
or a short cut to run programs hit Alt+f2 and typegconf-editor
this will open up the configuration editorFind
/apps/gnome-power-manager/actions/
by using the + icons and folders on the left sidebar, so first find "apps" then "gnome-power-manager" within the "apps" folder, and finally "actions" within that.Within "actions" look for
sleep_type_battery
andsleep_type_ac
in the main window. Which in your case the value would be set tosuspend
double click suspend and change it tohibernate
for which one you want to set to hibernate.Since later versions of Ubuntu use
dconf
instead ofgconf
, Mateo's answer is out-of-date. To edit these same settings indconf
, do the following:First, run
and take note of the different values: there is a timeout and type for each of A/C power and battery power. The type is one of
'suspend'
or'hibernate'
. The timeout is the number of seconds of inactivity before suspending.In System Settings (
gnome-control-center
), choose power, and set the timeout to some unique value; I chose 2 hours (7200 seconds), since bothbattery-timeout
andac-timeout
were set to disabled (0) previously.Now, run the command in step 1 again. Check which timeout changed. For my desktop computer it was the battery timeout, so pay close attention.
Modify the "sleep" type which corresponds to the timeout you modified in step 2. Since step 2 modified the timeout for battery, I modified the sleep type for battery.