Experiences with Linux kernel 2.6.0-test1

I recenly decided it would be nice if I had some better power management on my laptop. I had heard good things about software suspend (including that it had a workaround for buggy X drivers like nvidia's!) and since I needed to upgrade my kernel anyway to make use of it, I decided to give the recently released 2.6.0-test1 a whirl. This was probably a mistake...

However, after several days of playing around, I do now have a nicely working system (albeit lacking the one feature I really wanted - see Power Management) and since the upgrade was slightly more fraught than I would have liked, I thought I would document the experience.

Updates

Compiling the Kernel

The default compiler in Debian testing is now gcc-3.3 which doesn't like multi-line comments. Although I can't remember if I tried compiling 2.6 with this, I've had problems compiling 2.4 kernels with it so the first thing I did was change all the references to gcc in the Makefile to gcc-2.95. (HOSTCC and CC variables.)

Kernel Modules

2.6 has a new kernel module setup so you need a new version of modprobe and friends, and you need to convert your modules.conf to a modprobe.conf which has a very different format. Fun.

The new tools are in the Debian package module-init-tools which does most of the hard part for you. However I had to copy some local configuration from /etc/modutils/ to the /etc/modprobe.conf file:

    # Some aliases to make various modules autoload
    alias autofs autofs4
    alias char-major-195 nvidia
    # Cause the ide-scsi driver to be loaded before anything else when
    # my CD drive is accessed. 
    install cdrom /sbin/modprobe ide-scsi; /sbin/modprobe --ignore-install cdrom

The cdrom line took me ages to work out. The old "pre-install" command has gone, so the only way to achieve the same effect is to cause modprobe cdrom to execute the given commands instead of actually loading the cdrom module. hmm...

Another change I had to make was to replace the reference to bluez in /etc/modprobe.d/alias to bluetooth (net-pf-31).

Even after working this out, some modules still refuse to load themselves (particularly those relating to USB devices - hotplug no longer seems to work properly), so I had to add them to /etc/modules. I load the following modules at startup: psmouse, usb-uhci, input, i8k, visor, hci_usb (bluetooth dongle), yenta_socket, pci_hotplug, 3c59x (network card).

Sound

The ALSA sound architecture has been around for a while, but the 2.4 series used the OSS drivers by default. OSS is still available in 2.6 but is marked "deprecated". Upgrading to ALSA was fairly painless but it did mean I had to install some extra user-space tools (Debian packages: alsa-base and alsa-utils) and I had to replace my libesd0 package with libesd-alsa0. All this meant a plethora of error messages and no esd when I did reboot into my 2.4 kernel, so you may want to consider sticking with the OSS drivers until you are ready to commit to 2.6.

The sys filesystem

2.6 has a new "sys" filesystem. I'm not quite sure what it does, but some of the docs I have read imply it might be used in hotplugging although I haven't had chance to test that yet. Anyway, it can't hurt to have it available, so mkdir /sys and then add the following line to /etc/fstab:

sys             /sys            sysfs   defaults        0       0
    

NVIDIA'S Binary Driver

If you have an NVIDIA graphics card then NVIDIA doesn't officially support development kernels so you will need a patch from www.minion.de (mirror of the patch for the 4364 release). Unfortunately this is a patch against the old style distribution of the driver where the kernel interface is separate from the XFree86 module. However, if you unpack the install files using --extract-only, the files in <unpack_dir>/usr/src/nv are the same as in what used to be distributed as the "kernel" part of the driver so just patch those instead. (Again you may need to patch the Makefile to use gcc-2.95 or whatever you built your kernel with.)

Laptop Trackpad

This kernel has a new driver for the synaptics touchpad found on many popular laptops (including mine). This also requires new userspace programs, so while there is a driver for X, GPM won't work. I couldn't actually get the X11 driver to work either (you need to compile against X11 sources which is a pain if you're using a distribution which uses binary packages) so I used the synaptics-optional patch (local mirror) to bring up the option at the make config stage to disable the synaptics support and just have it act as a normal ps2 mouse instead.

Power Management: ACPI and Speedstep

The only patch I applied to the kernel before installing it was for the latest ACPI support. With this patch, ACPI works nicely out of the box for my Dell Inspiron under 2.4.20 I had to patch the DSDT which is a rather messy business (I haven't tried sleep states). I couldn't get the processor/../performance interface to work for speedstep though and had to enable the /proc/cpufreq interface:

    # CPU Frequency scaling
    CONFIG_CPU_FREQ=y 
    CONFIG_CPU_FREQ_PROC_INTF=m,
    CONFIG_CPU_FREQ_GOV_USERSPACE=y 
    # CONFIG_CPU_FREQ_24_API is not set 
    CONFIG_CPU_FREQ_TABLE=y

One you have loaded the proc_intf modules, instructions on how to use this interface can be found here but I use: echo -n "0:0:0:powersave" > /proc/cpufreq to move to a power saving state, and echo -n "0%64%100%performance" > /proc/cpufreq to return to full CPU power. (Change the 64% to suit your CPU!). I run the first of these commands automatically when I disconnect AC power, using the following in /etc/acpi/acOff:

      event=ac_adapter AC.*
      action=/etc/acpi/powerSave.sh

At some point I intend to make powerSave.sh more intelligent and look at /proc/acpi/ac_adapter/AC/state to see whether it should switch to powersave or performance modes.

Ironically, software suspend is the one thing I can't seem to get working. Although 2.6.0-test1 claims to have built-in support, it doesn't seem to work (complains about something missing from /proc. Anyway, I'm hoping there will be a patch for it soon (the last one available from the swsusp website is for 2.5.66, or maybe 2.6.0-test2....

Update 24/07/2003: I believe the source of my problems was a misconfigured suspend.conf. I haven't tested it, but rerunning suspend.sh --install and/or setting SWSUSP_FORCE_SUSPEND_MODE to "acpi" may help.

LinModem

Added 24/07/2003: Although the installer claims experimental support for 2.5 kernels I couldn't get it to compile, even after some minor hacking at the configure.in file. :(


Home
PageReturn to Home Page

Last updated: Sunday, 26-Sep-2004 17:23:49 BST