Ubuntu, a Dell D600, and some ACPI adventures (with kernel lockups)

And, finally, I've my new Dell D600 working (almost) correctly with a Ubuntu Linux Warty distribution. Installing Ubuntu did produce some problems, however the most difficult was ACPI related.

The main problem: with Ubuntu installed you cannot close the LCD, or Linux kernel will hang inmediately. Some other ACPI events was affected with this problem. Of course, others worked ok (power button events, for example), but LCD closing was very important for me.

When I booted standard linux kernel provided with Ubuntu (, by closing the LCD the kernel locks up. Always. It's didn't matter if I booted with "acpi=off" command line. Press your lid button and Linux will hang.

Speaking about this problem with Jesús, he recommended us to use a previous kernel, 2.6.7. So we searched the package for Ubuntu and installed it. The problem, magically fixed. ¿Has 2.6.8.x kernel a bug with these laptops? ¿will 2.6.9 hang in my machine? It is not packaged yet for Ubuntu nor Debian sid, so I'll not test it for now.

Next, it's time to test programming ACPI events. It was easy: I wish to disconnect the screen when closing the display, and suspend to RAM when hitting the Sleep key (Fn+Esc). I've not modified other event behaviors: Power button (it will shutdown cleanly the system) and Battery/AC events (which will put part of hardware, such as harddisk, in energy saving mode).

If you wish to know Power or Battery/AC behaviors, please take a look to acpi-support and laptop-mode Ubuntu packages.

For lid button, I've modified the script /etc/acpi/lid.sh. It also disconnects the backlight of display panel to save energy. For that, I use radeontool 1.5. You can download a Debian package here. The script:


. /usr/share/acpi-support/power-funcs


grep -q closed /proc/acpi/button/lid/*/state
if [ $? = 0 ]
. /usr/share/acpi-support/screenblank
echo `fgconsole` > $LIDSTATE
chvt 12
radeontool light off
grep -q off-line /proc/acpi/ac_adapter/*/state
if [ $? = 1 ]
su - $user -c "xscreensaver-command -unthrottle"
radeontool light on
chvt `cat $LIDSTATE`

For sleeping the machine, I've needed to shutdown the network. It is important to avoid problems with tg3 driver (Broadcom Gigabit). It was not neccesary to unload (rmmod) the driver. Also, I shutdown hotplug subsystems to automatically unload any module related with USB interfaces (which Linux cannot suspend). The script:


. /usr/share/acpi-support/power-funcs


grep -q closed /proc/acpi/button/lid/*/state

/etc/init.d/hotplug stop
/etc/init.d/network stop
echo 3 > /proc/acpi/sleep

# wake up
/etc/init.d/hotplug start
/etc/init.d/network start

Some problem that persist: the Broadcom Gigabit does not wake correctly when powering up the network again. However, if I type ifconfig eth0 up in a shell, the device wakes without problems. I do not know why, but in sleep.sh script I can wake eth0 correctly (however, wireless card, with a much more experimental driver, works better).

Another unresolved issue: battery info key (Fn+F3) stops working when Linux boots (in Grub I can poll the battery). The same problem occurs with CRT/LCD (Fn+F8). However, for switch to CRT I use radeontool again (with dac option). It's command line but not a problem.