tag:blogger.com,1999:blog-21248318507934354112024-03-05T23:59:08.694+00:00Linux Tipps, Fixes & MoreYour Linux Self-Help Desk. A selection of mostly Linux related tutorials, howtos, fixes, news and more.Unknownnoreply@blogger.comBlogger26125tag:blogger.com,1999:blog-2124831850793435411.post-44091267678055380992013-05-09T19:06:00.000+01:002013-05-09T19:06:26.453+01:00Small Bash Power Usage MonitorWhile I'm about releasing power scripts, I've quickly written this script to monitor power usage on various Linux systems. It needs bash and sysfs. It can use bc and gnuplot for more comfort.<br>
<a href="http://linux-tipps.blogspot.com/2013/05/while-im-about-releasing-power-scripts.html#more">Read more »</a><div class="blogger-post-footer">(...)
-- Click to read the entire post.</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2124831850793435411.post-22809862381901697822013-05-09T18:27:00.004+01:002013-05-09T18:59:44.336+01:00Automatically Resume from Suspend to Ram and Suspend to Disk to Save Battery in LinuxSuspending to RAM is allows the system to quickly wake up. But Suspend to Disk allows the system to completely power off, saving more power. That's why I've written a small script for modern Linux systems, which wakes up the system from S3 (memory sleep) and puts it into S5 (hibernation) mode. Also, it prevents you from losing data, because eventually your system's battery will run out.<br>
<a href="http://linux-tipps.blogspot.com/2013/05/automatically-resume-from-suspend-to.html#more">Read more »</a><div class="blogger-post-footer">(...)
-- Click to read the entire post.</div>Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-2124831850793435411.post-76603351181397132912011-08-24T16:59:00.001+01:002011-08-24T16:59:45.749+01:00Tips for saving power on Intel Notebooks with i915 driverPhoronix published some <a href="http://www.phoronix.com/scan.php?page=article&item=intel_i915_power&num=1"> intel laptop linux power saving tips</a> you might want to read: i915.i915_enable_rc6=1 i915.i915_enable_fbc=1 and i915.lvds_downclock=1<div class="blogger-post-footer">(...)
-- Click to read the entire post.</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2124831850793435411.post-38351621704302142822011-05-15T20:52:00.007+01:002011-05-17T16:06:18.025+01:00Logging and Graphing Power Consumption of Embedded Linux Systems -- Busybox and GnuPlot analyzing the Kindle 3<div class="separator" style="clear: both; text-align: justify;">Actually this should've been really easy. A small script loop on the kindle to log the battery consumption and then plug that data into gnuplot. But it turned out gnuplot afaik doesn't support to output the difference between values. Thanks to apo_ from #gnuplot I've got it running with the help of awk now. The great thing is that this script runs in busybox and can hence easily be adapted for pretty much any kind of portable devices including Android phones, Kindles, Tablets, Notebooks, Netbooks, etc. And that's how it looks.</div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvtGX7x78WYVnmy5Z7USaA98k6mOFUTDknDq45OPWKYwE0H58IDrCVkMSuSJ_BKuMjr-0IP2kgLP3dJAZAfm0d2WqlE9g1Qnb2GtUqA7PesgJpDNEncRLF1tY-IgEpEzwifS7zH4Rvkro/s1600/gnuplot_kindle.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="263" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvtGX7x78WYVnmy5Z7USaA98k6mOFUTDknDq45OPWKYwE0H58IDrCVkMSuSJ_BKuMjr-0IP2kgLP3dJAZAfm0d2WqlE9g1Qnb2GtUqA7PesgJpDNEncRLF1tY-IgEpEzwifS7zH4Rvkro/s400/gnuplot_kindle.png" width="400"></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b>Kindle 3 Battery Consumption</b><br>
Measurement points are marked with an x.</td></tr>
</tbody></table><br>
<div class="separator" style="clear: both; text-align: center;"></div><a href="http://linux-tipps.blogspot.com/2011/05/graphing-power-management-statistics.html#more">Read more »</a><div class="blogger-post-footer">(...)
-- Click to read the entire post.</div>Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-2124831850793435411.post-27331732626805357922011-05-15T10:21:00.000+01:002011-05-15T10:21:19.209+01:00Charging Devices During Suspend Using your Notebook's USB Port with LinuxYou probably have done this before: Plug your phone or mp3 into your Notebook's USB port to charge it. E.g. the Kindle usually only comes with a USB cable and no seperate charger. Did you know you can do this even when your system is in standby mode? I will show you how - without the need to modify anything but software!<br>
<br>
<a href="http://linux-tipps.blogspot.com/2011/05/charging-devices-during-suspend-using.html#more">Read more »</a><div class="blogger-post-footer">(...)
-- Click to read the entire post.</div>Unknownnoreply@blogger.com6tag:blogger.com,1999:blog-2124831850793435411.post-58453925375191892432011-05-05T08:36:00.003+01:002011-05-05T08:46:18.752+01:00Minimal Powertop as Bash Script esp. for Embedded EnvironmentsI wrote this for my kindle and android devices. It's a nice, easy script though and should be great especially for embedded environments, where you have a shell but not all of the powertop dependencies. It works wonderfully on my notebook and netbook, but you may have to slightly adjust the path names to work on your system.<br>
<br>
It turns out that this wasn't needed for either, as the kindle comes with powertop preinstalled. But it can't work on either of my devices, as timer_stats are disabled in their kernels.<br>
I do wonder: Why do they disable the timer_stats? Is the overhead of timer_stats too high? Let me know how you use it!<br>
<a href="http://linux-tipps.blogspot.com/2011/05/minimal-powertop-as-bash-script-esp-for.html#more">Read more »</a><div class="blogger-post-footer">(...)
-- Click to read the entire post.</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2124831850793435411.post-22076644576126517832011-04-22T14:47:00.003+01:002011-05-03T06:18:09.349+01:00Is the Linux Desktop getting slower and more bloated?In his <a href="http://kmandla.wordpress.com/2011/04/22/a-failure-of-logic/#comment-49027">"failure of logic"</a> post "K. Mandla" writes that the Linux Desktop is not getting faster even though all the hardware around it is getting faster, pointing to an <a href="http://www.linuxjournal.com/article/5818">article with the same argument</a> 10 years ago. The ensueing discussion was much too abstract for my taste. ("Why are clouds?" "What clouds, where?") But if you split up the question you get answers:<br>
<br>
<a href="http://linux-tipps.blogspot.com/2011/04/is-linux-desktop-getting-slower-and.html#more">Read more »</a><div class="blogger-post-footer">(...)
-- Click to read the entire post.</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2124831850793435411.post-39530544641219120342011-04-16T16:51:00.016+01:002011-05-15T08:12:19.368+01:000.4 Watt Less During Audio Playback - (Updated:) Power Performance: Pulseaudio + Interrupt-Less Alsa(<a href="http://linux-tipps.blogspot.com/2011/04/power-performance-of-pulseaudio-alsa.html#update">Skip to the update</a>)<br>
Ok, so with some help from Pierre-Louis from Intel I've managed to get it working and do some performance/power tests. But let me start at the beginning: Recently, pulseaudio not only switched to a more power efficient (and otherwise) timing system, as far as I understand a callback API. It also provided the infrastructure to use ALSA devices without causing any interrupts ("period wakeup disabling"), so you CPU can stay longer in standby mode (e.g. "C6 residency"), saving you power and avoiding playback glitches at the same time. See <a href="http://0pointer.de/blog/projects/pulse-glitch-free.html">here</a> and <a href="http://pulseaudio.org/wiki/LatencyControl">here</a> or more background information. With kernel 2.6.38 the first driver (snd-hda-intel) supports this infrastructure out of the box, the snd-hda-intel driver. This combination is what I tested for power efficiency...<br>
<a href="http://linux-tipps.blogspot.com/2011/04/power-performance-of-pulseaudio-alsa.html#more">Read more »</a><div class="blogger-post-footer">(...)
-- Click to read the entire post.</div>Unknownnoreply@blogger.com6tag:blogger.com,1999:blog-2124831850793435411.post-20836794488915094982011-03-20T09:50:00.002+00:002011-05-23T13:11:34.702+01:00Pulseaudio Power EfficiencyUsing pulseaudio in combination with alsa is already more power efficient and avoids many interrupts on current systems. In my experience the interrupts created by hda_intel decreased from 60-80 down to 6 per second. The sleep residency increased from about 3 ms to about 8 ms. This already makes a difference of about .25 Watts. I wonder if and how the difference will be with the new patches that went into 2.6.38, disabling even more interrupts.<br />
<br />
Update: Also check <a href="http://linux-tipps.blogspot.com/2011/04/power-performance-of-pulseaudio-alsa.html">how to save 0.4 Watts and more with pulseaudio and alsa</a>.<div class="blogger-post-footer">(...)
-- Click to read the entire post.</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2124831850793435411.post-1471011348023668852010-12-22T10:19:00.004+00:002010-12-22T11:11:53.754+00:00Saving 2 W power by Making Sure Laptop_Mode oesn't destroy your HDLaptop_mode is actually a great thing, as it activates a few powerful power saving modes in Linux, most importantly disk power saving and delayed writes. But if you use it with out of the box settings, there are two major bugs in Laptop Mode Tools, which could cause your disk to crash and are the reason it's normally disabled. Now let me show you how to work around them and easily save 2 W of power:<br>
<a href="http://linux-tipps.blogspot.com/2010/12/making-sure-laptopmode-doesn-destroy.html#more">Read more »</a><div class="blogger-post-footer">(...)
-- Click to read the entire post.</div>Unknownnoreply@blogger.com3tag:blogger.com,1999:blog-2124831850793435411.post-19668096328509253962010-12-21T16:32:00.002+00:002010-12-21T16:33:16.190+00:00What to do if you mobile has battery problemsSometimes mobile phones with Li-Ion battery have a problem that causes them not to provide anywhere near the expected run time. A possible problem is that not all cells are charged equally. This can happen especially if you have not charged your phone until it said it's full the first time you charged it. But it can happen in any case.<br />
<br />
Now a great workaround for this problem is to follow <a href="http://forum.xda-developers.com/showthread.php?t=701567">this guide</a> posted on the xda-developers forum: You fully charge the phone. (until it says it's full) and then power it off and then:<br />
<br />
1. Wait until it shows its fully charged.<br />
2. Unplug the phone and wait for it to turn off lights and display.<br />
3. Replug the phone and go to No. 1. (Repeat about 10 times)<div class="blogger-post-footer">(...)
-- Click to read the entire post.</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2124831850793435411.post-88319892886125155062010-12-14T06:26:00.007+00:002010-12-14T15:54:25.797+00:00Make your Android power efficient in any situation (for free!)In the following post I will explain how to use <a href="http://www.appbrain.com/app/cpu-tuner-(rooted-phones)/ch.amana.android.cputuner">cpu tuner</a>, a completely free and open source <i>app</i> for android. All you need is root and some time. It's a follow up on and summary of my various related posts you can mostly see below ("related posts") on working with governors to increase power efficiency in Linux. This is of course something that a) Linux and b) Android and c) your phone manufacturer should already have done. But as they didn't...<br>
<br>
<a href="http://linux-tipps.blogspot.com/2010/12/make-your-android-power-efficient-in.html#more">Read more »</a><div class="blogger-post-footer">(...)
-- Click to read the entire post.</div>Unknownnoreply@blogger.com13tag:blogger.com,1999:blog-2124831850793435411.post-80807886227420799262010-11-25T14:38:00.004+00:002010-11-27T13:06:37.610+00:00What can Governor Adjustments do for your Battery Mileage?After my previous post about <a href="http://linux-tipps.blogspot.com/2010/11/reducing-power-consumption-on-almost.html#more">Android saving power with Linux governor tweaking</a>, I did some governor tweak testing on my netbook with a tweaked phoronix test suide (pts) and came up with <a href="http://global.phoronix-test-suite.com/index.php?k=profile&u=anon-9628-29059-628">these results</a>:<br>
<br>
The first two show the power usage in Watts, the third shows the frequencies used during the test.<br>
<br>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVMyvV_CMJ2Mn3LEWgoKK-E0c572W5spTb4VYPfD1V8uvIMjhx-XL4_Aj2SnYf84aWLmQsro9mhz0dXgng1lyzbxaMg9NwVyY0GAR7pQP9UHSPElafnynE-DdufAV5IJh7YWgNW9AfwCM/s1600/power2.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="206" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVMyvV_CMJ2Mn3LEWgoKK-E0c572W5spTb4VYPfD1V8uvIMjhx-XL4_Aj2SnYf84aWLmQsro9mhz0dXgng1lyzbxaMg9NwVyY0GAR7pQP9UHSPElafnynE-DdufAV5IJh7YWgNW9AfwCM/s400/power2.png" width="400"></a></div><br>
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbxxXBFY_5x3rXUOj5juLXV0G1hKFg2DVAcxQ8dOFwvCCB4stvFZL2Uz7JWc-pntukgCI1zuPZFVSajQhKBSun4BBt8swTDFbt_PzQRGOTnp-nyUvelHh2Fw9oyVK01kOOWhs5OsdJk-s/s1600/power.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"></a></div><a href="http://linux-tipps.blogspot.com/2010/11/what-can-governor-adjustments-do-for.html#more">Read more »</a><div class="blogger-post-footer">(...)
-- Click to read the entire post.</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2124831850793435411.post-65028710633659160552010-11-24T17:41:00.005+00:002010-11-26T18:58:46.694+00:00Reduce Power Consumption Extend Battery Life of your Android with CPUfreq Governor TweaksCPUfreq is the part of the Linux kernel that changes your CPU's frequency to save power or increases it to make your system run faster. Obviously the settings you use there are essential for you performance and battery consumption. I read an extensive article by IBM some time ago analysing the <a class="vt-p" href="http://www.ibm.com/developerworks/linux/library/l-cpufreq-3/?ca=drs-">different Linux cpu frequency governors</a>. It makes lots of fancy tests and has great diagrams etc. What it boils down to is that these are the perfect setttings for low power at high performance in Linux. (Also check out <a class="vt-p" href="http://linux-tipps.blogspot.com/2010/11/what-can-governor-adjustments-do-for.html">this article</a> where I tested these settings on my netbook.)<br>
<br>
<a href="http://linux-tipps.blogspot.com/2010/11/reducing-power-consumption-on-almost.html#more">Read more »</a><div class="blogger-post-footer">(...)
-- Click to read the entire post.</div>Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-2124831850793435411.post-73192898622913082162010-10-25T17:49:00.002+01:002010-10-25T17:57:30.559+01:00Atom Power Usage Reduced with kernel 2.6.36As expected, the <a href="http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=history;f=drivers/idle/intel_idle.c;h=cb3ccf3ed221ecef98c996fc50206b17ba1f1c1a;hb=HEAD">intel_idle</a> driver <a href="http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=7fcca7d900957b43c84da171b750afcf1682808a">includes</a> ATM-C4 and ATM-C6 CPU power saving modes in kernel 2.6.36, even if your BIOS doesn't announce them. <a href="http://www.kernel.org">Check it out</a>!<br />
<br />
I'm sure it'll lower your power consumption by at least 0.5W on average loads. Of course there might be no difference at all if your BIOS already supports them. But often the BIOS disables the states when the AC adapter is plugged in. They still work, though, when using intel_idle. This makes your netbook less power hungry and more importantly: quieter. For some netbooks this will definitely be a big difference in run time as well.<br />
<br />
Let me know how it works for you in the comments.<div class="blogger-post-footer">(...)
-- Click to read the entire post.</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2124831850793435411.post-69698214350073890592010-10-23T21:38:00.017+01:002011-05-26T09:53:46.157+01:00Disabling Fsync in Laptop_ModeThere are several libraries that help you to disable fsync temporarily so your hard disk doesn't always spin up to save your notebooks battery. Of course that is not very flexible as you need to preload the libraries meaning you have to restart the programs.<br>
<br>
<a href="http://linux-tipps.blogspot.com/2010/10/disabling-fsync-in-laptopmode.html#more">Read more »</a><div class="blogger-post-footer">(...)
-- Click to read the entire post.</div>Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-2124831850793435411.post-57727999928813450822010-08-08T20:25:00.002+01:002010-08-09T14:14:56.968+01:00New Low Power Record - Power Management Progress in 2.6.35I just wanted to test how low the system can go in it's power usage with the power management framework of kernel 2.6.35 and the results amaze me. A test just showed that the system can save an additional 0.8 watts with the new kernel. Before the minimum battery usage without wifi was 5.6 W. Now in kernel 2.6.35 this has gone down another 0.8 W to 4.8 W - or 8.3 hours with just over 70 % battery. This is amazing. Even with wifi active the system now goes down to about 6 W - significantly increasing the amount of time you can be online surfing on battery. I wonder how much energy recent kernels save on other systems.<div class="blogger-post-footer">(...)
-- Click to read the entire post.</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2124831850793435411.post-31516182646595475972010-08-04T13:34:00.001+01:002010-08-06T13:21:39.625+01:00Fixing Suspend for the MSI Wind U110 in 2.6.34 and 2.6.35The MSI Wind U110 suddenly stopped going into suspend more in newer kernels starting at 2.6.34. A kernel developed <a href="https://bugzilla.kernel.org/show_bug.cgi?id=16512">found</a> where the issue is located. Actually the system did go into suspend mode, but it came right back immediately.<br />
<br />
The issue is very easy and quickly solved, though, with a single simple command:<br />
echo LID | sudo tee /proc/acpi/wakeup<br />
<br />
Now I can go into suspend again, and the system still comes back from suspend as expected, nice! :)<br />
<br />
Unfortunately for some reasons this does still not mean that suspend is working in Ubuntu 10.04 for me. Probably an issue related to the updated Xserver in 10.04. Though I can suspend and resume now, X crashes and restarts after resume.<div class="blogger-post-footer">(...)
-- Click to read the entire post.</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2124831850793435411.post-46111143782738472082010-06-27T11:43:00.003+01:002010-07-01T17:32:54.675+01:00Backlight Control on MSI U110 NetbookI've managed to get the backlight working roughly as well! All I needed to do was to load msi-laptop with the parameter force=1. The problem is that there is so far very little scaling, I can only set brightness to 0 (very dark) or 1-8 (all "very bright"). Check for updates to get it working well with KDE.<br />
<br />
I've contacted the driver developers and I hope we can make some progress on the drivers soon.<div class="blogger-post-footer">(...)
-- Click to read the entire post.</div>Unknownnoreply@blogger.com4tag:blogger.com,1999:blog-2124831850793435411.post-29346722843595185102010-06-11T18:28:00.008+01:002010-12-12T09:22:45.441+00:00Saving 33% or 3 Watts of Power with your Netbook (here a Poulsbo system)I've tried around a lot to see how much more power I can save on my system. An easy step with lots of success was to configure the laptop tools to run automatically. Check /etc/defaults/acpi-support and looks for LAPTOP_MODE, set it to true. Then you have to go to /etc/laptop-mode/ and configure first laptop-mode.conf and then the additional settings in the conf.d subdirectory. This could already save me at least 1 watt of power with very, very little hassle. <br />
<br />
<b>Poulsbo</b><br />
I've tried around a lot with my X system, because it can draw a lot or little power depending on its settings. E.g. if you reduce the backlight you can save at least 2 watt power. Unfortunately the backlight controls on my system don't work - I'm happy I've managed to get the driver to run at all. (Check my special article on the MSI Wind U110 for more on that.) Hence at least for now I need to set my backlight to the level I want before booting Linux.<br />
<br />
But I did find out that disabling vsync saves quite a substantial amount of power, I think about 0.5 watt. Most of the savings come from the cpu staying in idle longer on average then (about 22 msecs instead of about 4-8 ms). The catch is that with that setting enables, xvideo and vaapi no longer work after standby. Browsing is still fine, but probably no youtube, either. The whole system hangs when an application tries to use xv. So I had to disable the setting again - which actually was the step to put my netbook in a lower power mode than the carefully customized windows installation can manage, too bad.<br />
<br />
If I pass it or any options (except debug) to the psb module during load, or load it myself during boot, X or suspend won't work at all or properly or properly after standby.<br />
<br />
In the xorg.conf I have the standard settings for psb:<br />
<blockquote>Option "AccelMethod" "EXA"<br />
Option "DRI" "on"<br />
Option "MigrationHeuristic" "greedy"<br />
Option "IgnoreACPI" "yes"</blockquote><br />
<b>Ralink Wifi</b><br />
Another big one was the wifi adapter. Disabling it saves about 1.5-2 watts power, but of course I wanted to be able to have it running and save energy as well. I installed the newest driver from ralink's homepage. The important step was to go into the os/linux/ directory and edit the config.mk file to enable HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y, otherwise NetworkManager would no longer work with it. Then I studied the documentation and found the command "iwpriv ra0 set PSMode=Fast_PSP" put my card into a low power mode which still keeps a good and rather fast connection - better than in Windows, there this powersaving mode does not exist and the MAX_PSP is unusable.<br />
<br />
<b>Last Hint</b><br />
A last additional hint is to kill knotify4.<br />
<br />
<b>Conclusion</b><br />
In the end my system runs with 5.7 watts in a full KDE 4.3.2 X session. With mplayer and VAAPI I can now watch movies for at least 8 hours. A great demonstration of how far Linux has already come in saving power.<br />
<br />
The only thing missing now is a working backlight control and a working XVideo without vsync would be great. Ok, an SSD would be great, too. So let me know if you have one you no longer need! ;) Or if you know how to fix the backlight control on a poulsbo system.<br />
<br />
Maybe I should try to <a href="http://www.nanoant.com/linux/compiling-kernel-iegd-10x-module-for-any-linux-distribution">compile the IEGD driver for my system</a>.<br />
<br />
<b>Update</b><br />
I've manged to get it all running, including no_vsync, and videoacceleration before and after suspend. The trick is to do a double console switch after resume. Then VAAPI still works even after the suspend and resume - at least with xserver-xorg-video-psb version 0.36.0-0ubuntu1ppa9.10+1.<br />
<br />
<b>Update2</b><br />
I've managed to get the backlight working roughly as well! All I needed to do was to load msi-laptop with the parameter force=1. The problem is that there is so far very little scaling, I can only set brightness to 0 (very dark) or 1-8 (all "very bright").<br />
<br />
<b>Update3</b><br />
Check out <a href="http://idlethread.blogspot.com/2010/12/prolonging-battery-life-on-your.html"> this article</a> with more general advice including how ensure your battery lives long and prospers. Backlight is fixed by now, I've written a patch for the psb driver (in testing at the ppa right now). With recently kernels, the power usage dropped down to 4.8 Watts without wifi! This means it lasts much longer in Linux than in Windows now.<div class="blogger-post-footer">(...)
-- Click to read the entire post.</div>Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-2124831850793435411.post-46787382614381859032010-06-11T17:51:00.003+01:002010-06-11T17:51:48.750+01:00Power Naps for your Linux SystemI've always wanted a tool that can automatically suspend my system automatically once all the jobs (mencoder scripts, updatedb, etc.) are finished. Then I could start tasks, leave my system alone and trust that it would take care of going into standby itself. Most software only checks for keyboard and X input, which exactly doesn't help for my scenario. But now there's "<a href="http://launchpad.net/powernap">powernap</a>".<br />
<br />
It's included in normal Ubuntu repositories and in its default configuration it suspends your system if no activity is detected for 5 minutes. What's still confusing me is that it by default checks for activity of initd. This does not seem to make much sense and I think a long list of typical software would be a much better alternative. Also I wonder whether it would also detect mouse and keyboard inputs, which might be nice and useful. But it's a good start in any case and you can set it up to run for your purposes.<div class="blogger-post-footer">(...)
-- Click to read the entire post.</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2124831850793435411.post-81493709619752018942009-12-29T11:23:00.002+00:002009-12-29T11:32:06.663+00:00Over 9 Hours of Video on Battery with the MSI Wind U110After I've managed to set up the video acceleration, it was time to test if it's really as power efficient as claimed. I just tried that with some SD and HD video. HD video wouldn't play properly of course, so it's silly to compare battery times.<div><br /></div><div>But with SD video and vaapi, I managed to get down to 6.1 watts (9.1 hours). Without vaapi it was around 6.3-6.5 watts (8.5 hours).</div><div><br /></div><div>I used a few tricks to achieve this:</div><div><ol><li>disabled wifi and bluetooth.</li><li>lowered the display brightness to minum (still good though). This has to be done before boot in 2.6.31.</li><li>moved the system to an SDHC card. While the power in standby is the same (5.7 watts both with only SDHC or only hard disk), the active power is much lower with the SDHC (only +0.5-2 watts instead of 3-5 watts).</li><li>used by powersave script to optimize the kernel settings for low power mode:</li></ol><div><div></div><blockquote><div>echo cpu </div><div>echo 1 | tee /sys/devices/system/cpu/sched_smt_power_savings</div><div>echo 1 | tee /sys/devices/system/cpu/cpu*/cpufreq/ondemand/ignore_nice_load</div><div>echo 95 | tee /sys/devices/system/cpu/cpu*/cpufreq/ondemand/up_threshold</div><div>echo 50 | tee /sys/devices/system/cpu/cpu0/cpufreq/ondemand/powersave_bias</div><div>echo</div><div><br /></div><div>echo usb</div><div>echo 2 | tee /sys/module/usbcore/parameters/autosuspend</div><div>echo auto | tee /sys/bus/usb/devices/*/power/level</div><div>echo</div><div><br /></div><div>echo misc</div><div>echo 1500 | tee /proc/sys/vm/dirty_writeback_centisecs</div><div>echo 0 | tee /sys/block/sdb/queue/rotational</div><div># broken echo 10 | tee /sys/module/snd_hda_intel/parameters/power_save</div><div># not better echo 1 | tee /sys/module/psb/parameters/disable_vsync</div><div><br /></div><div>killall -q hald-addon-storage knotify4 NetworkManager</div><div>hciconfig hci0 down</div></blockquote><div></div></div></div><div class="blogger-post-footer">(...)
-- Click to read the entire post.</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2124831850793435411.post-83499957706302114402008-11-17T15:50:00.003+00:002008-11-17T16:03:06.959+00:00More About Being a Good Citizen in an Open Source WorldAfter looking into the source of Android, Metthew Garrett tells us about his <a href="http://mjg59.livejournal.com/100221.html">disappointment with the underlying code</a>. And with his example of iPhone vs. Android a heated debate was of course not far:<br /><br />Who is the <span style="font-style:italic;">worse</span> open source citizen, Google, Apple or nobody? And I posted <a href="http://mjg59.livejournal.com/100221.html?thread=1156221#t1156221">a little comment </a>as well:<br /><br /><blockquote><br />Google is to blame for doing open source(Linux), but the wrong way(hotfix instead of a good solution). <br />Apple is to blame for doing open source(BSD), but the wrong way(bad or no community "backfeed").<br /><br />What's worse is a matter of taste. I also think Apple is the worse open source participant. They give back so little to the community it makes me sad. (Then they restrict the app store in ways that prevents competition, etc.)<br /><br />Google does not do much for the community, though it says it tries. But honestly, if you would put their effort into relation with what money they make through open source software, it's really very sad, too. And the companies PR departments would be silly if they wouldn't make sure it looks like a serious effort.<br /><br />But they both gain a lot and give a little. Google may state what they wish - considering their resources they give little. They could employ at least a few expert kernel hackers pro bono. Otherwise they will get an identity crisis a little like Ubuntu currently: People want to know they are part of bringing things forward.<br /><br />And this shows the problems with current open source licenses in my view: The companies still don't really have to give useful "back-feed" to the open source projects (far from being in relation with what they gain).</blockquote><br /><br />What if the EU would decide that every device must come with open source drivers? Or if someone wrote a license that requires at least 1% of the profits from the open source project to flow back into the project? It would of course be very good for the projects. But in a second step I am convinced it would be at least as useful from a macroeconomic point of view:<br /><br />Less development effort would be duplicated and the code quality would constantly increase.<br /><br />Of course the big problem with this approach is finding out how much money is made with a project. That would be the job for courts to decide. And currently I can't think of any really good measurement possibilites. But then with 1% of the profits I'm sure it would not hurt a company anyway.<div class="blogger-post-footer">(...)
-- Click to read the entire post.</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2124831850793435411.post-74412617578924799932008-11-05T17:09:00.004+00:002008-11-05T17:20:25.617+00:00Fixing Wake On LAN in Ubuntu 8.10I've already spent a few hours to finally get this working again. There are several problems in Ubuntu 8.10 considering Wake on LAN:<br /><br /><span style="font-weight:bold;">1. The network cards' drivers are unloaded during suspend. </span><br /><br />This often deactivates your card's wake on lan feature and completely powers it off.<br />You have to add your network cards driver module to the MODULES_WHITELIST in /etc/default/acpi-support. Also add the network card's interface(e.g. eth0) to SKIP_INTERFACES.<br /><br /><span style="font-weight:bold;">2. The network is not (properly) restarted after resume.</span><br /><br /><span style="font-weight:bold;">a. NetworkManager overrides settings in /etc/network/interfaces.</span><br /><br />The easy way is to simply remove networkmanager: sudo aptitude remove network-manager.<br /><br /><span style="font-weight:bold;">b. The network setup script is not restarted after resume.</span><br /><br />You can add the script (networking) to STOP_SERVICES in /etc/default/acpi-support.<br /><br /><span style="font-weight:bold;">3. Wake on Lan is not enabled by default</span><br /><br />You need to issue e.g. <span style="font-weight:bold;">sudo ethtool -s eth0 wol g</span>. You can do that in an init script and you will likely have to do it again after resume. (I've put it a script to do that into both /etc/acpi/suspend.d/54-wol.sh and /etc/acpi/resume.d/99-wol.sh )<div class="blogger-post-footer">(...)
-- Click to read the entire post.</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2124831850793435411.post-54270921729085781402008-09-03T21:03:00.004+01:002008-09-04T19:39:07.009+01:00Power Save ScriptI wrote a little powersave script that quickly executes a few commands to improve battery life, esp. on notebooks. You can put it in /etc/acpi/battery.d/20-powersave.sh to start automatically when the computer runs on battery.<br /><br /><blockquote><br />#!/bin/bash<br /><br />SUDO=`which sudo`<br />SU=`which su`<br />EXEC="$SUDO $SU -c"<br /><br />echo Activating power saving mode...<br /><br /># Automatically suspend USB -- How to automatize?<br /># usbcore.autosuspend=1 to kernel cmdline didnt work<br />$EXEC "echo 1 > /sys/module/usbcore/parameters/autosuspend"<br /><br /># Disable CD autodetection by hal<br /># sudo hal-disable-polling --device /dev/scd0<br /><br />$EXEC "ethtool -s eth0 wol d"<br /><br /># reduce disk writes<br />$EXEC "echo 1500 > /proc/sys/vm/dirty_writeback_centisecs"<br /><br /># SATA powersaving mode<br />$EXEC "echo min_power > /sys/class/scsi_host/host0/link_power_management_policy"<br /><br /># AC97 power saving<br />$EXEC "echo 1 > /sys/module/snd_ac97_codec/parameters/power_save"<br /><br /># Intel-HDA power saving<br />$EXEC "echo 1 > /sys/module/snd_hda_intel/parameters/power_save"<br /><br /># optimize scheduling for dual-core cpus<br />$EXEC "echo 1 > /sys/devices/system/cpu/sched_mc_power_savings"<br /><br /># Remove fixed network adapter, intel watchdog<br />sudo rmmod iTCO_wdt iTCO_vendor_support tg3<br /><br /># set minimum frequency<br />#$EXEC "echo 866664 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq"<br /><br />sudo killall guidance-power-manager.py<br /><br />xrandr --output TV --off<br /><br />for i in /sys/bus/usb/devices/%s/power/autosuspend; do $EXEC "echo 1 > $i"; done<br /><br />$SUDO iwconfig wlan0 power on<br /><br /></blockquote><br /><br />Actually I think a part of the script might be from someone else...<div class="blogger-post-footer">(...)
-- Click to read the entire post.</div>Unknownnoreply@blogger.com0