{"id":291,"date":"2018-06-23T16:55:11","date_gmt":"2018-06-23T15:55:11","guid":{"rendered":"http:\/\/www.dbonline.se\/?p=291"},"modified":"2018-06-23T17:09:48","modified_gmt":"2018-06-23T16:09:48","slug":"enabling-hibernation-on-lubuntu","status":"publish","type":"post","link":"https:\/\/www.dbonline.se\/index.php\/2018\/06\/23\/enabling-hibernation-on-lubuntu\/","title":{"rendered":"Enabling hibernation on Lubuntu"},"content":{"rendered":"<p>This is a simple guide to enable hibernation on Lubuntu.<br \/>\nIt took me eight hours to fix, hopefully it wont take you this long.<\/p>\n<ol>\n<li>Make sure you have a swap partition! NOTE SWAP PARTITION it&#8217;s much simpler.<br \/>\nThere are multiple guides online to setup the swap area,<br \/>\nsee this as an example: <a href=\"https:\/\/help.ubuntu.com\/community\/SwapFaq\" rel=\"nofollow noopener\" target=\"_blank\">https:\/\/help.ubuntu.com\/community\/SwapFaq<\/a><\/li>\n<li>Enable the hibernate buttons by editing this file:<br \/>\n<em>sudo nano \/var\/lib\/polkit-1\/localauthority\/10-vendor.d\/com.ubuntu.desktop.pkla<\/em>[Disable hibernate by default in upower]<br \/>\nIdentity=unix-user:*<br \/>\nAction=org.freedesktop.upower.hibernate<br \/>\nResultActive=no[Disable hibernate by default in logind]<br \/>\nIdentity=unix-user:*<br \/>\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<br \/>\nResultActive=noto &#8221;yes&#8221;<\/li>\n<li>We will be using s2disk for our hibernation, install it with he following command:\n<div class=\"crayon-pre\">\n<div id=\"crayon-5b2db67c2824d630320872-1\" class=\"crayon-line\"><em><span class=\"crayon-v\">apt<\/span><span class=\"crayon-o\">&#8211;<\/span><span class=\"crayon-r\">get<\/span> <span class=\"crayon-e\">install <\/span><span class=\"crayon-v\">uswsusp<\/span><\/em><\/div>\n<div>\n<p>If the configuration wizard doesn&#8217;t start automatically type:<br \/>\n<span class=\"crayon-v\"><em>sudo dpkg-reconfigure uswsusp<\/em><br \/>\n<\/span><\/p>\n<\/div>\n<\/div>\n<\/li>\n<li>\n<div class=\"crayon-pre\">\n<div>Now we need to tell the system to use s2disk so do the following:<\/div>\n<div id=\"crayon-5b2db67c28291701450978-1\">cp \/lib\/systemd\/system\/systemd-hibernate.service \/etc\/systemd\/system\/<\/div>\n<div id=\"crayon-5b2db67c28291701450978-2\">cp \/lib\/systemd\/system\/systemd-hybrid-sleep.service \/etc\/systemd\/system\/<\/div>\n<div>\n<p>And edit the <em><span id=\"crayon-5b2db67c28296006727700\">\/etc\/systemd\/system\/systemd-hibernate.service<\/span><\/em><\/p>\n<div>\n<div id=\"crayon-5b2db67c282a1624680870-1\">[Service]<\/div>\n<div id=\"crayon-5b2db67c282a1624680870-2\">Type=oneshot<\/div>\n<div id=\"crayon-5b2db67c282a1624680870-3\">ExecStart=\/bin\/bash \/opt\/sleepscripts\/s2disk.sh<\/div>\n<\/div>\n<\/div>\n<div><\/div>\n<div>And <em><span id=\"crayon-5b2db67c282a6503485443\">\/etc\/systemd\/system\/systemd-hybrid-sleep.service<\/span><\/em><\/div>\n<\/div>\n<div>\n<div>\n<div><\/div>\n<div id=\"crayon-5b2db67c282ab444039233-1\">[Service]<\/div>\n<div id=\"crayon-5b2db67c282ab444039233-2\">Type=oneshot<\/div>\n<div id=\"crayon-5b2db67c282ab444039233-3\">ExecStart=\/bin\/bash \/opt\/sleepscripts\/s2both.sh<\/div>\n<\/div>\n<\/div>\n<div><\/div>\n<\/li>\n<li>Restart, and it should work<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>This is a simple guide to enable hibernation on Lubuntu. It took me eight hours to fix, hopefully it wont take you this long. Make sure you have a swap partition! NOTE SWAP PARTITION it&#8217;s much simpler. There are multiple<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"enabled":false},"version":2}},"categories":[4],"tags":[],"class_list":["post-291","post","type-post","status-publish","format-standard","hentry","category-it"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8vDvB-4H","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.dbonline.se\/index.php\/wp-json\/wp\/v2\/posts\/291","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbonline.se\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbonline.se\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbonline.se\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbonline.se\/index.php\/wp-json\/wp\/v2\/comments?post=291"}],"version-history":[{"count":12,"href":"https:\/\/www.dbonline.se\/index.php\/wp-json\/wp\/v2\/posts\/291\/revisions"}],"predecessor-version":[{"id":304,"href":"https:\/\/www.dbonline.se\/index.php\/wp-json\/wp\/v2\/posts\/291\/revisions\/304"}],"wp:attachment":[{"href":"https:\/\/www.dbonline.se\/index.php\/wp-json\/wp\/v2\/media?parent=291"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbonline.se\/index.php\/wp-json\/wp\/v2\/categories?post=291"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbonline.se\/index.php\/wp-json\/wp\/v2\/tags?post=291"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}