问题
这是我尝试的:
1)sudo pm-hibernate
不执行操作。
2 ) sudo gedit /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla
3)sudo update-grub
在菜单中仍然没有hibernate选项
4)已安装tuxonice
sudo add-apt-repository ppa:tuxonice/ppa
sudo apt-get update
sudo apt-get install tuxonice-userui linux-generic-tuxonice linux-headers-generic-tuxonice
然后sudo pm-hibernate
没有结果
5) sudo apt-get install hibernate
然后sudo systemctl hibernate
我得到这个错误消息:
通过logind休眠系统失败:
6) sudo gedit /var/lib/polkit-1/localauthority/10-vendor.d/com.ubuntu.desktop.pkla
[Disable hibernate by default in upower]
[Disable hibernate by default in logind]
。并将ResultActive=no
更改为ResultActive=yes
后来我找到了原因:必须在BIOS中禁用secure boot选项。
答案1
你必须在BIOS中禁用secure boot选项。
答案2
通过按Ctrl+Alt+t打开终端。
在终端中键入sudo systemctl hibernate
,并按Enter,提示时输入密码。
计算机关闭后,将它重新打开,打开的应用程序是否重新打开?
如果hibernate测试工作正常,当想要hibernate时,你可以继续使用sudo systemctl hibernate命令。
还可以在菜单中启用hibernate选项,为此,使用你最喜欢的文本编辑器创建/etc/polkit-1/localauthority/50local.D/com.ubuntu.enable将以下内容添加到文件中,并保存:
[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.login1.hibernate-ignore-inhibit
ResultActive=yes