Fun with Compcache/RamZSwap
1. Get and compile a current version of rzscontrol in the compcache package sub-projects folder.
2. sudo swapoff -a
3. sudo modprobe ramzswap
4. sudo rzscontrol /dev/ramzswap0 --verbose --init
5. sudo swapon /dev/ramzswap0
Enjoy! Check out lwn's tech info about it.
Update: Actually it does work for me in 2.6.33, but in 2.6.35 it does not work at all and the --backing_swap /dev/your-current-swap-partition support was removed.
Update2: You can make it work with a bit of source code modification. The author writes, though, that he will soon release a new version of both his kernel module and command line tool that can be installed and run in 2.6.35.
Saving 33% or 3 Watts of Power with your Netbook (here a Poulsbo system)
Poulsbo
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.
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.
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.
In the xorg.conf I have the standard settings for psb:
Option "AccelMethod" "EXA"
Option "DRI" "on"
Option "MigrationHeuristic" "greedy"
Option "IgnoreACPI" "yes"
Ralink Wifi
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.
Last Hint
A last additional hint is to kill knotify4.
Conclusion
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.
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.
Maybe I should try to compile the IEGD driver for my system.
Update
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.
Update2
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").
Update3
Check out this article 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.
Crashes and Blue Screens are Normal and a Processor Fan has a Lifetime of 1 year -- Everyday Support Hotline Fun and the Intel Dynamic Acceleration Technology
Well my experience has been that mencoder, whether running on Linux, or Windows is so resource friendly that there really isn't a problem usually. And my understanding is also that if any problems should occur, they should be a slow and unresponsive system due to massive swapping -- and not a bluescreen. But of course that's only my lowly knowledge of about 10 years of computer support and 8 years of Linux fun.
Well after I responded shocked and directly asked him whether he was implying that blue screens would be normal and acceptable we withdrew his statement and agreed to have someone look at the device. I'm still not certain, though, if they will stick to their position that because my girlfriend ordered a system from their Vostro business laptop series and their database has her name marked as a company name, that she won't get the 2 years mandatory warranty, but only 1 year as a business would get.
Though actually that shouldn't make a difference with an error that couldn't possibly appear through mishandling of the system but must've been there from the beginning: The system crashes after some time with heavy load (longer times around 50 % may be enough, though). For a while the hard disk, whose SMART data reports a critical heat, stopped working and simply wasn't detected at boot time.
But the Dell guys didn't really understand that either. They said that it could just be a natural phenomena that a fan only has a life time of about a year and hence the system was perfectly fine at the time it was turned over to my girlfriend.
But I don't want to bore you any further with a story that probably happens everywhere to everyone and all the time in the daily Windows world... While hardware problems occur in Linux just as well, at least the people you talk to about them don't treat you like an idiot but really know their stuff.
In the end the error seems to have been the intel dynamic acceleration technology. After I "upgraded" the BIOS to the same version it already had been I looked through the BIOS and thought I'd try disabling it. Now the fan is slightly less loud and more importantly: the computer no longer seems to crash as it did before.
Intro to Linux Virtual Memory
Linux Memory Statistics
Memory Usage - Pidgin vs. Kopete
The GTalk outage gave me some time to run another test of pidgin vs. kopete in memory consumption. Pidgin used to always win this competition, which is - next to the then better working file transfers - why I use pidgin.
I tested it again today and this time the Kopete coming with KDE 4.1.1 in Kubuntu won!
- Kopete used about 18 MB ram
- Pidgin used 23 MB ram
These results and the differences were reproducible. They were tested with "free" in the console. I started one program, then the other and in between ran free in the shell - several times.
Of course these results apply only if you're running a KDE 4.1.1 desktop. If you're a gnome user, pidgin is very likely to use less memory for you.
Also reproducible was that Kopete ate a lot of memory when opening the - currently very slow - configuration dialogue.
There seems to be a bug somewhere, as this memory is not freed until after you restart kopete. So after configuring something in Kopete 0.60.1 make sure you quit and restart it.
Feel free to test it yourself and post your results. Make sure to include what distribution, program versions and desktop environment you use and that you have the same amout of accounts active in each program.