Mint 16 MATE 的电源管理器中没有休眠选项

Dun*_*nes 4 power-management hibernate linux-mint mate-desktop

在我全新安装的带有 MATE 的 Linux Mint 16 中,电源管理器中没有休眠选项;只挂起和关闭。

在退出菜单中,我将休眠作为一个选项。也sudo pm-hibernate可以从命令行工作。

关于如何在电源管理器中启用休眠的任何建议?我想在笔记本电脑盖合上时休眠。

我有足够的交换空间供休眠工作:

$ free -h
             total       used       free     shared    buffers     cached
Mem:          3.5G       1.6G       1.8G         0B        18M       406M
-/+ buffers/cache:       1.2G       2.3G
Swap:         3.6G        16M       3.6G
Run Code Online (Sandbox Code Playgroud)

小智 6

编辑此文件: /var/lib/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla

例如。: sudo gedit /var/lib/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla

添加此内容:

[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
Run Code Online (Sandbox Code Playgroud)

这将在菜单中添加休眠选项。但是如果你想休眠,当 LID 关闭时,然后执行这个(这将在 LID 关闭时启用休眠):

sudo sed -i 's/#HandleLidSwitch=suspend/HandleLidSwitch=hibernate/g' /etc/systemd/logind.conf
Run Code Online (Sandbox Code Playgroud)

并重新启动系统或执行: sudo systemctl restart systemd-logind.service