Currently I am runnig Arch Linux [1] on my laptop. It was installed in April 2006, but due to its "rolling release" system it's easy to keep it up to date by periodically running pacman -Syu. I am rewriting this text from time to time, but it may be outdated in parts.
After booting the Arch CD (Version 0.7.1) from the external FireWire DVD drive, I had to enter loaddisc /dev/scd0 to mount the CD. I selected a keymap via km, skipped font selection, ran /arch/setup, created partitions, installed all base packages, edited /etc/rc.conf and installed the boot loader in the MBR. After rebooting I set a root password (in more recent versions of Arch this has become part of the installation process) and created a user account
passwd useradd -m -s /bin/bash [username] passwd [username]
Current kernel version is 2.6.31. I modified /etc/mkinitcpio.conf as follows:
MODULES="ata_piix sd_mod ext2 ext3 intel_agp agpgart i810fb" BINARIES="" FILES="/etc/modprobe.d/i810fb.conf" HOOKS="base udev uresume"
The module i810fb is required to obtain a 1024x768 framebuffer console. It may as well be placed in the MODULES section of /etc/rc.conf, but including it in the initial ramdisk makes it available in an earlier stage of booting. Module options are specified in /etc/modprobe.d/i810fb.conf
options i810fb vram=4 xres=1024 yres=768 bpp=16 hsync1=30 \
hsync2=55 vsync1=50 vsync2=60 accel voffset=31
The default value for the memory offset is adjusted via voffset to avoid conflicts with the intel driver used by X (which fails to start otherwise). A drawback of using framebuffer is that suspending to RAM works only partially (screen remains black), see below.
Since X.org has become modular, some required packages are not installed by default e.g. xf86-video-intel, libgl and some font packages like xorg-fonts-type1.
The basic X configuration was done via xorgcfg -textmode. I added some lines (font paths, DPMS, DRI) to /etc/X11/xorg.conf, you can find it here. Due to the new Xorg hotplugging the file can be reduced to
Section "Monitor" Identifier "Monitor0" HorizSync 31.5 - 48.5 VertRefresh 50.0 - 70.0 EndSection Section "Screen" Identifier "Screen0" Device "Card0" Monitor "Monitor0" DefaultDepth 16 SubSection "Display" Viewport 0 0 Depth 16 Modes "1024x768" "800x600" "640x480" EndSubSection EndSection
The HorizSync value must be specified to get a fullscreen 1024x768 resolution (by default it's only 800x600 with big black bars). Direct rendering works only with a color depth of 16 (by default 24 is used, causing a slow "software rasterizer" to be applied).
DPMS is not working; the screen only blanks after some time, and you can force immediate blanking via xset, e.g. xset dpms force standby but I don't recognize a difference between standby, suspend and off - backlight is never turned off.
After upgrading to Xorg 7.4 I had to create and edit /etc/hal/fdi/policy/10-keymap.fdi and /etc/hal/fdi/policy/11-x11-synaptics.fdi to set the correct keymap and enable touchpad tapping as described in the ArchWiki [3]. I configured Xfce to use the system default keyboard layout, otherwise it takes extremely long to start.
For Fn-keys and Jog-Dial the module sonypi (or sony-laptop with sonypi compatibility enabled) is required; added to the MODULES array in /etc/rc.conf. Created PKGBUILDS for rsjog and ruby-gtk (updated 01/09). Edit: rsjog stopped working since ruby 1.9.1 and ruby-gtk currently doesn't build.
Latest upgrade of xorg-server to 1.6.0 gave me a default keyboard repeat delay of 2 seconds. I did't find a way to reduce this value globally without disabling Xorg hotplugging, so I added
xset r rate 500 30
to the autostarted applications in Xfce. To get the same behaviour on the virtual terminals I edited /etc/rc.local
kbdrate -s -d 500 -r 30
I installed alsa-utils, ran alsaconf and alsamixer and added alsa to the DAEMONS string in /etc/rc.conf. Users must be in group sound:
gpasswd -a [username] sound
After some update the laptop was beeping when booting and there was no sound. A workaround was to add !snd_pcsp to the MODULES array in /etc/rc.conf.
To avoid interchanging interface naming for wired and wireless network the latter is determined by its MAC adress via this udev rule [4] in /etc/udev/rules.d/10-local.rules:
SUBSYSTEM=="net", ATTR{address}=="00:02:2d:6a:5d:63", NAME="wlan"
This way wlan becomes the WLAN interface name, while eth0 is used for LAN, which is configured in a network profile/etc/network.d/lan
CONNECTION="ethernet" DESCRIPTION="" INTERFACE=eth0 IP="dhcp" DHCP_TIMEOUT=10
To auto-connect upon cable insertion I installed ifplugd, added it to the DAEMONS array in /etc/rc.conf and disabled the network daemon. Here is my /etc/ifplugd/ifplugd.conf
NET_IFS="eth0" ARGS="-fwIl -u0 -d10"
and the core part of /etc/ifplugd/ifplugd.action
case "$2" in
up)
netcfg -a
netcfg lan
;;
down)
netcfg -a
netcfg wlan
;;
If an ethernet cable is plugged in (or present at boot time), ifplugd will disable all connected profiles (i.e. WLAN, see below) and start LAN - and vice versa. Due to the option -l this also works, if initially there is no cable: The action script is then run with the down agument, hence the WLAN profile will be started.
As pccardctl ident reveals, it's a Hermes I card, supported by the orinoco_cs module.
Socket 0: no product info available Socket 1: product info: "Lucent Technologies", "WaveLAN/IEEE", "Version 01.01", "" manfid: 0x0156, 0x0002 function: 6 (network)
Since kernel 2.6.29 orinoco_cs has support for WPA. A firmware file is required, which can be downloaded from here. Unpack and copy orinoco.fw to /lib/firmware/agere_sta_fw.bin.
For kernel<=2.6.28 I had to install a modified version of an old driver by Agere [5], which is available in the AUR [6]. Added !orinoco_cs wlags49_h1_cs to the MODULES array in /etc/rc.conf to use it instead of the default orinoco driver.
WLAN is configured in a network profile /etc/network.d/wlan
CONNECTION="wireless" INTERFACE=wlan SCAN="yes" ESSID="My Network" SECURITY="wpa-config" IP="dhcp" TIMEOUT=20 WPA_CONF="/etc/wpa_supplicant.conf"
where /etc/wpa_supplicant.conf reads
ctrl_interface=/var/run/wpa_supplicant
eapol_version=1
ap_scan=1
fast_reauth=1
network={
scan_ssid=1
proto=WPA
key_mgmt=WPA-PSK
pairwise=TKIP
group=TKIP
ssid="My Network"
#psk="..............................................................."
psk=................................................................
}
which is based on the output of
wpa_passphrase "My Network" $(pwgen -c -n -s 63 1)
Initially the devices for partitions on MemorySticks were not created unless the stick was inserted at boot time or the module usb_storage was reloaded after insertion. To force creation of device nodes I added this udev rule
SUBSYSTEMS=="scsi", ATTRS{model}=="MSC-U03", NAME{all_partitions}="memstick%n"
to /etc/udev/rules.d/10-local.rules. Model name was identified by udevadm info -a -p /sys/block/sda. Now a MemoryStick's first partition will be at /dev/memstick1 instead of /dev/sda1.
Meanwhile the udev option all_partitions is no longer necessary, so the udev rule is now similar to those for unique device naming for my USB stick and disk.
SUBSYSTEMS=="scsi", ATTRS{model}=="MSC-U03", SYMLINK+="memstick%n"
SUBSYSTEMS=="usb", ATTRS{product}=="YP-U2", SYMLINK+="usbstick%n"
SUBSYSTEMS=="scsi", ATTRS{model}=="DK23DA-30", SYMLINK+="usbdisk%n"
These are the corresponding entries in /etc/fstab:
/dev/memstick1 /mst vfat user,noauto 0 0 /dev/usbstick1 /usb vfat user,noauto 0 0 /dev/usbdisk1 /usbhd vfat user,noauto 0 0
First time I actually used the PC Card interface. Bought a PCMCIA adaptor which provides a USB 2.0 interface. Tested successfully with a USB 2.0 DVB-T Stick (that does not work on the 1.1 interface) and with a USB 2.0 hard disk drive (containing the drive that was originally inside the laptop). Connection speed of the latter is about ten times higher than at the USB 1.1 device.
Package bluez is required. User must be in group tty. For pairing I use bluez-simple-agent. Edit /etc/bluetooth/rfcomm.conf for binding the device /dev/rfcomm0 to a remote device, e.g. your mobile phone. Module ppp_generic is required for internet connections via GPRS.
To start/stop Bluetooth I configured sudo and defined aliases in my ~/.bashrc, that include the required spicctrl command:
alias blue='spicctrl -l 1 && sudo /etc/rc.d/bluetooth start' alias blue_down='sudo /etc/rc.d/bluetooth stop && spicctrl -l 0'
After some update the Bluetooth interface was not detected any more (no MAC address reported by hcitool dev). The reason was that hcid won't work, if dbus isn't started, so I added dbus to the DAEMONS array in rc.conf.
See the Bluetooth section for Gentoo and Fedora for some more information.
Suspend to RAM is working now! I tested the utility s2ram from the Linux suspend project [7] with different parameters. The following combination was successful:
s2ram -f -s
While the option -a 2 seems to have no effect, -a 1 and -a 3 cause the laptop to not wake up properly (high CPU load, no reaction). If the option -s is omitted or -p is set, the screen keeps blank (blindly typing halt makes it shut down normally). Unfortunately, this also happens when the i810fb framebuffer driver is used. Option -f must be set, because the laptop is not in the database. s2ram -n reports
Machine is unknown.
This machine can be identified by:
sys_vendor = "Sony Corporation "
sys_product = "PCG-SRX51P(DE) "
sys_version = "01 "
bios_version = "R0221U2"
At first the above command worked only in text mode (runlevel 3), suspending from X created strange images on the screen (disabling 3D acceleration didn't help). After a long time I tried again with kernel 2.6.20, and now it also works from X.
A package for suspend called uswsusp is in the community repository. As an alternative pm-suspend from pm-utils can be used. The option required here is --quirk-vbestate-restore. Since pm-suspend is usually called from HAL/dbus (e.g. via the Xfce logout menu) this option should be placed in a file /etc/pm/config.d/config:
ADD_PARAMETERS="--quirk-vbestate-restore" SLEEP_MODULE="uswsusp"
Suspending to disk via pm-hibernate works as well. Swap partition is specified in /etc/suspend.conf
snapshot device = /dev/snapshot resume device = /dev/sda8 compress = y
You also have to add the uresume hook in /etc/mkinitcpio.conf and run mkinitcpio -p kernel26.
To avoid supending to RAM if a framebuffer device is present I placed a hook in /etc/pm/sleep.d/00fbdev and made that file executable.
#!/bin/bash
case "$1" in
suspend)
if [ -e /dev/fb0 ]; then exit 1 ; fi
;;
esac
Suspending may also be initiated when the laptop's lid is closed. While acpid is stopped cat /proc/acpi/event shows, that closing the lid is an ACPI event:
button/lid LID 00000080 00000001 button/lid LID 00000080 00000002
So I created a file /etc/acpi/events/lid with the following content:
event=button/lid LID 00000080 action=pm-suspend
Now, if acpid is started, closing the lid will make the laptop suspend to RAM.
To use the buttons from the Xfce logout menu I had to edit /etc/PolicyKit/PolicyKit.conf
<config version="0.1">
<match action="org.freedesktop.hal.power-management.*">
<return result="yes"/>
</match>
</config>
Current problems with suspending:
For CPU speedstepping the module acpi_cpufreq is required (append to the MODULES array in /etc/rc.conf)
[1] http://www.archlinux.org/
[2] http://wiki.archlinux.org/index.php/Fbsplash
[3] http://wiki.archlinux.org/index.php/Xorg_input_hotplugging
[4] http://reactivated.net/writing_udev_rules.html
[5] http://ubuntuforums.org/showthread.php?t=304217
[6] http://aur.archlinux.org/packages.php?do_Details=1&ID=9637
[7] http://en.opensuse.org/S2ram