Installing Ubuntu/Breezy on a ThinkPad T42

From ThinkWiki
Revision as of 19:31, 15 October 2005 by 86.52.124.190 (Talk) (Initng)
Jump to: navigation, search

Generel installation

Here comes installation instructions for Ubuntu Breezy Badger on T42 2374-ZEP.

Get a copy of Ubuntu from UbuntuLinux.org.

Kernel support

How to get the correct kernel: $ sudo apt-get linux-i686

Kernel modules

TODO
Load the different kernel modules, and their configuration

Importent to turn off dynamicClocks in radeonfb in kernels before 2.6.14: /etc/modprobe.d/radeonfb.modprobe:

options radeonfb default_dynclk=-1

ibm_acpi module:

Turning on experimental features: /etc/modprobe.d/ibm_acpi.modprobe:

options ibm_acpi hotkey=enable,0xff9f experimental=1

Starting with wireless off: /etc/modprobe.d/ipw2100.modprobe:

options ipw2100 disable=1

ACPI

TODO
Hibernate, suspend, buttons, lid, speedstep

Modification to turn on wireless: /etc/acpi/wireless.sh:

#!/bin/bash
# Find and enable/disable wireless devices

for DEVICE in /sys/class/net/*; do
    if [ -d $DEVICE/wireless ]; then
# $DEVICE is a wireless device. Check if it's powered on:
	if [ `cat $DEVICE/device/power/state` = 0 ]; then
# It's powered on. Switch it off.
	    echo -n 3 > $DEVICE/device/power/state;
	    echo 0
	else
# It's powered off. Switch it on.
	    echo -n 0 > $DEVICE/device/power/state;
	    echo -n 0 > $DEVICE/device/rf_kill;
	    echo 1
	fi
    fi
done

Xorg

Relevant part:

Section "InputDevice"
	Identifier	"Configured Mouse"
	Driver		"mouse"
	Option		"CorePointer"
	Option		"Device"		"/dev/input/mice"
	Option		"Protocol"		"ImPS/2"
	Option		"Emulate3Buttons"	"true"
	Option		"EmulateWheel"		"true"
	Option		"EmulateWheelButton"	"2"
	Option		"ZAxisMapping"		"4 5"
EndSection

Section "InputDevice"
	Identifier	"Synaptics Touchpad"
	Driver		"synaptics"
	Option		"SendCoreEvents"	"true"
	Option		"Device"		"/dev/psaux"
	Option		"Protocol"		"auto-dev"
	Option		"HorizScrollDelta"	"0"
EndSection

Section "Device"
	Identifier	"ATI Technologies, Inc. Radeon Mobility 7500 (M7 LW)"
	Driver		"radeon"
	BusID		"PCI:1:0:0"
	Option		"DynamicClocks"	"off"
	Option		"AGPMode"	"4"
	Option		"AGPFastWrite"	"yes"
EndSection
ATTENTION!
Options DynamicClocks "on" may hang your machine

Initng

Very great initiative for optimizing the boot process. Initng

Dep packages can be found: http://alioth.debian.org/projects/pkg-initng/

Installation: sudo dpkg -i initng_0.3.3-2_i386.deb

To run nice a few things and scripts need modification as follows:

Kernel options

To enable initng an option must be appended to the kernel load command in grub.

/boot/grub/menu.lst:

kernel          /vmlinuz-2.6.12-9-686 root=/dev/hda9 ro quiet splash video=radeonfb init=/sbin/initng

Runlevel

/etc/initng/default.runlevel:

system
daemon/acpid
daemon/dbus
daemon/hald
daemon/vixie-cron
daemon/ifplugd
system/alsasound
system/speedstep
system/laptop-mode
daemon/syslogd
daemon/klogd
daemon/gdm
daemon/hpiod
daemon/cupsd
daemon/powernowd

Scripts

dbus.i

daemon/dbus.i has a few faults, on Ubuntu it is "dbus" not "dbus-1"!

service daemon/dbus {
        need = system/initial system/mountfs system/bootmisc
	
        pid_file = /var/run/dbus/pid
        daemon {
              DAEMON=/usr/bin/dbus-daemon
              NAME=dbus
              DAEMONUSER=messagebus
              PIDDIR=/var/run/dbus
              PIDFILE=$PIDDIR/pid
              DESC="system message bus"

              if [ -e /etc/default/dbus ]; then
                . /etc/default/dbus
              fi

              if [ ! -d $PIDDIR ]; then
                mkdir -p $PIDDIR
                chown $DAEMONUSER $PIDDIR
                chgrp $DAEMONUSER $PIDDIR
              fi
              if [ -e $PIDFILE ]; then
                PIDDIR=/proc/$(cat $PIDFILE)
                if [ -d ${PIDDIR} -a  "$(readlink -f ${PIDDIR}/exe)" = "${DAEMON}" ]; then
                  echo "$DESC already started; not starting."
                else
                  echo "Removing stale PID file $PIDFILE."
                  rm -f $PIDFILE
                fi
              fi
              echo -n "Starting $DESC: "
              $DAEMON --system $PARAMS
              echo "$NAME."
              }
}

hald.i

daemon/hald.i

service daemon/hald {
    need = system/initial system/mountfs daemon/dbus
#    use = daemon/acpid

    daemon {
        PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
        DAEMON=/usr/sbin/hald
        PIDDIR=/var/run/hal
        NAME=hal
        DAEMONUSER=hal
        DESC="Hardware abstraction layer"

        if [ -f /etc/default/hal ] ; then
          . /etc/default/hal
        fi

        if [ ! -d $PIDDIR ]; then
          mkdir -p $PIDDIR
          chown $DAEMONUSER:$DAEMONUSER $PIDDIR
        fi

        echo -n "Starting $DESC: "
        $DAEMON --daemon=no $DAEMON_OPTS
        echo "$NAME."
        }
}

gdm.i

daemon/gdm.i, to add locale support to the GDM login screen:

service daemon/gdm {
    need = system/initial system/mountfs system/hostname net/lo system/modules system/bootmisc
    use = daemon/xfs system/static-modules system/coldplug system/netmount    
#    daemon = /usr/sbin/gdm
#    daemon = /usr/bin/gdm
#    daemon_args = -nodaemon
    daemon {
	PATH=/bin:/sbin:/usr/bin:/usr/sbin
	if [ -r /etc/default/gdm ]; then
	    . /etc/default/gdm
	    if [ -z "$LANG" ]; then
		:
	    else
		export LANG
	    fi
	fi
	
	gdm -nodaemon
    }
    #pid_file = /var/run/gdm.pid
}

Helpfull tools

Rovclock

Utility to overclock and underclock the ATI radeon chip. Can be used to underclock to reduce power, especialy when on batteries.

Get it from: http://www.hasw.net/linux/

Stable clock speeds: Core: 100MHz Memory: 120Mhz for LCP only, 180Mhz when using DVI out on port replicator.

Ex: $ sudo rovclock -c 100 -m 120

noflushd

Noflushd is a daemon that spins down disks that have not been read from after a certain amount of time, and then prevents disk writes from spinning them back up. It's targeted for laptops but can be used on any computer with IDE disks. The effect is that the hard disk actually spins down, saving you battery power, and shutting off the loudest component of most computers. $ sudo apt-get noflushd

ifplugd

ifplugd is a daemon which will automatically configure your ethernet device when a cable is plugged in and automatically unconfigure it if the cable is pulled. This is useful on laptops with onboard network adapters, since it will only configure the interface when a cable is really connected. $ sudo apt-get ifplugd

/etc/default/ifplugd:

INTERFACES="eth0"
HOTPLUG_INTERFACES="eth0"
ARGS="-q -f -u0 -d10 -w -I -b"
SUSPEND_ACTION="stop"

Known problems

TODO
List of bugs from kernel, Xorg and Ubuntu