Difference between revisions of "Installing Ubuntu on a ThinkPad X31"

From ThinkWiki
Jump to: navigation, search
(Using ACPI)
(Preface)
Line 1: Line 1:
 
==Preface==
 
==Preface==
I installed hoary ({{Ubuntu}} "unstable") because of some specific needs. Netherless,
+
The content of this page was originally geared toward Hoary ({{Ubuntu}} 5.04),
this article should apply to Ubuntu 4.10 "The Warty Warthog" too. Everything seems to work very fine.
+
but nearly everything here applies just as well to the Warty (4.10) and Breezy (5.10) releases.
  
 
See [http://dev.gentoo.org/~brix/papers/X31/X31.html Henrik Brix Andersens] page for a lot of useful background information.
 
See [http://dev.gentoo.org/~brix/papers/X31/X31.html Henrik Brix Andersens] page for a lot of useful background information.

Revision as of 07:53, 14 October 2005

Preface

The content of this page was originally geared toward Hoary (Ubuntu 5.04), but nearly everything here applies just as well to the Warty (4.10) and Breezy (5.10) releases.

See Henrik Brix Andersens page for a lot of useful background information.

Installing without cdrom or floppy

Look here or follow the Netboot remarks instructions at UbuntuSupport.

Choosing between APM and ACPI

I tested both, APM and ACPI but settled with ACPI which now works like a charm.

Ubuntu ships with ACPI enabled, but without ACPI suspend-to-disk being configured. Since ACPI suspend to ram does not switch off the LCD backlight neither suspend mode is working out of the box. See below how to configure ACPI.

On the other hand: having ACPI disabled will make your system use about 10% more power which reduces my battery runtime from ~4:00h to 3:40h.

Please read "How to make use of Power Management features" for more in depth information.

Disabling ACPI and using APM

Simply disabling ACPI at boottime activates APM which works fine with suspend to ram and suspend to disk.

To disable ACPI boot your kernel with acpi=off

...describe how to edit /boot/grub/menu.lst...

APM based suspend to disk needs a save2disk.img hibernation file on FAT16. Use the tphdisk utility to create this file.

Use FnF4 to suspend-to-ram and FnF12 to suspend-to-disk.

Using ACPI

Get ubuntulinux, radeonlight and this script (which goes in /etc/acpi), nothing more!

{{{2}}} cat lid.sh

#!/bin/sh

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

getXuser;

grep -q closed /proc/acpi/button/lid/*/state
if [ $? = 0 ]
then
        . /usr/share/acpi-support/screenblank
        echo `fgconsole` > $LIDSTATE
        chvt 12

        # Unmount any NFS or SMB filesystems:
        echo "unmounting NFS and SMB filesystems"
        umount -a -r -t nfs,smbfs

        # remove modules
        echo "remove modules"
        #rmmod ipw2100    ## WLAN
        rmmod ehci-hcd   ## USB module
        rmmod uhci-hcd   ##  -||-

        # update the disk super block
        echo "sync"
        sync


        # wait a second
        sleep 1


        # turn the LCD off
        echo "backlight off"
        radeontool light off


        # suspend to ram
        echo "suspend to ram"
        echo -n mem > /sys/power/state

        # load modules
        modprobe ehci-hcd
        modprobe uhci-hcd

        # turn the LCD on
        echo "turn the LCD on"
        radeontool light on

        # go back to VT7 (X)
        echo "back to VT7"
        chvt 7

else
        grep -q off-line /proc/acpi/ac_adapter/*/state
        #if [ $? = 1 ]
        #then
                #su - $user -c "xscreensaver-command -unthrottle"
        #fi
        chvt `cat $LIDSTATE`
fi