{"id":34462,"date":"2021-08-27T14:24:08","date_gmt":"2021-08-27T14:24:08","guid":{"rendered":"https:\/\/ubuntuhandbook.org\/?p=34462"},"modified":"2026-04-14T07:59:28","modified_gmt":"2026-04-14T07:59:28","slug":"enable-hibernate-ubuntu-21-10","status":"publish","type":"post","link":"https:\/\/ubuntuhandbook.org\/index.php\/2021\/08\/enable-hibernate-ubuntu-21-10\/","title":{"rendered":"Enable Hibernate Function in Ubuntu 26.04, 24.04 or 22.04 LTS"},"content":{"rendered":"<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/hibernate-icon.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-thumbnail wp-image-39085\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/hibernate-icon-250x250.webp\" alt=\"\" width=\"250\" height=\"250\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/hibernate-icon-250x250.webp 250w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/hibernate-icon-300x300.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/hibernate-icon-600x600.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/hibernate-icon-768x768.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/hibernate-icon.webp 1200w\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" \/><\/a><\/p>\n<p>Computer hibernate does not work in your Ubuntu? Here&#8217;s step by step complete guide shows how to enable this feature in Ubuntu 26.04, Ubuntu 24.04, or Ubuntu 22.04 LTS.<\/p>\n<p>Similar to suspend, hibernate can be used to save your system work. It moves the content from RAM memory into swap area in hard disk, then shutdown your machine completely. Next time you boot the computer, it restores the system status exactly as it was.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/hibernate-menu-noble.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-46416\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/hibernate-menu-noble-505x700.webp\" alt=\"\" width=\"505\" height=\"700\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/hibernate-menu-noble-505x700.webp 505w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/hibernate-menu-noble-216x300.webp 216w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/hibernate-menu-noble.webp 512w\" sizes=\"auto, (max-width: 505px) 100vw, 505px\" \/><\/a><\/p>\n<p><b>NOTE: The hibernation feature does work with Secure Boot enabled or zram!<\/b><\/p>\n<p><b>For non-GNOME desktop environments, you need to replace <code>gnome-text-editor<\/code> or <code>gedit<\/code>\u00a0in following commands with your favorite text editor, or use the universal <code>nano<\/code> command line editor that works in most desktops (use Ctrl+S to save, Ctrl+X to exit).<\/b><\/p>\n<h3>Step 1: Check the ID of Swap Area &amp; Create if NOT exist.<\/h3>\n<p>System hibernate feature saves data into swap area on disk. You need to first find out the ID or UUID of the swap device, so to know where to resume from hibernation.<\/p>\n<h4 style=\"color: #ff9000;\">a. Check Swap Area:<\/h4>\n<p>First, press <code>Ctrl+Alt+T<\/code> on keyboard to open terminal. When it opens, run command:<\/p>\n<pre>swapon --show<\/pre>\n<p>The command will output all enabled swap devices in your system, along with its name, type, size, priority, etc., information.<\/p>\n<ul>\n<li>If the TYPE is a <b>partition<\/b>, then you need to write down its name, which is usually &#8216;<b>\/dev\/sdaX<\/b>&#8216; or &#8216;<b>\/dev\/nvme0n1px<\/b>&#8216;. Next go directly to step 2<\/li>\n<li>If it&#8217;s a <b>file<\/b>, then you need to go next step (b.) to find out the <b>root partition<\/b> (Ubuntu file-system) name, as well as the <b>physical offset<\/b> to locate that swap file.<\/li>\n<\/ul>\n<p><b>NOTE: A Linux system may have multiple swap devices, go check the one with highest priority! If the swap name is &#8220;\/dev\/zram0&#8221;, then it does NOT support hibernation!!<\/b><\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/swapon-show.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-46412\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/swapon-show-700x370.webp\" alt=\"\" width=\"610\" height=\"322\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/swapon-show-700x370.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/swapon-show-300x159.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/swapon-show-768x406.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/swapon-show.webp 851w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/a><\/p>\n<h4 style=\"color: #ff9000;\">b. Find root partition name and physical offset<\/h4>\n<p>So, if your system uses a <b>file<\/b> for swap area, then you need to find out the root partition name + physical offset to locate it.<\/p>\n<p><b>To get the system partition name<\/b>, run the command below, and check the one mounted on &#8220;\/&#8221;:<\/p>\n<pre>df -h<\/pre>\n<p>In my case, Ubuntu partition is encrypted. It&#8217;s <code>\/dev\/mapper\/ubuntu--vg-ubuntu--lv<\/code>. If you don&#8217;t have Ubuntu encrypted, it will be something looks like <code>\/dev\/nvme0nXpY<\/code> or <code>\/dev\/sdXY<\/code>.<\/p>\n<p><b>To get the physical offset<\/b> of the swap file, use command:<\/p>\n<pre>sudo filefrag -v \/swap.img<\/pre>\n<p>Here, replace <b>\/swap.img<\/b> with yours swap file name (see <code>swapon --show<\/code> output). Then, copy the start number under physical_offset. It&#8217;s <b>13336576<\/b> in my case.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-50952\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/detect-offset-700x417.webp\" alt=\"\" width=\"610\" height=\"363\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/detect-offset-700x417.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/detect-offset-300x179.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/detect-offset-768x457.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/detect-offset.webp 899w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/p>\n<h4 style=\"color: #ff9000;\">c. Create Swap File, if you don&#8217;t have Swap area:<\/h4>\n<p>Ubuntu now by default creates a swap file (usually \/swap.img) when you don&#8217;t make a swap partition during the installation. Just in case, you may also follow the steps below to manually create one:<\/p>\n<p>a.) Pre-allocate a disk place for a file via command:<\/p>\n<pre>sudo dd if=\/dev\/zero of=\/swapfile count=8192 bs=1MiB<\/pre>\n<p><i>Replace 8192 MB (8G) to your desired size. As large as RAM is recommended for swap.<\/i><\/p>\n<p>b.) Change the file permission to that only root has read &amp; write access:<\/p>\n<pre>sudo chmod 600 \/swapfile<\/pre>\n<p>c.) Set the file as swap area:<\/p>\n<pre>sudo mkswap \/swapfile<\/pre>\n<p>d.) Finally enable it by running command:<\/p>\n<pre>sudo swapon \/swapfile<\/pre>\n<p>If you already have a swap space, and want to use this one with higher priority, run <b>sudo swapon -p 100 \/swapfile<\/b> instead. Replace <b>100<\/b> with any number bigger than the existing swap.<\/p>\n<p>And, if you already &#8216;swapon&#8217; the swap, then you need to disable it via <code>sudo swapoff \/swapfile<\/code> first, then swap-on with priority number with the command above.<\/p>\n<p>e.) And write it into &#8216;\/etc\/fstab&#8217;, so Ubuntu will mount it automatically on startup.<\/p>\n<pre>echo '\/swapfile none swap sw 0 0' | sudo tee -a \/etc\/fstab<\/pre>\n<p>When done, you may run step <b>b.<\/b> to find out the root partition name plus physical offset for this swap file.<br \/>\n<a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/create-swapfile.webp\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-39091\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/create-swapfile-600x291.webp\" alt=\"\" width=\"600\" height=\"291\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/create-swapfile-600x291.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/create-swapfile-300x145.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/create-swapfile.webp 768w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<h3>Step 2: Enable Hibernate by adding Kernel Parameter<\/h3>\n<p>After step 1, you can now add kernel parameter in Grub boot-loader config file, to tell it to try resuming from the swap device on every boot.<\/p>\n<p>To do so, press <code>Ctrl+Alt+T<\/code> to open terminal, and run command to edit the config file:<\/p>\n<pre>sudo gnome-text-editor \/etc\/default\/grub<\/pre>\n<p><i>For Ubuntu 22.04 and earlier, replace <code>gnome-text-editor<\/code> with <code>gedit<\/code>. For non-GNOME desktop, use other text editor or <code>nano<\/code> that works for all.<\/i><\/p>\n<p><b>For Swap partition<\/b>, add <b>resume=\/dev\/xxx<\/b>\u00a0(do <i>replace &#8220;\/dev\/xxx&#8221; to the Swap partition name you got in step 1<\/i>) as value of &#8220;GRUB_CMDLINE_LINUX_DEFAULT&#8221;.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/hibernate-partition.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-46545\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/hibernate-partition-700x354.webp\" alt=\"\" width=\"610\" height=\"308\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/hibernate-partition-700x354.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/hibernate-partition-300x152.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/hibernate-partition-768x388.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/hibernate-partition.webp 958w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/a><\/p>\n<p><b>For Swap file<\/b>, add <b>resume=\/dev\/xxx resume_offset=xxx<\/b> (<i>also replace xxx with the root partition name and physical offset number according to step 1<\/i>) instead for value of &#8220;GRUB_CMDLINE_LINUX_DEFAULT&#8221;.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-50953\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/offset_grub-700x383.webp\" alt=\"\" width=\"610\" height=\"334\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/offset_grub-700x383.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/offset_grub-300x164.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/offset_grub-768x421.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/offset_grub.webp 1108w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/p>\n<p>Finally, save the file and <strong>apply changes<\/strong> by updating the Grub configuration via command:<\/p>\n<pre>sudo update-grub<\/pre>\n<h3>Step 3: Regenerate initramfs<\/h3>\n<p>If your Ubuntu has swap on file, then you need to also do this step to tell kernel to resume from swap.<\/p>\n<p>Firstly, open terminal (Ctrl+Alt+T) and run command to create a config file:<\/p>\n<pre>sudo gnome-text-editor \/etc\/initramfs-tools\/conf.d\/resume<\/pre>\n<p>Then paste the line &#8220;RESUME=\/dev\/xxx resume_offset=xxx&#8221; (<i>replace xxx<\/i> with correct partition name and offset number) and save it.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-50954\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/init-resume-config-700x485.webp\" alt=\"\" width=\"610\" height=\"423\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/init-resume-config-700x485.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/init-resume-config-300x208.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/init-resume-config-768x532.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/init-resume-config.webp 776w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><br \/>\nAfter saving the file, regenerate initramfs via command:<\/p>\n<pre>sudo update-initramfs -c -k all<\/pre>\n<p>Finally reboot and test hibernate function again.<\/p>\n<h3>Step 4: Check if hibernate works:<\/h3>\n<p><b>NOTE: The hibernation won&#8217;t work with secure boot!! You have to disable it in BIOS\/EFI first.<\/b> With secure boot enabled, you&#8217;ll get error:<\/p>\n<blockquote><p><i>&#8220;Failed to hibernate system via logind: Sleep verb &#8220;hibernate&#8221; not supported&#8221;<\/i>.<\/p><\/blockquote>\n<p>To verify if the hibernation function works now, open terminal (<strong>Ctrl+Alt+T<\/strong>) and run command:<\/p>\n<pre>sudo systemctl hibernate<\/pre>\n<p>Save you work before running the command!! Then type user password when it asks. The command will turn off your computer\/laptop. Next you can boot the machine again, and <b>see if it restores your system status<\/b> after login.<\/p>\n<p>If hibernation works, <i>go to Step 4 to enable &#8216;Hibernate&#8217; option in shutdown menu<\/i>. If NOT, then your computer may NOT support this feature or something has gone wrong.<\/p>\n<h4>Troubleshooting:<\/h4>\n<p>For Ubuntu 24.04 with swap file, there was <a href=\"https:\/\/bugs.launchpad.net\/ubuntu\/+source\/systemd\/+bug\/2057687\" target=\"_blank\" rel=\"noopener\">a bug<\/a>, that may cause <u>&#8220;Call to Hibernate failed: Invalid argument&#8221;<\/u> error when running the hibernate command. In the case, the hibernation may only work on first action.<\/p>\n<p><b>The bug has been fixed in Ubuntu 24.04.1<\/b>. And, here is just the note about the workaround:<\/p>\n<ul>\n<li>First, open terminal and run command <b><code>lsblk<\/code><\/b> to get the <code>MAJ:MIN<\/code> value of the root partition. If you don&#8217;t know root name, use <code>df -h<\/code> to find the one mounted on &#8220;\/&#8221;.<\/li>\n<li>Next, run command to create a tmpfiles.d config file:\n<pre>sudo nano \/etc\/tmpfiles.d\/hibernation_resume.conf<\/pre>\n<p>When file opens in terminal window, add the lines below:<\/p>\n<pre>#    Path                   Mode UID  GID  Age Argument\r\nw    \/sys\/power\/resume       -    -    -    -   259:6<\/pre>\n<p>Here, replace <b>259:6<\/b> according to <code>MAJ:MIN<\/code> value you got in last command. Then, press Ctrl+S to save file and Ctrl+X to exit.<\/li>\n<\/ul>\n<p>This config file tells to write <code>MAJ:MIN<\/code> value to the <code>\/sys\/power\/resume<\/code> automatically on system boot, so to workaround the bug until it was fixed.<\/p>\n<h3>Step 5: Enable Hibernate option in Power-Off Menu:<\/h3>\n<p>After enabled the function, you can now add a menu option into the system tray shutdown menu.<\/p>\n<p><b>Option 1: The legacy method for For Ubuntu 22.04 and earlier, though it still works in Ubuntu 24.04.<b><\/b><\/b><\/p>\n<p>1.) First, open terminal (Ctrl+Alt+T) and run command to create the config directory, that&#8217;s not exist by default in Ubuntu 24.04:<\/p>\n<pre>sudo mkdir -p \/etc\/polkit-1\/localauthority\/50-local.d<\/pre>\n<p>2.) Thanks to @Joerg, Ubuntu 23.10 and Ubuntu 24.04 users need to install <code>polkitd-plka<\/code> package first:<\/p>\n<pre>sudo apt install polkitd-pkla<\/pre>\n<p>3.) Then, run command to create &amp; edit a config file (replace <code>gedit<\/code> with <code>gnome-text-editor<\/code> for 24.04):<\/p>\n<pre>sudo gedit \/etc\/polkit-1\/localauthority\/50-local.d\/com.ubuntu.enable-hibernate.pkla<\/pre>\n<p>When the file opens, paste following lines and save it.<\/p>\n<pre style=\"background: none;\">[Re-enable hibernate by default in upower]\r\nIdentity=unix-user:*\r\nAction=org.freedesktop.upower.hibernate\r\nResultActive=yes\r\n\r\n[Re-enable hibernate by default in logind]\r\nIdentity=unix-user:*\r\nAction=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\r\nResultActive=yes<\/pre>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/enable-hibernate.webp\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-39097\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/enable-hibernate-600x283.webp\" alt=\"\" width=\"600\" height=\"283\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/enable-hibernate-600x283.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/enable-hibernate-300x142.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/enable-hibernate-768x363.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/enable-hibernate.webp 817w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p><b>Option 2: Thanks to <a href=\"https:\/\/www.reddit.com\/r\/Kubuntu\/comments\/1c2frkd\/enabling_hibernation_on_2404\/?rdt=59532\" target=\"_blank\" rel=\"noopener\">this thread<\/a>, since Ubuntu 24.04, the new method to add hibernate menu option is to create config file under <code>\/etc\/polkit-1\/rules.d\/<\/code> directory.<\/b><\/p>\n<ul>\n<li>First, run command to create a config file:\n<pre>sudo nano \/etc\/polkit-1\/rules.d\/10-enable-hibernate.rules<\/pre>\n<\/li>\n<li>When file opens, paste the lines below and press Ctrl+S to save, finally press Ctrl+X to exit.\n<pre>polkit.addRule(function(action, subject) {\r\n    if (action.id == \"org.freedesktop.login1.hibernate\" ||\r\n        action.id == \"org.freedesktop.login1.hibernate-multiple-sessions\" ||\r\n        action.id == \"org.freedesktop.upower.hibernate\" ||\r\n        action.id == \"org.freedesktop.login1.handle-hibernate-key\" ||\r\n        action.id == \"org.freedesktop.login1.hibernate-ignore-inhibit\")\r\n    {\r\n        return polkit.Result.YES;\r\n    }\r\n});<\/pre>\n<\/li>\n<\/ul>\n<p><b>After doing either option above, your desktop (including MATE, XFCE, KDE, but exclude GNOME) should NOW have the &#8220;Hibernate&#8221; option in shutdown menu!<\/b><\/p>\n<p><b>For GNOME up to v48, the default desktop in Ubuntu 24.04 and earlier, you need to do one more step to make the menu option visible:<\/b><\/p>\n<p>For default GNOME desktop, go to the link button below and install the extension for the menu option:<\/p>\n<div class=\"wp-block-buttons aligncenter\">\n<div class=\"wp-block-button is-style-fill\"><a class=\"wp-block-button__link has-vivid-cyan-blue-to-vivid-purple-gradient-background has-text-color has-background\" href=\"https:\/\/extensions.gnome.org\/extension\/755\/hibernate-status-button\/\" target=\"_blank\" rel=\"noreferrer noopener\">Hibernate Status Button Extension<\/a><\/div>\n<\/div>\n<p>For those first time installing Gnome extension, you need to run command to install &#8220;chrome-gnome-shell&#8221; package first:<\/p>\n<pre>sudo apt install chrome-gnome-shell<\/pre>\n<p>And click the &#8220;<i>click here to install browser extension<\/i>&#8221; link in the extension page and refresh the page if you don&#8217;t see the toggle icon.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/hibernate-extension.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-34473\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/hibernate-extension-600x361.jpg\" alt=\"\" width=\"600\" height=\"361\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/hibernate-extension-600x361.jpg 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/hibernate-extension-300x181.jpg 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/hibernate-extension-768x463.jpg 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/hibernate-extension.jpg 1081w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>Or, search for and install &#8220;<b>Extension Manager<\/b>&#8221; from Ubuntu Software, and use the tool to search and install that extension:<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/install-hibernatestatus-buton.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-43355\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/install-hibernatestatus-buton-600x426.webp\" alt=\"\" width=\"600\" height=\"426\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/install-hibernatestatus-buton-600x426.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/install-hibernatestatus-buton-300x213.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/install-hibernatestatus-buton-768x545.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/08\/install-hibernatestatus-buton.webp 928w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>After installed the extension, go back &#8220;Installed&#8221; tab in Extension Manager window, and click configure the extension for showing\/hiding power-off menu options (May need log out and back in).<\/p>\n<h3>Moreover:<\/h3>\n<p>If everything goes well after this tutorial, you can get more, including <a href=\"https:\/\/ubuntuhandbook.org\/index.php\/2020\/05\/lid-close-behavior-ubuntu-20-04\/\" target=\"_blank\" rel=\"noopener\">hibernate when lid is closed<\/a>, and <a href=\"https:\/\/ubuntuhandbook.org\/index.php\/2021\/06\/automatic-shutdown-hibernate-on-idle-ubuntu\/\" target=\"_blank\" rel=\"noopener\">automatic hibernate on system idle<\/a>.<\/p>\n<h3>Tips:<\/h3>\n<p>For users who upgraded Ubuntu from an old release (e.g, 22.04 -&gt; 24.04, 24.04 -&gt; 24.10), some report that screen turns on automatically 15s after hibernation (See <a href=\"https:\/\/ubuntuhandbook.org\/index.php\/2021\/08\/enable-hibernate-ubuntu-21-10\/#comment-3756834\" target=\"_blank\" rel=\"noopener\">this comment<\/a>). Thanks to @Maarten Vergouwe, try upgrading the latest kernel may fix the issue.<\/p>","protected":false},"excerpt":{"rendered":"<p>Computer hibernate does not work in your Ubuntu? Here&#8217;s step by step complete guide shows how to enable this feature in Ubuntu 26.04, Ubuntu 24.04, or Ubuntu 22.04 LTS. Similar to suspend, hibernate can be used to save your system work. It moves the content from RAM memory into swap area in hard disk, then [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":34463,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[653],"class_list":["post-34462","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","tag-hibernate"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/34462","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/comments?post=34462"}],"version-history":[{"count":0,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/34462\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media\/34463"}],"wp:attachment":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media?parent=34462"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/categories?post=34462"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/tags?post=34462"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}