0

I just haven't been able to configurate Ubuntu 14.04 so that it starts up in the last session, just like before I shut it down

  • Use hibernate / suspend instead of shutdown? – kraxor Aug 13 '14 at 6:13
0

Unfortunately, hibernate doesn't work in many cases, which can cause you to lose data if you expect your documents and applications to re-open when you switch your computer back on. Therefore, hibernate is disabled by default.

Test if hibernate works

Note : Always save your work before hibernating
You should save all of your work before hibernating the computer, just in case something goes wrong and your open applications and documents cannot be recovered when you switch on the computer again.

You can use the command line to test if hibernate works on your computer.

  1. Open the Terminal by pressing Ctrl+Alt+T or by searching for terminal in the Dash.

  2. Type sudo pm-hibernate into the terminal and press Enter.
    Enter your password when prompted.

  3. After you computer turns off, switch it back on. Did your open applications re-open?

If hibernate doesn't work, check if your swap partition is at least as large as your available RAM.

Enable hibernate

If the hibernate test works, you can continue to use the sudo pm-hibernate command when you want to hibernate.

You can also enable the hibernate option in the menus. To do that, use your favorite text editor to create /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla. Add the following to the file and save:

[Re-enable hibernate by default in upower]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes

[Re-enable hibernate by default in logind]
Identity=unix-user:*
Action=org.freedesktop.login1.hibernate; org.freedesktop.login1.hibernate-multiple-sessions
ResultActive=yes

Source : Official Documentation

0

You can hibernate instead of shutting down.

Run these commands to enable it :

sudo -i

touch /var/lib/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla

echo "[Re-enable hibernate by default in upower]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes
[Re-enable hibernate by default in logind]
Identity=unix-user:*
Action=org.freedesktop.login1.hibernate
ResultActive=yes" >> /var/lib/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla

Then reboot.

You should now have a Hibernate option in your power menu.

Source : http://ubuntuhandbook.org/index.php/2014/04/enable-hibernate-ubuntu-14-04/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.