A new life

In 2009 I switched my job, moved to a new city and bought a new computer. As it turned out the acer laptop had a couple of very anoying problems. The showstopper was it's tendency to crash when compiling bigger SW packages like Qt. As my new job was maintaining Qt this really didn't do. So I switched back to a "normal" computer again. This is the solution to the small number of small problems that I had with it.

The setup

The new computer has a Intel Core Duo 8500 (only 60W energy consumption and two fast cores. I thought that this would be much better than four slow cores that are not used, expecially when playing dosbox games). It hat a Asustek P5QL Pro motherboard and a Nvidia GeForce 9400 GT passive cooled. Then I also bought a new case, a 1TB harddisk and 4GB memory.

The SW

For a system I switched from WindowMaker on Gentoo to KDE on Ubuntu. A good decision as much more works out of the box. Installs are so much faster. Just bad that it's so much harder to get up-to-date packages now. You usually have to wait for a big system update and then get all the new problems connected with it.
And I switched over to 64 bit. Also without problems.

Harddisk setup

As file system I am now using JFS on all harddisks. I like it because it's fast, formating is super fast and the file system check is also fast. What do you want more?
But it also caused some small problems because after the install I noticed that my boot partition (ext2) was too small. Ubuntu installs new kernels quite frequently and my boot partition could only hold two of them. Also it turned out that hibernate best works with a swap partition.
No big problems in principle, however there are currently no out of the box tools to shrink jfs partitions.
Also it seems that some some kernels have problems with JFS. 2.6.32-22 works, -23 and -24 had problems on my machine.

I want silence

The processor is has a cool water cooler. So no fan here. The graphic card is passive. No fan here either. The PSU is a Silverstone SST-ST40NF Nightjar power supply. Really running cool and no fan.
I could have been happy but it turned out that without case fan the chipset, RAM and harddisks would heat up too much. At least more than I thought healthy.
On the other hand the two case fans in my Lin Li PC-60FNW window edition tower were much to loud. The case looks really good and I love the power button and USB connections on the top, but then I also want silence.
Here started the odyssey with the Winbond w83627dhg super IO chip which controls disks, voltages, temperature and fans. The P5QL Pro has three connectors for fans. The w83627dhg can control the speed of up to five fans using three different modes. So I thought: Hey, just a buggy driver. Now it turned out that not only the driver wouldn't let me control the speed of the fans. (Also the bios ACPI tables were buggy and missing the temperature profiles.)
Also it turned out that the PSU and case fans have only three pin connectors. For PWM fans (that are the only ones that can be controlled) you need four pins. Also slowing a fan down with a small resistor does not really work. The fans tend not to start up and a small resistor get's very warm.
So let's summarize that: The only fan that can be controlled by the P5QL Pro is the CPU fan. Fixing the linux driver (as it does not fully support the w83627dhg does not make any sense). I solved the problem with a Coollink SWiF2-1200 fan. One keeps the mainboard temperature at 36°C while being sufficiently quiet (but not silent).

The second source of noise turned out to come from an old hard disk. Ubuntu does not set a default spin down time for it's hard disks even though a sufficiently long time would make sense.
So set it yourself in /etc/hdparam.conf and don't forget to switch off the hdparam power management script or it will reset your configuration every time when going or coming out of suspend.

I want noise

Update: The Pulse Audio library is getting better. It now supports digital output as good as the analog one. However it does go directly to the hardware devices. On most sound cards that means that either Pulse Audio will make noise or the rest of the world, but not both. There is a pulse audio plugin for Alsa that can be set. Many people seem to be happy with this whole setup. For me it was easier to edit /etc/asound.conf and "apt-get remove pulseaudio".

The first problem was Alsa again. I thought that the time of writing Alsa configuration files was finally over. But that's not the case when you are using digital output. Then the trouble starts. Usually the soundcards don't know how to mix or change the volume for the digital output. This was also the case for the build in Realtek ALC1200 chip. So I needed some time to fiddle around.
To make a long story short. Use the following configuration file to get a mixer an additional volume slider called Software:

pcm.digital {
    type hw
        card 0
        device 1

ctl.digital {
    type hw
        card 0
        device 1

pcm.dmixer { 
    type dmix 
        ipc_key 1024
        ipc_key_add_uid false
        ipc_perm 0666           # mixing for all users
        slave { 
            pcm "digital" 
                period_time 0 
                period_size 1024 
                buffer_size 8192
                rate 44100
                channels 2
    bindings { 
        0 0 
        1 1 

pcm.softvol {
    type softvol
        slave.pcm "dmixer"      #redirect the output to dmix (instead of "hw:0,0")
    control {
        name "Software"       # set to PCM override the PCM slider to set the softvol volume level globally MASTER is not allowed
            card        0

pcm.!default { 
    type plug 
    slave.pcm "softvol" 

pcm.phonon { 
    type plug 
        slave.pcm "softvol" 
        hint {
            show on
                description "Digital out enhanced" # Anzeigename in den Phonon-Einstellungen


# for OSS
pcm.dsp0 {
    type plug
        slave-pcm "softvol"

ctl.dsp0 {
    type plug
        slave.pcm "digital"

ctl.mixer0 {
    type plug
        slave.pcm "digital"

This file is stored at /etc/asound.conf for a global sound configuration. After writing the file you can try to activate the S/PDIF output with alsamixer. Alsamixer is your friend.
Now you can try to switch the KDE audio output to "Digital out enchanced". I also tried to get rid of everything PulseAudio. Then you can also switch the master channel of KMix to the new "Software" channel.
Also if you fiddle around too much with the Alsa configuration you can run into problems. At one point of time the KDE settings got confused and at another point Alsa stored all the different SW mixer names in the settings file that is automatically written when you reboot. It's very hard to get rid of that.

Microsoft natural ergonomic keyboard 4000

Update: I managed to get the inet layout fixed. Ubuntu 11.04 comes with a keyboard configuration that seem to support all the silver extra keys on the Microsoft natural ergonomic keyboard. It a little bit different from the patch that I have below, but it's still good.

I also bought the Microsoft natural ergonomic keyboard 4000. I like natural keyboards and this is one of the few naturals on the market. Also it's the one I am using at work.
With this keyboard you don't have all the multimedia keys you like to have and the five favorite keys at the top are not supported by xorg currently. (The zoom key is also not supported but who needs that anyway?) It turned out that there is already a bug for this problem at freedesktop.org.
There are a lot of nice descriptions how to change your keyboard layouts. One nice one is here: Extending xkb The following solution is easier and faster.
Start with patching the xkb definition file. It's called inet and the following patch should do it. KDE is cool as it shows the setxkbmap command at the bottom of the keyboard settings dialog. Mine looked like this: setxkbmap -layout de -variant nodeadkeys If you add a -print it will show you the used section. This should read evdev.
Now restarting X will not get you the new keyboard layout. Also calling setxkbmap with the old settings won't. I needed to change the keymap. It seems that X is caching it somewhere and won't re-read the file unless something big changed. The following command did it for me: setxkbmap -model microsoft7000 -layout de -variant nodeadkeys
Now you can start using the new keys, but don't be surprised. To avoid problems with already existing Symbols I used XF86Launch3 for the ‘1’ key. Qt will add a couple of numbers (because there are also other keys called Launch) and display it as ‘Launch (5)’.

Watching video on second screen

The nvidia driver still ignores external displays (like my projector) if they are switched off when X is started. With Gentoo I had a second X configuration and a script that started a second X-server, executed the video player on it and then stopped X again. This does not work as easy on Ubuntu as a normal user is not allowed to start X. Also I had problems with sound in the second server, so I searched for a better solution.
It turned out that nvidia-settings has a lot of command line options. One of them allows to probe for new devices, however it does not allow to generate the needed modmaps for xrandr. A small tool in the nvidia-settings-dev package has this option. You might need to add the source repositories to /etc/apt/sources.list Then you can download it with apt-get source and try to build it. The following commands did the trick for me:

apt-get source nvidia-settings
cd nvidia-settings-195.36.08/
mv src/libXNVCtrl/libXNVCtrl.a{,.old}
cd samples/
The result should be a nv-control-dpy The following shell commands will then probe your display and activate it:
  nv-control-dpy --probe-dpys
  nv-control-dpy --dynamic-twinview
  xrandr -s 3840x1080
(the xrandr line depends on your resolution.)
As clever as this solution is I don't use it any longer as I use hibernate whenever possible and this keeps the last screen layout.


After moving my system to a new drive I had some troubles. Grub 2 does not make it easy to do this and the distributed configuration files of Ubuntu make it even harder. But the hardest of all was to get hibernate working. This post helped me a lot. Its in German tough.

After an Ubuntu natty update I had the problem that the wake up from hibernate would hang. It turned out that removing the uswsusp package (that I seemingly previously installed) solved the problem. I am happy again.

Last updated August 16 2011