Fix Ubuntu 13.10 hibernation, don’t install hibernate

I got around to rebuilding the Linux dualboot setup that was destroyed in this post. Today’s beautiful thought, then, is as follows.

Apparently, as a matter of policy, suspend-to-disk or hibernation is not wanted in Ubuntu any more. As a result, Canonical removed the menu items and other stuff from 13.10 and beyond. You can read the discussion of this decision in launchpad here, which is a superb document of groupthink among other things.

Ask Ubuntu explains how to put it back. This didn’t work for me. Running sudo pm-hibernate just locked the screen, which was weird because it worked fine in 12.10. The explanation of this issue is that depending on your hardware and setup, you need to create the file as per the Ask thread above either in /etc/polkit-1/... or in /var/lib/polkit-1/... Having tried /etc first, I put a symlink in /var/ pointing to the new file, which solved the problem.

So, having made the file as above:

cd /var/lib/polkit-1/localauthority/10-vendor.d/
sudo ln -s com.ubuntu.desktop.pkla /etc/polkit-1/localauthority/10-vendor.d/com.ubuntu.enable-hibernate.pkla

Be very careful about this answer, which recommends installing the package hibernate. If you have an encrypted swap partition, which you probably do if you have an encrypted /home/, it will suspend to disk all right, perhaps via sudo s2disk rather than sudo pm-hibernate, but it will hang during the resume and you will not be able to boot the computer. The solution is to boot from a liveUSB stick, mount your /home/, chroot into it, and then uninstall hibernate.

sudo su
mkdir /media/temp/
mount /dev/sda5* /media/temp/
chroot /media/temp/
apt-get purge hibernate

*obviously, whichever partition your system lives in

Yes, this sucks.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.