{"id":3863,"date":"2018-08-21T07:14:53","date_gmt":"2018-08-21T05:14:53","guid":{"rendered":"https:\/\/rephlex.de\/blog\/?p=3863"},"modified":"2018-10-02T10:57:49","modified_gmt":"2018-10-02T08:57:49","slug":"asus-zenbook-13-ux331un-with-ubuntu-battery-drain-while-in-suspend","status":"publish","type":"post","link":"https:\/\/rephlex.de\/blog\/2018\/08\/21\/asus-zenbook-13-ux331un-with-ubuntu-battery-drain-while-in-suspend\/","title":{"rendered":"Asus ZenBook 13 (UX331UN) with Ubuntu: Battery drain while in suspend"},"content":{"rendered":"\n<p>When i got my shiny new ZenBook 13 UX331UN in July, i immediately wiped it and installed Ubuntu 18.04 (Bionic Beaver).<\/p>\n\n\n\n<p>But I soon realized something was wrong with suspend: The laptop would go to sleep and over night the battery would either almost (10-ish percent) or completely drain, leaving the laptop completely powered off.<\/p>\n\n\n\n<p>On other laptops the suspend state would eat about 5% charge per day, leaving you able to suspend around 3 weeks in theory, but something was using the battery in suspend here.<\/p>\n\n\n\n<p><strong>Here&#8217;s the problem analysis:<\/strong><\/p>\n\n\n\n<p>Suspend your laptop. Wake it up again. Now check the output of<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>sudo journalctl | grep &#8222;PM: suspend&#8220; | tail -2<\/p><\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>May 13 18:41:00 mex kernel: PM: suspend entry (s2idle)<br\/>May 13 20:52:36 mex kernel: PM: suspend exit<\/p><\/blockquote>\n\n\n\n<p>If you end up with\u00a0<\/p>\n\n\n\n<p>Your laptop is only entering &#8222;s2idle&#8220; sleep (which is basicallynot saving much more than with blanking out screen and disabling the network). What we really want instead is the &#8222;deep&#8220; sleep.<\/p>\n\n\n\n<p>You can also check<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>cat \/sys\/power\/mem_sleep<\/p><\/blockquote>\n\n\n\n<p>which yields<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>[ s2idle] deep<\/p><\/blockquote>\n\n\n\n<p>meaning the s2idle state is active in standby, because it&#8217;s written in brackets.<\/p>\n\n\n\n<p><strong>The permanent fix:<\/strong><\/p>\n\n\n\n<p>Edit your grub bootloader config to add a parameter to your Linux kernel when it boots. Type<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>sudo gedit \/etc\/default\/grub<\/p><\/blockquote>\n\n\n\n<p>and replace the line\u00a0GRUB_CMDLINE_LINUX_DEFAULT=&#8220;quiet splash&#8220; with<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>GRUB_CMDLINE_LINUX_DEFAULT=&#8220;quiet splash mem_sleep_default=deep&#8220;<\/p><\/blockquote>\n\n\n\n<p>Save the file and exit. Now run<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>sudo update-grub &amp;&amp; sudo reboot<\/p><\/blockquote>\n\n\n\n<p>To apply the changes and reboot. Test. Done.<\/p>\n\n\n\n<p><strong>IMPORTANT:<\/strong> If you now have troble waking your laptop up, <strong>DO NOT USE THE NVIDIA DRIVERS<\/strong>. They suck. Use noveau.<\/p>\n\n\n\n<p class=\"has-background has-very-light-gray-color has-luminous-vivid-orange-background-color\">EDIT: The above works and is tested, but i now have the problem that the laptop won&#8217;t resume when on battery. When it&#8217;s on power supply it can resume. Any ideas!?<\/p>\n\n\n\n<p class=\"has-background has-very-light-gray-color has-luminous-vivid-orange-background-color\">EDIT: You&#8217;re\u00a0 not alone:\u00a0<a href=\"https:\/\/bugzilla.kernel.org\/show_bug.cgi?id=201307\">https:\/\/bugzilla.kernel.org\/show_bug.cgi?id=201307<\/a> and\u00a0<a href=\"https:\/\/askubuntu.com\/questions\/1071855\/ubuntu-18-04-does-not-wake-up-from-suspend-on-asus-zenbook\">https:\/\/askubuntu.com\/questions\/1071855\/ubuntu-18-04-does-not-wake-up-from-suspend-on-asus-zenbook<\/a><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When i got my shiny new ZenBook 13 UX331UN in July, i immediately wiped it and installed Ubuntu 18.04 (Bionic Beaver). But I soon realized something was wrong with suspend: The laptop would go to sleep and over night the battery would either almost (10-ish percent) or completely drain, leaving the laptop completely powered off. [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[4],"tags":[543,547,548,546,541,367,542,47,545,544],"class_list":["post-3863","post","type-post","status-publish","format-standard","hentry","category-techtalk","tag-asus","tag-battery","tag-drain","tag-laptop","tag-noveau","tag-power","tag-suspend","tag-ubuntu","tag-ux331un","tag-zenbook"],"_links":{"self":[{"href":"https:\/\/rephlex.de\/blog\/wp-json\/wp\/v2\/posts\/3863","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rephlex.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rephlex.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rephlex.de\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/rephlex.de\/blog\/wp-json\/wp\/v2\/comments?post=3863"}],"version-history":[{"count":6,"href":"https:\/\/rephlex.de\/blog\/wp-json\/wp\/v2\/posts\/3863\/revisions"}],"predecessor-version":[{"id":3905,"href":"https:\/\/rephlex.de\/blog\/wp-json\/wp\/v2\/posts\/3863\/revisions\/3905"}],"wp:attachment":[{"href":"https:\/\/rephlex.de\/blog\/wp-json\/wp\/v2\/media?parent=3863"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rephlex.de\/blog\/wp-json\/wp\/v2\/categories?post=3863"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rephlex.de\/blog\/wp-json\/wp\/v2\/tags?post=3863"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}