ebullient·works

[ About · Archive ]

Gentoo and an IBM T60p - Part 1: Installation and X

Got a new T60 yay!, here’s my brain dump on getting it to work with gentoo (2006.1).

See also (Updated as new parts are added):

General ‘fo:

Motherboard: Lenovo ThinkPad T60 2613EJU1
Processor: Intel Core Duo T2600 (2.16GHz)2
Memory: 2 × 1G DDR2
Graphics Card: ATI Mobility FireGL 256MB
Hard Drives: 100GB SATA 7200RPM
Sound Card: Intel (ICH7) : ALSA hda-intel3
Wired: Intel Corp. 82573L Gigabit
Wireless: Atheros Communications AR5212 NIC

Installation

I followed the general install instructions for gentoo; no rocket science here. I used 2006.1/desktop profile, which sets a lot of handy use flags for you – what you have to do is unset those you don’t want (like gnome or kde). In general, I try to keep the global flags list short(er) – though the default desktop profile pulls a lot of stuff in. I prefer setting use flags per package via the /etc/portage/package.use file.

added: acpi directfb dmx fbcon fuse gtk2 hdaps madwifi mmx motif opengl real samba smp sse sse2 svg syslog usb wifi

removed: -arts -apm -esd -gnome -ipv6 -kde -ldap -nls

Note: euse (from gentoolkit) is very useful here. Using euse -i you can tell: a) all of the packages that make use of a given flag and what they use it for, and b) whether or not it’s included or excluded from the default profile or from your make.conf. Handy stuff.

I adjusted the grub install for Dual-boot, and did some checking for kernel options: a) ACPI configuration, b) removing DRM because of the ATI chipset (below), etc.

Just for the hell of it, I set up sSMTP to route to my gmail account4.

Pointing devices:

I decided to add drivers for the touchpad (we’ll see how long it lasts – I’ll probably end up disabling it via the BIOS..) and for using the mouse on(in? at?) the console. I didn’t need to do anything special aside from emerging the packages (and in the case of gpm, starting the daemon via /etc/init.d/gpm).

  • x11-drivers/synaptics-0.14.5-r1
  • sys-libs/gpm-1.20.1-r5

On-Screen Display and Thinkpad things

For thinkpad buttons, I use tpb with the xosd use flag to enable on-screen display when you push things (like the volume buttons). After emerging tpb, update /etc/tpbrc per your preferences. Use the hdaps useflag with tm_smapi to enable 1/2 of automatic HD head parking function (the reading-the-data part).

For on-screen display to work w/ X, you have to start tpb when you start X, and it has to have access to the display, etc.

  • x11-libs/xosd-2.2.14-r1
  • app-laptop/tpb-0.6.4
  • app-laptop/tp_smapi-0.27
  • app-laptop/tpctl-4.17
  • script for starting tpb

Setting up X

This is the fun part. As noted above, the T60 uses an ATI FireGL graphics chipset, which means binary ATI drivers5. I grabbed the latest of both ati-drivers and ati-drivers-extra (with ~x86 for both in /etc/portage/package.keywords). The combination of use flags mentioned above were sufficient for both packages.

Note: ati-drivers-extra-8.30.3 required libXinerama when the qt use flag is enabled, even if qt did not use that flag. I had to emerge x11-libs/libXinerama for ati-drivers-extra to compile properly.

After emerging the package (followed by source /etc/profile to regen path strings), I copied the xorg.conf.example to xorg.conf (in /etc/X11) and used aticonfig --initial --input=/etc/X11/xorg.conf to create an initial xorg.conf file. Then I updated the file to strip down what was in there – keeping the ATI stuff, and punting the extra stuff.

Without too much fooling around, X came up (with DRI and everything). The settings generated by aticonfig left a lot to X11 defaults. 1600×1200 at depth 24:

# xdpyinfo | grep resolution -A 1 -B 1
  dimensions: 1600x1200 pixels (301x221 millimeters)
  resolution: 135x138 dots per inch
  depths (7): 24, 1, 4, 8, 15, 16, 32

Now, I did check out sys-apps/ddcxinfo-knoppix, and I have to say it’s pretty neat. It spat out all kinds of things about the TFT display. I’ve included the output in the list below.

I did see the following message in Xorg.0.log: (EE) AIGLX error: dlopen of /usr/lib/dri/fglrx_dri.so failed (/usr/lib/dri/fglrx_dri.so: cannot open shared object file: No such file or directory). According to the Modular X Migration guide:

Note: With modular installed, external drivers such as nvidia-glx and wacom as well as some vnc apps may not work if they install things to /usr/lib/modules instead of /usr/lib/xorg/modules. Many of these will have modular X detection added to the installation process …

The ati-drivers ebuild does have such detection, and the requested library was installed in the new location (/usr/lib/xorg/modules/dri) however, it looks like the code trying to load the DLL is still expecting it in the old place? I tried the most obvious first.. create a symlink from the new location to the old. That seemed to really open things up.

# glxinfo
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.2
...
client glx vendor string: ATI
client glx version string: 1.3
...
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: ATI MOBILITY FireGL V5200 Pentium 4 (SSE2) (FireGL) (GNU_ICD)
OpenGL version string: 2.0.6119 (8.30.3)

I still, however, saw an error message: AIGLX error: dlsym for __driCreateNewScreen_20050727 failed (/usr/lib/dri/fglrx_dri.so: undefined symbol: __driCreateNewScreen_20050727. This seems not to harm anything, and the screen is so darn beautiful I just want to use it for awhile.

Sound

Why not. Sound next. In the kernal config, I enabled support for ALSA as modules. I enabled “Intel HD Audio” PCI Driver for the kernel-based hda-intel module. I didn’t have to set up any of the dmix stuff I used to, as (I seem to remember reading) that’s all built in these days. Everything “appears to function” right out of the box. Goodness!

  • media-sound/alsa-utils-1.0.13
  • media-libs/alsa-oss-1.0.12

Footnotes / References :

1 Overview – ThinkPad T60, T60p [www.ibm.com]

2 Intel® Centrino™ Duo Mobile Technology [intel.com]
Intel® Core™ Duo processor T2600

3 ALSA: hda-intel [alsa-project.org]

4 HOWTO Gmail and sSMTP [gentoo-wiki.com]

5 Gentoo ATI Radeon FAQ [odin.prohosting.com/wedge01]

6 Mozilla Font Size / DPI Issues

Other References (of course):

2007-01-05: Updated to make all linked files work (missed uploading a few), added link to Parts 2 and 3.