{"id":2277,"date":"2011-11-02T00:07:25","date_gmt":"2011-11-01T23:07:25","guid":{"rendered":"http:\/\/rephlex.de\/blog\/?p=2277"},"modified":"2013-12-29T14:00:48","modified_gmt":"2013-12-29T13:00:48","slug":"changing-the-critical-battery-power-level-for-system-shutdown-in-ubuntu","status":"publish","type":"post","link":"https:\/\/rephlex.de\/blog\/2011\/11\/02\/changing-the-critical-battery-power-level-for-system-shutdown-in-ubuntu\/","title":{"rendered":"Changing the critical battery power level for system shutdown in Ubuntu"},"content":{"rendered":"<blockquote><p>Tested and working under:<\/p>\n<ul>\n<li>Ubuntu 11.10 (&#8222;Oneiric&#8220;)<\/li>\n<li>Ubuntu 12.04 (&#8222;Precise&#8220;)<\/li>\n<li>Ubuntu 12.10 (&#8222;Quantal&#8220;)<\/li>\n<li>Ubuntu 13.04 (&#8222;Raring&#8220;)<\/li>\n<li>Ubuntu 13.10 (&#8222;Saucy&#8220;)<\/li>\n<\/ul>\n<\/blockquote>\n<p>On my Dell Inspiron i have had the problem of Ubuntu not shutting down the system early enough. As a result, the computer just gets banged off, potentially suffering data loss.<\/p>\n<p>I googled a bit and found some info about changing the &#8222;critical&#8220; and &#8222;action&#8220; thresholds in gconf-editor under &#8222;apps-&gt;gnome-power-manager&#8220;, but the whole gnome-power-manager subtree does not exist in Oneiric anymore.<\/p>\n<p>Instead, you&#8217;ll have to do this via shell, which is less a pain in the ass than it sounds like.<\/p>\n<p>You can list your current settings by typing:<\/p>\n<blockquote><p>user@hostname:~$ gsettings list-recursively org.gnome.settings-daemon.plugins.power<\/p><\/blockquote>\n<p>The output probably includes something like<\/p>\n<blockquote><p>org.gnome.settings-daemon.plugins.power percentage-action 2<br \/>\norg.gnome.settings-daemon.plugins.power percentage-critical 5<br \/>\norg.gnome.settings-daemon.plugins.power percentage-low 10<\/p><\/blockquote>\n<p>This means your system says &#8222;battery low&#8220; at 10 percent, &#8222;battery critical&#8220; at 5 percent, and shutdown &#8222;action&#8220; is taken at 2 percent.<\/p>\n<p>I changed critical to 7 and action to 5 percent, which works just fine. Here&#8217;s the commands to issue:<\/p>\n<blockquote><p>user@hostname:~$ gsettings set org.gnome.settings-daemon.plugins.power percentage-critical 7<br \/>\nuser@hostname:~$ gsettings set org.gnome.settings-daemon.plugins.power percentage-action 5<\/p><\/blockquote>\n<p>I wonder why they removed the settings from gconf-editor in the first place.<\/p>\n<p><strong>Update:<\/strong> Do<\/p>\n<blockquote><p>rephlex@avis:~$ gsettings set org.gnome.settings-daemon.plugins.power use-time-for-policy false<\/p><\/blockquote>\n<p>for the changes to take effect, or else the percentage values we defined will be ignored, and the estimated runtime will be used &#8211; which is not what we want.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Tested and working under: Ubuntu 11.10 (&#8222;Oneiric&#8220;) Ubuntu 12.04 (&#8222;Precise&#8220;) Ubuntu 12.10 (&#8222;Quantal&#8220;) Ubuntu 13.04 (&#8222;Raring&#8220;) Ubuntu 13.10 (&#8222;Saucy&#8220;) On my Dell Inspiron i have had the problem of Ubuntu not shutting down the system early enough. As a result, the computer just gets banged off, potentially suffering data loss. I googled a bit and [&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":[],"class_list":["post-2277","post","type-post","status-publish","format-standard","hentry","category-techtalk"],"_links":{"self":[{"href":"https:\/\/rephlex.de\/blog\/wp-json\/wp\/v2\/posts\/2277","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=2277"}],"version-history":[{"count":7,"href":"https:\/\/rephlex.de\/blog\/wp-json\/wp\/v2\/posts\/2277\/revisions"}],"predecessor-version":[{"id":3204,"href":"https:\/\/rephlex.de\/blog\/wp-json\/wp\/v2\/posts\/2277\/revisions\/3204"}],"wp:attachment":[{"href":"https:\/\/rephlex.de\/blog\/wp-json\/wp\/v2\/media?parent=2277"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rephlex.de\/blog\/wp-json\/wp\/v2\/categories?post=2277"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rephlex.de\/blog\/wp-json\/wp\/v2\/tags?post=2277"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}