Lenovo T400

- It should be relatively small and handy. A battery runtime of noticeably more than 3 hours. High quality chassis. With other words: a mobile notebook.
- The screen resolution has to be noticeably higher than 1280x800.
- It will be my main computer. Therefore it should offer good performance, but not necessarily in graphics domain.
- Finally, there has to be good Linux support.
Changelog
- 2011-11-21: Clean up xorg.conf.d files
- 2011-03-26: Adding 2.6.38 kernel config, adding kernel parameters for radeon, updating xorg configuration
- 2010-11-21: Adding tempinfo.sh
- 2010-05-21: Adapting content to vga_switcheroo
- 2010-05-08: Removing '.sh' for the acpi event file names
- 2010-03-28: Update info on xorg's and AMD's driver for the ATI graphics card
- 2010-03-01: Note on switchable graphics, reviewed sleep.d and acpi scripts
- 2009-12-12: Kernel 2.6.32 config, widely distributed minor updates.
- 2009-12-10: Update xorg-conf init script
- 2009-11-08: Cleanup some notes on really old package versions.
- 2009-09-26: Update infos on keymap, xrandr, intels virtual size
- 2009-08-07: Linking to Gentoo Intel GMA site, note on KMS
- 2009-07-30: Font DPI issue
- 2009-07-28: Some notes on fingerprint sensor
- 2009-07-26: Temperature sensors
- 2009-07-24: Gzip kernel configs, note on hdaps and tp_smapi
- 2009-07-19: Info on Load_Cycle_Count problem
- 2009-07-05: Updates on ati-drivers, xf86-video-ati, and new 2.6.30 kernel config
- 2009-06-29: Linguistic improvementes
- 2009-04-24: Patch of ati-drivers for 2.6.29 kernel
- 2009-04-21: Update btn-lock.sh script and xorg-conf init script.
- 2009-04-10: Adding a new kernel config. Some intel graphic notes.
- 2009-04-07: Adding xorg-server-1.5 notes and files
- 2009-03-16: Note on transflective display
- 2009-03-05: Initial version
Specification
The model number of my notebook is 276521G and the order number is NM321GE. The German specification site of this model is available at the IBM website. A summary is given in the following:- Centrino 2 chipset, ICH9 family
- Intel Core 2 Duo Processor P8600, 2.4GHz, 3MB L2 cache
- 1GHz FSB, 2GB DDR3 RAM at 1066MHz
- WXGA+ TFT, 14.1", 1440x900 pixels
- Internal graphics: Intel GMA X4500HD (IGP) max.384MB shared memory
- Discrete graphics: ATI Mobility Radeon HD 3470 256MB
- 250GB SATA hard disk, WDC WD2500BEVS-08VAT1
- UltraBay Slim DVD writer for CD-R(W), DVD-R(W) double layer, DVD+R(W), DVD+R double layer
- 7-in-1 card reader
- V.90 modem
- Intel WiFi 5300AGN, Intel 82567LM Gigabit Ethernet
- Firewire: Ricoh Co Ltd R5C832 IEEE 1394 Controller
- Broadcom ThinkPad Bluetooth with Enhanced Data Rate II
- UMTS modem: Ericsson F3507g Mobile Broadband Minicard Composite Device
- AuthenTec Inc. fingerprint sensor
- 6 cell battery with 56 Wh
- 2.13kg, 31.9 x 335 x 238 mm
Support overview
Generally speaking the Lenovo notebooks, especially the ThinkPads, have excellent Linux support. Actually, there is no device that did not work for me by now. However, I have not yet tested the Bluetooth module, UMTS modem, fingerprint sensor, and the V.90 modem.
Component | State |
WXGA+, VGA, dual-head | Works |
WLAN, kismet, Ethernet | Works |
DVD-writer | Works |
Card reader | Works |
Firewire | Not yet tested |
ACPI, special keys | Works |
Suspend, hibernate | Works |
V.90 modem, Bluetooth, UMTS modem | Not yet tested |
Microphone | Works |
Fingerprint sensor | Not yet tested |
Anyhow, other test reports tell us that all the untested components from above should work. In particular, the finger print sensor is supported by the thinkfinger project. The following references provide more in-depth details:
- ThinkWiki.org: an absolute must-have for all Linux users owning a ThinkPad.
- Gentoo-Wiki an article on installing and configuring a T400 and related models.
- ArchWiki: a detailed discussion on configuring a T400 on ArchLinux.
Installing Gentoo Linux
Unfortunately the 2008 Gentoo installer CD lacks of support for the SATA CD-drive. Hence, you have to use another Linux Live-system for booting and installing. In my case I downloaded an Ubuntu 8.10 DVD and followed the Gentoo Wiki instructions. I assume you decided to install the amd64 architecture using stage3 tarballs. You can basically jump directly to the chapter 4 of the Gentoo handbook and we assume that an internet connection is already working. In chapter 6, you have to mount /proc and /dev in a different way than listed in the Gentoo handbook, namelymount -o bind /proc /mnt/gentoo/proc/
mount -o bind /dev /mnt/gentoo/dev/
# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /etc/make.conf.example for a more detailed example.
CFLAGS="${CFLAGS} -march=core2"
CXXFLAGS="${CFLAGS}"
CHOST="x86_64-pc-linux-gnu"
MAKEOPTS="-j3"
FEATURES="parallel-fetch"
GENTOO_MIRRORS="http://gentoo.mneisen.org/ http://mirror.bih.net.ba/gentoo/"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="acpi alsa bash-completion consolekit dbus exif ffmpeg fuse gtk -hal
-handbook hdaps ipv6 jpeg kde lame laptop latex logrotate mmx mp3 mpeg mplayer
nsplugin ogg opengl policykit png qt3support smp sse sse2 sse3 ssse3 unicode
vim vim-syntax wifi xinerama X"
VIDEO_CARDS="intel fglrx radeon"
#Note, if you use xorg with hal support, you only need evdev and synaptics
INPUT_DEVICES="keyboard mouse synaptics evdev"
LINGUAS="en"
- For some reasons related to udev my fresh installed system caused extremely long delays while booting. I solved the problem by removing the files `/etc/udev/rules.d/70-*`. They will be restored correctly after a reboot. However, this could also be related to the installation of baselayout-2 and openrc.
- Deactivate switchable graphics before installing Linux. See the note below in the Graphics section.
- The 64bit support under Linux is very good. Even java and flash-plugins have been made available for 64bit Linux systems.
- You can make use of the multiple cores when compiling the kernel by calling "make -j 3".
- For all config files KMS has been activated per default
- It is sometimes reported that the parameters 'radeon.audio=0 radeon.modeset=1' should be passed to the kernel in grub.conf
Graphics, xorg
Many ThinkPads are actually shipped with two graphics adapters built in, known as switchable graphics: The so-called internal adapter (Intel GMA X4500HD (IGP) max.384MB shared memory) and the co-called discrete adapter (ATI Mobility Radeon HD 3470 256MB). Currently only Windows Vista (or later) is able to switch between both adapters on-the-fly. For all other operating systems a reboot and a subsequent change in the BIOS settings is necessary. However, since the release of the Linux kernel 2.6.34, support for switching the graphics adapter at runtime got available, see below.Intel chip
I almost constantly use the Intel chip since I rarely need high 3D performance. Regarding the Intel chip the package x11-drivers/xf86-video-intel driver is pulled in when "intel" is added to make.conf's variable VIDEO_CARDS. There is a very informative Gentoo wiki site on the Intel GMA.ATI chip
The ATI chip can be used with at least two different drivers: the xorg open source driver (x11-drivers/xf86-video-ati) and the closed source driver (x11-drivers/ati-drivers). I once had both installed bit for a while I use the closed source drivers only.- xorg's driver: Currently, I have xf86-video-ati installed
which is pulled in when adding 'radeon' to VIDEO_CARDS in
/etc/make.conf. (I had reoccuring problems when
updating to new kernel versions and AMD had not updated their
proprietary driver already.) The xorg driver has good working 3D
support and performance is getting better from version to version.
You may want to visit the RadeonFeature and the Radeon 3D acceleration Portal sites of xorg.
- AMD's driver: I once had the package ati-drivers installed by adding 'fglrx' to VIDEO_CARDS in /etc/make.conf. The proprietary driver from AMD has currently a much better 3D performance but is constantly incompatible with new kernel versions. Nevertheless, the proprietary drivers undoubtely exhibits the better performance.
xorg-server
For the current stable xorg-server hal support has again been replaced by udev, which is good. The current xorg-server version has the ability to save configurations for devices in /etc/X11/xorg.conf.d, see for example here and here.Summarizing, I placed the following files in /etc/X11/xorg.conf.d/
10-hdaps.conf
Section "InputClass"
Identifier "ThinkPad HDAPS blacklist"
MatchProduct "ThinkPad HDAPS accelerometer data"
Option "AutoServerLayout" "on"
Option "Ignore" "on"
EndSection
80-synaptics.conf
Section "InputClass"
Identifier "touchpad-all"
MatchIsTouchpad "on"
Option "AutoServerLayout" "on"
Driver "synaptics"
Option "SHMConfig" "true"
Option "TapButton1" "1"
Option "RTCornerButton" "2"
Option "RBCornerButton" "3"
Option "VertEdgeScroll" "true"
Option "HorizEdgeScroll" "true"
Option "VertTwoFingerScroll" "true"
Option "HorizTwoFingerScroll" "true"
Option "EmulateTwoFingerMinZ" "97"
EndSection
90-keyboard.conf
Section "InputClass"
Identifier "keyboard-all"
MatchIsKeyboard "on"
Option "AutoServerLayout" "on"
Driver "evdev"
Option "XkbLayout" "de"
EndSection
And finally, these are my actual xorg.conf files, which are quite short once one uses xorg.conf.d-files to manage input devices. Note that the actual xorg.conf is generated by my script vga_switch.sh by concatenating, say xorg.conf.intel, with xorg.conf.common, see below.
/etc/X11/xorg.conf.intel
Section "ServerFlags"
Option "DefaultServerLayout" "LayoutIntel"
EndSection
/etc/X11/xorg.conf.radeon
Section "ServerFlags"
Option "DefaultServerLayout" "LayoutRadeon"
EndSection
/etc/X11/xorg.conf.common
Section "ServerLayout"
Identifier "LayoutIntel"
Screen 0 "ScreenIntel" 0 0
EndSection
Section "ServerLayout"
Identifier "LayoutRadeon"
Screen 0 "ScreenRadeon" 0 0
EndSection
Section "Monitor"
Identifier "LVDS"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
EndSection
Section "Monitor"
Identifier "LVDS2"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
EndSection
Section "Monitor"
Identifier "VGA2"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
EndSection
Section "Device"
Identifier "CardIntel"
Driver "intel"
BusID "PCI:0:2:0"
EndSection
Section "Device"
Identifier "CardRadeon"
Driver "radeon"
BusID "PCI:1:0:0"
EndSection
Section "Screen"
Identifier "ScreenIntel"
Device "CardIntel"
Monitor "LVDS2"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 16
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection
Section "Screen"
Identifier "ScreenRadeon"
Device "CardRadeon"
Monitor "LVDS"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 16
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection
Section "DRI"
Mode 0666
EndSection
Performance
As already known for the i810 Intel graphics chip, better performance is gained if color depth is set to 16 Bits in xorg.conf. The difference in glxgears is about 400 fps from 1200 fps to 1600 fps. In contrast using the ATI chip results in about 4200-4400 fps. However, glxgears is not a serious benchmark for graphics chips. But, like everywhere in life, better performance comes with another drawback: the ATI chip consumes about 10W more power than the Intel chip.KMS (Kernel mode setting)
If you use a xorg-server of at least version 1.6 you can gain from a new feature called KMS. With KMS the kernel is responsible for setting resolutions and the like and not the xorg server any more. Within this change a very fast and potential more stable switch from a virtual terminal to a X session is gained. Beside that there is no need to use a framebuffer for higher resolutions on virtual terminals. See the Gentoo wiki of the Intel GMA for more info. Since recently, I am using KMS for the Radeon card, too. However, I recommend a recent kernel and xorg's graphics driver for that purpose.Please note that I have activated KMS for the Intel card per default in my 2.6.30 kernel config. So if you use my kernel config you either disable this option, our you use at least xorg-server-1.6.
Automatically switching xorg.conf
Once someone wants to use both chips we have the problem that the xorg.conf has to be exchanged according to the currently enabled graphics chip. I solved the problem by writing a little init.d script and a shell script /usr/local/bin/vga_switch.sh which is doing that for me. Note that 'vga_switch.sh' has now support for vga_switcheroo, see below.
/etc/init.d/xorg-conf
#!/sbin/runscript
# Stefan Huber <shuber2@gmail.com>
description="Sets xorg.conf according to the used graphics adapter"
depend()
{
before xdm
need localmount
}
start()
{
if [ "`lspci | grep VGA | wc -l`" -ge "2" ]
then
einfo "Both graphic adapters activated."
fi
/usr/local/bin/vga_switch.sh --off
/usr/local/bin/vga_switch.sh --autoset-xorg
return 0
}
rc-update add xorg-conf boot
Switching graphics at runtime
With Linux kernel 2.6.34 support for switching graphics adapters at runtime became available. The corresponding code is called 'vga_switcheroo' and has been developed by David Airlie. The kernel config for 2.6.34 listed on this site activates the support for vga_switcheroo. In order to make vga_switcheroo working it is necessary that (i) the Intel and Radeon drivers support KMS and have been integrated directly into the kernel, (ii) support for debugfs is activated. Further, I had to activate detection of primary console (CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY); otherwise I got a blank screen some time. The scripts 'vga_switch.sh' already brings the support for changing the graphics adapter, see above.I configured acpid to execute 'vga_switch.sh --gui' when pressing Fn+F3. A gui using kdialog pops up and asks to which adapter one wants to switch to. You can select one adapter and then the kernel waits until you logout and X is restarted. After that kdm reappears and X is up with the selected graphics adapter. Calling 'vga_switch.sh' without an argument tells you the current powering state.
Dual head, mirroring
With current xrandr packages (or grandr, or krandrtray) setting up dual head or mirroring with an VGA-connected monitor can be done on-the-fly. However, note that (at least for Intel chip) the Virtual screen size is per default limited to 2048x2048. Hence adding a 1024x768 display to the 1440x900 LVDS panel does not fit. You can override this settings in the xorg.conf. There is a good description of xrandr-1.2 at thinkwiki.org. Interestingly, for some time I am using version 2.8 of the intel drivers and the virtual size is now 8192x8192 for some reason.If you want to set up the Fn-key combinations appropriately, you may want to setup ACPI properly. (See later section for that.) I use the following configuration:
/etc/acpi/events/btn-fn7
event=ibm/hotkey HKEY 00000080 00001007
action=/etc/acpi/actions/btn-vga.sh
/etc/acpi/events/btn-fn9
event=ibm/hotkey HKEY 00000080 00001009
action=/etc/acpi/actions/btn-vgapause.sh
/etc/acpi/actions/btn-vga.sh
. /usr/local/bin/getXenv.inc
STATEFILE="/tmp/vgastate"
function vgaoff()
{
logger "No VGA1 connected: putting LVDS1 to standard setup"
xrandr --output VGA1 --off \
--output LVDS1 --mode 1440x900 --scale 1x1
echo "off" > $STATEFILE
}
function vgamirror()
{
logger "Mirror LVDS1 to VGA1"
xrandr --output VGA1 --mode 1024x768 \
--output LVDS1 --same-as VGA1 --mode 1024x768
echo "mirror" > $STATEFILE
}
function vgarightof()
{
logger "Putting VGA1 right of of LVDS1"
xrandr --output LVDS1 --auto --mode 1440x900 \
--output VGA1 --auto --right-of LVDS1
echo "right-of" > $STATEFILE
}
if [[ -z `xrandr | grep "VGA1 connected"` ]]
then
vgaoff
else
case `cat $STATEFILE 2> /dev/null` in
mirror)
vgarightof
;;
*)
vgamirror
;;
esac
fi
/etc/acpi/actions/btn-vgapause.sh
. /usr/local/bin/getXenv.inc
logger "Disabeling VGA"
xrandr --output VGA1 --off
echo "off" > /tmp/vgastate
/usr/local/bin/getXenv.inc
getXuser() {
user=`who| grep -m1 " :$displaynum " | awk '{print $1}'`
if [ x"$user" != x"" ]; then
userhome=`getent passwd $user | cut -d: -f6`
export XAUTHORITY=$userhome/.Xauthority
else
export XAUTHORITY=""
fi
}
#Find the right XServer to be configured.
for x in /tmp/.X11-unix/*; do
displaynum=`echo $x | sed s#/tmp/.X11-unix/X##`
getXuser;
if [ x"$XAUTHORITY" != x"" ]; then
export DISPLAY=":$displaynum"
fi
done
Multimedia keys
There are several explanations for setting up the multimedia keys for the T400 notebook, like here, here, or here. The latter also links to a more detailed tutorial.As a shortcut you may want to add the following file:
/etc/X11/Xmodmap
keycode 144 = XF86AudioPrev
keycode 153 = XF86AudioNext
keycode 160 = XF86AudioMute
keycode 162 = XF86AudioPlay
keycode 164 = XF86AudioStop
keycode 174 = XF86AudioLowerVolume
keycode 176 = XF86AudioRaiseVolume
keycode 233 = XF86Forward
keycode 234 = XF86Back
By the way, the ThinkLight which illuminates the keyboard with a led on the top of your display works via BIOS mechanisms and has not be setup. Also the kmilo plugin for KDE works for me. It display via an OSD changes in brightness of the display or volume settings. Also the power button works out of the box. However, it took me a week to find out that I have to press the button about a second for a shutdown. My old notebook reacted instantly. But be aware that if you press the button several seconds then the notebook will simply be powered off, without shutting down cleanly.
Font sizes
In my case KDE, gvim, thunderbird and virtually all applications show unusable font sizes. To fix this, you can add the following line to the given file. See this information from Mozilla for further infos.
/etc/X11/Xresources
Xft.dpi: 96
As an alternative one could also set this value via the "Fonts" properties in 'kcontrol'. Anyhow, the solution above is much cleaner, since it applies also to non-KDE environments.
Framebuffer
I formerly used vesafb as framebuffer to increase the screen resolution at the virtual terminals. However, when activating the ATI chip my kernel was not able to boot: display got black and then the notebook rebooted. Removing the vga kernel parameter "fixes" the problem. But since I use KMS now for the Intel graphics there is no need for a vga kernel parameter to gain higher resolution.Transflective Display
There have been some speculations of Lenovo having built in transflective displays in the T-series of the Thinkpads. Interestingly, I have never found some official information from Lenovo on that stuff. Even though one could expect heavy marketing for such a feature. However, there is definitely something going on with the panel on my notebook. Reports stating that one could use the T400 outdoor without backlight in the same way as with backlight are clearly wrong (at least for my model). However, if I turn off the backlight, one can percept the content on the display. (Ok, that was possible, to some extent, for my old notebook too. But this panel has a much better contrast for that test case.) However, I do not expect someone to use that constantly for his work. On the bottom line, I would call that possibly a semi-transflective display...Energy consumption, suspend/hibernate
My 6 cell battery has a capacity of 56Wh powering the notebook for about 4-5 hours when doing non energy consuming tasks. If I turn off WiFi, bring the TFT brightness to 30% and use the ondemand frequency governor the energy consumption comes down to about 12-13W. Installing laptop-mode-tools can bring down power consumption to approximately 10-11W. By the way, I recommend using more recent versions of laptop-mode-tools since they have better support for recent hardware, like the wireless card of the T400. Using the ATI graphics adapter instead of the Intel internal graphics adapter adds about 10W to the total power consumption. See some German notes on the ATI card for details.On the T400 both, suspend and hibernate, works without the tuxonice patchset. While KDE's klaptop applet was already able to trigger suspend and hibernate, I installed sys-power/pm-utils for making that available from command line. The most important commands are pm-hibernate and pm-suspend and they worked out of the box. A short 45' experiment reveals about 390mW power consumption in suspend mode. If you use pm-utils, you can place scripts in /etc/pm/sleep.d/ which are called after resume, suspend, hibernate, et cetera. In particular, I use the following scripts:
/etc/pm/sleep.d/90vga_switch
#!/bin/sh
case "$1" in
hibernate|suspend)
/usr/local/bin/vga_switch.sh --on
;;
thaw|resume)
/usr/local/bin/vga_switch.sh --off
;;
*) exit $NA
;;
esac
/etc/pm/sleep.d/20lockscreen
#!/bin/sh
case "$1" in
hibernate|suspend)
/usr/local/bin/lockkde.sh
;;
esac
/usr/local/bin/lockkde.sh
# See above for file listing
. /usr/local/bin/getXenv.inc
if [ -n "$user" ]; then
su $user -c "dbus-send --session \
--dest=org.freedesktop.ScreenSaver \
--type=method_call --print-reply \
/ScreenSaver org.freedesktop.ScreenSaver.Lock"
fi
Load_Cycle_Count problem
Too aggressive power management properties of the hard disk can lead to a frequent number of so-called "load cycles". However, hard disks are only built for a specific number of such load cycles. This problems, in some variants, have been frequently described on various places. See for example here, here and here.The problem can sometimes be recognized by click-sounds from the hard disk. You can simply check if your system is affected by calling
$ smartctl --all /dev/sda | grep -E "^(193| 9) "
9 Power_On_Hours 0x0032 098 098 000 Old_age Always - 1516
193 Load_Cycle_Count 0x0032 136 136 000 Old_age Always - 193014
To temporarily this problem you can call
$ hdparm -I /dev/sda | grep -m 1 Advanced
Advanced power management level: 128
$ hdparm -B 254 /dev/sda
You want to check if the settings work by monitoring the idle notebook (no IO performing tasks running) with the following command:
$ while true; do smartctl --all /dev/sda | grep 193; sleep 10; done
193 Load_Cycle_Count 0x0032 136 136 000 Old_age Always - 193014
193 Load_Cycle_Count 0x0032 136 136 000 Old_age Always - 193014
193 Load_Cycle_Count 0x0032 136 136 000 Old_age Always - 193014
193 Load_Cycle_Count 0x0032 136 136 000 Old_age Always - 193014
...
ACPI
It is recommended to activate the IBM resp. Thinkpad related ACPI capabilities in the kernel. In my '/etc/conf.d/modules' I set the line 'modules_2_6="acpi-cpufreq thinkpad_acpi"' for enabeling ACPI and additional IBM features. For example you may want to inspect '/proc/acpi/ibm' where you can (de)activate bluetooth, WiFi, ThinkLight, et cetera. To use the Fn-keys for suspending and hibernating my notebook I added the following files. Do not forget to make the action scripts executeable.
/etc/acpi/events/btn-fn2
event=ibm/hotkey HKEY 00000080 00001002
action=/etc/acpi/actions/btn-lock.sh
/etc/acpi/events/btn-fn3
event=ibm/hotkey HKEY 00000080 00001003
action=/etc/acpi/actions/btn-battery.sh
/etc/acpi/events/btn-fn4
event=ibm/hotkey HKEY 00000080 00001004
action=/etc/acpi/actions/btn-suspend.sh
/etc/acpi/events/btn-fn12
event=ibm/hotkey HKEY 00000080 00001004
action=/etc/acpi/actions/btn-hibernate.sh
/etc/acpi/actions/btn-lock.sh
#!/bin/sh
# See above for file listing
/usr/local/bin/lockkde.sh
/etc/acpi/actions/btn-suspend.sh
#!/bin/sh
pm-suspend
/etc/acpi/actions/btn-hibernate.sh
#!/bin/sh
pm-hibernate
/etc/acpi/actions/btn-battery.sh
#!/bin/sh
/usr/local/bin/vga_switch.sh --gui
Temperature sensors
Using the thinkpad_acpi kernel module, a file '/proc/acpi/ibm/thermal' is offered which looks for example like this:- CPU neighbourhood: This value is identical to the one reported by '/proc/acpi/thermal_zone/THM0/temperature'. However, ACPI reports that THM1 is the CPUs temperature. Both strongly respond on launching CPU consuming tasks, where THM1 does this even faster. However, this value also responds on hot air at the cooling gill.
- Ultrabay: Blowing hot air at the dvd drives location leads to a response on this sensor.
- Express card: Blowing hot air at the express card location leads to a response on this sensor.
- ATI graphics: Choosing discrete graphics in BIOS changes this value from -1 to a reasonable value which responds on launching fgl_glxgears. If you have no ATI card installed, you get -128.
- Main battery: Value changes to -128 if battery is removed. However, this value is almost always at about 50 and only sometimes changing. On the other hand I heard of T400 with a 9 cell battery having values around 34.
- Ultrabay battery? At thinkwiki.org there is a conjecture for the T500 that this could be the corresponding value to sensor no. 5 for the ultrabay battery. I have no such battery, so I could not test this.
- Main battery: Value changes to -128 if battery is removed. This value correlates much better with '/sys/devices/platform/smapi/BAT0/temperature'.
- Ultrabay battery? See the note above.
- Hard disk: Blowing hot air at the hard disks location leads to a response on this sensor. However, the value is a few degrees below the one reported by 'smartctl --all /dev/sda'. The reason might be that SMART reads the hard disks sensor which is inside the hard disk. This corresponds to the observation that the SMART value is responding much slower.
- Intel graphics: This value strongly responds on calling 'gtkperf' if integrated graphics is selected in BIOS. Even if ATI graphics card is selected in BIOS, this value is provided.
- Heatsink? This conjecture is due to the entry for the T500 at thinkwiki.org. Nevertheless, this value responds on CPU load and hot air at the cooling gill, but much slower than value no. 1.
Modules tp_smapi and hdaps
As an owner of a Lenovo T400 you may probably be interested into the modules tp_smapi and hdaps. The former one controls the so-called SMAPI-BIOS build in, which itself controls for example in-depth battery settings and the latter one is used for accessing the built-in acceleration sensor. There is a detailed website at thinkwiki.org.
I recommend to set the hdaps use-flag such that the hdaps module is installed
too. Further, the module thinkpad_ec needs the parameter "force_io=1".
Therefore, my /etc/conf.d/modules file contains the lines
modules_2_6="$modules_2_6 thinkpad_ec tp_smapi hdaps"
module_thinkpad_ec_args="force_io=1"
Battery profiles
Once you have installed the package app-laptop/tp_smapi, you can access several battery settings at '/sys/devices/platform/smapi/'. Such settings include the maximum capacity to which a battery is charged or the threshold which must be reached to charge the battery. I strongly recommend to read the battery treatment notes at thinkwiki.org. Especially if you use your thinkpad often as office computer, you might be interested in not charging the battery always to 100% capacity. I wrote a little init script that supports three profiles 'desktop', 'mobile', 'default'. Depending on the profile set, the single parameters of the battery are set accordingly. You download install it as follows:$ whoami
root
$ cd /tmp
$ wget www.sthu.org/files/batprofile.tar.bz2
$ tar -xvf batprofile.tar.bz2 -C /
$ rc-update add batprofile default
$ vi /etc/conf.d/batprofile