ThinkPad X61s
Specs
Note: There are several different models, and Lenovo offer customization in some countries. This is just what I have. Bus IDs are provided when I can't find more details on the model.
- CPU: Intel Core 2 Duo L7500 @ 1.60Ghz
- RAM: 1GB PC2-3500 DDR2
- Graphics: Intel Graphics Media Accelerator X3100 (i965)
- Display: 12.1" 1024x768 TFT
- Hard Drive: 120GB Hitatchi SATA drive
- Audio: AD1984 Intel HD Audio
- LAN: Intel 82566MM Gigabit Ethernet
- WLAN: Intel 3945 ABG
- WWAN: Sierra Wireless (Internal USB, ID: 1199:6813)
- Bluetooth: Broadcom Corp. (Internal USB, ID: 0a5c:2110)
- Fingerprint reader: SGS Thomson Microelectronics Fingerprint Reader
- USB: 4 UHCI controllers, 2 EHCI controllers, 3 ports. Intel 82801H (ICH8 Family)
- Firewire: Ricoh Co Limited - Unknown device (PCI ID: 1180:0832)
- SD Card reader: Ricoh Co Ltd R5C822
- Pointing device: TrackPoint - "nipple mouse"
Notes
If you plan on keeping Vista, don't use it's built in NTFS resizer. This will only free up around 30GB of space, instead of the more than 60 you can free up with other tools. I used a proprietary Windows application, Paragon Partition Manager, however Parted and ntfs_resize are reported to have no problems. I'd advise not using Partition Magic, as it officially doesn't support Vista.
I would advise not deleting the first partition, as it is the recovery partition. I would also advise not installing your bootloader to the MBR without backing up the MBR first, as it isn't a standard MBR.
CDMA WWAN devices *MUST* be activated from Windows; GSM/UMTS devices don't need activating. For both types of WWAN, the on-screen 'activation information' isn't complete - the full information is on a sticker on the underside of the laptop.
If when running lilo, you get an error out the partition table being invalid, and asking you to FIX or IGNORE, "lilo -P fix" worked for me, and I can still boot Windows fine. "lilo -P ignore" is safer, but may not work.
Also, I installed Slamd64, not Slackware. I will note anywhere where I believe there's likely to be a difference.
Installing
There's 4 choices:
- Normal install from UltraBay DVD drive in UltraBase (docking station)
- Normal install from USB DVD drive - there's reportedly been mixed success with this though
- PXE + NFS install
- USB + NFS install
I created the USB/PXE installer initrd for Slamd64 (Slackware 12.0 includes one already), and went for the PXE + NFS option. There is already good documentation for how to install Slackware like this. You should start the installer with the hugesmp.s kernel, and install it, until you've made a suitable initrd for booting from another kernel.
Kernel
I'd strongly recommend going for the latest kernel from kernel.org - this is a very new laptop, and not properly supported in older kernels. You also probably want to patch it a bit. I used 2.6.22.2
Patches
Some of these were hard to find, so I've put them at [1].
- hdaps_protect-2.6.19.patch.gz - allows userspace to park the hard disk heads. Required for the accelerometer-based hard-drive shock protection to work
- thinkpad-acpi-0.15-20070723_x2.6.22.1.patch.gz - required for advanced power management, bluetooth, and the soundcard - doesn't quite apply cleanly, find -name "*.rej" in your source tree and apply the remaining changes manually.
- alsa-git-2007-07-20.patch.gz - required for the sound card
- enablec3.patch.gz - allows the CPU to enter a lower CPU sleep state
If you have in-built WWAN, you also will need to do minor changes to drivers/usb/serial/sierra.c:
- Find the two lines containing:
USB_DEVICE(0x1199, 0x6812)
- Copy them to the next line, changing 0x6812 to 0x6813
- Change the comment to something descriptive, like:
/* Thinkpad X61s unknown card */
Config
I based mine off hugesmp.s's config:
zcat /proc/config.gz > .config make oldconfig </dev/null
I also turned on the following options (paths given are for the tree structure in menuconfig):
- Processor type and features/Support for suspend on SMP and hot-pluggable CPUs - CONFIG_HOTPLUG_CPU; this is required for suspend to RAM to function correctly, and lets you turn off the second core to save power.
- Networking/Wireless/Generic IEEE 802.11 Networking Stack (mac80211) - CONFIG_MAC80211; this is required for the newer of the two WLAN drivers. I recommend making this a module.
- Device drivers/Misc devices/ThinkPad ACPI Laptop Extras - CONFIG_THINKPAD_ACPI; this is required for sound, bluetooth, and advanced power saving, and used to be "ibm-acpi" instead of "thinkpad-acpi". I recommend making this a module, and turning on 'Enable input layer support by default' (CONFIG_THINKPAD_ACPI_INPUT_ENABLED).
rc.modules.local
Unless noted otherwise, this is where modules should be loaded from. Keep in mind that if this file is present and +x, rc.modules is not called. For this reason, my rc.modules.local starts with:
#!/bin/sh if [ -x /etc/rc.d/rc.modules ]; then /etc/rc.d/rc.modules fi
This file should be +x, and belongs in /etc/rc.d/.
Hard Drive Impact Protection
The laptop contains hardware to detect a fall, and to park the hard disk drive heads. You need the a kernel patched with the hdaps_protect patch described above.
- Download tp_smapi
- Extract it
- make HDAPS=1
- make install HDAPS=1
Add the following to /etc/rc.d/rc.modules.local:
/sbin/modprobe hdaps /sbin/modprobe tp-smapi
If you wish to use the joystick device provided by the tilt sensors, one of the axis is inverted. This can be fixed by changing the function 'transform_axes' in hdaps.c to the following, before running 'make':
static void transform_axes(int *x, int *y) { if (hdaps_invert) *x = -*x; else *y = -*y; }
Impact protection requires a user-space daemon, hdapsd:
- Download hdapsd-20070524.c
- gcc -o /usr/local/sbin/hdapsd hdapsd-20070524.c
- Add the following to /etc/rc.d/rc.local:
/usr/local/sbin/hdapsd -d sda -s 30 -b
KHDAPSMonitor
KHDAPSMonitor is a KDE system-tray applet that indicates the status of the hard disk parking. Eric Hameleers has made a package and SlackBuild script.
XOrg
xorgconfig should give you a working configuration. You want to use the 'intel' graphics driver.
Multiple Monitors
xrandr 1.2 can handle this fine; there's two "gotchas":
- You must provide a large enough virtual screen - I have 'Virtual 3000 1600' in my "Display" Subsection
- Only modes with horizontal and vertical refresh rates in the ranges specified in your xorg.conf screen section will be accepted. Making these ranges really large appears to have no ill effects. (I'm currently using HorizSync 10-100, and VertRefresh 30-70).
Once you've got the above done, and restarted X, it's easy to add enough screen once X is running:
- xrandr --output TV --off
- xrandr # get a list of modes
- xrandr --output VGA --mode XRESxYRES
For example, "xrandr --output VGA --mode 1280x1024".
If you want Xinerama, instead of cloning, replace the last line with:
- xrandr --output VGA --mode XRESxYRES --left-of LVDS
Other valid options are --right-of, --above, and --below.
DRI
This works fine, as long as you've upgraded mesa; it's unstable and crashes with the version included in Slackware, however, upgrading to mesa 7.0.1 fixes this.
TrackPoint
The TrackPoint 'just works' as a basic mouse, however, it can do better :) For enhanced support:
Add the following to /etc/rc.d/rc.modules.local (the psmouse driver doesn't recognize it as a TrackPoint the first time):
/sbin/rmmod psmouse /sbin/modprobe psmouse
Add the following to /etc/rc.d/rc/local:
echo 1 > /sys/devices/platform/i8042/serio1/press_to_select
I have the following as the relevant "InputDevice" section in my xorg.conf, which lets you hold down the middle mouse button to scroll:
Section "InputDevice" Identifier "Mouse1" Driver "mouse" Option "Protocol" "ExplorerPS/2" # IMPS/2 is not recommend for TrackPoints Option "Device" "/dev/input/mice" Option "EmulateWheel" "on" Option "EmulateWheelTimeout" "200" Option "EmulateWheelButton" "2" Option "YAxisMapping" "4 5" Option "XAxisMapping" "6 7" EndSection
Card Reader
Add the following to rc.modules.local:
/sbin/modprobe sdhci /sbin/modprobe mmc-block
This card reader is compatible with HAL's media insertion/removal support.
Sound
This uses the snd-hda-intel driver, which should be automatically loaded by udev. If you get silence, check that Speaker output is enabled, and check /proc/acpi/ibm/volume.
Without the thinkpad-acpi module loaded, audio is corrupted.
Gigabit Ethernet
This uses the e1000 driver.
Wireless LAN (802.11)
I used the new iwlwifi driver, version 1.0, and the corresponding iwlwifi-3945-ucode, version 2.14.1.5. Ignore the documentation saying you need to download mac80211 and patch the kernel, this is included in recent kernels.
- Download the ucode tarball
- Extract it somewhere
- Copy iwlwifi-3945-1.ucode to /lib/firmware/iwlwifi-3945.ucode - note the filename change
- Download the iwlwifi driver tarball
- Extract it
- make; make install
Add the following to rc.modules.local:
/sbin/modprobe iwl3945
When this module is loaded, the WLAN device is wlan0.
Wireless WAN (EVDO/UMTS)
These instructions based on the UK Vodafone 3G card. I believe the US Cingular/Verizon cards should be very similar; check the USB IDs though.
Add the following to rc.modules.local:
/sbin/modprobe usbserial vendor=0x1199 product=0x6813
You should now have /dev/ttyUSB[0-2].
I have modified the pppd peers scripts that Sierra provides. Untar these to /etc/ppp, creating 4 files in /etc/ppp/peers. "gsm" and "gsm_chat" are for GSM/UMTS connections, "cdma" and "cdma_chat" are for CDMA devices. For GSM/UMTS, if you aren't using Vodafone, you must change the APN in gsm_chat. I am unsure about the configuration of CDMA.
To connect, type "pppd call gsm" for GSM/UMTS, or "pppd call cdma" for cdma.
ACPI
I'm assuming you've patched your kernel and build thinkpad-acpi as a module.
To enable basic ACPI functionality, add the following to /etc/rc.d/rc.modules.local:
/sbin/modprobe nvram /sbin/modprobe ac /sbin/modprobe battery /sbin/modprobe button /sbin/modprobe acpi-cpufreq /sbin/modprobe cpufreq-ondemand /sbin/modprobe thinkpad-acpi
If you wish to use any of the ACPI action scripts below:
- Download [2] as /etc/acpi/acpi_handler.sh
chmod +x /etc/acpi/acpi_handler.sh
CPU Frequency Scaling
To enable on-demand frequency scaling:
echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
Changing the cpufreq settings for one core affects both. cpu1's cpufreq directory is actually a symlink to cpu0's.
Intel recommend ondemand, and believe it to be more power-efficient than 'powersave'.
Suspend to RAM
Add the following to the Linux section of your /etc/lilo.conf, otherwise you'll have a black screen when resuming:
append = "acpi_sleep=s3_bios"
Run lilo and reboot.
To sleep, download [3]. This script is based on one from ThinkWiki.
If you want to go to sleep based on ACPI events, such as closing the lid or pressing the sleep button (Fn-F4):
- Save the above 'sleep' script as /etc/acpi/actions/sleep
chmod +x /etc/acpi/actions/sleep
- For Fn-F4 to work, run the following and add it to /etc/rc.d/rc.local:
echo 808 > /proc/acpi/ibm/hotkey
808 is a modification of the default bitmask, telling thinkpad-acpi to pass the Fn-F4 event to the ACPI userspace, instead of dealing with it itself, AKA ignoring it.
Suspend to Disk
This works fine, just change the above 'sleep' script to echo "disk" instead of echo "ram".
Adjust Screen Brightness on AC Status Change
- Download [4] as /etc/acpi/actions/ac
- chmod +x /etc/acpi/actions/ac
The brightness levels used on battery and ac are adjusted by two variables at the top of that script.
You might also want to add /etc/acpi/actions/ac to /etc/rc.d/rc.local, so that the appropriate brightness is set on boot.
PCMCIA/CardBus
This works fine, and should 'just work'. It uses the yenta_socket driver.
Fingerprint Reader
This works fine on a PAMified system, using the 'thinkfinger' driver. I've not tried the closed source driver.
You can also use it instead of a BIOS password if you configure it from Windows.
Not Tested
Firewire
I don't have any firewire devices, so I've not tested this. It is however detected by the kernel, and appears to be supported.
BlueTooth
I've just not got round to testing this yet.
/proc/acpi/ibm/bluetooth enables/disabled it. When it's disabled, it doesn't appear on the USB bus. When enabled, and the wireless kill switch is off, it is detected by the hciusb driver.
UltraBase/UltraBay DVD Drive
I don't own this hardware. Reportedly it's a standard IDE drive, and hotplugging works.
Modem
Got no use for it.
Not Working
Screen Brightness Buttons
Screen brightness can be controlled via /proc/acpi/ibm/brightness
External sources
- ThinkWiki - Linux Thinkpad Wiki - Tons of information about installing various Linux distributions on IBM/Lenovo Thinkpads