{"id":219,"date":"2018-03-31T08:01:15","date_gmt":"2018-03-31T08:01:15","guid":{"rendered":"http:\/\/info.ffteixeira.net\/2018\/03\/31\/maximize-linux-laptops-battery-life\/"},"modified":"2018-03-31T08:01:15","modified_gmt":"2018-03-31T08:01:15","slug":"maximize-linux-laptops-battery-life","status":"publish","type":"post","link":"https:\/\/blog.ffteixeira.net\/?p=219","title":{"rendered":"Maximize Linux Laptop\u2019s Battery Life"},"content":{"rendered":"<h2 style=\"clear: both;font-size: 21px;, sans-serif\">&nbsp;<\/h2>\n<h2 style=\"clear: both;font-size: 21px;, sans-serif\">Check if Your Battery Needs to Be Replaced<\/h2>\n<div><span style=\", sans-serif;font-size: 16px\">For example, on Ubuntu, you can open the Power Statistics application from the Dash. Look at the &ldquo;Laptop battery&rdquo; section. &ldquo;Energy when full&rdquo; is how much power your battery can currently store when it&rsquo;s fully charged. &ldquo;Energy (design)&rdquo; is how much power your battery could originally store when it&rsquo;s fully charged.<\/span><\/div>\n<div>&nbsp;<\/div>\n<div><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2017\/02\/ximg_58b0bd2dcac30.png.pagespeed.gp+jp+jw+pj+ws+js+rj+rp+rw+ri+cp+md.ic.eQnJjJOPot.png\" style=\"width: 350px;height: 245px\" \/><\/div>\n<div>&nbsp;<\/div>\n<div>\n<p style=\"margin-bottom: 1.5em;, sans-serif;font-size: 16px\">Divide &ldquo;Energy when full&rdquo; by &ldquo;Energy (design)&rdquo;, multiple the result by 100, and you&rsquo;ll get a percentage. For example, in the screenshot below, we&rsquo;d do the following math:<\/p>\n<pre style=\"overflow: auto;line-height: 1.1em;margin-top: 0px;margin-bottom: 10px;max-width: 618px;padding: 20px 10px;clear: both;border-width: 1px;border-style: dashed;font-size: 14px !important\">\n(44.8 \/ 54.3) * 100 = 82.5%<\/pre>\n<p style=\"margin-bottom: 1.5em;, sans-serif;font-size: 16px\">This means the battery currently holds 82.5% of its original capacity. That&rsquo;s not too bad. You won&rsquo;t be at 100% unless you just purchased a new laptop. But if it&rsquo;s low&mdash;under 50%, for example&mdash;and you aren&rsquo;t getting much time out of your battery, you may just need to replace the battery.<\/p>\n<p style=\"margin-bottom: 1.5em;, sans-serif;font-size: 16px\">&#8212; OR &#8212;<\/p>\n<p style=\"margin-bottom: 1.5em;, sans-serif;font-size: 16px\">Divide &ldquo;Energy when full&rdquo; by &ldquo;Energy (design)&rdquo;, multiple the result by 100, and you&rsquo;ll get a percentage. For example, in the screenshot below, we&rsquo;d do the following math:<\/p>\n<pre style=\"overflow: auto;line-height: 1.1em;margin-top: 0px;margin-bottom: 10px;max-width: 618px;padding: 20px 10px;clear: both;border-width: 1px;border-style: dashed;font-size: 14px !important\">\n(44.8 \/ 54.3) * 100 = 82.5%<\/pre>\n<p style=\"margin-bottom: 1.5em;, sans-serif;font-size: 16px\">This means the battery currently holds 82.5% of its original capacity. That&rsquo;s not too bad. You won&rsquo;t be at 100% unless you just purchased a new laptop. But if it&rsquo;s low&mdash;under 50%, for example&mdash;and you aren&rsquo;t getting much time out of your battery, you may just need to replace the battery.<\/p>\n<\/div>\n<div>&nbsp;<\/div>\n<div>&nbsp;<\/div>\n<h2 style=\"clear: both;font-size: 21px;, sans-serif\">Advanced Battery-Saving Utilities<\/h2>\n<div>\n<p style=\"margin-bottom: 1.5em;, sans-serif;font-size: 16px\">Intel&rsquo;s open-source&nbsp;<a href=\"https:\/\/software.intel.com\/en-us\/articles\/powertop-primer-1\" style=\"background-color: transparent\">PowerTOP utility<\/a>&nbsp;will examine your system and see how well various power-saving features are enabled, even providing some suggestions for how to reduce your system&rsquo;s power consumption. It&rsquo;s a command-line tool, so you&rsquo;ll need to run it from there. You&rsquo;ll usually find it in your Linux distribution&rsquo;s software repositories.<\/p>\n<p style=\"margin-bottom: 1.5em;, sans-serif;font-size: 16px\">For example, to install and run PowerTOP on Ubuntu, you&rsquo;d open a Terminal window and run the following commands:<\/p>\n<pre style=\"overflow: auto;line-height: 1.1em;margin-top: 0px;margin-bottom: 10px;max-width: 618px;padding: 20px 10px;clear: both;border-width: 1px;border-style: dashed;font-size: 14px !important\">\nsudo apt install powertop\n\nsudo powertop --calibrate<\/pre>\n<div><span style=\"font-family: DroidSans, sans-serif;font-size: 16px;text-align: justify\">Try to write &#039;powertop &#8211;auto-tune&#039; before the exit directive in \/etc\/rc.local. You will need the administrative permission to modify the file (here with GEdit):<\/span><\/div>\n<div><span style=\"font-size: 14px\">sudo apt install powertop<\/span><\/div>\n<pre style=\"margin-top: 0px;margin-bottom: 10px;padding: 20px 10px;border-width: 1px;border-style: dashed;overflow: auto;line-height: 1.1em;max-width: 618px;clear: both;font-size: 14px !important\">\ngksu gedit \/etc\/rc.local<\/pre>\n<p style=\"margin-right: 10px;font-family: DroidSans, sans-serif;font-size: 16px;text-align: justify\">i&#039;ve just edited the file:<\/p>\n<p style=\"margin-right: 10px;font-family: DroidSans, sans-serif;font-size: 16px;text-align: justify\">#!\/bin\/sh -e<br \/>#<br \/># rc.local<br \/>#<br \/># This script is executed at the end of each multiuser runlevel.<br \/># Make sure that the script will &quot;exit 0&quot; on success or any other<br \/># value on error.<br \/>#<br \/># In order to enable or disable this script just change the execution<br \/># bits.<br \/>#<br \/># By default this script does nothing.<br \/>\/usr\/sbin\/powertop &#8211;auto-tune<\/p>\n<p style=\"margin-right: 10px;font-family: DroidSans, sans-serif;font-size: 16px;text-align: justify\">exit 0<\/p>\n<\/div>\n<pre style=\"margin-top: 0px;margin-bottom: 10px;padding: 20px 10px;border-width: 1px;border-style: dashed;overflow: auto;line-height: 1.1em;max-width: 618px;clear: both;font-size: 14px !important\">\nsudo chmod +x \/etc\/rc.local<\/pre>\n<p style=\"margin-bottom: 1.5em;, sans-serif;font-size: 16px\">For example, TLP will more aggressively suspend USB devices, park your hard drive&rsquo;s heads, and throttle your CPU. These may not be ideal tweaks if you already have solid battery life on your Linux laptop, but they may be helpful if you&rsquo;re struggling to squeeze more battery time out of your system.<\/p>\n<pre style=\"overflow: auto;line-height: 1.1em;margin-top: 0px;margin-bottom: 10px;max-width: 618px;padding: 20px 10px;clear: both;border-width: 1px;border-style: dashed;font-size: 14px !important\">\nsudo apt install tlp<\/pre>\n<p style=\"margin-bottom: 1.5em;, sans-serif;font-size: 16px\">You can then restart your system and TLP will automatically start at each boot. To avoid restarting immediately, you can launch it by running:<\/p>\n<pre style=\"overflow: auto;line-height: 1.1em;margin-top: 0px;margin-bottom: 10px;max-width: 618px;padding: 20px 10px;clear: both;border-width: 1px;border-style: dashed;font-size: 14px !important\">\nsudo tlp start<\/pre>\n<p>&nbsp;<\/p>\n<p>Credits<\/p>\n<p><a href=\"https:\/\/www.howtogeek.com\/55185\/how-to-maximize-the-battery-life-on-your-linux-laptop\/\" target=\"_blank\" rel=\"noopener noreferrer\">Link 1<\/a> | <a href=\"https:\/\/trisquel.info\/en\/forum\/setup-powertop-auto-tune-startup\" target=\"_blank\" rel=\"noopener noreferrer\">Link 2<\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; Check if Your Battery Needs to Be Replaced For example, on Ubuntu, you can open the Power Statistics application from the Dash. Look at the &ldquo;Laptop battery&rdquo; section. &ldquo;Energy when full&rdquo; is how much power your battery can currently &hellip; <a href=\"https:\/\/blog.ffteixeira.net\/?p=219\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-219","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=\/wp\/v2\/posts\/219","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=219"}],"version-history":[{"count":0,"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=\/wp\/v2\/posts\/219\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=219"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=219"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=219"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}