gentoo Linux on Sony VAIO VGN T2XP

Configuration

vendor_id       : GenuineIntel
model name      : Intel(R) Pentium(R) M processor 1.20GHz
stepping        : 8
cpu MHz         : 1200.000
cache size      : 2048 KB
bogomips        : 2384.16
  
memeory         : 1024MB

00:00.0 Host bridge: Intel Corporation 82852/82855 GM/GME/PM/GMV Processor to I/O Controller (rev 02)
00:00.1 System peripheral: Intel Corporation 82852/82855 GM/GME/PM/GMV Processor to I/O Controller (rev 02)
00:00.3 System peripheral: Intel Corporation 82852/82855 GM/GME/PM/GMV Processor to I/O Controller (rev 02)
00:02.0 VGA compatible controller: Intel Corporation 82852/855GM Integrated Graphics Device (rev 02)
00:02.1 Display controller: Intel Corporation 82852/855GM Integrated Graphics Device (rev 02)
00:1d.0 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #1 (rev 03)
00:1d.1 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #2 (rev 03)
00:1d.2 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #3 (rev 03)
00:1d.7 USB Controller: Intel Corporation 82801DB/DBM (ICH4/ICH4-M) USB2 EHCI Controller (rev 03)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 83)
00:1f.0 ISA bridge: Intel Corporation 82801DBM (ICH4-M) LPC Interface Bridge (rev 03)
00:1f.1 IDE interface: Intel Corporation 82801DBM (ICH4-M) IDE Controller (rev 03)
00:1f.3 SMBus: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) SMBus Controller (rev 03)
00:1f.5 Multimedia audio controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller (rev 03)
00:1f.6 Modem: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Modem Controller (rev 03)
02:04.0 CardBus bridge: Texas Instruments PCI7420 CardBus Controller
02:04.2 FireWire (IEEE 1394): Texas Instruments PCI7x20 1394a-2000 OHCI Two-Port PHY/Link-Layer Controller
02:04.3 Mass storage controller: 
02:08.0 Ethernet controller: Intel Corporation 82801DB PRO/100 VE (MOB) Ethernet Controller (rev 83)
02:0b.0 Network controller: Intel Corporation PRO/Wireless 2200BG (rev 05)

Preparation

If you have not set up gentoo before, you should either not do it (my way) or consult the gentoo handbook *all* the time. (Download the one page version to your harddrive!!!)

I won't go into details here, when I say: "install package x". You should be familiar with portage/emerge/use flags.

Read the whole section before starting to do it! Backup everything! Damaging anything is your own risk!

This is *not* for newbies.

Let's start:

Partitioning

Boot with Knoppix (Knoppix has a nicer environment than the gentoo boot cd: e.g. vi and graphics if somebody cares ...). The more important feature is that the stage3/portage tarballs are *newer* on the internet than on cd usually. So the gentoo install cd is useless to me. (More recent versions are better and I did a gentoo install with one lately, but it was missing the stages tarballs ???)

You should be online by dhcp right away ... (if not check your server/switch config)

This is for a dual boot setup:

Bootstrapping

Kernel

Emerge the gentoo-sources (2.6.19 or higher). My config is available for reference. Important sections: ACPI, sonypi, alsa (incl. soundcard driver), framebuffer. Your should start with my config and change what needed. Having reiserfs I put it directly into my kernel, change that to your filesystem. I don't believe in initrd's and loading important drivers in there. For wireless you need to enable IPW2200 yourself.

Gentoo

Do a normal gentoo install from now on.

Before reboot

Don't forget: Below there are the installation procedures for the special hardware:

LAN

The e100 driver should be in the kernel. Using my config you are all set with:
modules=( "dhcpcd" )

config_eth0=( "dhcp" )
dhcpcd_eth0="-t 2"
in /etc/conf.d/net and installed dhcpcd (emerge it). I use a short timeout if my cable is not connected it would hang 60 seconds (default) and my cable is like never connected.

Wireless LAN with WPA2

I removed the WEP part, no sane person should use that weak encryption.

Activate ipw2200 in the kernel as a module. Emerge wireless-tools and wpa_supplicant. Put into: /etc/modules.autoload.d/kernel-2.6

ipw2200
And add:
modules=( "wpa_supplicant" )

config_eth1=( "dhcp" )
dhcpcd_eth1="-t 5"
into /etc/conf.d/net. And put following into: /etc/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=10
eapol_version=2
ap_scan=1
fast_reauth=1

network={
        ssid="ESSID"
        proto=WPA RSN
        key_mgmt=WPA-PSK
        pairwise=CCMP
        group=CCMP
        psk="PASSWORD"
        priority=0
}
Just replace ESSID and PASSWORD with the real values. Some access points want eapol_version=1 or ap_scan=0 play with that. My Netgear worked with the above. A Linksys liked ap_scan=0.

For occational open networks, when on the move. I just use "/etc/init.d/net.eth1 stop". Look for the network with iwconfig. Switch to it with iwconfig. And do an "ifconfig eth1" up and start: dhcpcd eth1.

You can also use an alternative /etc/conf.d/net file with:

modules=( "iwconfig" )
instead of wpa_supplicant.

Framebuffer console

Works with my kernel config, but just 1024x768 which is ok. (BTW: page up/down if shift-fn-up/down)

X11

Before starting X11 you need to add following line to an init script:
/usr/sbin/855resolution 7c 1280 768
You get the program here. My xorg.conf contains some tryouts too.

Touchpad

Emerge synaptics in order to use my xorg.conf. You can fine tune everything then. I disabled the tapping stuff. If you use KDE install ksynaptics - you may need to unmask it.

Internationalization

German

Sound

Just install ALSA: alsa-lib, alsa-oss, alsa-tools, alsa-utils and alsa-headers. Start alsaconf, the your alsa subsystem and then alsamixer and mute External Amplifier and set your volumes: master and PCM.

Special Sony functions

Compile sony_acpi. And copy it to /lib/modules/your_kernel_here/misc.

Do a depmod -a and add:

sonypi
sony_acpi
to /etc/modules.autoload.d/kernel-2.6. For sonypi also create /etc/modules.d/sonypi with:
alias char-major-10-63 sonypi
options sonypi minor=63 verbose=2 fnkeyinit=1
I'm not sure if fnkeyinit in necessary and you can remove verbose if you are sure it works. Make a modules-update and modprobe sonypi and sony_acpi.

Install: spicctrl

Just enter spicctrl and see what you can do. Setting the brightness does not work here, but with

cat /proc/acpi/sony/brightness
to read and
echo "6" > /proc/acpi/sony/brightness
to set.

Bluetooth

Switch off: spicctrl -l 0
Switch on: spicctrl -l 1
Read state: spicctrl -L (0 is off, anything else is on)

Special Keys

spicctrl does not directly handle the FN keys, but the kernel module propagates the events to /dev/sonypi. You can use sonypid or sonykeyd or fsfn to make use of the keys: sonykeyd seems simple and nice. However I don't get all FN key events but I can live with it...

After starting kde it hogs the /dev/sonypi device - not solved yet. There is some kded/kmilo thing which may someday provide access to the keys but hogs the device for battery information today.

I managed to suspend to disk with closing the lid of the laptop. So a lot is possible.

Modem

You need the alsa module: snd_intel8x0m and the slmodem package, but NOT the slmodem drivers. Use the description from there: http://forums.gentoo.org/viewtopic-t-375305-highlight-slmodem.html

USB

Just works. I added an USB mouse to my xorg.conf, so USB (wheel) mice work out of the box.

Hibernation

Add resume=/dev/hda4 to your boot loader line. Change that to your swap partition. Suspend to disk just works:
#!/bin/bash

vt=`fgconsole`
chvt 1
hwclock --systohc
echo disk >/sys/power/state
hwclock --hctosys
chvt 1
/usr/sbin/855resolution 7c 1280 768
chvt $vt
Suspend to ram did not work so far.

Power saving

Install powernowd and add speedstep-centrino to /etc/modules.autoload.d/kernel-2.6.

Bluetooth

You need: bluez-kernel, bluez-libs, bluez-hcidump, bluez-utils and kdebluetooth.

Sending pics from the mobile to my computer works. For gprs connections look there.

PCMCIA

Compiled into kernel (as modules) and install the userspace utilities from pcmcia-cs. Worked with old firewire card.

External display

To switch on/off: with i855crt
/usr/sbin/i855crt swcursor on 1024x768@85
/usr/sbin/i855crt off

Firewire

My external hd just worked with modprobe sbp2.

DVD writing

The dvd+rw-tools do the trick. Inspite of their name they write dvd-r fine as well and of course dvd video.

Files

/etc/portage/package.use
media-libs/freetype -bindist
/etc/portage/package.keywords
net-dialup/slmodem ~x86
x11-drivers/synaptics ~x86
kde-misc/ksynaptics ~x86
x11-libs/libsynaptics ~x86
net-wireless/wpa_supplicant ~x86
app-portage/layman ~x86
TuxMobil - Linux on Laptops, Notebooks, PDAs and Mobile Phones