Installing Gentoo Linux 2006.1 on IBM x60s
zpejder — May 27, 2006 - 12:17
Introduction
This page describes how to install and customize Gentoo Linux [1] 2006.1 so that it will run nicely on a Lenovo (IBM) x60s [2].
Lenovo x60s hardware
The x60s is build on the Intel Centrino technology and is using the Intel Core Duo processor.
The hardware specs of my x60s can be seen below.
00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS/940GML and 945GT Express Memory Controller Hub (rev 03) 00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS/940GML Express Integrated Graphics Controller (rev 03) 00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/940GML Express Integrated Graphics Controller (rev 03) 00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02) 00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 02) 00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 02) 00:1c.2 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 3 (rev 02) 00:1c.3 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 4 (rev 02) 00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #1 (rev 02) 00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #2 (rev 02) 00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #3 (rev 02) 00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #4 (rev 02) 00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 02) 00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2) 00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 02) 00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 02) 00:1f.2 SATA controller: Intel Corporation 82801GBM/GHM (ICH7 Family) Serial ATA Storage Controller AHCI (rev 02) 00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 02) 02:00.0 Ethernet controller: Intel Corporation 82573L Gigabit Ethernet Controller 03:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02) 15:00.0 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev b4) 15:00.1 FireWire (IEEE 1394): Ricoh Co Ltd R5C552 IEEE 1394 Controller (rev 09) 15:00.2 Class 0805: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 18)
More details about the x60s hardware can be found at ThinkWiki [3].
lsusb output can be seen below:
Bus 005 Device 002: ID 17ef:1000 Bus 005 Device 001: ID 0000:0000 Bus 004 Device 002: ID 0483:2016 SGS Thomson Microelectronics Fingerprint Reader Bus 004 Device 001: ID 0000:0000 Bus 003 Device 001: ID 0000:0000 Bus 002 Device 001: ID 0000:0000 Bus 001 Device 001: ID 0000:0000
The unnamed device in the first line is the blue tooth device and can be enabled/disabled by a sliding button on the front.
Installing Gentoo
The x60s does not have a built-in optical drive, but an optical drive is available for the X6 UltraBase Docking station [4]. So unless you have the X6 or a peripheral optical drive, you have to find another way to boot the Gentoo [1] LiveCD.
One way of booting the LiveCD is using an USB drive. A guide [5] to using an USB drive to boot a machine is available on gentoo.org.
Booting Gentoo
To get the x60s to boot from USB you can either change the boot order in the BIOS, or you can press F12 when ThinkPad logo is displayed. Pressing F12 will present you with a prompt allowing you to choose which device should be used to boot the x60s.
After the USB drive has been selected as the primary boot device, the x60s will continue to boot the LiveCD. At this point you can follow the instructions listed in the Gentoo Handbook [6].
The SATA disk
The USB drive during the install process is to be found at /dev/sda1 and the hard drive is to be found at /dev/sdb.
Building the base system
I always do a stage 1 install when I install Gentoo and therefor my make.conf [7] can contain a greater deal of customization. I have attached it so you can see what flags I use.
As of 2006.1 I tried to do a stage 3 install for the first time, and I must say that it is a lot easier and faster than a stage 1. When you have finished the stage 3 install and your machine has reboot, you can "upgrade" to a stage 1 by doing:
emerge -ueDNav world
My make.conf [7] is still available...
Building the kernel
I have attached my .config [8] for the sys-kernel/vanilla-sources-2.6.19 to this page. What is in my kernel:
- Support for the dual core cpu
- Support for cpu frequency scaling
- Wireless support
- Graphics card support
- Highmem support
- Ultrabay DVD-ROM drive
- Reiserfs 3
- Bluetooth support
- infrared, SD card, fingerprint reader NOT supported
Configuring GRUB
One thing i found out (at least for me) is that the SATA disk switches from /dev/sdb to /dev/sda when you boot your own kernel. This means that GRUB [9] has to look on /dev/sda for the kernel during boot.
Installing the graphics driver
In order to run X.org 7.1 you need to use the x11-drivers/xf86-video-i810 (>=1.6.0) driver. The current stable version is 1.6.5 so you should be good to go. If you set VIDEO_CARDS="i810 vesa" in your make.conf portage will install the driver as a dependency.
If it isn't installed, you can install it by doing:
emerge x11-drivers/xf86-video-i810
When you have installed the driver (and the rest of X.org) you should be able to start X. I have attached my xorg.conf [10] if you would like the see how to configure X to run on the Intel Graphics Media Accelerator 950.
The Intel 950 Graphics card is fairly decent and gives me the following in glxgears:
4526 frames in 5.0 seconds = 905.046 FPS 4581 frames in 5.0 seconds = 916.151 FPS 4563 frames in 5.0 seconds = 912.507 FPS 4555 frames in 5.0 seconds = 910.823 FPS 4578 frames in 5.0 seconds = 915.587 FPS
Installing the wireless driver
The driver for the Intel Wireless 3945ABG card is in portage so it is straightforward to install.
emerge net-wireless/ipw3945 wireless-tools -av
NB #1: Current portage versions of net-wireless/ipw3945 (1.0.5 - 1.1.0-r1) require the net-wireless/ieee80211 (<1.2.0).
NB #2: If you are using my kernel configuration, the emerge of net-wireless/ieee80211 will fail complaining about the presence of ieee80211 in the kernel. The error message should tell you what command you need to run in order to remove the ieee80211 from the kernel. Once you have removed the conflicting files from the kernel, you can run the above command again.
NB #3: net-wireless/ipw3945d >= 1.7.22-r3 requires the ipw3945d service to be started in order to see the device through iwconfig.
It should be enough to add it to the default runlevel:
rc-update add ipw3945d default
Installing the sound card driver
The Intel High Definition Audio Controller can be installed either by enabling SND-HDA-INTEL in the kernel or by installing the media-sound/alsa-driver package.
Set ALSA_CARDS="hda-intel" in make.conf to only build the hda-intel driver.
emerge alsa-driver alsa-tools alsa-utils -av
When that is done, run alsaconf and select the Intel High Definition Audio Controller in the ncurses menu in order to tell alsa what drivers to load.
Next, add the alsasound service to the boot runlevel:
rc-update add alsasound boot
You may have to unmute the card through alsamixer to enable sound.
NB: There is a bug in the BIOS that requires the modem to be enabled or else the sound card won't play anything. If the modem is disabled, the card can be installed, but not used.
Installing the HDAPS driver
The HDAPS [14] driver can read the information from the accelerometer on the hard disk and can be used to park the disk head when a shock is detected. The driver is available as SENSORS_HDAPS in the kernel or as app-laptop/tp_smapi in portage.
USE="hdaps" emerge app-laptop/tp_smapi
You should note that this doesn't enable disk head parking, it just installs the driver. To enable disk head parking you need the app-laptop/hdapsd package, but this relies on the kernel module and cannot be used with tp_smapi. Furthermore there seems to be some problems with hdapsd and kernel 2.6.18 and SATA disks.
Loading the drivers at boot
Gentoo [1] will automatically load modules listed in /etc/modules.autoload.d/kernel-2.6 if you are using a 2.6 profile.
These are the modules I load at boot:
ieee80211_crypt ieee80211 ipw3945 usbhid uhci-hcd ehci-hcd ohci-hcd thinkpad_ec tp_smapi hdaps i915
A note about portage installed drivers
You need to re-emerge portage installed drivers every time you have updated your kernel. You can make this easier by installing the sys-kernel/module-rebuild package. This will provide the module-rebuild command that will rebuild all extra drivers installed through portage.
What to do next
When my install is complete, I usually install some extra portage utils:
emerge app-portage/portage-utils app-portage/gentoolkit app-portage/eix app-portage/genlop -av
Configuration wise you could follow the UTF-8 guide [15] to enable UTF-8 on your system. The Power management guide [16] might also be of interest.
Comments and feedback
If this helped you, please leave a comment (or send me an email) with your feedback and/or suggestions to make this guide better.
Shoutouts
I would like to thank ThinkWiki [3] for the detailed listings of the x60s hardware, which made it a lot easier to build the correct kernel.
Also thanks to Werner Heuser at TuxMobil [11] for listing this page under the IBM/Lenovo section [12] and under the Gentoo section [13] of his excellent home page.
References
[1] http://gentoo.org
[2] http://www-131.ibm.com/webapp/wcs/stores/ [snipped]
[3] http://www.thinkwiki.org/wiki/Category:X60s
[4] http://www-131.ibm.com/webapp/wcs/stores/ [snipped]
[5] http://www.gentoo.org/doc/en/liveusb.xml
[6] http://www.gentoo.org/doc/en/handbook/
[7] http://farmerzonen.dk/files/make_0.conf
[8] http://farmerzonen.dk/files/2.6.19.2.vanilla.config
[9] http://www.gnu.org/software/grub/
[10] http://farmerzonen.dk/files/xorg.conf
[11] http://tuxmobil.org/
[12] http://tuxmobil.org/ibm.html
[13] http://tuxmobil.org/gentoo_mobile.html
[14] http://www.thinkwiki.org/wiki/HDAPS
[15] http://www.gentoo.org/doc/en/utf-8.xml
[16] http://www.gentoo.org/doc/en/power-management-guide.xml

Kernel .config
alexander (not verified) — October 2, 2006 - 19:11Hello!
Gentoo 2006.1 is released. It would be great if you could update the installation instructions and post your kernel config.
I'm stuck with my hardware config (mostly with the graphics :()
Or maybe there is anyone out there, who got a well running kernel .config for the x60s. Just email me :)
Thank you all!
Alex
Updates coming
zpejder — October 3, 2006 - 00:07I have the coming weekend set aside to installing Gentoo 2006.1.
Mean while, my current kernel config for vanilla 2.6.18 is available at http://farmerzonen.dk/files/2.6.18.vanilla.config
have suspend to RAM and disk working 100%
George Nychis (not verified) — July 19, 2006 - 23:56Hey guys,
I saw a couple people post about this, so I thought I would help everyone get suspending to RAM and disk to work. First off, none of this will work without a 2.6.18-rc1 kernel, you need 6 specific patches created for the kernel by Forrest Zhao (thanks!)
So, download the 2.6.18-rc1 kernel, and then apply these 6 patches:
http://www.andrew.cmu.edu/user/gnychis/ahci-patch1
http://www.andrew.cmu.edu/user/gnychis/ahci-patch2
...
http://www.andrew.cmu.edu/user/gnychis/ahci-patch6
To apply them, put them in /usr/src/linux and do:
patch -p1 < ahci-patch[1-6]
The patches fix the hard disk failing to resume after a suspend.
For memory suspension you need:
CONFIG_ACPI=y
CONFIG_ACPI_SLEEP=y
CONFIG_ACPI_SLEEP_PROC_FS=y
For disk suspension you need:
CONFIG_SOFTWARE_SUSPEND=y
CONFIG_PM_STD_PARTITION="/dev/sda2" # YOUR SWAP PARTITION
Finally, install the kernel and reboot
To suspend to ram:
echo -n mem > /sys/power/state
To suspend to disk:
echo platform > /sys/power/disk; echo disk > /sys/power/state
Enjoy!
- George
The sound card now works
zpejder — August 17, 2006 - 08:04I have had some problems with the sound card installing, but not being able to play anything. A few days ago I stumbled onto the solution.
As listed on http://www.thinkwiki.org/wiki/AD1981HD there is a bug in the bios that messes with the sound card when the inbuilt modem is disabled. After I enabled the modem and got back into Gentoo, I fired up Vlc and played an mp3 with no problem (after I unmuted the speakers with the button above the F keys).
Long time, no updates
zpejder — August 15, 2006 - 07:58I have been pretty busy for the last couple of months and haven't had time to maintain this page.
When Gentoo 2006.1 is released (and it should be so within a month), I will update the instructions on this page and post a new kernel config.
from hardware information to kernel
questor (not verified) — August 11, 2006 - 14:08Hello zpejder
I would like to know how you knew how to set all the kernel settings just by looking at the hardware information at thinkwiki.
Greetings,
questor
Most of the pages on
zpejder — August 15, 2006 - 07:54Most of the pages on ThinkWiki mention what driver you have to use in order to get a working device. So when you know what driver to use, all you need to do is enable it in your kernel configuration. (Finding the driver in the kernel config can be sped up by searching for it by pressing / (in make menuconfig, that is) and typing in the driver name)
Kernel config
flo (not verified) — June 28, 2006 - 13:01Hi
Can you attach your Kernel config
.config
zpejder — July 8, 2006 - 15:15Hi,
sorry about the long time before I responded... I have been really busy.
Anyway, I should be able to post my config for vanilla-sources in a couple of days...
- Steffen
Hibernate and/or Suspend-to-ram
Anonymous (not verified) — May 30, 2006 - 09:14I have a question does hibernate work on your x60?? Or the sleep function does it work?? Another minor request, could you please post what is working and what not??(for example Hibernate, Sound, Card Reader,...)
Thanks a lot
Greetings
Thierry
Re: Hibernate
zpejder — May 30, 2006 - 10:30Hi Thierry
I haven''t had the time to tinker around with suspend, and I'm quite busy at the university at the moment so I don''t think I will have any time to do it until late june...
In regards to what is working and what is not, then I don''t have any way to test the card reader as I don't have any of the cards. As you can see on http://www.thinkwiki.org/wiki/SD_Card_slot there is some support for it in Linux, but as I said, I haven''t tried to get it working.
As for the sound card then I''m using the media-sound/alsa-driver-1.0.11 because the ALSA drivers in the 2.6.16 kernel is to old. With the alsa-drivers from Portage I''m able to install the card but there is no sound when I play something.
The 2.6.17 kernel should have improved the hda-intel driver so it should work with the inbuilt ALSA. 2.6.17 will also include support for hdaps (making the disk head move off the disk if the laptop should fall to the floor) which I look forward to.
- Steffen
Thanks a lot, well I
Anonymous (not verified) — June 2, 2006 - 12:56Thanks a lot, well I currently have a thinkpad x60 and almost everything is working except hibernate/suspend. A friend even got the fingerprint reader to work, relatively easily.
Well I wish your good luck for your work at the university....
thierry
architecture for gcc w/l2400
George (not verified) — June 9, 2006 - 22:07Ok, after seeing this, I had decided on having my /etc/make.conf specify my architecture to be pentium-m... but then the more I thought about it, this didn''t seem right, even though it is in the same family, it has improvements over the pentium-m. So I asked over on the GCC-help mailing list, and check the gentoo-wiki, both the wiki and someone on gcc-help suggest using march=prescott
anyways, check it out:
http://archive.netbsd.se/?ml=gcc-help&a=2006-06&m=2083805&list
http://gentoo-wiki.com/Safe_Cflags#Intel_Core_Solo.2FDuo_.28Yonah.29
Just trying to help optimize... I''m also currently trying to figure out what architecture to specify in the kernel, whether it be pentium-m or p4 based... both boot the machine, so maybe i''ll run benchmarks to decide.
i915 built into kernel
George (not verified) — June 12, 2006 - 07:59Hey guys,
Can someone using the exact xorg.conf and kernel .config post results of glxgears?
I've noticed with the kernel .config posted and the xorg.conf that when you startx, it complains about missing i915 support in the kernel. Without this support I get ~910FPS with glxgears. If i modify the posted .config to add i915 support, i get about 1091FPS.
Can someone using the exact configs posted, please post their glxgears results?
Thanks!
George
ibm x60 gentoo linux config
gaweee (not verified) — June 8, 2006 - 20:02anyway u can release the config file for newbies like us?
current kernel config
zpejder — June 8, 2006 - 23:22My config for 2.6.16-gentoo-r9 is available at http://farmerzonen.dk/files/2.6.16-gentoo-r9
- Steffen