# How-to enable hibernate on Ubuntu

**URL:** <https://support.nitrokey.com/t/how-to-enable-hibernate-on-ubuntu/5804>\
**Category:** NitroPad, NitroPC\
**Created:** [January 7, 2024, 3:01pm UTC](https://support.nitrokey.com/t/how-to-enable-hibernate-on-ubuntu/5804 "2024-01-07T15:01:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![commandline](https://support.nitrokey.com/user_avatar/support.nitrokey.com/commandline/32/510_2.png) [@commandline](https://support.nitrokey.com/u/commandline)\
**Post date:** [January 7, 2024, 3:01pm UTC](https://support.nitrokey.com/t/how-to-enable-hibernate-on-ubuntu/5804/1 "2024-01-07T15:01:38Z")

</div>

assuming I did not unintentionally broke this before … or Ubuntu 22.x there’s not a default hibernate available, the fix is easy though

works well with Ubuntu since v2.4 of nitropad firmware but will not work with Qubes

edit: /var/lib/polkit-1/localauthority/10-vendor.d/com.ubuntu.desktop.pkla

**modify both**

[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

**to read**

[Disable hibernate by default in upower]  
Identity=unix-user:\*  
Action=org.freedesktop.upower.hibernate  
ResultActive=yes

[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=yes

reboot or log-off/log-on may be required  
whenever you select ‘logout’ the **hibernate** and **hybrid sleep** option are now available

when using hibernate and thawing the machine (push the power button once) this will require use of the boot security key again and also the LUKS password, this is normal, all is working as before, the uptime counter is still continuing

_software to consider to have installed_

apt install pm-utils laptop-mode upowerd
