I want to assign a shortcut key for the Hibernate functionality. I have Fn + F11 for hibernation in Windows, but it's not working on Ubuntu. It's getting in sleep mode instead.
I've also tired changing the keyboard shortcut option as Ctrl + H with command pm-hibernate, but still it didn't work. I referred this Ubuntu Forums Thread but couldn't find any solution for this.
Any solution please?
12 Answers
If you need to setup hibernation shortcut sequence, you go to Ubuntu System settings (Ctrl+Alt+T and then typing gnome-control-center) and then choosing keyboard settings.
Under that, you will see a tab that says "shortcuts", and there will be an option to set a custom command :
Then you will need to put the command you want to hibernate your computer.
1Firstly, Hibernate will need to be enabled. Go into console and type
sudo gedit /var/lib/polkit-1/localauthority/50-local.d/hibernate.pklaIn the new gedit window, copy-paste this in:
[Re-enable Hibernate]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yesSave and close the file, reboot the computer, and then you have it available as a menu option. Assuming you're on a laptop, the fn + F11 shortcut should work afterwards as well, if this is a default option that came with the laptop (i.e. printed on the keyboard, etc.).
3