如何在15.04启用hibernate?

我做了一个15.04的干净安装,尝试从http://ubuntuhandbook.org/index.php/2014/10/enable-hibernate-option-in-ubuntu-14-10-unity/启用每个指令的hibernate状态

但它只有在我使用upstart而不是systemd启动时才有效。

如何让它与systemd一起使用?

编辑>安装hibernate包后,我可以从终端运行它,但它仍然在关机菜单中不可用。

  1. 创建以下文件: /etc/polkit-1/localauthority/10-vendor.d/com.ubuntu.desktop.pkla

  2. 将以下内容复制/粘贴到其中:

    [Enable hibernate by default in upower] Identity=unix-user:* Action=org.freedesktop.upower.hibernate ResultActive=yes [Enable hibernate by default in logind] Identity=unix-user:* Action=org.freedesktop.login1.hibernate;org.freedesktop.login1.handle-hibernate-key;org.freedesktop.login1;org.freedesktop.login1.hibernate-multiple-sessions;org.freedesktop.login1.hibernate-ignore-inhibit ResultActive=yes 
  3. 注销并检查您是否可以在登录屏幕上看到hibernate菜单项,登录后也一样。

需要完成上述手动步骤的原因是它们似乎在Ubuntu 15.04中默认禁用了hibernate。

Jinesh Choksi给出的创建文件/etc/polkit-1/localauthority/10-vendor.d/com.ubuntu.desktop.pkla的答案似乎对我不起作用,当我恢复hibernate状态时,它只执行一个正常启动。 我发现的最佳选择是经典的pm-hibernate ,它没有任何问题:

 sudo pm-hibernate 

您还可以选择混合挂起/hibernate。 从手册页:

 pm-suspend-hybrid Hybrid-suspend is the process where the system does everything it needs to hibernate, but suspends instead of shutting down. This means that your computer can wake up quicker than for normal hibernation if you do not run out of power, and you can resume even if you run out of power. s2both(8) is an hybrid-suspend implementation.