Linux tribulations

UPDATE: Now that the development of Debian Squeeze is frozen (this happens typically a few months before a testing release becomes stable), I decided to reinstall Squeeze from scratch. Most of the problems outlined below have disappeared and therefore this post can be considered essentially outdated.

Contradicting myself, I have decided to switch to Debian Squeeze in both my laptop and my workstation. I found Debian Lenny and Scientific Linux (RHEL) to be too out of date. That would not be much of a problem if developers did not tend to use the latest of the latest in terms of libraries when writing their code. Squeeze should be a good compromise (I hope) between stability and currentness.

The installation on the workstation proceeded without problems. However, I needed the proprietary Nvidia driver (195.36.31, x86_64) and that gave me a lot of problems. I needed a dual-head configuration and one of the monitors was not properly recognised by the driver (which set a wrong resolution). The solution to this problem is in this xorg.conf file. I guessed the information for the Zalman monitor from the /var/log/xorg.0.log file produced upon first boot by the nouveau driver, which, in turn, correctly configured the monitor. The lesson to be learn is that if the nv or the nouveau drivers correctly detect your monitor, you should put /var/log/xorg.0.log in a safe place for further reference just in case the Nvidia driver messes everything up. Please be ware that the NoDFPNativeResolutionCheck is a potentially dangerous option, as the driver will not double-check and will just believe what you put on the configuration file, so you better get it right…

The installation and configuration on the laptop was rather troublesome. Even if I used the same installation CD (netinstall, daily builds from 15 June 2010, AMD64), the installation took ages and hanged several times. I was only able to complete the installation in graphical mode.

The laptop is a NEXOC Osiris E 705 III (8800 GTX Extreme Edition). Under the hood this means CLEVO M57RU (synonym of M570RU). Most of the stuff bellow also apply to other AMD64 distros such as Debian testing-based distros and Ubuntu and derivatives.

Once installed, I run into the following problems:

1) As with Ubuntu, the ethernet r8169 driver makes the computer freeze on high load (the better the connection, the most likely it will hang up). This is a problem with the driver, which I believe it comes as a kernel module. Of course, the kernel developers would say that my card, BIOS or chip are buggy and does to respect the standards. Quite likely they are right, but yet… The solution is blacklisting r8169 and compiling r8168B, obtained from the RTL website.

2) Another problem is that, even if a German keyboard was chosen during installation and operational after first boot, further reboots insisted in leaving me with a US layout. The solution is changing the layout in /etc/default/keyboard

3) A third problem is the intermittent loss of the wireless connection. Reinstallation of the iwlagn driver appears to fix this issue this far.

4) The sun-java-plugin is not working. I had to set to 0 the parameter net.ipv6.bindv6only in /etc/sysctl.d/bindv6only.conf

5) Yet one issue is the fact that hal appears to report that the laptop is in battery power even when on AC power. This problem is also present in most versions of Ubuntu but not in Debian Lenny and other distros. This is extremely annoying. Of course, again, the kernel guys will tell you it is a problem with your computer and they are right but… I though I had found a workaround, but it seldom works…

I have just compiled the Debian kernel from source as per this blog. I have changed some options in the ACPI section such as always loading AC instead of loading as a module (default) and also activating deprecated configurations. This did not work. I will try with a newer kernel.

SOLUTION TO ISSUE  5: Compiling the latest stable (2.6.34) kernel solves the ACPI problem. Even if the gnome power manager applet does not reflect the right power status, Nvidia PowerMizer does, and the performance of the graphics card is adjusted accordingly.

6) Finally, the last issue this far comes from the installation of the proprietary Nvidia driver. I had to follow the instructions here. Just with a newer version of the driver and also removing the nouveau-related stuff.

7) Kernel 2.6.34 introduces a new issue that first appeared in 2.6.33. The sound card is no longer working properly. There are fast cuts or interrupts whenever you are listening to any audio track (regardless of the format or player). I have tried everything to get the card working (all kind of Alsa options, the RealTek drivers, recompiling Alsa, …) to no avail. It is a kernel problem. Audio was working fine with this card in 2.6.32 and previous kernels. These regressions are one of the most frustrating things about Linux.

WORKAROUND TO ISSUE 7: In my user directories, I compiled kernel 2.6.32 with the same compiler and kernel parameters I had used for 2.6.34. Next I copied all .ko files from sound/pci/hda/ (2.6.32) into /lib/modules/2.6.34-whatever/kernel/sound/pci/hda/. Then I rebooted into the new kernel and recompiled alsa (reinstallation was possibly sufficient) and voilà!

UPDATE: This workaround does not have permanent effects. The sound issues persist.

Finally, I got my system fully operational and working in the way I expected.


Just let me add that Debian Squeeze (currently testing) is beta software and that it is not intended to be neither stable nor user-friendly. Ubuntu is supposed to, but, obviously, it is not (at least, not the 64-bit version). In fact, both systems share most of the bugs and issues. Provided both are hard to set up in my system, I think that at the end of the day Debian is lighter and more stable. No out-of-the box experience in the 64-bit world for this laptop yet.