我刚刚在我的 ThinkPad X1 Carbon - 20A7CTO1WW(第二代)上安装了 ubuntu 15.04(3.19.0-16-generic #16-Ubuntu)。
休眠功能在关闭盖子时有效(偶尔,不是所有时候),sudo pm-hibernate
但在关闭盖子时无效。在 14.04 上,我不得不修改 2 个文件才能使其工作,但现在它不再工作了。以下是在 14.04 上曾经有效的修改:
- 在
/var/lib/polkit-1/localauthority/10-vendor.d/com.ubuntu.desktop.pkla
:替换
[Disable hibernate by default in upower] Identity=unix-user:* Action=org.freedesktop.upower.hibernate ResultActive=no [Disable 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=no
经过
[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.handle-hibernate-key;org.freedesktop.login1;org.freedesktop.login1.hibernate-multiple-sessions;org.freedesktop.lo
ResultActive=yes
- 在
/etc/systemd/logind.conf
:替换
#HandleLidSwitch=suspend
经过
HandleLidSwitch=hibernate