-
Notifications
You must be signed in to change notification settings - Fork 2
/
how-to-increase-the-battery-life-of-your-laptop-netbook.html
351 lines (333 loc) · 22.4 KB
/
how-to-increase-the-battery-life-of-your-laptop-netbook.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="Salih Emin" />
<meta name="copyright" content="Salih Emin" />
<meta name="description" content="Trying to increase the battery life on your laptop is actually more easy than it sounds. Here is how you can get the most out of your laptop battery
" />
<meta property="og:type" content="article" />
<meta name="twitter:card" content="summary">
<meta name="keywords" content="battery, laptop, Laptop Mode Tools, Hardware, " />
<meta property="og:title" content="How to increase the battery life of your laptop - netbook "/>
<meta property="og:url" content="http://utappia.org/how-to-increase-the-battery-life-of-your-laptop-netbook.html" />
<meta property="og:description" content="Trying to increase the battery life on your laptop is actually more easy than it sounds. Here is how you can get the most out of your laptop battery" />
<meta property="og:site_name" content="Utappia" />
<meta property="og:article:author" content="Salih Emin" />
<meta property="og:article:published_time" content="2012-10-09T00:36:00+03:00" />
<meta name="twitter:title" content="How to increase the battery life of your laptop - netbook ">
<meta name="twitter:description" content="Trying to increase the battery life on your laptop is actually more easy than it sounds. Here is how you can get the most out of your laptop battery">
<title>How to increase the battery life of your laptop - netbook · Utappia
</title>
<!-- <link rel="stylesheet" type="text/css" href="http://utappia.org/theme/css/bootstrap-combined.min.css" media="screen">-->
<!-- <link rel="stylesheet" type="text/css" href="http://utappia.org/theme/css/font-awesome.css" media="screen"> -->
<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css" rel="stylesheet">
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.1/css/font-awesome.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="http://utappia.org/theme/css/pygments.css" media="screen">
<link rel="stylesheet" type="text/css" href="http://utappia.org/theme/tipuesearch/tipuesearch.css" media="screen">
<link rel="stylesheet" type="text/css" href="http://utappia.org/theme/css/elegant.css" media="screen">
<link rel="stylesheet" type="text/css" href="http://utappia.org/theme/css/custom.css" media="screen">
<link href="http://utappia.org/feeds/all.rss.xml" type="application/atom+xml" rel="alternate" title="Utappia - Full Atom Feed" />
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-62475496-1', 'auto');
ga('send', 'pageview');
</script>
</head>
<body>
<div id="content-sans-footer">
<div class="navbar navbar-static-top">
<div class="navbar-inner">
<div class="container-fluid">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="http://utappia.org/"><span class=site-name>Utappia</span></a>
<div class="nav-collapse collapse">
<ul class="nav pull-right top-menu">
<li ><a href="http://utappia.org">Home</a></li>
<li ><a href="http://utappia.org/pages/downloads.html">Downloads</a></li>
<li ><a href="http://utappia.org/pages/feedback.html">Feedback</a></li>
<li ><a href="http://utappia.org/categories.html">Categories</a></li>
<li ><a href="http://utappia.org/tags.html">Tags</a></li>
<li ><a href="http://utappia.org/archives.html">Archives</a></li>
<li><form class="navbar-search" action="http://utappia.org/search.html" onsubmit="return validateForm(this.elements['q'].value);"> <input type="text" class="search-query" placeholder="Search" name="q" id="tipue_search_input"></form></li>
</ul>
</div>
</div>
</div>
</div>
<div class="container-fluid">
<div class="row-fluid">
<div class="span1"></div>
<div class="span10">
<article>
<div class="row-fluid">
<header class="page-header span10 offset2">
<h1><a href="http://utappia.org/how-to-increase-the-battery-life-of-your-laptop-netbook.html"> How to increase the battery life of your laptop - netbook </a></h1>
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- Front page -->
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-1644909386979397"
data-ad-slot="1718239665"
data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</header>
</div>
<div class="row-fluid">
<div class="span2 table-of-content">
<nav>
<h4>Contents</h4>
<div class="toc">
<ul>
<li><a href="#abstract">Abstract</a></li>
<li><a href="#introduction">Introduction</a></li>
<li><a href="#increase-the-battery-life-with-laptop-mode-tools">Increase the battery life with Laptop Mode Tools</a><ul>
<li><a href="#how-to-install-laptop-mode-tools">How to install Laptop Mode Tools</a></li>
<li><a href="#tweak-laptop-mode-tools">Tweak Laptop Mode Tools</a></li>
</ul>
</li>
<li><a href="#results-and-discussion">Results and discussion</a></li>
<li><a href="#references">References</a></li>
</ul>
</div>
</nav>
</div>
<div class="span8 article-content">
<p><img alt="How to increase the battery life of your laptop" src="/images/increase-battery-life-ubuntu.jpg" style="width: 600px; height: auto;" title="How to increase the battery life of your laptop"/></p>
<h1 id="abstract">Abstract</h1>
<p>Battery life on laptops and thus power saving is crucial for laptop users. Linux users have the benefit of the tools that are provided by the community so the they can get the most out of the "battery juice".</p>
<h1 id="introduction">Introduction</h1>
<p>Three of the most power consumption monsters in a Laptop is the <strong>Graphics Card</strong>, <strong>Hard Disk</strong> and the <strong>CPU</strong>. Nowadays most of the latest CPUS's have Dynamic CPU frequency scaling (also known as CPU throttling) which is a technique in computer architecture where a processor is run at a less-than-maximum frequency in order to conserve power. Linux Kernel utilize this feature by automatically enabling the
so-called Governance (Performance, On-Demand, Conservative, Power-save) For example if you manually set the <strong>Power-save state</strong> (with CPUfrequtils), you "tell your kernel" to try to increase the battery life of your laptop.</p>
<p>The next too parts (Graphics Card, Hard Disk) have also a Power Saving modes but they are not always utilized well by the Linux Kernel. Personally, the one that I find most annoying when I use my laptop is that the Hard Disk never spins down to conserve power and therefore it decreases the battery life of my laptop.</p>
<h1 id="increase-the-battery-life-with-laptop-mode-tools">Increase the battery life with Laptop Mode Tools</h1>
<p><strong>Laptop Mode Tools</strong> is a laptop power saving package for Linux systems. It allows you to increase the battery life of your laptop, in several ways. It is the primary way to enable the Laptop Mode feature of the Linux kernel, which lets your <em>hard drive spin down</em>. In addition, it allows you to tweak a number of other <em>power-related settings</em> using a simple configuration file.</p>
<h2 id="how-to-install-laptop-mode-tools">How to install Laptop Mode Tools</h2>
<p>According to its developer you should use the latest Debian package which is compatible with Ubuntu because the one that ships on Ubuntu Software Center is crippled so that some options don't work, the most notable of which are</p>
<ul>
<li>ENABLE_LAPTOP_MODE_ON_AC</li>
<li>ENABLE_LAPTOP_MODE_WHEN_LID_CLOSED</li>
<li>DISABLE_LAPTOP_MODE_ON_CRITICAL_BATTERY_LEVEL</li>
</ul>
<p>Supported 2.6.6+ Linux Kernel</p>
<blockquote>
<p><a href="http://packages.debian.org/sid/all/laptop-mode-tools/download"><em>Mirrors of the latest
version</em></a></p>
</blockquote>
<p>After you have downloaded the package, double-click and install it. Once installed you don't need to do anything ! If everything went OK, laptop mode will be activated automatically the next time you unplug your laptop from the mains.</p>
<h2 id="tweak-laptop-mode-tools">Tweak Laptop Mode Tools</h2>
<p>If you are curious about the options available for Laptop mode Tools (I bet you are !) you can make some minor changes to its configuration file to make it correspond to your personal needs.</p>
<ol>
<li>Open as administrator/root/sudo the file at
<strong>/etc/laptop-mode/laptop-mode.conf</strong></li>
<li>Read carefully the available options and only make changes to the
one that you are sure about</li>
<li>Save it and close it!</li>
<li>You are done</li>
</ol>
<h1 id="results-and-discussion">Results and discussion</h1>
<p>For reference here are my changes :</p>
<div class="highlight"><pre>#
# The drives that laptop mode controls.
# Separate them by a space, e.g. HD="/dev/hda /dev/hdb". The default is a wildcard, which will get you all your IDE and SCSI/SATA drives.
#
HD="/dev/sda"
#
# The partitions (or mount points) that laptop mode controls.
# Separate the values by spaces. Use "auto" to indicate all partitions on drives
# listed in HD. You can add things to "auto", e.g. "auto /dev/hdc3". You can also specify mount points, e.g. "/mnt/data".
#
PARTITIONS="auto /dev/sda\*"
........
#
# Read-ahead, in kilobytes. You can spin down the disk while playing MP3/OGG
# by setting the disk readahead to a reasonable size, e.g. 3072 (3 MB).
# Effectively, the disk will read a complete MP3 at once, and will then spin down while the MP3/OGG is playing. Don't set this too high, because the readahead is applied to _all_ files that are read from disk.
#
LM_READAHEAD=6072
NOLM_READAHEAD=128
</pre></div>
<p>Also, it is valuable to read the Frequently Asked Questions about <strong>Laptop Mode Tool</strong>, so please read some ports that I thought are important and if you have more I include the link for more information</p>
<p><strong>How do I check if laptop mode is enabled?</strong></p>
<p>Execute cat /proc/sys/vm/laptop_mode. If it contains a nonzero value, then laptop mode is enabled, if it says 0, then it isn't.</p>
<p><strong>I have a solid-state disk (SSD) in my machine. Should I enable any of the disk-related parts of laptop-mode-tools, or are they irrelevant?</strong></p>
<p>They may be relevant, because (a) laptop mode will reduce the number of writes, which improves the lifetime of an SSD, and (b) laptop mode makes writes bursty, which enables power saving mechanisms like ALPM to kick in. However, your mileage may vary depending on the specific hardware involved. For some hardware you will get no gain at all, for some the gain may be substantial.</p>
<p><strong>Spinning down too many times may kill hard drives</strong></p>
<p>Desktop hard drives are usually rated for only 40,000-50,000 spinups, and one spinup every 10 minutes will kill your 40,000-spinup HD in 277 days. So this is NOT recommended for server use, unless you increase the spinup interval dramatically, to say once every hour or two. Laptop hard
drives are usually rated for around 300,000 spinups, so those will last about 2083 days or 6 years if you have them powered on 24-7.</p>
<p><strong>I have an SATA disk and it doesn't work.</strong></p>
<p>Spindown timeouts don't currently work on SATA drives, because the Linux kernel does not support that properly. There are patches available that add this support. Check out http://www.thinkwiki.org/wiki/Problems_with_SATA_and_Linux for all SATA-on-Linux problems. For laptop mode to work, you want the libata_passthru patch. It will be included in the Linux kernel starting from version 2.6.15. Note: You also need a recent version of hdparm in order to make this work!</p>
<p><strong>If my machine crashes or runs out of power, will I lose all my work?</strong></p>
<p>If you have laptop mode enabled and your machine crashes, then you will lose up to MAX_LOST_WORK_SECONDS seconds of work. If you really need to have something written to disk, issue the "sync" command. If you have laptop mode enabled and your machine runs out of power, you will not lose as much work (provided you have an ACPI laptop, as most current PC laptops are) because laptop mode is automatically disabled when the battery almost runs out. </p>
<p><strong>What is the relationship between Laptop Mode Tools and the script in the kernel documentation?</strong></p>
<p>Laptop Mode Tools is a fork of the script in the kernel documentation.
The script in the kernel documentation is currently pretty much unmaintained AFAIK, so I don't recommend using it.</p>
<p><strong>I set PARTITIONS and now it doesn't work anymore at all.</strong></p>
<p>You have to include the default partitions (the partitions of the drives listed in the HD configuration setting) as well. In version 1.06 and higher you can use the "auto" keyword to indicate "and remount all of the default ones as well". "Default" here means "partitions that contain the device name of a hard drive in HD", i.e. if your partition is /dev/hda3 and you have HD=/dev/hda, then /dev/hda3 is part of the
default partitions, but if it is aptly named /dev/hdx7 then it isn't. :)</p>
<p><strong>I set REMOUNT_PARTITIONS to "/ /mnt /usr" and it doesn't work.</strong></p>
<p>You have to include the partitions' devices, not their mount points. So you should list things like "/dev/hda2 /dev/hdb1". If you're using version 1.06 or higher than you don't have this problem, as this version supports mount points as well as device names in REMOUNT_PARTITIONS (or PARTITIONS, as it's called in the new config file format introduced in version 1.07). </p>
<h1 id="references">References</h1>
<ol>
<li>Laptop Mode Tools: <a href="http://samwel.tk/laptop_mode/faq">FAQ</a></li>
<li>Arch Wiki : <a href="https://wiki.archlinux.org/index.php/Laptop_Mode_Tools">laptop-mode-tools</a></li>
</ol>
<section>
<p id="post-share-links">
Share on:
<a href="http://twitter.com/home?status=How%20to%20increase%20the%20battery%20life%20of%20your%20laptop%20-%20netbook%20http%3A//utappia.org/how-to-increase-the-battery-life-of-your-laptop-netbook.html" target="_blank" title="Share on Twitter">Twitter</a>
❄
<a href="http://www.facebook.com/sharer/sharer.php?s=100&p%5Burl%5D=http%3A//utappia.org/how-to-increase-the-battery-life-of-your-laptop-netbook.html" target="_blank" title="Share on Facebook">Facebook</a>
❄
<a href="https://plus.google.com/share?url=http%3A//utappia.org/how-to-increase-the-battery-life-of-your-laptop-netbook.html" target="_blank" title="Share on Google Plus">Google+</a>
❄
<a href="mailto:?subject=How%20to%20increase%20the%20battery%20life%20of%20your%20laptop%20-%20netbook&body=http%3A//utappia.org/how-to-increase-the-battery-life-of-your-laptop-netbook.html" target="_blank" title="Share via Email">Email</a>
</p>
</section>
<section>
<p id="comment-message">So what do you think? Did I miss something? Is any part unclear? Please leave your comments below </p>
<div class="accordion" id="accordion2">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle disqus-comment-count" data-toggle="collapse" data-parent="#accordion2"
href="http://utappia.org/how-to-increase-the-battery-life-of-your-laptop-netbook.html#disqus_thread">
Comments
</a>
</div>
<div id="disqus_thread" class="accordion-body collapse">
<div class="accordion-inner">
<div class="comments">
<div id="disqus_thread"></div>
<script type="text/javascript">
var disqus_shortname = 'utappia';
var disqus_identifier = 'http://utappia.org/how-to-increase-the-battery-life-of-your-laptop-netbook.html';
var disqus_url = 'http://utappia.org/how-to-increase-the-battery-life-of-your-laptop-netbook.html';
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
</div>
</div>
</div>
</div>
</section>
<hr/>
</div>
<section>
<div class="span2" style="float:right;font-size:0.9em;">
<h4>Published</h4>
<time pubdate="pubdate" datetime="2012-10-09T00:36:00+03:00">Oct 9, 2012</time>
<h4>Category</h4>
<a class="category-link" href="http://utappia.org/categories.html#hardware-ref">Hardware</a>
<h4>Tags</h4>
<ul class="list-of-tags tags-in-article">
<li><a href="http://utappia.org/tags.html#battery-ref">battery
<span>1</span>
</a></li>
<li><a href="http://utappia.org/tags.html#laptop-ref">laptop
<span>1</span>
</a></li>
<li><a href="http://utappia.org/tags.html#laptop-mode-tools-ref">Laptop Mode Tools
<span>1</span>
</a></li>
</ul>
<h4>Contact</h4>
<a href="https://plus.google.com/+Salihemin" title="My Google-Plus Profile" class="sidebar-social-links" target="_blank">
<i class="fa fa-google-plus sidebar-social-links"></i></a>
<a href="https://twitter.com/cerebrux" title="My Twitter Profile" class="sidebar-social-links" target="_blank">
<i class="fa fa-twitter sidebar-social-links"></i></a>
<a href="https://github.com/cerebrux" title="My Github Profile" class="sidebar-social-links" target="_blank">
<i class="fa fa-github sidebar-social-links"></i></a>
<a href="https://www.linkedin.com/in/salihemin" title="My linkedin Profile" class="sidebar-social-links" target="_blank">
<i class="fa fa-linkedin sidebar-social-links"></i></a>
<!-- Begin MailChimp Signup Form -->
<div id="mc-embed-signup">
<form action="http://utappia.us10.list-manage.com/subscribe/post?u=43b8fcc4811e0e42e65177af1&id=5759f75729" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
<h4>Get Notified</h4>
<input type="email" value="" name="EMAIL" class="email" id="mce-EMAIL" placeholder="your email" required>
<div class="clear"><input type="submit" value="click to subscribe" name="subscribe" id="mc-embedded-subscribe" class="button"></div>
</form>
</div>
<!--End mc_embed_signup-->
</div>
</section>
</div>
</article>
</div>
<div class="span1"></div>
</div>
</div>
<div id="push"></div>
</div>
<footer>
<div id="footer">
<ul class="footer-content">
<li class="elegant-license"><a rel="license" target="_blank" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="/images/cc4.png" /></a><br /><span xmlns:dct="http://purl.org/dc/terms/" href="http://purl.org/dc/dcmitype/Text" property="dct:title" rel="dct:type">Utappia.org website</span> by <span xmlns:cc="http://creativecommons.org/ns#" property="cc:attributionName"><a href="https://www.linkedin.com/in/salihemin" target="_blank">Salih Emin</a></span> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"target="_blank">Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License</a>.</li>
<li class="elegant-power">Powered by <a href="http://getpelican.com/" title="Pelican Home Page">Pelican</a>. Theme: <a href="http://oncrashreboot.com/pelican-elegant" title="Theme Elegant Home Page">Elegant</a> by <a href="http://oncrashreboot.com" title="Talha Mansoor Home Page">Talha Mansoor</a></li>
</ul>
</div>
</footer> <script src="http://code.jquery.com/jquery.min.js"></script>
<script src="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script>
function validateForm(query)
{
return (query.length > 0);
}
</script>
<script type="text/javascript">
var disqus_shortname = 'utappia';
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>
<script language="javascript" type="text/javascript">
function uncollapse() {
if (window.location.hash.match(/^#comment-\d+$/)) {
$('#disqus_thread').collapse('show');
}
}
</script>
<script type="text/javascript" language="JavaScript">
uncollapse();
window.onhashchange=function(){
if (window.location.hash.match(/^#comment-\d+$/))
window.location.reload(true);
}
</script>
<script>
$('#disqus_thread').on('shown', function () {
var link = document.getElementsByClassName('accordion-toggle');
var old_innerHTML = link[0].innerHTML;
$(link[0]).fadeOut(500, function() {
$(this).text('Click here to hide comments').fadeIn(500);
});
$('#disqus_thread').on('hidden', function () {
$(link[0]).fadeOut(500, function() {
$(this).text(old_innerHTML).fadeIn(500);
});
})
})
</script>
</body>
<!-- Theme: Elegant built for Pelican
License : http://oncrashreboot.com/pelican-elegant -->
</html>