Gentoo Linux on the Thinkpad W700

Lenovo Thinkpad W700 out of the box

I recently upgraded my Thinkpad T60p for a W700. This laptop is a tank, and it weighs about as much as one. It dwarfs the T60p that I had before, and that was still pretty big. Here are some quick specs for this W700:

  • Intel Core 2 Extreme QX9300 / 2.53 GHz, Quad-Core
  • 12MB L2 cache
  • 4GB RAM
  • Serial ATA-300 with RAID 0/1
  • 2 500GB 7200rpm Drives
  • 17 in TFT active matrix 1920 x 1200 (WUXGA)
  • NVIDIA Quadro FX 2700M PCI Express x16, 1GB Video Memory
  • 9-cell Lithium ion battery
  • Dimensions: 16.1in x 12.2in x 1.6in
The PCI/PCI Expres bus:

00:00.0 Host bridge: Intel Corporation Mobile 4 Series Chipset Memory Controller Hub (rev 07)
00:01.0 PCI bridge: Intel Corporation Mobile 4 Series Chipset PCI Express Graphics Port (rev 07)
00:03.0 Communication controller: Intel Corporation Mobile 4 Series Chipset MEI Controller (rev 07)
00:19.0 Ethernet controller: Intel Corporation 82567LM Gigabit Network Connection (rev 03)
00:1a.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 (rev 03)
00:1a.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #5 (rev 03)
00:1a.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #6 (rev 03)
00:1a.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 (rev 03)
00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 03)
00:1c.0 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 1 (rev 03)
00:1c.1 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 2 (rev 03)
00:1c.3 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 4 (rev 03)
00:1c.4 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 5 (rev 03)
00:1d.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 03)
00:1d.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 03)
00:1d.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 (rev 03)
00:1d.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 03)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 93)
00:1f.0 ISA bridge: Intel Corporation ICH9M-E LPC Interface Controller (rev 03)
00:1f.2 SATA controller: Intel Corporation ICH9M/M-E SATA AHCI Controller (rev 03)
00:1f.3 SMBus: Intel Corporation 82801I (ICH9 Family) SMBus Controller (rev 03)
01:00.0 VGA compatible controller: nVidia Corporation G94M [Quadro FX 2700M] (rev a1)
03:00.0 Ethernet controller: Atheros Communications Inc. AR5001 Wireless Network Adapter (rev 01)
15:00.0 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev ba)
15:00.1 FireWire (IEEE 1394): Ricoh Co Ltd R5C832 IEEE 1394 Controller (rev 04)
15:00.2 SD Host controller: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 21)
15:00.3 System peripheral: Ricoh Co Ltd R5C843 MMC Host Controller (rev 11)
15:00.4 System peripheral: Ricoh Co Ltd R5C592 Memory Stick Bus Host Adapter (rev 11)
15:00.5 System peripheral: Ricoh Co Ltd xD-Picture Card Controller (rev 11)



Install Gentoo from CD

At the time of this writing, the latest Gentoo minimal iso didn't recognize my wired ethernet (gentoo-x86-minimal-2008.0.iso), so I went to the current-iso directory to grab the latest. Also, I had previously tried a 2007.1 minimal CD, and it couldn't even mount the CDROM because the w700 has a SATA CD/DVD drive. There was a problem recognizing the 82567LM Gigabit Network controller using the 2008.0 install CD but the 20090901 one worked fine. From here, I followed the Gentoo Handbook. Since the network is already working, I skipped to prepare my disks. There are 2 500GB drives in this laptop so I opted for a 64M /boot, 196G /, and the rest for /home on /dev/sda. The second disk (/dev/sdb) has 8G for swap and the rest is entirely allocated for /media. As for the fs types, I chose: /boot = ext2, / = ext3, /home = reiserfs, /media = xfs. The ext filesystems are for compatibility in case I'm sticking it in another computer to read data off of it and XFS to handle big files and reiserfs because I tend to have directories with tens of thousands of files in them.

After installing the stage3 and the portage snapsot, I moved /tmp and /usr/portage to /home and symlinked so that they can take advantage of reiser. I set my CFLAGS to -O2 -march=prescott -pipe -fomit-frame-pointer in the /etc/make.conf file. These are the USE flags which I set:

USE="X xorg a52 aac aalib acpi aim alsa bash-completion berkdb boundschecking bzip2 canna cdda cddb cdr cjk cracklib crypt css ctype cvs dbus dga dri dts dv dvd dvdr emacs encode esd expat fastcgi ffmpeg firefox flac fontconfig freetds freewnn ftp gcj gif gimp gnome gnuplot gnutls gphoto2 gzip gtk hal hddtemp ibm idn imagemagick imlib java java6 javascript jpeg jpeg2k lame libcaca libgda libnotify libwww lua lzo mad matroska migemo mime mmap mmx mng mono mozilla mp3 mp4 mpeg mplayer mule ncurses nls nptl nsplugin offensive opengl pam pcmcia pcre pdf perl png python quicktime raw session smp sockets sox spell sse sse2 ssse3 ssl svg theora threads tiff truetype unicode vorbis wifi win32codecs wmf x264 xemacs xine xml xpm xv xvid zlib"



Kernel Configuration

Next up is configuring the kernel. I went with the default gentoo-sources and emerged that (as of this writing, 2.6.30-gentoo-r6). Then using make menuconfig I had to turn on a few things specific for the laptop. Under "Device Drivers -> Power supply class support" I turned on "Generic PDA/phone power driver" and under "Device Drivers -> X86 Platform Specific Device Drivers" I turned on the "ThinkPad ACPI Laptop Extras". Under "File Systems", I needed to enable ReiserFS and XFS support since 2 of my paritions are formatted as such, as well as NTFS support since some cameras store data on NTFS and FUSE because I use sshfs.

For the most part, the menuconfig scripts added everything that I needed. I double checked the things that I knew I'd need:

General Config

I checked some of the general kernel config settings for the processor and power management. These aren't vital, but it's nice to have them, especially ACPI since I intend to use it.

Processor type and features  --->
    [*] Symmetric multi-processing support
    Processor family (Core 2/newer Xeon)  --->
        (X) Core 2/newer Xeon
    [*] Multi-core scheduler support
Power management and ACPI options  --->
    [*] Power Management support
    [*] ACPI (Advanced Configuration and Power Interface) Support  --->
        <*>  AC Adapter
        <*>  Battery
        <*>  Button
        -M-  Video
        <*>  Fan
        -*-  Dock
        <*>  Processor
        <*>    Thermal Zone
Device Drivers  --->
    SCSI device support  --->
        <*> SCSI disk support
        <*> SCSI CDROM support
        [*]  Enable vendor-specific extensions (for SCSI CDROM)
        <*> SCSI generic support
    <*> Serial ATA (prod) and Parallel ATA (experimental) drivers  --->
        [*]  ATA ACPI Support
        <*>  AHCI SATA support
        <*>    Generic ATA support
    -*- I2C support  --->
        I2C Hardware Bus support  --->
            <*> Intel 82801 (ICH)
            <*> Intel SCH SMBus 1.0

Intel PRO/1000 gigabit ethernet

The Intel Corporation 82567LM Gigabit Network Connection can use the e1000 driver, but it runs in PCI Express. Make sure you have PCI Express turned on in your "Bus options".

Device Drivers  --->
    Network device support  --->
        Ethernet (1000 Mbit)  --->
            <*>  Intel(R) PRO/1000 Gigabit Ethernet support
            <*>  Intel(R) PRO/1000 PCI-Express Gigabit Ethernet support

Atheros AR2425 Wireless

The W700 that I have has the "IBM ThinkPad" wireless LAN adapter as opposed to the Intel one. This makes things a bit easier because the Intel adapter is still pretty new and there might be configuration problems. The AR2425 chipset is supported directly in the kernel so we just need to turn it on. This will use the ath5k Atheros driver.

Networking support  --->
    [*]  Wireless  --->
        <*>  Generic IEEE 802.11 Networking Stack (mac80211)
Device Drivers  --->
    Network device support  --->
        Wireless LAN  --->
            [*] Wireless LAN (IEEE 802.11)
            <*>  Atheros 5xxx wireless cards support

High Definition Audio

This driver has been around for a while, it's part of ALSA, so we need to turn that on then enable the driver.

Device Drivers  --->
    <*> Sound card support  --->
        <*>  Advanced Linux Sound Architecture  --->
            [*]  PCI sound devices  --->
                <*>  Intel HD Audio  --->
                    [*]  Build Realtek HD-audio codec support
                    [*]  Build Analog Device HD-audio codec support
                    [*]  Build IDT/Sigmatel HD-audio codec support
                    [*]  Build VIA HD-audio codec support
                    [*]  Build ATI HDMI HD-audio codec support
                    [*]  Build NVIDIA HDMI HD-audio codec support
                    [*]  Build INTEL HDMI HD-audio codec support
                    [*]  Build Conexant HD-audio codec support
                    [*]  Build C-Media HD-audio codec support
                    [*]  Build Silicon Labs 3054 HD-modem codec support
                    [*]  Enable generic HD-audio codec parser

After compiling the kernel, I installed a few things (grub, vixie-cron, syslog-ng, slocate, logrotate, reiserfsprogs, xfsprogs) and restarted.



Booting off the harddrive

Booted up with no problems, ethernet, drives, cdrom, all worked on boot. I already did an emerge --sync while chrooted in the previous step, so now I'll just load it up with the packages that I want. Wireless LAN wasn't working because I didn't have wireless-tools or wpa_supplicant installed yet, although if I try to bring up wlan0, it shows up in ifconfig but can't find an AP and times out. After 10 million hours compiling a thousand packages, I'm ready to set some things up. Let's start with the easy stuff.


Just a quick check to see if I can access the CD ROM:

# mount /dev/sr0 /mnt/cdrom/
mount: block device /dev/sr0 is write-protected, mounting read-only
# ls /mnt/cdrom/
README.txt  gentoo.efimg  gentoo.efimg.mountPoint  image.squashfs  isolinux  livecd
# umount /mnt/cdrom/

Note that the device is /dev/sr0 and not the typical /dev/cdrom or /dev/hda1.

Intel Pro/1000 Gigabit Ethernet

Works with no additional installation. You'll just need to add whatever LAN related config in your /etc/conf.d/net for eth0.

X11 and OpenGL

This laptop has a hot graphics card. I don't run anything that heavily uses GL but I'd like to at least have hardware accelleration for video playback. Getting X to run is easy. With the Xorg 1.5 server, you can use HAL and pretty much not use a config file at all and everything gets auto-detected. Almost. You need to use the "nvidia" driver and not the "nv" driver that Xorg tries to use. You can install this manually:

# emerge nvidia-drivers
(or just have Xorg bring it in as a dependency by adding this to your /etc/make.conf)

You'll need an /etc/X11/xorg.conf file now, specifically with this in the Device section:

Section "Device"
    Driver  "nvidia"

X should at least startup for you now. But you may notice that you don't get GLX or hardware accelleration. You'll see this in your /var/log/Xorg.0.log:

(EE) NVIDIA(0): Failed to initialize the GLX module; please check in your X
(EE) NVIDIA(0):    log file that the GLX module has been loaded in your X
(EE) NVIDIA(0):    server, and that the module is the NVIDIA GLX module.  If
(EE) NVIDIA(0):    you continue to encounter problems, Please try
(EE) NVIDIA(0):    reinstalling the NVIDIA driver.

This is because Xorg has a libglx module and so does NVidia, and NVidia wants you to use their's. One way you can do this is to rename the Xorg's version to something else and symlink NVidia's version:

# cd /usr/lib/xorg/modules/extensions/
# mv
# ln -s /usr/lib/opengl/nvidia/extensions/

But this is kind of messy and the next time you update Xorg, it'll break GLX again. The better way to do this is to tell Xorg where to find the NVidia libraries. You can open the xorg.conf that you made to get X to use the right video driver, and add this to the "Files" section:

ModulePath    "/usr/lib/xorg/modules"
ModulePath    "/usr/lib/opengl/nvidia"

This should make Xorg load NVidia's GLX driver over Xorg's version. The module path needs to be in this order or else modules such as WFB will break. NVidia has a which it loads in the event that X isn't providing it, but Xorg 1.5 does provide it and will puke if it isn't using its own libwfb. If this doesn't work, then do it the messy way. Make sure you have the nvidia's opengl selected and that glxinfo (from the mesaprogs package) reports kosher stuff:

# eselect opengl show
(if that doesn't say "nvidia", then you need to do this:)
# eselect opengl list
Available OpenGL implementations:
  [1]  nvidia
  [2]  xorg-x11 *
# eselect opengl set 1
Switching to nvidia OpenGL interface... done
# glxinfo
(Output of glxinfo should include these lines)
server glx vendor string: NVIDIA Corporation
client glx vendor string: NVIDIA Corporation
OpenGL vendor string: NVIDIA Corporation

That was pretty painless compared to the ATI drivers with my old ThinkPad T60p. With X11 working, and hardware accelleration, I can move on to other things.

Atheros Wireless LAN

I installed wpa-supplicant and wireless-tools to help with the setup of the Atheros wireless adapter, but after I added the correct ssid and keys to wlan0 in my /etc/conf.d/net, net.wlan0 started up just fine. I didn't add any modules to the /etc/conf.d/net file so I'm pretty sure I'm not using iwconfig, eventhough the config is the same:

config_wlan0=( "dhcp" )
essid_wlan0="My Access Point"
config_My_Access_Point=( "dhcp" )
key_My_Access_Point="0123456789 enc restricted"

This is enough to get things started in the event that wpa is needed. As a side note, my wireless antenna LED doesn't seem to come on.

Intel High Definition Audio

Works with no additional effort. One strange side effect that I noticed was the volume buttons don't work. They're definitely not broken because I can mute (which works) then hit a volume up or down button and it unmutes. There must be a setting somewhere where I'm not allowing something to write to nvram. It's not that big of a deal right now since I can control the sound from alsamixer, but when it annoys me enough, I'll probably look into it.

UPDATE (10/14/2009): I'm not sure what exactly fixed this. But after the last update world I did, Xorg was upgraded to 1.6.3 and Gnome to 2.26 (yes, I still use gnome/metacity), and I just noticed today that my volume buttons work again. I even get an onscreen overlay showing the volume.


The ThinkPad ACPI Extras worked as advertised, allowing you to control things like the think light through the /proc filesystem (I have my beeps scripted to blink the think light instead of making a sound). The /proc hooks that you get look like this:

# ls /proc/acpi/ibm/
beep  bluetooth  cmos  driver  fan  hotkey  led  light  thermal  video  volume


Not tested, I assume it works as when I plug my phone into it, I can see USB events go off in the logs. The question is whether I can read/write from thumb drives or cameras.

Fingerprint reader

I installed thinkfinger but it can't find the biometric device in the USB chain. According to lsusb, this is all I get:

Bus 004 Device 002: ID 08ff:2810 AuthenTec, Inc.

According to what I've read, libfprint can talk to an AuthenTec reader, but it's no longer in the portage tree. There's also a project called aes2501 but it hasn't been updated in almost 2 years and it's not in the portage tree. BioAPI doesn't recognize the device and it segfaults. Looks like there isn't a quick and easy solution to get this to work as of yet.


Not tested.


Not tested.


Not tested.



Lenovo Thinkpad W700 with Gentoo, vs 28 inch TV, vs PlayStation 3, vs SGI Keyboard (for size comparison)



TuxMobil - Linux on Laptops, Notebooks, PDAs and Mobile Phones

This page was last updated on: Sep 10 2007