Encoding Videos for Android

Yeah, I know I'm being lazy again, but hey, if someone else already did all the work. Check it out at Ubuntu here.

Google Chrome married to Flash

For a single version during beta,, Chrome beta supported a nice, elegantly working plugin blocker. In the content settings you could choose to use plugins on demand. Now in it's disappeared again.

I think the reasons are probably the Adobe alliance allowing Google to distribute Flash with its browser and phones on the one hand and Google getting its money from advertizing. And flash ads probably just make more money. We can conclude that Chrome will probably be the last browser to include features users want but advertizers don't.

Mobile Version

From now on when you visit my blog with your mobile phone you will see a small no-nonsense version adjusted to mobile phones. This is a nice new feature of Blogger Draft.

Saving 2 W power by Making Sure Laptop_Mode oesn't destroy your HD

Laptop_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:

What to do if you mobile has battery problems

Sometimes 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.

Now a great workaround for this problem is to follow this guide posted on the xda-developers forum: You fully charge the phone. (until it says it's full) and then power it off and then:

1. Wait until it shows its fully charged.
2. Unplug the phone and wait for it to turn off lights and display.
3. Replug the phone and go to No. 1. (Repeat about 10 times)

The Second Biggest Android Market Problem

The biggest problem is that Android's Market is hard to grasp, as there is so much stuff in there and people can pretty much post anything anywhere. The Second Biggest Problem is that Apps never work well on all phones. And that's hardly something to blame the poor developers for. They can't have all phones. There are two approaches to fix this:
1. Improve the platform robustness: APIs should whenever possible work exactly the same on all devices so programmers need not reprogram their software for each device. That's the whole purpose basing them on Java in the first place.
2. Provide a testing platform: App developers should have access to a means of seeing how their apps work on different phones. One way would be a technical solution that runs the devices' firmwares in a Virtual Machine. Many bugs should be fixable this way. Another way would be the open source way: A group could be created where people with the same phone join groups and developers can post new applications. Then each group tests them and reports how they work on the real devices.

What do you think:

Saturating your Link with Lftp

I've been looking for a tool that downloads with several connections at the same time for a while, like GetRight for Windows used to be. Because without a tool like that, you can't really take advantage of fast connections with 20 and more Mbit. Now I've found a tool that does that and even surpasses my expectations: lftp. Lftp does not only support this, it supports the feature in http and ftp like many programs, but also in sftp, fish, ftps and https. And the usage is extremely simple: lftp pget url.

Free Time? Try some Open Source Video Games

Wikipedia has a nice long list of open source games, linking to their description, often including videos. It will keep you well busy over the free time. A personal recommendation is UfoAI (Alien Invasion), a great 3D round based first person shooter and infrastructure building combination:

It's fascinating to first build your infrastructure and later venture inside it fighting of invading aliens. Of course first you have to select and train your people, research and build of steal guns and ammo, etc. But be careful, the game can be quite addictive.

More Videos.

If you liked this post, you might want to link to it and subscribe to the RSS feed so you won't miss the next one. In any case, check the related posts below. Maybe I'm just having a really bad day and normally write much more interesting posts about theses subjects. Or maybe you'll only understand what I meant here once you've read all my other posts on the topic. ;-)

Make your Android power efficient in any situation (for free!)

In the following post I will explain how to use cpu tuner, a completely free and open source app 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...

Why I'm *not* Signing Up for Google Chrome OS Pilot Program

It's been all over the news that Google is starting a pilot program for it's Chrome OS, which I expect to be out within a few months. The pilot program is probably meant to get the last polish for the system. As my readers will know I'm always excited about new technology, especially dealing with Linux. But here's why I ended up not even trying to get into the program:

Uncompressed PDFs in CUPS - A Problem to Go Crazy

I found no solution. I just wanted to air my frustration that CUPS completely ignores the settings I put into /etc/cups/cups-pdf.conf. Hence I can try making better settings all I want, they are completely ignored. If anyone knows a fix, please tell me. I just spend 45 mins on this in vain.

What can Governor Adjustments do for your Battery Mileage?

After my previous post about Android saving power with Linux governor tweaking, I did some governor tweak testing on my netbook with a tweaked phoronix test suide (pts) and came up with these results:

The first two show the power usage in Watts, the third shows the frequencies used during the test.

Power-Saving Summary

IBM has recently made a presentation about green data centers. Their slides sum up most things you can do on any computer to save energy: http://events.linuxfoundation.org/slides/lfcs09_srinivasan.pdf

Reduce Power Consumption Extend Battery Life of your Android with CPUfreq Governor Tweaks

CPUfreq 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 different Linux cpu frequency governors. 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 this article where I tested these settings on my netbook.)

Android and Fritz Box VoIP

The only app that worked well in my experience was CSIPSimple. And it was easily configured and feature-laden yet small (1.3 MB) and low-resource at the same time. I couldn't get sipdroid or others to run properly.

If you like this article, you might want to subscribe for more.

Understanding the Necessity of Wayland

Questioning the necessity for Wayland and the wiseness of the choice has become a phenomena, especially after Mark Shuttleworth annouced Ubuntu's plans to eventually switch to Wayland. Following I will provide a concise reasoning why we want Wayland. At the end there are some more links for further reading.

In 1984 the MIT started X11.
In 1991, XFree86 started out of the X386 server based on the X11 platform.
In 2003, Xorg took over from XFree86 after a license dispute.
In 2008, Wayland was started to overhaul the entire system and keep only what's necessary for the desktop today, using only today's modern infrastructure in a leightweight architecture.

"Unusual" Linux Games

Linuxaria has a great list of fun, "different" Linux games, can't wait to try out some of them.

If you liked this article, you might want to subscribe for more.

200 Best Android Apps List

If you've got a droid and some time on your hand you may want to check out this list created during the Android developer challenge.

If you liked this article, you might want to subscribe for more.

Learning with Android

Learning flash cards with your mobile phone would be great, especially when you're on your way e.g. to work or uni.  With OpenCards, there is a great application for that on your Computer. And it's already written in Java (though Openoffice, which it requires, isn't). But then there's already a basic Openoffice Document reader for Android. And they are both Java based and Open Source. Now if only someone would combine the two to have it both working together, that'd be really great...

If you liked this article, you might want to subscribe for more.

Using Bloggers More Tag to Split Large Posts

I've started using Bloggers tag to split up large posts. This means large posts will only show with a few introductionary lines on the front page, for the whole thing you need to click on it: "Read More". I think this makes the front page better suited for its purpose: Providing an overview of current topics. If you are hugely annoyed or positively crazed about this, let me know in the comments and I might reconsider.

Immediate Latency Improvement on Recent Linux Kernels

Check out this article on Webupd8. But I'm sure an easier version you can just install as a normal package will come out soon as well.

But it works excellently indeed. I can transcode now and I don't even notice any change in responsiveness.

What I like about Android - and what I don't -- My Android Review (including my Favorite Apps)

Find out what I like and dislike about the android system after a critical review on the Samsung Galaxy 3. And at the end there's a list of my favorite apps.

What to do if sshfs / fuse freezes your system?

Two things you can do. If it's generic fuse:
fusermount -u -z (mountpoint, don't tab to get the directory, you have to enter it exactly.)

If it's sshfs, you can reduce the timeout to have your system return from the ice age sooner and automatically next time:
echo ServerAliveInterval 15 >> ~/.ssh/config

And don't bother, this bug is know and has been reported before.

Which Software-Scaler Looks Best - Mencoder and FFmpeg settings

-There is an old but good test showing you all of mplayers software scalers and how they look in the same image, here. The numbers mean this, see the mplayer man page:
0 fast bilinear
1 bilinear
2 bicubic (gute Qualität) (Standard)
3 experimentell
4 nearest neighbour (schlechte Qualität)
5 area
6 luma bicubic / chroma bilinear
7 gauss
8 sincR
9 lanczos
10 natural bicubic spline

If you want to translate that into ffmpeg language, it looks like this:

Just add on of the above to -sws_flags in ffmpeg.

Happy transcoding!

Gutenberg.orgs New Mobile Page

If you like to download free books from Gutenberg, this has now become a whole lot easier. M.Gutenberg.org provides an interface with large, touchable links and direct downloads in various formats.

Fritz Box Power Usage

Out of some curiosity I recently measured the power usage of my Fritz Box 7570. It's an amazing Linux-powered all-in-one router device with VDSL, VoIP, DECT, USB (e.g. printer or stick) and LAN connectors and VPN and FTPD support. Using VDSL-50 (without its power saving mode), all but one LAN ports off and DECT and Wifi-N active, it uses 9.6 Watts. More than I had been hoping for considering its elaborate power saving modes. Disabling the DECT module takes about 0.05 Watts off of that. Putting the one LAN port into auto-off another 0.05 Watts.

Comparison: My phone's base station takes 1.7 Watts for only the DECT part. An energy saving bulb with 60 Watts brightness usually takes 11 Watts.

Compiling a new wpa_supplicant for Debian or Ubuntu and Network-Manager

There are a few changes to dbus files so you should best just replace the wpa_supplicant binary in /sbin with your version. Use this .config file to make a binary that works as plug-in replacement with network-manger in Ubuntu and probably Debian as well.

How to Fix Your Slow CPU ;)

I just read this funny entry in the LKML about how to enhance your performance on systems with slow CPUs.

Grepping for a list of processes and then e.g. killing them

If you e.g. want to kill a list of processes you can all grep but are too lazy to type all the pids. Or e.g. as part of a service script on a server:
ps -ef | grep something | awk '{print }' | xargs -i kill {}

Full of Little Bugs but not Without Potential - First Impression of the OYO E-Book Reader

The new e-reader on the European block was just released and while it features a webbrowser, audio player, web store next to the book reading and everything with a touch screen, everything is also slightly buggy:

Atom Power Usage Reduced with kernel 2.6.36

As expected, the intel_idle driver includes ATM-C4 and ATM-C6 CPU power saving modes in kernel 2.6.36, even if your BIOS doesn't announce them. Check it out!

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.

Let me know how it works for you in the comments.

Cheap Plug Computer for US customers

After fiding the offer for Germany, it turned out the offer for US customers is much, much better. You get it for 32 $ (free super saver shipping) with this link.

Günstiger Plug-Computer von Amazon / Cheap Plug Computer from Amazon

Amazon hat gerade ein sehr günstiges Angebot (51 € inkl. versand), aber nur bei Bestellung über diesen Link.

(Amazon currently offers a cheap plug computer in Germany for 51 € incl. shipping via this link.)

Disabling Fsync in Laptop_Mode

There 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.

Uploading Videos to Picasaweb from Linux with GoogleCL

All you need to know really is that it works via googlecl. Once you've installed that, it's as easy as google picasa post --title "Albumname" path/to/video.avi. And Google webspace is cheap with 20 G for 5 $ a year - with full control over your privacy. (Better than facebook anyway.)

Ok, you may need to upgrade to a current python-gdata and remove your old config files: rm -r ~/.googlecl/ for it to work. But it does work!

Powertop C6 mwait record

I know it's crazy and unfortunately I had no time to make a screenshot, but I recently had a 462 ms stay of my CPU in C6 mwait. That's what I call efficient. Also my Poulsbo netbook is down to about 3 watts with Wifi, HD and display off. For it's energy efficiency - though not for it's drivers - Poulsbo is an awesome platform.

Lower CPU power consumption with Atom in 2.6.36

Len Brown recently wrote the intel_idle driver, a special idle mode driver for intel processors that lets you use deeper idle modes even when your BIOS does not announce them. Now he kindly expanded that to the C6 state for the Atom processor from the C2 state before. Now it does not matter if your power adapter is connected or not, you can use the C6 state. And if your BIOS didn't support it at all before, now you can still use it with Linux. Just compile 2.6.36(-rc8) with intel_idle built in and check it out.

Rekonq is the new kid on the block

Try out this new KDE-integrated webkite browser. It's pretty snappy and comes with some cool features including out of the box ad-blocker, okular pdf viewing, tab preview and speed dial. Better than arora but feels just as lightweight.

Virtual Headphone Surround from Stereo with Mplayer

Fun things to do with mplayer include upmixing stereo to 5.1 surround -- with the help of surround, sub, center filters -- to play it on your surround system and also downmixing 5.1 surround to play it on your headphones -- with the hrtf filter. Now another fun thing you can do is combine the two and upmix Stereo to Surround and then back down to Stereo to have some additional atmosphere for your headphone music: mplayer -channels 6 -af resample=48000,surround,center,hrtf


How to keep a program running when you log out

Very simple. First you put it into background with Ctrl-Z and "bg". Then you disown it with: "disown -h %1".

Shamelessly stolen from Linuxaria.

Introducing (native!) µTorrent for Linux

If you've ever looked into the various programs available to download via bittorrent, you will probably have discovered µtorrent. Back then it was probably already tiny and full-featured at the same time. It even had customizations to better run inside WINE. But it didn't run natively on Linux. Of course that made the very low resource bittorrent client much more resource hungry. Now this all changed. (Screenshots inside)

The war of the Internet has begone

I know, quite a dramatic title. But I've written about it before. It's serious business and someone just showed how a global internet attack can look like. And of course it really could be much worse. The only real protection is complete separation of critical systems from any outside data - especially the internet.

Don't rmmod snd-hda-xxx to save power

This is counter-productive. This will not suspend the sound card for some odd reasons, but leave the codec active on my system, consuming about 0.3 W more than the automatic suspending during idle.

Low Power Browser

I've written about it before. When you're on battery you will notice some browsers are better than others. Google Chrome is definitely not a good choice atm, as it keeps the sound card open, consuming 3 W extra on my system. Switching to e.g. Arora removes all that and is something you should consider when surfing on battery- Opera is pretty good, too.

The summay on bcache performance tests

Linux-Mag tested bcache, a layer to combine SSD and HD for better disk performance. The conclusion is that it's not yet ready:
The testing data presented in the last several articles shows that there are some workloads where bcache works well and many workloads where it doesn’t work well. But remember that bcache is still in early development so I’m not surprised that it doesn’t have good performance in certain areas.(...)So is bcache ready for prime time use? The author of bcache readily admits that it’s not and I agree.

So any good programmer reading this: this is your chance to get involved! ;-) For everyone else, stay tuned, I have a feeling it's going to get there eventually. By then SSDs will hopefully be more affordable, too.

Various Optimization Tweaks

Check the /dev/random blog for some good advice on how to optimize your linux system. More to be seen in the comments there. I've already tried them almost all before. I can recommend atime and swap adjustment. Noatime is a must, I don't know why distributions don't apply that out of the box, especially as it gives a noticeable speed gain.

Encoding Canon EOS .Mov Video Files with Mencoder

They end up quite large. Here's the command line that should help you to encode them without sync problems, should work with mplayer, too:
mencoder -demuxer lavf -vf-add harddup -aspect 16:9 -noskip -mc 0

Let me know if it worked for you, too.

Canon Printer Error U150

The printer says it can't recognize some print cartridges and asks you to replace them. You replace them, but nothing happends. After fiddling around with it for a while, eventually it works, but another cartridge shows the error. Possible Solutions:

1. Pull the plug. Take the energy away from the printer to reset the memory. Leave it without power for a few minutes. Try not turning it off first.
2. Reset the chips. This often happens with replacement ink or canon chips on replacement ink tanks. Go to the ink store, they usually have chip resetters.
3. Clean the contacts on the printer and the ink chips with ISOPROPYL Alcohol.

AT YOUR OWN RISK! If nothing works, try Canon original ink. If that doesn't work, contact Canon. Good luck!

Eduroam with Linux (incl. Android!)

The guide my university supplied did not work after all with Linux. So I used an alternative guide, which also turned out to be working for Android:

Security: WPA2 Enterprise

Authentification Tunneled TLS (TTLS)

Anonymous Identity: none

CA-Certifikate: (none)

Inner Authentification: MSCHAP2

User: user@your-uni.com (as in the Windows settings guide of your home university)
password: your password, as in windows.

Fixing - at least some - Skypephone S2 Battery Issues

My 3 Skypephone S2 at some point started to run out of battery after being on for about 20 hours or less. And this is not because a Java program crashed, which can be a reason, too. It was after a full charge over night and switching it off and on. Eventually it turned out the problem was that I had still activated the USB Modem setting in Connections. Once I turned it back to blue tooth mode and turned off bluetooth after that the problem was gone and the battery lasted a *lot* longer again. Anyways, the battery delivered with the phone seems to be not very good in any case, so you might want to get a new one. The big question is just: where?

Update: It works! The only problem is you need to leave out the battery at least over night afterwards.

If you like this, why not order a Three UK Sim with my agent link (or send the link to friends). You get an extra 5 quid or so AFAIK.

Immediate Fix for Slow Open and Save Dialogs in Ubuntu OpenOffice

I'm using KDE and I think it's somehow related to that. Anyway, you need to execute the following command to fix it:
echo -e \\t $HOSTNAME localhost $HOSTNAME.'(none)' | sudo tee -a /etc/hosts

Hope this helps. Found in the Ubuntu Forums here.

Linus System Monitoring Tools

Why should I write much about them if someone else already has.


Fix: OpenCards 1.5 Crashes in Openoffice 3.1 3.0 Linux or Mac

If you don't know it yet, go and check out OpenCards - the best flash card learning software I know. You can edit the cards with OpenOffice Impress like a presentation and then Opencards helps to to learn the slides with a smart algorithm.

If your system crashes when you want to run OpenCards, try starting it from xterm like this:
env SAL_NO_XINITTHREADS=true ooffice -impress
This certainly fixed my problems. Now I can switch to Linux on my Netbook. Turns out Openoffice runs much faster in Linux than in Windows.

By the way:If you can't install the OpenCards Extension and see a large java error message, you probably haven't installed all necessary openoffice packages and activated Java. Try installing the meta-package "openoffice.org" and the package "sun-java6-bin".

Simpler workaround to Print Google Waves

All you really need to do it press the fullscreen button on the right top corner. Then you have the same view a in iPhone mode and you can print it. But going back now is just the press of a button. Still, Google Wave is IMHO not much more than a forum thread (on exstacy) which you can export to certain people.

Printing from Google Wave

The work around is to use the iPhone as User Agent:
google-chrome --user-agent='Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_0 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7A341 Safari/528.16' wave.google.com

This works even if you just open a new tab - no need to quit the entire browser first.

More Security in Windows with EMET

If you are an unfortunate Windows user, at least some times - like most of us are - the Microsoft toolEMET may help you to more security against exploits. Maybe finally something of value after the useless and annoying toolkit I constantly need to block in Windows Update?

XBMC with VAAPI on GMA500

It's not possible directly right now due to limitations of the existing GMA 500 drivers (IEGD, PSB, ...). But if you have mplayer-vaapi running, it's really easy - Because you can set up xbmc to use external players.

Media Center Software for German TV

If you have read this blog from the very beginning you probably already noticed I speak German. If you do, too, here is a great one stop software for AFAIK all German state media accessable online.

Fix for device key_bitmask has changed - Device has changed - disabling

The bug was reported here for Ubuntu and the fixing patch can be found here. The patch applies cleanly to older versions of evdev in my test. I've also packaged a fixed .deb for Ubuntu Karmic here. Your keyboard should no longer stop working after a few suspends. Enjoy\!

Medion ebook reader (not) on the IFA 2010 Berlin

I went there and made a point of checking for it after reading about the upcoming release of their ebook reader on the H. Medion is known for producing pretty good value products (at least every once in a while) and so I was curious. But the representatives could neither show it to me (only to VIPs), nor would they tell me anything about it - not the price, estimated release date, etc. Hence I doubt there will be any sort of release from Medion anytime soon. And with everyone else showing off their devices it was not very convincing. Some of the ones I liked best were the iriver with a nice touch screen but no web browser and vague battery times (11000 pages) and some of the Sony ebook readers (there was one of them with a very bad resolution unfomfortable to read, though). It was actually the first time I saw an ebook reader, though and I really thought - hey is that just an empty sample with something printed on a plastic foil? No it wasn't I found out as it reacted to my finger touching it.

All in all the IFA is quite interesting and it's wonderful to see all the upcoming 3D TVs and their technologies. By far my favorite was a head tracking 3D display at the Heise (the H) stand 124 in hall 17 - no glasses needed but amazingly great results. Most other 3D TVs either needed glasses or had pretty disappointing results. Also impressive were the LG HDTVs - brilliant, crisp colors.

Nice Speed Test Site

The German router producer AVM - IMHO making the world best routers - has a nice speed test site. It does not only include the usual upload and download tests and ping, but also jitter and packet loss. For those who don't live in Germany, it can still help to check how good e.g. your overseas connection is. If you're interested in those routers, google for AVM Fritz Box.

Advanced SSH

Pretty much everything you should know about advanced SSH usage - at least pretty much everything I know - is in this post on the kplice blog.

LG Flatron 1970H and how it really isn't VESA mount compatible

The monitor needs a special metal plate fixed to the stand in order to be VESA compatible. After calls to LG hotline, the replacement parts hotline, the distribution hotline and the replacement parts distribution hotline it turns out this part is not available anywhere and nobody even knows of it. The nicest part though was when I told the man that the device is several years old. He immediately lost interest and hung up. Nice. Thanks, LG.

Whooops. I had that weird plate in my package all along. This wrapped. Sorry, LG. All I can blame you for is no longer having replacement parts after... roughly 5 years.

Okular Formats Follow-Up

After finding out you can read epub ebooks with Okular, I checked the list of supported formats (as of KDE 4.2): PDF PS Tiff CHM DjVu Images DVI XPS ODT FictionBook ComicBook Plucker EPub Fax. That includes OpenDocument(e.g. OpenOffice, KOffice) Writer Documents, CHM (aka. Windows Help) files, Djvu and others. I wonder what's the current list for the current 4.5.

Viewing Ebooks in KDE

I just discovered by accident that Okular - at least in version 4.5 - has the power to display ebooks. And it does it quite nicely, too.

Gnash 0.8.8 with VAAPI support out

But don't get too excited yet. It does not seem to be as fast as hoped in many cases and there are no Ubuntu packages yet except for the still unstable Maverick release. If you run that with VAAPI, try deb http://www.getgnash.org/debs/ubuntu maverick main.

DVD Backup with Mencoder and dual audio Matroska

Three easy steps:

1. mplayer dvd:// -vf cropdetect -ss 1200
2. mencoder -alang en -oac copy -ovc x264 -x264encopts crf=23:trellis=1:ratetol=inf:frameref=2:bframes=2:8x8dct:ssim:psnr: -o main.avi (add interlace to x264encopts if necessary)
3. mencoder -oac copy -alang de -o tempaudio.avi -ovc frameno dvd://
4. mkvmerge -v -o "Main en de ac3.mkv" --title "My Big Backup" --language 1:eng main.avi --language 0:ger -D tempaudio.avi

Add subtitles to your gusto, mix and enjoy!

Switching the XV area between different screens

Very easy once you know the command: xvattr -a XV_CRTC -v 1 for screen 1, xvattr -a XV_CRTC -v 0 for screen 0, etc. Check this page for more.

How Your Browser Determines Battery Runtime

Using Chrome I noticed a lot of CPU usage with some open web pages. This is much better when using Opera. Also Chrome seems to constantly write something to disk, which stops it from spinning down, which saves lots of energy. Hence I will now use Opera again, at least when surfing on battery... What are your experiences with CPU usage and disk access with browsers\?

Syncronized Folders across Windows and Linux - (Cloud-)Free Encrypted Cross-Platform Synchronisation with Unison

I always wanted to sync a few folders of my system across all my computers. E.g. the my scripts directory, where I constantly fiddle with my scripts and create new ones, my documents I always want to be able to have and edit everywhere, etc. I would never know where the most current version is without bothersome comparison of the dates. I would have to check every file and then copy the newer one. But that's now history, thanks to unison and my sync scripts.

What you need
The biggest problem is that you need a Linux server somewhere that is best constantly running and connected. I sync all my files with an online server. This is not a big deal because with SSH the connection is securely encrypted. Also due to compression and the fact that files are only transferred once, sync is pretty fast even with an ADSL connection. Of course this won't work for slow dial up connections in combination with large files. But as long as there are only small changes in certain files, even dial up might work for you. A Linux server is not really needed, but makes the setup much easier, which is why that's what I demonstrate here. And of course if you only want to sync two computers with each other, then there's no need for a constantly active server. It should work with Mac as a client or even server, but I don't own one so I can't help with that.

You can get your unison downloads for Mac, Windows here and for Linux here (Ubuntu binaries i386 for 9.10 and 10.04 and more in this ppa. I recommend version 2.40.16, read below for why.

For Windows you also need to get Putty Agent (Pagent), Putty Puttygen and Plink get them at http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html. For Linux you also need openssh-server ssh-agent, ssh-keygen (in the openssh-client package) and keychain. You need to setup a working ssh connection with public key authentication for this to work without your interaction in the background. See here how to do this.

Bugs in the past
At the time I found it, over a year ago, it was still pretty buggy. It couldn't handle unicode, special characters or Umlauts properly. Especially between different system you'd end up with two differently named versions of a file unless you restricted yourself to normal a-z characters - very annoying.

But recently new version has come out, which fixes the problem. Now unison is not only a tool to synchronize flawlessly across different systems, it's also faster and prettier "GUI" than older versions and it still synchronized across encrypted ssh connections if you want it to. In my view this makes it the perfect tool for my needs. I've set it up to synchronize my laptop and my netbook with each other and my server system over ssh.

How it works
It's blazingly fast by only copying those parts of the files that have changed. And it doesn't transfer any files to check this. It runs both on the server and the client and only transfers the dates and hash coddes of the files via a secure compressed ssh connection. You can find out more about unison at LinuxJournal.

The easiest setup and the one I will show here is a star topology setup. This means there are several client systems synchronizing with one server. It works because unison knows which files are newer. The great side effect is that you automatically have a distributed backup on all your systems - the server and all clients of all your files.

The script runs automatically every X minutes in the background via cron on Linux (completely invisible) and is called by the Windows Task Manager on Windows (almost invisible).

Important to know
You need to use exactly the same version on all system you deploy it. There are easy to install packages for Debian and Ubuntu and precompiled versions for Windows. I haven't worked with OS X version yet, but they should work as well. I use a Linux server, Windows on the server side should be possible to set up but it's going to be much more difficult. Setting up the client on Windows is already non-trivial.

As you don't modify the same file on both systems at the same time before a server sync, then there won't be any problems. If you do, unison will not sync them. You need to call unison by itself and it will prompt you to chose how to deal with the situation.

The Linux version uses the symlink feature of Linux to let you configure which folders to sync on the go. In Windows this won't work, so all your folders you want to sync need to be inside one parent folder. I know no way around this, though the unison config file might have a solution somewhere...

Sync script:

LOG="tee -a $HOME/logs/mysync2.log"
source $HOME/scripts/functions $HOME/scripts/variables

main ()
echo Starting at $(date)

# exit if running on battery
grep on-line /proc/acpi/ac_adapter/*/state >> /dev/null
if [ ! $? ]; # 1 if not "on-line"
echo Running on battery. Leaving now...
exit 0;
echo Running on AC Adapter.

# use ssh-agent
source $HOME/.keychain/*-sh 2>&1
echo sock $SSH_AUTH_SOCK pid $SSH_AGENT_PID me $(whoami)
ssh-add -l || (echo "SSH Key not active\!"; ssh-add || exit 1)

cd $HOME

unison-2.40.16 sync -batch -maxbackups 2 ${@} 2>&1

echo Exiting at $(date)

main | $LOG

It checks and exits when the system is running on battery. To be able to work in the background, it uses ssh-agent. So you need to setup ssh key authentication.

Unison config in ~/.unison/sync.prf:
# Unison preferences file
root = /home/user/sync
root = ssh://user@syncserver:port/syncfolder
follow = Path *
ignore = Path {scripts/s3.sh}

This is a sample config file. It follows all symlinks in the $HOME/sync folder to syncfolder on syncserver via ssh. The ignore section shows you how to exclude certain files from synchronization.

Windows Setup
This should already work just fine in Linux. Now let's turn to the Windows client.

The Window setup, as you will see, it much more "fun". There are several steps you need: Putty Agent (Pagent), Putty Puttygen and Plink (see above for links) and then a few bash scripts.

You need to copy your private ssh key from your linux box and convert it to putty's format with puttygen. Then copy it into a safe folder. I have it in the same folder as the Unison.exe. Then setup an ssh connection to your server with Putty that uses the key and save it to profile name unisonssh. Copy the following bash files to your unison folder and adjust the path names accordingly.

Putty Agent.bat:
pageant.exe sshkey.ppk
This needs to be a script or otherwise it's not started in the right folder and won't find the key. Try it with the full path of the key file then. This must be linked into Autostart if your and will prompt you for your ssh key password if your key is password protected.

SSH Connect.bat
@plink -C -ssh -load unisonssh -i "C:\unison\sshkey.ppk" -l djtm -P 22 unison -server -auto
Change the path to where your ssh key lies and the port to your server's port if necessary.

Unison Sync.bat
cd "C:\unison\"
unison2.4.exe -sshcmd sshconnect.bat -backups -backupdir unisonbackups -backuplocation central -batch -confirmbigdeletes -contactquietly

Testing it
Now is a good chance to try everything works fine. Try creating a file one one system and see how after two syncs it magically appears on the other. Edit it there to see how the edits are transferred back to the first system.

Scheduling it
Once everything works you can schedule it to run regularly without you needing to do anything. In Linux, you should install keychain for this to work in scripts and then enter the following into your cron. (To edit your cron type crontab -e)
*/15 * * * * $HOME/scripts/unisonsync
The */15 means to sync every 15 minutes. Don't worry, usually nothing will be done - I hardly ever notice anything happening. Of course the path should be where your unison sync script lies.

In Windows it's a tad more difficult again. The most difficult part of it all is to make it run in the background without annyoing you every 15 minutes or so. The following command looks a bit quirky, but that's the best I could do. Enter exactly this behind Execute: in the task scheduler.
cmd /C start /LOW /MIN "Unison Sync" "C:\unison\unison.bat"
and "C:\unison" next to execute in. Check both execute only when logged in and, under the settings tab, not to start the task if you're running on battery.

And now - finally - enjoy great, free, in sync folders!

Another older, less detailed guide is available here and here. Thanks to the authors of Unison.

DOUBLE_CONSOLE_SWITCH=true can lead to keyboard problems

With this option enabled, my keyboard was no longer working in X after suspend. In my case, with the poulsbo chipset, the better option was to switch the console *after* suspend. Then X keeps working flawlessly.

Enable XvMC on Intel Chipsets

All you need is any current distribution (Ubuntu 9.10+). Then you need to enable it in /etc/X11/xorg.conf:
Section "Device"
Identifier "Videocard0"
Driver "intel"
Option "XvMC" "true"
. Then play an MPEG2 file with /usr/bin/mplayer -vc ffmpeg12mc -vo xvmc and Enjoy\!

Which e-book readers *don't* use Linux?

If you have a look at the Wikipedia page comparing e-book readers (http://en.wikipedia.org/wiki/Comparison_of_e-book_readers) right now you find almost only Linux variants including Android. The more efficiency you need, the more Windows will no longer be able to compete, as it can't be adjusted to the circumstances. I wonder when Microsoft will start to partially open source parts of Windows...

New version of Compcache - ZRam

A new version was just uploaded writes the main developer. Now you can use it to mount /tmp there, too:

hg clone https://compcache.googlecode.com/hg/ compcache

The README file in the source root contains information on how to use it. Some of its features include (see Changelog for details):
- Devices are now called /dev/zram ( = 0, 1, 2 ...) instead of ramzswap since they can now handle any kind of I/O and not limited to use as swap.
- Replaced ioctls with sysfs interface. So no need for separate tool like rzscontrol.
- Percpu stats and buffers for improved scalability
- Lots of other cleanups, minor fixes.

(quote from http://code.google.com/p/compcache/issues/detail?id=68)

Speed up your system for free with the -ck patches

Well, okay, unfortunately it does take quite some time to compile your kernel, so really it's not for free. But you don't need new hardware to get a system that responds much quicker and more fluently - without using more power on battery thanks to dynticks. I've always wondered why in my impression the kernel had become less responsive some time after the beginning of the 2.6 era. Con Kolivas has fixed this - again. I just wish there was a Ubuntu ppa for his kernels.

Internal PDF Reader in Chromium

Chrome and Chromium are really that similar. All you need to do is:
sudo ln -s /opt/google/chrome/libpdf.so /usr/lib/chromium-browser/libpdf.so

Then you can read PDFs directly in Chromium. But be warned, this may interfere with Chrome's License as well as future Chromium Updates.

Thank you, GParted LiveCD\!

I've just used GParted for the first time. It worked fabulously for me. Resizing a partition by 14 GB and moving the other one out of the way in below 10 minutes and without any problems. The biggest problem was that the current version was not working with the Ubuntu USB boot disk creator. There was some kind of problem with isolinux or syslinux. So I just replaced it with the much preferred GRUB. (grub-install /dev/sdb1). Then I entered the settings manually and the rest was easy. I'm normally not a GNOME user, but I really love how (once booted) it just works\!

Bash CLI TCP Access

Have you ever been in the situation that you are on an absolutely minimally equipped system, yet you want to access TCP? Than BASH can be your savior. Simply use /dev/tcp to access a remote server, e.g. cat /dev/tcp/ and nc -l 1234 > test.tar.bz2 on the other side...

Linux Heavy IO Latency Issues Fixed?

A new patch was just published (http://www.phoronix.com/scan.php?page=news_item&px=ODQ3Mw) that might very well fix the latency issues many desktop users have noticed during heavy transfers to and from disk. You can get the patch here: http://lkml.org/lkml/2010/8/1/40. The patch changes vmscan.c and I wonder when it will enter mainline so it can easily be tested via Ubuntu's kernel ppa (kernel.ubuntu.com/~kernel-ppa/mainline/).

New Low Power Record - Power Management Progress in 2.6.35

I 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.

Easy Posting with Blogger from the Command Line

Posting with Blogger is now really easy just using the command line. An example command looks like this
google blogger --blog="Linux Tipps & More" --title="Some title" post "Here comes the content"

You can of course put all this into a script so it becomes even easier to post new blog entries:
google blogger --blog="Linux Tipps & More" --title="$1" --tags=$2 post "$3".

Ubuntu 10.04 working with the MSI Wind U110

I finally managed to get it to work. All I needed to do it go to /etc/default/acpi-support and set DOUBLE_CONSOLE_SWITCH to true. Now I can resume from standby in Ubuntu 10.04. For now I've only done this on my test system, but soon I will upgrade the main system - finally.

Update: Actually it's still a bit buggy then. I still get a blue flickering after resume until I manually switch to X with Alt-F7 and back a few times.

Fixing Suspend for the MSI Wind U110 in 2.6.34 and 2.6.35

The MSI Wind U110 suddenly stopped going into suspend more in newer kernels starting at 2.6.34. A kernel developed found where the issue is located. Actually the system did go into suspend mode, but it came right back immediately.

The issue is very easy and quickly solved, though, with a single simple command:
echo LID | sudo tee /proc/acpi/wakeup

Now I can go into suspend again, and the system still comes back from suspend as expected, nice! :)

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.

Fun with Compcache/RamZSwap

If you run a netbook, a system with few memory, or just for the fun of it. Using RamZSwap helps your performance and is included since 2.6.33 and really easy:

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.

Comparing Kernel Dmesgs: Remove Timing Info and Diff Side by Side

I often wanted to compare what new messages appear or disappear in a new kernel so check out what might have changed, esp. when debugging. The problem is that diff is confused by the timing information that is by default prepended to dmesg information in Ubuntu kernels.

Here's how to remove the timing information to have a clean, diff-compatible dmesg log:
sed 's/^...............//'
The command basically removes the first (number of dots ".") characters of every line.

Then you can use diff to compare the dmesg files side by side:
diff -y -w -B --suppress-common-lines dmesg-A dmesg-B
Of course this is still not magic, but at least now diff can filter out a lot of similarities for you.

Standby-Strom des Edision Avantage DVB-T Receiver - Energiespar-Tipps

Ich habe gerade mal ein bisschen rumprobiert, um zu sehen wieviel das Teil an Standby-Strom verbraucht. Normal, ohne USB oder SD-Karte, verbraucht es recht gute 1,5 Watt (Conrad Voltkraft 3000 Energy Meter, ist recht exakt, Herstellerangabe < 2 Watt). Mit USB-Festplatte, die offenbar nicht ausgeht: 3,5 Watt.

Normal:    1,5 Watt
Stick:        1,5 Watt
USB-HD:  3,5 Watt
SDHC:      4,4 Watt

Es empfiehlt sich also aus Stromkostengründen einen USB-Stick dafür zu kaufen und keine Festplatte, auch wenn letztere weniger Kostet pro MB. Sonst zahlt man das Geld über die Stromkosten wieder zurück (1 Watt sind bei 22 cent pro kWh ca 2 € im Jahr). Auf jeden Fall sollte man auf eine SDHC verzichten, die jährlich ca. 6 € an Strom zusätzlich kosten würde. Wenn man ihn vom Strom trennt, spart man ca. 3 € pro Jahr, muss dann aber natürlich auf zeitgesteuerte Videoaufnahmen verzichten.

Insgesamt bin ich mit dem Gerät sehr zufrieden, vor allem für den günstigen Preis. Es lohnt aber, noch in einen möglichst kleinen/kurzen USB-Stick (da nur vorderseitiger USB-Anschluss) und ein besseres SCART-Kabel zu investieren (das mitgelieferte macht ein sehr schlechtes Bild!).

Die Videorekorderfunktion mit Timer muss ich noch testen. Sofortaufnahme und "Pause", also "Time Shifting", haben bereits gut funktioniert.

Fast, Cheap, Reliable VPN for Linux

I did some research into VPN services because even if I'm not in the US or UK for a while I don't want to be prevented from accessing certain websites there and signing up for services there.

You can sign up to the PureVPN shared IP services here. I have good experience (hulu with maximum quality streaming, iplayer work fine) with the cheapest version.

I recommend chosing the Monthly or Quarterly plan for tests ($14), but there is a three day test account ($3) available as well. It seems there is a bandwith limit now, and without you pay more.

Payment processing can take a few hours so be aware you can't start you fun and tests directly. Settings for network manager (gnome) can be found here. It works fine for me after installing network-manager-pptp-kde. Let me know in the comments if you need help. The most important part is to deselect everything in that one list except CHAP in the advanced settings and dselect MPPE. You can also try the nm-applet from Gnome, which you can of course also use in KDE. In my experience it often works better than the KDE version anyway unfortunately.

You may run into problems if your router doesn't support pptp forwarding. Then you either get a better router, or - in the long term probably the cheaper and better option for your speed - get a better router.

By signing up via a link from this blog you support the author.

The Story of the VP8 Encoder and Decoder

An x264 developer blogs about the work on writing a decoder for ffmpeg and how the code is not really perfect and the spec not really existing:

For example, Google’s decoder will, if told to “swap the ALT and GOLDEN reference frames”, overwrite both with GOLDEN, because it first sets GOLDEN = ALT, and then sets ALT = GOLDEN. Is this a bug? Or is this how it’s supposed to work? It’s hard to tell — there isn’t a spec to say so.
-- x264dev

Interesting to see the story of the great new universally accepted web video codec from his view. I bet developers at Firefox, Opera, and last but not least Google think similarly...

Check the Strength of your Passwords

There's a great new website which tells you roughly how long it would take
to brute force crack your passwords, giving you a good indication of how
good your passwords are. Of course you should not input any of your real
passwords for security reasons, but you can just replace any small
character with any other and any special character with any other to get a
good idea of how long it would take. It's just a rough calculation.


Increase Speed and Save Traffic with Opera Turbo

If you have a traffic limitation I have some great advice: Install Opera.
Starting with Opera 10, there is the integrated "Opera Turbo". With the
help of that proxy you not only speed up the loading of websites by 4x and
more, but you also decrease the amount of data transfered, which makes
your volume last much longer.

After a whole day of 3G web surfing, Opera Turbo had saved me 2 GB of
traffic! (Only about 100 MB were left, that 20x less!) So the first thing
after setting up 3G should be setting up Opera with Opera Turbo!

Oh and you'll probably also want to put this list into your Opera urlfilter.ini. This stops Opera from loading ads, saving you even more traffic. But you can't use save as, you must use copy & paste to get rid of the html elements in the file.

Mobile Internet with the Skypephone S2 in Ubuntu

It does not (yet) work out of the box. There is a little trick you need. You need to manually load the usbserial module supplying the vendor and product ID. You can find those IDs via the lsusb command. Just add an 0x at the beginning and then load the module:

sudo modprobe usbserial vendor=0x1614 product=0x0407

The support should be automatic in one the next upcoming Linux kernels, though. You can of course automate the module load with an entry in /etc/modules:
usbserial vendor=0x1614 product=0x0407

Then the module is always loaded in the right way at boot time and you just need to plug in the mobile phone for it to pop up in Network Manager (with the help of Mobile Manager). Once that's the case in Gnome with nm-util you can use an easy wizard that should already include your settings. In Kubuntu 9.10 the KDE support for connecting was broken, though. But it's fixed now in Kubuntu 10.04. Too sad many of these changes are never backported...

And now: Enjoy mobile Internet! (And don't miss my next entry on how to save traffic and speed up your new mobile internet.)

If you're in the UK, order your next Three SIM via my agent link, please.

Backlight Finally Works - Generic Poulsbo GMA 500 Fix via ACPI Video Interface

The trick is to go into drivers/acpi/video.c and remove the part that disables the acpi handling if there is an intel opregion present. The patch looks like this:
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index 60ea984..ad8fc2d 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -2394,9 +2394,6 @@ static int __init acpi_video_init(void)

- if (intel_opregion_present())
- return 0;
return acpi_video_register();

You can compile the module by getting the sources of your running kernel, cding into the acpi directory (drivers/acpi), applying the acpi patch and then executing
make -C /lib/modules/$(uname -r)/build M=$PWD video.ko

Then just sudo insmod ./video.ko.

Alright, here's the more elaborate version by Joey Lee hopefully entering the kernel soon:
drivers/acpi/video.c | 17 ++++++++++++++++-
include/linux/pci_ids.h | 1 +
2 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index 9865d46..25a70e0 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -88,6 +88,11 @@ static int acpi_video_bus_add(struct acpi_device *device);
static int acpi_video_bus_remove(struct acpi_device *device, int type);
static void acpi_video_bus_notify(struct acpi_device *device, u32 event);

+static const struct pci_device_id intel_drm_blacklist[] = {
+ { } /* Terminating entry */
static const struct acpi_device_id video_device_ids[] = {
{"", 0},
@@ -2531,8 +2536,11 @@ static int __init intel_opregion_present(void)
#if defined(CONFIG_DRM_I915) || defined(CONFIG_DRM_I915_MODULE)
struct pci_dev *dev = NULL;
u32 address;
+ int i;
+ bool in_blacklist;

for_each_pci_dev(dev) {
+ in_blacklist = 0;
if ((dev->class >> 8) != PCI_CLASS_DISPLAY_VGA)
if (dev->vendor != PCI_VENDOR_ID_INTEL)
@@ -2540,7 +2548,14 @@ static int __init intel_opregion_present(void)
pci_read_config_dword(dev, 0xfc, &address);
if (!address)
- return 1;
+ for (i = 0; intel_drm_blacklist[i].device != 0; i++) {
+ if (dev->device == intel_drm_blacklist[i].device) {
+ in_blacklist = 1;
+ break;
+ }
+ }
+ if (!in_blacklist)
+ return 1;
return 0;
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 3bedcc1..78858b1 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -2669,6 +2669,7 @@
#define PCI_DEVICE_ID_INTEL_82443GX_0 0x71a0
#define PCI_DEVICE_ID_INTEL_82443GX_2 0x71a2
#define PCI_DEVICE_ID_INTEL_82372FB_1 0x7601
#define PCI_DEVICE_ID_INTEL_82454GX 0x84c4

Quick Fix for Your Multimedia Keys

If your multimedia keys give this warning in dmesg:
atkbd.c: Unknown key pressed (translated set 2, code 0xf7 on isa0060/serio0).
atkbd.c: Use 'setkeycodes e077 ' to make it known.
then you need to look up the right number in include/linux/input.h e.g.here. E.g.
And use that number with setkeycodes, e.g. for my system:
setkeycodes e077 224 # brightness down
setkeycodes e078 225 # brightness up
setkeycodes 0xee 212 # webcam
setkeycodes 0xe4 240 # touchpad -> unknown
setkeycodes e076 238 # wifi + bluetooth
And now your system (e.g. KDE or Gnome) should immediately recognize the keys. Post the information to your distribution and it should be included in future releases. Just write the commands (without sudo) into /etc/rc.local to make them permanent for now.

If you get stuck, here's a good guide.

What Linux means for the Consumer - Drivers, Open Source and Support

When a consumer installs a Linux system, this has various consequences for him, which are sometimes hard to estimate at first. I've written a little summary touching the differences to Windows and Mac OS X in drivers, open source and support.

Linux is not yet as far spread as Operating Systems like Windows or Mac OS X. This means that hardware corporations which have little money or skilled staff usually don't publish their own Linux driver and ship it along with the hardware when you buy it. In short: There currently is usually no driver disk for Linux.

But that's not really as a big a problem as it seems at first. One point is that - especially if the poor or skill lacking company is smart and publishes detailed product specifications - drivers are often written by the community. This has the disadvantage that it takes longer and when a device is first release, there is not usually no driver ready yet.

But it also has several advantages: Once drivers are written, they are usually open source. For the advantages, see below in my next point. And the drivers eventually are often better and more extensive than the drivers delivered by the hardware manufacturer. E.g. the bttv drivers of my TV card worked much better and longer than their Windows counterparts. And there was even an additional driver not present in Windows for a sound chip on the TV card to digitalize TV and line input sound up to a rate of 192 Khz -- for a TV card produced in 199X! My current sound card - using the snd-hda-intel driver - for some reason has a significantly better sound in Linux than in Windows, where it pretty much lacks any bass.

A huge advantage is the common API of drivers. In Windows every manufacturer writes his own drivers with their own API, and their own software to use the API. E.g. A DVB-T digital TV card has a Windows driver, and a special decoding and recording software for each and every single card. Sometimes the main chip and driver comes from the same manufacturer for several cards. But it's still often difficult if possible at all to use another software than the one supplied by the manufacturer.

In Linux, there is a common DVB interface. This means you can not only use the same software for all DVB-T receivers, you can even often use the same for DVB-T(errestrial), DVB-S(atellite), and DVB-C(abel). And it makes perfect sense that instead of tens of quickly written (and often buggy) different applications for different cards, you have a selection of a few really good programs. (E.g. Tvtime and others for analog, Kaffeine and others for digital reception -- and I mean for all supported ones).

In Windows, if there is a new group of popular hardware, like WIFI or Digital TV adapters, you need to wait for Microsoft to release a common API and hope they do. That's likely to happen only in the next Windows Version (e.g. XP, Vista). And then everything must be backwards compatible. This means that a better API might not be introduced for Windows XP ever, and advantages for new APIs are restricted by the requirement that all old APIs have to still work exactly the way they did. With open source drivers in the kernel tree, you can just modify the drivers along with the API. It's all in the same place and some changes are simply a matter of "search and replace".

Once a good open source driver exists, and especially if it gets integrated into one of the main driver projects, it usually works out of the box. This means you start Linux, even from a Live CD, and the hardware, e.g. a sound card, scanner or TV card just immediatelly works without any fuss like driver installation or configuration. It's not like installing Windows and then downloading the drivers for all your software, but if the driver is well supported, it just all works after installing the sytem. That's why Live CDs are so useful to test the Linux compatibility of a computer's hardware. And another great thing is that these integrated drivers are automatically updated for you - for Ubuntu even without the need to reboot (for other distributions you need to pay for this feature). This prevents security risks, which are much more rare in Linux, anyway.

Open Source
Open Source is a guarantee that a good product can have a long life-time. Drivers are one excellent example. If you have an open source driver, and it's of good quality and integrated into the Linux kernel or one of the main user land driver projects (SANE, CUPS, ALSA), you will have a driver for a very, very long time. This means that unlike with Microsoft and Mac OS X systems, you will not need to buy a new scanner, because you can't find a driver for Windows 7 or the "Snow Leopard", but quite the contrary the driver usually gets better and better and you often have no problems whatsoever with using a 10 years or older scanner, printer, sound card, TV card, etc with the newest Windows version.

My DVB-T adapter has lots of features it lacks in Windows, including recording up to 4 channels in one bouquet at once, 50 fps deinterlacing, hardware accelerated video decoding, automatic scheduled recording, etc. I just got a new sound card, which uses a lot less CPU and doesn't have a few of the Windows issues like skipping and beeping during playback. Even the pretty new Intel poulsbo chipset already works better for me in Linux now than in Windows (lower battery consumption, better video scaling and hardware accelerated video playback, much faster resume from suspend (feels like 1 second max, dmesg says 2.5 seconds; Windows takes a felt 4-15 seconds), ...). Thanks to Linux my Netbook is now a full featured surround sound FullHD video center and it consumes even less battery than in Windows.

But open source also means that things are customizable. This would of course also mean that if you can program yourself you can potentially modify and fix as many issues with software and drivers as your skills permit. And this is one of the main driving forces of Open Source. But it also means that if there is a problem, the fix can be applied where it makes the most sense. Let's make another example in comparison to Windows.

In Windows if there is a bug in the suspend to ram mechanism, which causes problems for a certain hardware, this is quite hard to figure out in the first place. Because you don't know how the Windows mechanism works. If it was publicly known, Linux would have a much easier way with ensuring suspend to ram compatibility for more hardware. Once you figure out where the problem is in Windows, you still have no way of fixing the problem where it occurs.

Because you can't modify any Windows components. That's completely different in Linux - here anyone can modify anything. I once wrote a small Linux kernel patch myself, and I'm really not that much of a programmer. But with the help of some kernel developers I fixed my own problem and then posted my first Linux kernel patch.

Another great example is powertop. It's a tool to check what decreases your battery time in Linux by looking into which applications wake up your CPU from power saving modes and how often. For this to work the kernel had to be modified. Once this was done you could find out which programs are the main cause. And then, because they are also usually open source, you could modify them as well so they don't wake up the processor as often. And that's how my netbook now consumes less power - in some scenarious a lot less - in Linux than in Windows. All this would not be possible in a closed source world. The same is now done for latency with latencytop btw.

The disadvantage with support in Linux and Open Source is that if you don't pay for it, you won't get people who will treat you like you paid for it. This means it's very un-wise to contact driver or other software developers and say: "You've got to fix this!" Because they really, really don't have to. They are in no way obligated to you. You should always remember that. Only some people get paid for their work for open source at all. Many start a project and keep working it to scrach and itch (see here, and here). And I think it's how Linus started the Linux kernel project sometime long ago. If you want support that treats you like you've paid for it - get paid support!

But the big advantage in Linux support is that if you have a clue, you have access to incredibly smart people. You can talk directly to the developers and they usually know their stuff really, really well. Yes it can be a problem to get an answer sometimes, but if you've read the manual, you really know what you're doing, keep in mind that you didn't pay them and appropriately contact them very politely, you will be amazed how much is possible.

I still remember how helpful, friendly and patient the KDE plasma developers were when I wrote my first plasma-applet. I remember how the Linux kernel developers take every issue seriously and try to help you find the problem, especially with regressions.

And in my view it's so incredibly much better than most hardware manufacturers who you pay with buying their products to get support. You usually first get stuck with incompetent telephone support and are really lucky if you ever get to contact the driver developers or someone anywhere near them. And then those driver developers usually get their money for writing bleeding edge new drivers for new hardware, or they need to write a driver that's compatible with the newest Windows release (without really knowing how everything works on the Windows side).

They usually have little patience and understanding for a not working driver in some system and say that your supplier should fix the issues. (E.g. NVIDIA would say the graphics card manufacturer should fix the problem and Intel would say your Notebook manufacturer should deal with the problems.) But open source developers will usually understand you well, because that's often why they wrote the driver in the first place, so as many people can use it without problems as possible. Here the problem is usually not the lack of will, but of your politeness, your and their time and other resources.

You have to ensure that hardware is Linux compatible before you buy it. If you're lucky and you find open source driver integrated into the Linux kernel or one of the main driver projects, you are most likely to be able to really enjoy your hardware in Linux for a very, very, very long time and there will be no need miss out on the newest features and software coming for free with the newest release of your favorite distribution. If something doesn't work you're expected to do your part and google and try everything you can to fix it, including postings in a forum and on a user mailing list before contacting the developers. This way they have more time for and fun with actually fixing the problem.

But it also means that for not paying for Windows and the drivers, you can't expect the same support. If you want the same level of support, try offering money to the developers you want the support from (paypal helps) or buy a support service. I'm sure they're much more likely to help you in a way similar or better than Windows then.

I'm happy about your thoughts and comments. And remember I don't get paid for writing this either - as you can't even see ads on this page.

All trademarks belong to their respective owners, not to me.
(Windows, Windows XP and Windows Vista->Microsoft, Mac OS X -> Apple, Linux to Linus Torvalds etc.).

Backlight Control on MSI U110 Netbook

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"). Check for updates to get it working well with KDE.

I've contacted the driver developers and I hope we can make some progress on the drivers soon.

Setting Up VAAPI Hardware Accelerated Video Decoding for Ubuntu 10.04 (example Intel Poulsbo GMA 500)

(For the more detailed guide for Ubuntu 9.10, which works much better for me, including suspend to ram, see here.)
This is just a really, really short basic howto for setting up the poulsbo X driver and VAAPI video acceleration on Ubuntu 10.04. I will post more details later.

1. Install the poulsbo driver:
sudo add-apt-repository ppa:gma500/ppa
sudo add-apt-repository ppa:gma500/fix
sudo apt-get update
sudo apt-get install poulsbo-driver-3d

2. Set up the Xorg.conf:
Section "DRI"
Mode 0666

Section "Device"
Identifier "GMA500"
Option "AccelMethod" "EXA"
Option "DRI" "on"
Option "MigrationHeuristic" "greedy"
Option "IgnoreACPI" "yes"
Driver "psb"

3. Reboot, check it's all working.

4. Download the right mplayer version:
wget http://www.splitted-desktop.com/~gbeauchesne/mplayer-vaapi/mplayer-vaapi-20100114.i686.tar.bz2
unp mplayer-vaapi*

5. Install the necessary libraries: (you can remove mplayer then, but it's the easiest method)
sudo apt-get install mplayer libgtop2-7

6. and play
mplayer -vo vaapi -va vaapi testfile.avi

If mplayer doesn't run because of missing libraries, this command will show which libraries are missing:
ldd mplayer-vaapi*/mplayer

Be quick, before the instructions change due to new repositories, libraries, etc... But don't everything to work flawlessly! My system doesn't even go into suspend, but crashes. Hence it can't come out of suspend, either. Backlight control still doesn't work for me. And I still have to do more testing on mplayer to see how smooth VAAPI actually is.

Theoretically, installing VLC 1.1.0 with VAAPI should be as easy as this:

sudo add-apt-repository ppa:c-korn/vlc && sudo apt-get update && sudo apt-get install vlc

But it didn't work out of the box for me and I didn't care about why. If you have hints, questions or - yes- comments, please post in the comments.

Ubuntu 10.04 Lucid Upgrade Went Fine

The upgrade went absolutely flawless for me. There was only one dubious moment: At the almost very end of the upgrade the system started counting upwards very slowly from 0 to 100. This did really take several minutes in my case and the counting number without any further notice was a bit confusing and tempting me to abort the upgrade. But my patience was rewarded with a system which still worked flawlessly after the upgrade.

My GMA500 (Poulsbo) netbook will still have to wait a bit, I want to be sure the graphics work fine -- including VAAPI acceleration -- before I start the upgrade. But of court LTS makes it very attractive then.

It turns out though the backlight control is much prettier, it's also broken and thus much more useless...
But I really like that most customized repositories were automatically re-enabled as lucid variants after the upgrade.

Saving 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.

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.

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.

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.

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").

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.

Power Naps for your Linux System

I'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 "powernap".

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.

Fixing Mplayer's Terminal Abuse, esp. for KDE and Windows

Mplayer updates the information about the amounts of frames it displayed, the played time, the remaining time, etc. every single time it displays a *frame*. This is not only completely unnecessary, it can unnecessarily hog several percent of your CPU in many terminal implementations, especially in current KDE 4 and Windows. The higher the frame rate, the more wasted CPU power.

On my netbook, the difference is 10% CPUand more with a 25 frames per second video - that's as much and more than mplayer uses for a simple Xvid video. And it could easily make the difference between a well playing file and one that's glitchy. (The CPU time is occupied by konsole 4.3.2 though, not by mplayer itself.)

The only way out would be -quiet. But then you wouldn't know what's going on anymore at all. That's why I had written and submitted roughly the following patch to fix this behavior. Unfortunately even after I made all the requested corrections, it was never applied without any reasons provided, or were there?. So I decided to publish it here so people at least know about it. But it also means unless I can convince someone here, you will have to compile mplayer and apply the patch yourself.

There are many guides how to compile mplayer. Before you start the compilation process, just copy this following block into a file quiet.patch and then apply it inside the svn directory with "patch -p0 < quiet.patch", then compile mplayer normally. You can now use the parameter -quiet-time. A value of 1 means a status message no more often than every 100 milliseconds (0,1 seconds). I think a good value is 5. You will notice that e.g. konsole uses less CPU during playback now. Enjoy the power of open source and let me know how it works for you!

Index: DOCS/man/en/mplayer.1
--- DOCS/man/en/mplayer.1 (Revision 29324)
+++ DOCS/man/en/mplayer.1 (Arbeitskopie)
@@ -732,6 +732,12 @@
handle carriage return (i.e.\& \\r).
+.B "\-quiet-time \ "
+Reduce console output updates to n per tenth of a second.
+Values of 5 or more work around slow terminals.
+See \-quiet for more.
.B \-priority (Windows and OS/2 only)
Set process priority for MPlayer according to the predefined
priorities available under Windows and OS/2.
Index: mplayer.c
--- mplayer.c (Revision 29324)
+++ mplayer.c (Arbeitskopie)
@@ -81,6 +81,7 @@
int slave_mode=0;
int player_idle_mode=0;
int quiet=0;
+int quiet_time=0;
int enable_mouse_movements=0;
float start_volume = -1;

@@ -1936,6 +1937,11 @@

static void adjust_sync_and_print_status(int between_frames, float timing_error)
+ static unsigned last_status_update=0;
+ unsigned now=GetTimerMS();
+ if (quiet_time && now >= (last_status_update + quiet_time * 100))
+ last_status_update=now;

@@ -1987,6 +1993,7 @@
+ if (!quiet_time || (last_status_update == now))
print_status(a_pts - audio_delay, AV_delay, c_total);

@@ -1994,6 +2001,7 @@
// No audio:

if (!quiet)
+ if (!quiet_time || (last_status_update == now))
print_status(0, 0, 0);
Index: cfg-common-opts.h
--- cfg-common-opts.h (Revision 29324)
+++ cfg-common-opts.h (Arbeitskopie)
@@ -8,6 +8,7 @@
// ------------------------- common options --------------------
{"quiet", &quiet, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
{"noquiet", &quiet, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
+ {"quiet-time", &quiet_time, CONF_TYPE_INT, CONF_RANGE, 0, 65536, NULL},
{"really-quiet", &verbose, CONF_TYPE_FLAG, CONF_GLOBAL|CONF_PRE_PARSE, 0, -10, NULL},
{"v", cfg_inc_verbose, CONF_TYPE_FUNC, CONF_GLOBAL|CONF_NOSAVE, 0, 0, NULL},
{"msglevel", msgl_config, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
Index: mencoder.c
--- mencoder.c (Revision 29324)
+++ mencoder.c (Arbeitskopie)
@@ -131,6 +131,7 @@
//void resync_audio_stream(sh_audio_t *sh_audio){}

int quiet=0;
+int quiet_time=0;
double video_time_usage=0;
double vout_time_usage=0;
double max_video_time_usage=0;
@@ -1420,8 +1421,14 @@
+ static unsigned last_status_update=0;
+ unsigned now=GetTimerMS();
+ if (quiet_time && now >= (last_status_update + quiet_time * 100))
+ last_status_update=now;
if(!quiet) {
if( mp_msg_test(MSGT_STATUSLINE,MSGL_V) ) {
+ if (!quiet_time || (last_status_update == now))
mp_msg(MSGT_STATUSLINE,MSGL_STATUS,"Pos:%6.1fs %6df (%2d%%) %3dfps Trem:%4dmin %3dmb A-V:%5.3f [%d:%d] A/Vms %d/%d D/B/S %d/%d/%d \r",
mux_v->timer, decoded_frameno, (int)(p*100),
(t>1) ? (int)(decoded_frameno/t+0.5) : 0,
@@ -1434,6 +1441,7 @@
duplicatedframes, badframes, skippedframes
} else
+ if (!quiet_time || (last_status_update == now))
mp_msg(MSGT_STATUSLINE,MSGL_STATUS,"Pos:%6.1fs %6df (%2d%%) %5.2ffps Trem:%4dmin %3dmb A-V:%5.3f [%d:%d]\r",
mux_v->timer, decoded_frameno, (int)(p*100),
(t>1) ? (float)(decoded_frameno/t) : 0,

Must Read Article on the Issues of Ubuntu, Open Source and Linux


Intel Poulsbo Frustration Continues a Year Later

I'm also frustrated. I happily bought my netbook about exactly a year ago as many others in the hope that Intel would provide a well working open source driver, at least excluding 3d and VAAPI. Then I managed to get it running at all and then including 3d and vaapi (see http://linux-tipps.blogspot.com/2009/12/vaapi-accelerated-hd-video-on-msi-wind.html) and i was quite happy.

But I never managed to get several things to work:

  • reliable standby (works once or twice if I haven't used 3d or vaapi)
  • backlight regulation.

Does anyone know how to fix any of this?

Now I have the crazy situation that in Windows XP I can use standby and 3d but no HD, and in Linux I have better quality and VAAPI HD video playback and 3d, but no standby. And I'm frustrated.
It's such a nice netbook and performs so well otherwise, it's really sad and frustrating if drivers keep you from really enjoying what you bought.

I don't even know if and how long I will be update my OS. It's already unclear if I would lose VAAPI and/or 3D acceleration when I upgrade to Kubuntu 10.04 -- if X would still work at all. But I have no idea how long drivers will still be developed or at least maintained if there is no open source version.

So please Intel, if not an open source driver then at least release open source specs!!!

I've actually managed to get standby working pretty reliably. The computer returns back from standby with amazing speed, too. The trick was to update the bios to the newest version. This fixes prior crashes during resume. But the crashes in Windows XP when I try to use DXVA persist.

Now the problem is that my wifi and sound drivers are still problematic after resume. My wifi driver causes kernel panics and my audio driver simply stops working...

Creative X-fi Surround USB Review and Guide for Ubuntu 9.10 or Newer

This article will review the Creative X-fi surround usb first quickly in Windows XP and then in Linux. It will give you some basic performance ideas and hints for fixing problems and having more fun with it.

After my survey of the possibilities for USB surround sound in Linux, I ended up ordering a Creative X-fi Surround USB. As you could read there, there is a helpful webpage that includes e.g. ready made .asoundrc files.

Windows XP
On my netbook, without installing any special drivers, playing a song on an otherwise unoccupied Windows XP utilizes about 20% CPU, minus the almost 5 % that somehow seem to be there almost always...

I've read reports that there are clicking sounds, which I can imagine well with a heavy system load. I've heard them at first after plugging it in, but by now they disappeared. It sounds crisp on my Sennheiser headphones and the base is noticeably better than my onboard sound, obviously, but that doesn't say much.

Now let's see how it fares in Linux...

Reboot. Plug. Play. It could hardly be easier. All I had to do was to tell mplayer which device to use (mplayer -ao alsa:device=hw=S51). Then it happily started playing over my new external sound card. The sound is as excellent as under Windows. But better than Windows: Surround sound works out of the box in my Kubuntu 9.10 system.

The combination of AC-3 surround with VAAPI accelerated 720p movie on my netbook utilizes around 10-12 % CPU. There is no stuttering in Linux, even with heavier load. Just playing music hardly seems to have any impact -- maybe around 5 % CPU. I'll have to let the Phoronix suite benchmark all this sometime. In Windows even just playing music in VLC and increasing the volume setting with the knob on the device can create stutters.

Right now for some reason the slightly dusty Chromium version on this netbook keeps bringing the system into a hard stutter making characters appear slowly on the screen up to a second after I type and the mouse does not move smoothly. But the sound plays smoothly in the background. Just plain wonderful.


I can definitely recommend the sound card for USB (surround or stereo) sound in Linux. I'm not sure if I would use it for Windows. Let's see after I installed the drivers, which will probably drive me mad.

But be aware that there are clicking sounds when the card is first intialized. If you want to use it for e.g. system sounds, you may not be very happy with that. They also seem to appear during heavy disk access (apt-get dist-upgrade), even if I'm not playing any music. That's definitely weird...

The microphone input works flawlessly. I didn't have problems with over-amplification, though I can imagine that being an issue with the lack of hardware mixing. And I definitely have a sound card for surround sound HD movie nights now. And the crazy thing is I can do it all perfectly with my little netbook. Thank you, Linux. Thanks also to you, Mandar.

Post Scriptum
Some additional information for nerds: When the card is not in use, it produces not wakes in powertop, when in use, it produces about 200-300 wakes/s (no matter if surround or stereo sound).

The clicking sound seems to be related to the power supply. The problem disappears in the same work load (e.g. heavy disk updatedb) if I plug the power adapter into my netbook.

As I almost expected the device is not anywhere as good in Windows as in Linux. The crystalizer does sound nice, but there are many glitches in the Windows driver. E.g.

  • sometimes when you pause they playback, the result is a constant beep until you press play again, 
  • during forwarding in movies, there are short beeps. 
  • Once after removing the plug and putting it back inside, the entire system hung, only working again after removing it again and then showing and error message. 
  • the driver uses much more CPU than in Linux and it's a 50 MB package
  • there are no volume controls for rear, center, lfe and front channels, only 1 master control (in Linux you can fix this -- maybe MatrixMixer works for Windows?)
  • the microphone input sounds slightly noise shaped, esp. in combination with the "crystalizer"
Hence I would make my recommendation more clear: I wouldn't recommend it for surround sound in Windows I think. It might still be your best option due to the lack of alternatives, though.

Update3 (9/2011)
Unfortunately I only just tried recording in Linux for the first time. And it seems it doesn't work at all. I got only noise. I've tried Line in and Mic in. There's no real setting for the record options anyway. (Which channel, etc.) So that's definitely a downside. I had never tried that in Linux before. btw. Check here to get the remote control and volume know working. It should come out of the box with kernel 2.6.37+.

And here's my .asoundrc so far:

pcm.!default {
type plug
slave.pcm "softvol" #make use of softvol

# create softvol master channel
# see http://alsa.opensrc.org/index.php/How_to_use_softvol_to_control_the_master_volume
pcm.softvol {
type softvol
slave {
pcm "dmixer2" #redirect the output to dmix (instead of "hw:0,0")
control {
name "Master" #override the PCM slider to set the softvol volume level globally
card S51

# create stereo dmixer, because using the 6 channel one causes stutter if the channels are empty
pcm.dmixer2 {
type dmix
ipc_key 2343
slave {
pcm "hw:S51"
channels 2

pcm.dmixer6 {
type dmix
ipc_key 2342
slave {
pcm "hw:S51"
rate 48000
channels 6
period_time 0
period_size 1024
buffer_time 0
buffer_size 4096

# reroute the channels because rear and sub/lfe are exchanged
pcm.mysurround {
type route
slave.pcm "dmixer6"
slave.channels 6

ttable.0.0 1
ttable.1.1 1
ttable.2.4 1
ttable.3.5 1
ttable.4.2 1
ttable.5.3 1