{"id":1391,"date":"2022-12-12T21:23:06","date_gmt":"2022-12-12T20:23:06","guid":{"rendered":"http:\/\/www.thelins.se\/johan\/blog\/?p=1391"},"modified":"2022-12-12T21:23:06","modified_gmt":"2022-12-12T20:23:06","slug":"hibernation","status":"publish","type":"post","link":"https:\/\/www.thelins.se\/johan\/blog\/2022\/12\/hibernation\/","title":{"rendered":"Hibernation"},"content":{"rendered":"\n<p>So, another day, another update. Today I managed to get hibernation working on my Dell XPS13 Plus (9320) running Debian.<\/p>\n\n\n\n<p>So, a quick recap. I&#8217;m running Debian testing. I set up the system with <em>Guided &#8211; Use entire disk and Setup LVM<\/em>. This leaves me with an encrypted root partition. What I want to do now, is to put a reasonably sized swap file there, and make the system hibernate to it.<\/p>\n\n\n\n<p>So, first, I created a 35 GB (35840MB) large swapfile as <code>\/swapfile<\/code>. I prefer to create a swapfile slightly larger than RAM, to ensure that everything fits and my machine comes with 32GB of RAM. I used <a href=\"https:\/\/wiki.archlinux.org\/title\/swap#Swap_file\">the instructions in the excellent Arch Wiki<\/a> to set this up. I also edited <code>\/etc\/fstab<\/code>, commenting out the swap partition setup by the installer and adding the swapfile.<\/p>\n\n\n\n<p>Then, I followed <a href=\"https:\/\/wiki.archlinux.org\/title\/Power_management\/Suspend_and_hibernate#Hibernation_into_swap_file\">these instructions<\/a> to find and set the <code>resume<\/code> and <code>resume_offset<\/code> in the <code>\/etc\/defaults\/grub<\/code> file. I changed the <code>GRUB_CMDLINE_LINUX_DEFAULT<\/code> parameter.<\/p>\n\n\n\n<p>A quick reboot followed by a <code>sudo swapon --show<\/code> told me that the swap file was active, so time to hibernate!<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl hibernate<\/code><\/pre>\n\n\n\n<p>This resulted in a lovely <code>Sleep verb \"hibernate\" not supported<\/code> error message in bright red. Lovely.<\/p>\n\n\n\n<p>After some poking around I had a look at dmesg and found a reference to <em>kernel lockdown<\/em>. It turns out that you cannot hibernate if <em>kernel lockdown<\/em> is active. Being more concerned about battery life than some expert hacker stealing my computer and getting to all my data, I decided to try to get rid of it. Turns out that by disabling <em>secure boot<\/em> in BIOS does the trick.<\/p>\n\n\n\n<p>So, now this works. Let&#8217;s see when I can fix the next issue. I&#8217;ve got the <a href=\"https:\/\/www.thelins.se\/johan\/blog\/2022\/12\/debian-on-the-xps13-plus-9320\/\" data-type=\"post\" data-id=\"1387\">audio issue discussed earlier<\/a> and the web cam left to fix.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So, another day, another update. Today I managed to get hibernation working on my Dell XPS13 Plus (9320) running Debian. So, a quick recap. I&#8217;m running Debian testing. I set up the system with Guided &#8211; Use entire disk and Setup LVM. This leaves me with an encrypted root partition. What I want to do &hellip; <a href=\"https:\/\/www.thelins.se\/johan\/blog\/2022\/12\/hibernation\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Hibernation<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22],"tags":[],"class_list":["post-1391","post","type-post","status-publish","format-standard","hentry","category-debian"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.thelins.se\/johan\/blog\/wp-json\/wp\/v2\/posts\/1391","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.thelins.se\/johan\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.thelins.se\/johan\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.thelins.se\/johan\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.thelins.se\/johan\/blog\/wp-json\/wp\/v2\/comments?post=1391"}],"version-history":[{"count":1,"href":"https:\/\/www.thelins.se\/johan\/blog\/wp-json\/wp\/v2\/posts\/1391\/revisions"}],"predecessor-version":[{"id":1392,"href":"https:\/\/www.thelins.se\/johan\/blog\/wp-json\/wp\/v2\/posts\/1391\/revisions\/1392"}],"wp:attachment":[{"href":"https:\/\/www.thelins.se\/johan\/blog\/wp-json\/wp\/v2\/media?parent=1391"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.thelins.se\/johan\/blog\/wp-json\/wp\/v2\/categories?post=1391"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.thelins.se\/johan\/blog\/wp-json\/wp\/v2\/tags?post=1391"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}