This quick tutorial is going to show you how to add back the ‘Hibernate’ option in the top-right corner shutdown menu in Ubuntu 17.04 Zesty Zapus.
By default the hibernate option is disabled in Ubuntu Unity because it does not work in many cases and that cause you to lose data if you don’t make backups. To re-enable the feature, you need to simply do a little hack on the configuration file.
Test if hibernate works in your case:
First open terminal (Ctrl+Alt+T) and install power management utility and gksu via command:
sudo apt install pm-utils gksu
Then test if hibernate works in your computer by running command:
sudo pm-hibernate
After you computer turns off, switch it back on. Did your open applications re-open? If hibernate does not work, check if your swap partition is at least as large as your available RAM.
Re-add Hibernate Option to Shutdown menu:
If hibernate works, do following steps to add the option to your system shutdown menu:
1. Open terminal (Ctrl+Alt+T) and run command:
gksudo gedit /var/lib/polkit-1/localauthority/10-vendor.d/com.ubuntu.desktop.pkla
2. When the above command opens up the configuration file, scroll down and find out below sections:
- [Disable hibernate by default in upower]
- [Disable hibernate by default in logind]
Change both the values from no to yes
Save the file and reboot your computer to apply the change.
For some devices, if above changes do not work, do following changes instead:
1. Run command to create and edit another configuration file:
gksudo gedit /etc/polkit-1/localauthority/10-vendor.d/com.ubuntu.desktop.pkla
2. When the file opens, paste following lines and save it.
[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
Hibernate Ubuntu when lid is closed:
For Ubuntu laptop, you may also want to hibernate Ubuntu automatically when the lid is closed. To do so, see this tutorial.
Đăng ký liền tay Nhận Ngay Bài Mới
Subscribe ngay
Cám ơn bạn đã đăng ký !
Lỗi đăng ký !
Add Comment