Saturday, December 6, 2008

Installing Arch Linux on a Lenovo ThinkPad X200s

Nota: para una explicación sobre el cambio de idoma, ver el final del post.
___________________________________________________

LAST UPDATE: March 20th, 2011
- Some things have changed: now almost everything works fine out of the box
- Graphics no longer present problems, Urban Terror is playable with no complaints and composition in KDE 4.6 works smoothly.
- Backlight adjustment works in console and graphic mode out of the box.
- Using x86_64, no problems with that.
- X input has switched back to xorg.conf. You have to add your configuration to xorg.conf.d/10-evdev.conf instead of the fdi file. (described in the Trackpoint section below)
- Energy management: check this post for a comparison between two different kernel versions.
- Fingerprint reader still doesn't have drivers.
- Suspension works out of the box. Don't use hibernation - can't comment on that.
- Microphone works (was "not tested" before)


April 7th 2009
- I've tested VGA out, results are in the video section.
- New update @ noise: check this out. I recommend the "rmmod uhci_hcd", as it also _might_ improve battery life. I've found it when looking for this other problem. As of now, running ktorrent keeps the drive busy ;)
- I've added a GRUB section.
- There has been a BIOS update which fixed the conflict that was going on. The tp_smapi module now loads fine.

April 3rd 2009
I just completed a fresh install, and I have good news! Some of the tricky things work without any intervention now:
- Backlight adjusting works out of the box with KDE4.2, I believe it is PowerDevil's work here. Can't say anything about other DEs, if it's behaving strangely you may still need the workaround described in the backlightt section.
- Trackpoint scrolling no longer needs user-compiled drivers, the standard evdev will do just fine.
- Suspend and hibernate also seem to work OK with the default settings.
I didn't experience the noise or video issues mikar described in the comments, so I can't help much with that. Check that you load the proper snd modules and you have the xf86-video-intel drivers installed and no xorg.conf file, it's the only think I can think of.

April 2nd 2009
- If you experience an annoying high-pitched noise, mikar suggests a workaround: enabling USB autosuspend makes it go away.
- There is a new BIOS available from Lenovo which adresses some unproper resource claiming. It may fix the thinkpad_ec problem, but I haven't tested it yet.
- My hard drive failed and I have to make the whole installation process again. If anything changes, I'll update the guide.

March 27th 2009
- Here you can find a energy saving guide for the laptop. Any feedback will be appreciated!
- The 3D performance with the new intel drivers is improved, but the 2D kinda sucks. Switching tabs or text files in kate is so laggy (1 second or more) that I went back to the 2.4 drivers. Also, the CPU usage of the X server is higher with the new ones. Clearly something is not ready yet, but looks promising. Maybe with 2.6.29 kernel and modesetting the whole thing is gonna start to work, but right now it's broken. I'll update the .config file as soon as I update my kernel to 2.6.29.

March 12th 2009
- With testing versions of some packages, now 3D effects seem to be working, check the Video section below for more details.
- Arch has been providing img install files with a new kernel for a while, you should absolutely use those for a new setup.

Feb 26th 2009
- Just let you know, KDE 4.2 (powerdevil actually) manages the screen brightness pretty well, the only problem it's that it is not aware of brightness changes via acpi handler. Maybe there is a way to make the handler notify powerdevil of the key press trough dbus and let powerdevil change the brightness...
- The graphic system doesn't work very well, I dont know if it's something with the intel xf86 driver or with the kernel. I tried svn versions of the packages involved and I saw no improvement whatsoever, so I'm clueless at this point. KDE4 works, but not as fast as KDE3 and Civilization4 on wine is not playable (2-3 fps).

Jan 19th 2009
- New kernel config for 2.6.28.
- Sound configuration update.
- tp_smapi 0.40 now works with a little tweak
- SD card is tested, works ok.

Previous updates: not listed (sorry)

________________________________________________________

I'm going to explain my experience installing i686 Arch Linux on a Lenovo ThinkPad X200s.

The process is a little tricky due to the specific hardware configuration of the laptop. Sorry in advance for any mistakes in the text, English is not my first language!

Hardware
:
Here are the guts of this little monster:
  • Intel Core 2 Duo SL9400
  • 2GiB RAM DDR3 (in 1 module)
  • 250Gb SATA 5400rpm HDD
  • Intel GM45 Chipset
  • Intel X4500HD graphic Adapter
  • 12'1 inch, WXGA+ (1440x900) LCD panel
  • Intel 5300AGN Wi-Fi Card
  • Intel 82567LM Gigabit Network Adapter
  • 5 in 1 card reader
  • Modem
  • TPM module
  • Lenovo keyboard + TrackPoint
  • ThinkLight
  • Broadcom bluetooth module
UPDATE: here are some useful snippets. They are hosted at pastebin.com so if they are offline let me know and I'll paste them somewhere else.
  • lspci
  • lsusb with bluetooth enabled
  • kernel .config
  • A little howto in Spanish about enabling console framebuffer with intelfb to get native resolution consoles. I think the code is pretty easy to follow and I'll answer any questions. In the end, you have to give the kernel the parameter vga=874 in grub and you'll get 1440x900 fb console.
  • xorg.conf
  • trackpoint.fdi for scrolling with input hotplugging
  • Acpi event handler.sh
  • Grub's menu.lst
If anything else interesting comes out, I'll update this section.

Preparing:
To make room for linux, Vista must get shrunk, obviously. First make sure to backup Vista with the recovery media tool from Lenovo, it may come in handy in the future. Then use any tool you like to shink and optionally move the Vista partition. My tool of choice is sysreccd, a small live-cd based on gentoo, but even PartitionMagic on Vista should do the job. I shrunk it to 50GB and moved it to the end of the disk, so I had the faster parts at the beginning of the disk free for linux. Since the laptop has no optical drive and I didn't feel like buying a usb one just for this purpuose, I went with the usb thumbdrive option. I used unetbootin (great tool) to create a live-usb from the iso image and gparted to do the actual work.
UPDATE Dec-11: when you move and shrink Vista, it may stop booting. Use a Vista boot DVD (NOT the lenovo tools, they will mess your disk. You have been warned!) and choose the "Rescue system" and then "fix boot" option. You may have to do this a couple of times since it reboots after fixing every single problem and there may be more than one. Yes, this time you have no choice but to get a USB DVD drive, try borrowing one from a friend.

Usual way:

Again, no optical drive, we have to make a bootable thumbdrive with Arch install. There are several ways to do this, though. You can either use unetbootin to create it from an iso image, create the bootable usb manually with syslinux or grab a ready to use usb image from the Arch website.
First, I tired to download the ftp image for usb thumbdrives.
# dd if=image_file of=/dev/sd[whatever letter you usb drive is]
ThinkVantage key and F12 to select boot media. Arch boots and then our first nasty surprise: no network interfaces. If I understand it right, the build is from June this year, so before the e1000e bug. Maybe it was just too early and there was no support for this card in the kernel. Anyway, no net = no ftp install = crap.
UPDATE (March 12th 2009): The newer ftp img (torrent, mirrors)from feb09 comes with a nice 2.6.28 kernel with support for both the ethetnet and the intel 5300 wifi card. You should definitely go this way to install a new system.

Alternative way (NOT NEEDED ANYMORE):

Lucky for me, there is a solution on the wiki, download the usb image from Tobias Powalowski's page and it comes with a new shiny 2.6.27 kernel with support for the ethernet AND the wireless card, BUT if you want to use the WiFi to perform the installation, you better go download the firmware for your card, because it may not be on the image. In my case, the 2008.10 image was "firmwareless".
If you follow the usual steps, the whole thing is going to blow up, because the installer loads a i686 kernel (GOOD) but detects the Core2Duo as a 64bit proc and installs the x86_64 packages (BAD). It ends up with an infinite loop of errors when chrooting to create the root password. To avoid this, you have to edit the mirrorlist. Anytime you want (the sooner the better) switch to another terminal and type this:
# cd /etc/pacman.d/
# sed -e 's/x86_64/i686/g' mirrorlist > 686
# mv 686 mirrorlist
If you want to install over the WiFi you also have to:
# mount /dev/sd[whatever your usb is] /mnt
# cp /mnt/path/to/your_firmware /lib/firmware
# ifconfig wlan0 up
# iwconfig [whatever]
In case you have a WPA[2] network, replace the iwconfig command with the appropiate wpa_supplicant equivalent.
Switch back to the installation menu and you're good to go, no more specific X200s problems from here (almost). Don't forget to select you firmware in the package selection screen!
The only thing to remember is to check the modules in rc.conf. If the snd-pcsp module is listed before snd-hda-intel, sound will fail most of the time, so swap them if you need. NOTE: as the kernel 2.6.28 config suggest, you shouldn't use pcsp at all. I just removed the module from the kernel config so I don't have the module in my system. No pcsp module, no problem.
Reboot, and welcome to your new shiny Arch system!

What works out of the box:

In Arch? That would be... the keyboard. And that's the point!
Actually, a couple more things work out of the box.
  • The Wifi should work if you installed the firmware. With kernel 2.6.28 it works in monitor mode WITH packet injection support.
  • The ethernet card works.
  • The Thinkpad goodies (ThinkLight, Brightness, Sensors...) also work without any intervention.
  • The brightness has a weird one-press-lag: if you are reducing the brightness and then press the brightness up key, it will reduce the brightness one more step before starting to bring it up as it should (not in KDE4.2).
  • The SATA hard drive works.
  • The USB ports work.
  • The fan is controlled automatically, it is possible to override it but there are some notes not to mess with it so I don't. It works well speeding up and slowing down as needed.
  • The card reader works and hal notifies the insertion.
It's important to keep in mind that Arch offers a very bare-bones installation of linux and it's up to the user to install further programs and utilities as he wants.

First step:
I personally wanted to mantain /etc backup in subversion based on this method, so I installed subversion and made a first backup before anything, and another one after each step, just in case.

GRUB configuration
GRUB does its job fine, but you may want to improve it with some fancy. You have the whole config file above, but here are the details:
  • Add a graphical background to the menu with grub-gfx. This splash is the one I chose.
  • Set the console framebuffer to native resolution with "vga=874" parameter to the kernel. If you know Spanish, you can take a look at my howto, if not, you can google for it or just read the commands.
  • Allow hibernation/suspend-to-disk, adding the parameter "resume=/dev/YOUR_SWAP_PARTITION" to the kernel line.

CPU frequency scaling:

Works as soon as you install and configure cpufrequtils:
# pacman -S cpufrequtils
Edit /etc/rc.conf and add "acpi-cpufreq cpufreq-ondemand" to MODULES and cpufreq to DAEMONS
Edit /etc/conf.d/cpufreq and edit frequencies to something that makes sense for you, or even comment them out, as it works perfectly autodetected.

Sound:

If you checked that snd_hda_intel is loaded before snd_pcsp (or you don't have the pcsp module at all) sound should be working but muted.
# pacman -S alsa-utils
# alsamixer
# aplay /usr/share/sounds/alsa/Front_Center.wav
If you still don't hear anything, check /proc/acpi/ibm/volume, make sure it is not muted (gets muted with the mute key, in case you were wondering). You can unmute it either by pressing vol up/down key or:
# echo -n up > /proc/acpi/ibm/volume
If you only hear noise or very distorted sounds its probably because the audio devices got mixed up. Unload the kernel modules and load them again in the right order, prefferably load only the intel one. Also, don't forget to enable the alsa daemon as noted by the official guide.
BTW: microphone works too.

Video:
The video should work without any issues even without any xorg.conf file, autodetecting the correct parameters. One extra step is necessary to install xf86-video-intel. Of course, it's always safer to follow the steps in the guide and make sure the intel driver is actually used. The new xorg server uses input hotplugging, so remember to start hal before doing any test, or override the policy in xorg.conf. If you do this, remove the Input configuration lines since the hotplugging behavior ignores them. Native 1400x900 resolution is detected flawlessly as well.
VGA-out also works, but with the suboptimally. My guess is the driver is a bit messed up with this also, as it also detects two HDMI "connected", one of them active. Anyway, with 2.4 intel drivers, you need to specify the total resolution with a "Virtual XXXX YYYY" line in your xorg.conf's display subsection, and you may need to specify the resolution you want on your external display with a Modeline in xrandr. This is an example:
$ xrandr --newmode "1920x1080" 172.798 1920 2040 2248 2576 1080 1081 1084 1118 -hsync -vsync
$ xrandr --addmode VGA "1920x1080"
$ xrandr --output VGA --mode "1920x1080"
For the usual VGA, SVGA, etc, resolutions you don't need to do the latter. You can check the detected resolutions with a plain "xrandr". I believe this will change with the new modesetting+xorg+intel pack, maybe even with xorg+intel alone. Feel free to try.

UPDATE (March 12th 2009): With xorg-server 1.6.0, xf86-video-intel 2.6.3, and intel-dri 7.3, now the 3D part seem to be working, but the 2D performance is somewhat laggy, specially in Qt4 apps. For example: with several text files open in kate, when you try to switch from one to another, it takes about one second to show the second file contents since you click on its name in the toolbar, and it shows up in "chunks" of the screen. It's nothing serious, but it's certainly annoying. That 2D glithes are kind of weird, but at least glxgears now gives a decent 1140 fps. Since it seems to be a Qt4 problem, I'll try to update Qt to 4.5.0 (now in testing) and then see how things work out.
NOTE: Qt didn't help. I don't use 3D apps so I went back to the old drivers.
To install all these packages, try to compile the new xf86-video-intel module from abs/testing and it'll start complaining about dependencies, so install/build all of those. You'll end up with a small dependency-hell with xorg-server and xf86-input-evdev depending on each other, since xorg is a compile dependency for evedev, force the xorg build with the "-d" switch, install xorg (in my case with "-df" since it complained about both evdev and some existing files) and then build and install the evdev driver.

Backlight adjustment:
UPDATE (April 3rd 2009):
Backlight adjustment works just fine in KDE4, without any intervention, but doesn't work at all in console mode. Use the following instructions if you really need them!

The backlight adjusting with Fn+PgUp/PgDown almost work out of the box. The problem is that for some reason, the "video" acpi module has a one key press lag. Say the brightness is 9. You press down a few times to get it to 5. Now, if you press UP, it will go DOWN to 4 and THEN it'll start to go up, with the next key press. So if you went from 9 to 5 and now you want to go up a notch, you will have to press up three times, as the brightness goes trough 5->4->5->6. If you, like me, are annoyed by this, it has a workaround.
First, install acpid:
# pacman -S acpid
Start it at boot and now:
# $EDITOR /etc/rc.conf -> DAEMONS += "@acpid"
# /etc/rc.d/acpid start
Configure the thinkpad_acpi module to take care of brightness:
# rmmod video
# rmmod thinkpad_acpi
# modprobe thinkpad_acpi brightness_enable=1
# cat /sys/devices/platform/thinkpad_acpi/hotkey_all_mask > /sys/devices/platform/thinkpad_acpi/hotkey_mask
And edit /etc/acpi/handler.sh to make the adjustment for you:
[...]
ibm/hotkey)
case "$4" in
[...]
*1011)
echo down > /proc/acpi/ibm/brightness ;;
*1010)
echo up > /proc/acpi/ibm/brightness ;;
[...]
NOTE: you have the whole file linked in the files section above.
Now it should be working as it have. Beware, however, that this is an ugly hack and you should look for a a fixed version of the video acpi module any day soon and use some nice gui like the now broken kde's powerdevil to handle all of this.

Desktop environment:
This one is up to everyone's personal preferences, so you should know how to do it. I use KDE, so kdemod is my choice.

Multimedia Keys:
They pretty much work out of the box. Just assign them to the actions you want. However, remember that the mute key works by muting the /proc/acpi/ibm/volume, not the soundcard, so you will have to unmute it as mentioned above. Almost all the other keys work sending the appropiate XF86Whatever keycode. Fn+F3,F8,F9 send an unmapped scancode, so you can map it to whatever you fancy using Xmodmap. Mute, Fn+F5,Spacebar and Fn + the keys with no blue image send nothing; maybe is a way to fix this playing with the thinkpad-acpi key mask but I haven't looked into it yet.

TrackPoint scrolling with input hotplugging and evdev:
UPDATE (March 20th 2011): The system now got back to xorg.conf instead of fdi files. Add this to /etc/X11/xorg.conf.d/10-evdev.conf:
Section "InputClass"
    Identifier  "Trackpoint Wheel Emulation"
    MatchProduct            "TPPS/2 IBM TrackPoint|DualPoint Stick|Synaptics Inc. Composite TouchPad / TrackPoint|ThinkPad USB Keyboard with TrackPoint|USB Trackpoint pointing device"
    MatchDevicePath         "/dev/input/event*"
    Option              "EmulateWheel"          "true"
    Option              "EmulateWheelButton"    "2"
    Option              "Emulate3Buttons"       "false"
    Option              "XAxisMapping"   "6 7"
    Option              "YAxisMapping"  "4 5"
EndSection

UPDATE (April 3rd 2009): The stock driver you can install with pacman already works, no need to compile it anymore. You still have to add the fdi file, though.
According to this thread in the Arch forums, the problem with wheel emulation is the xf86-input-evdev version. It should be rebuilt using ABS and the TrackPoint should work without any config tweak. Note: as stated in the gentoo wiki, march should be "native" if gcc>=4.3 and not using distcc. This is the most common scenario, so chances are you should use it. Install and configue ABS, go to /var/abs/extra/xf86-input-evdev, copy to your build dir and edit the PKGBUILD changing:
  • pkgver->2.1.0
  • md5sums->a6070ead29b2d81b5b386a96df2661b8 (here is the source if you want to md5 it yourself)
Save the PKGBUILD and install the new evdev driver with:
$ makepkg
# pacman -U xf86-input-evdev-2.1.0-1-i686.pkg.tar.gz
Restart the X server and try. It may work you automatically, but in my case, the autoconf didn't work. Reading /var/log/Xorg.0.log I figured out that it was trying to emulate the wheel with button 4, not 2. To fix this, create "/etc/hal/fdi/policy/trackpoint.fdi" and paste something like this (sorry for the broken indentation, blogger sucks for not including some [code] label. If you want the nice version, check out the snippet section):
<?xml version="1.0" encoding="utf-8"?>
<deviceinfo version="0.2">
<device>
<match key="info.product" contains="TrackPoint">
<merge key="input.x11_options.Emulate3Buttons" type="string">on</merge>
<merge key="input.x11_options.Emulate3TimeOut" type="string">50</merge>
<merge key="input.x11_options.EmulateWheelTimeOut" type="string">200</merge>
<merge key="input.x11_options.ZAxisMapping" type="string">4 5</merge>
<merge key="input.x11_options.EmulateWheel" type="string">on</merge>
<merge key="input.x11_options.EmulateWheelButton" type="string">2</merge>
<merge key="input.x11_options.YAxisMapping" type="string">4 5</merge>
<merge key="input.x11_options.XAxisMapping" type="string">6 7</merge>
</match>
</device>
</deviceinfo>
Then, restart hal with:
# /etc/rc.d/hal restart
Restart the X server (yep, again) and your scrolling should be working perfectly now.

Suspend and Hibernate:
UPDATE (April 3rd 2009): It's hard to tell, but using the 2.6.28 kernel, suspend seems to work fine out of the box, both in Xx and console. Hibernate didn't fail either. I just tested it a few times, so I you run into trouble, use the old workaround....
It's pretty broken out of the box, usually with the resume part. Fortunately workarounds do exist to fix this. First, check you have pm-utils to try to suspend.
# pacman -S pm-utils
Just in case it work, try to both suspend and hibernate. It's a feature that's changing very fast, so by the time you read this it may be working.
# pm-suspend
[...]
# pm-hibernate
[...]
If it doesn't work, try this solution. For me, it worked perfectly, with a 2.6.27-7 kernel, 1.5.3-3 xorg server and 2.4.3 intel driver. I tried to build the 2.5.1 intel driver with ABS as I did with evdev, but it depends on libdrm>=2.4.0, I have 2.3.1 and I don't want to rush too many updates so I left it with the workaround for now.

UPDATE: As of 2.6.28 kernel and 2.6.3 intel driver, I still use this solution, I just havent tried to suspend without the workaround, since it doesn't have any unwanted effects.

Fingerprint Reader:
The laptop comes with the new AuthenTec reader, so right now there is no driver for it, but it's being working on. In the future I'll pay it more attention, but right now I don't really need it, so I just let it be there. Besides, it's a pretty weak system.

Bluetooth:
The bluetooth is enabled/disabled via /proc/acpi/ibm/bluetooth file. When enabled, the device appears as a usb adapter. No Arch driver recognizes the hardware though. It's supposed to be supported by the btusb module, which isn't provided with Arch, despite it is in the official kernel source. Definetly something possible to resolve.
UPDATE Dec-9: once recompiled the kernel with the .config linked in the first section, bluetooth is listed in hciconfig and it's possible to scan for other devices with hcitool. No further testing was performed because bluetooth (among others) is pretty broken in KDE4.1.
UPDATE Dec-11: using the acpi handler script above, you can enable/disable bluetooth with Fn-F5.

SMAPI module:
IMPORTANT: Lenovo released a BIOS update that solves the conflict. If you haven't, you should update you BIOS and won't have any problem. If not, keep reading.
The tp_smapi module (AUR) version 0.39 can't load, with the error: thinkpad_ec: cannot claim io ports 0x1600-0x161f. Seems like unsupported hardware for now, have to wait for a new version. Accordingly, neither the accelerometer nor the advanced battery load configuration does work.

UPDATE: The tp_smapi 0.40 allows to force loading the module:
# modprobe tp_smapi
FATAL: Error inserting tp_smapi (/lib/modules/2.6.28-ranger/extra/tp_smapi.ko): Unknown symbol in module, or unknown parameter (see dmesg)
# dmesg
[...]
thinkpad_ec: cannot claim IO ports 0x1600-0x161f... consider using force_io=1.
[...]
# modprobe thinkpad_ec force_io=1
# modprobe tp_smapi
#
And now you can adjust the fan and use the accelerometer as in any thinkpad.


Does NOT work:
The laptop is amazing but there are some broken things.

The graphic 3D acceleration is almost usless, due to a lack of synchronization between the intel driver guys and the kernel developers. In 2.6.28 kernel should be working again. Don't use compiz or switch back to older versions. As soon as I have some spare time I'll take a look at that.
UPDATE (March 20th 201): video works in 3D and 2D without any major issues.
UPDATE (March 12th 2009): 3D acceleration works with testing versions of xorg, intel, drm, dri and a whole lot more stuff, but now 2D has some issues in Qt4 apps (see Video section above). Anyway, it seems to be solved soon.

The fingerprint reader is another one, but I already mentioned that.

Not tested:
These are things that I don't use, so I have no special interest in them.
  • Microphone input, Integrated Microphone Tested, works
  • Modem (might work, some Lenovo come with real modems)
  • TPM module (no idea about this one)
Well, I think it's pretty much everything. If you have any questions don't hesitate to ask in the comments, either in English, Spanish or almost any language you want (google translation rulez). I will update this page as soon as something new develops. I'm planning to recompile the kernel to get bluetooth support as well as include some modules built into the kernel to gain some boot speed, so I'll come back to let you know how it works out.
If you need further info on installing various linux distributions on similar hardware (X200), check out the reports at tuxmobil.
___________________________________________________

Este post está en inglés, por si le es útil a alguien el mundo más allá de paises hispanohablantes. Dado que este portátil no ha llegado aún a España (ni tiene pinta de que lo haga en varios meses), dudo mucho de su utilidad ahora mismo para nadie aquí. En caso de no entender algo, aclararé cualquier duda. Dejo para un posterior post una pequeña review del portátil, porque realmente es una peazo máquina.


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

30 comments:

Anonymous said...

Great article!
Thank you very much, I have an X200, and this helped me a lot. The best one I read about installing and setting up this thinkpad. And even with config files, kernel setup(!) and acpi tweaking... You should post it on thinkwiki (www.thinkwiki.org).
Thank you again. I'll be looking forward and check this article from time to time, if you'll update it. Please do, if you can.
tricqster

Unknown said...

I'm glad it was useful for someone.
And it's updated with some things I've been trying lately, I hope it helps!
Unfortunately I don't have time right now to reformat it to post it on thinkwiki, but you're welcome to post it for me if you want.

David Kowis said...

I just got an X200s and this has been an awesome resource. I may do the posting on thinkwiki.

I didn't really have to change anything. I'm using the 2.6.28.1 kernel and I updated to all the latest versions of xf86-video-intel, mesalib, etc. Still no GEM. The driver claims that the kernel doesn't have version 1.9 of DRM to do it. No clue how to resolve this :( I've had nvidia on all my systems before this one...

Unknown said...

That's too bad GEM is not working... the only test I was able to run was glxgears, and it dropped from 300 something with 27 to half that with 28, without changing any config.
When I finish my exams I will take a deeper look at that, I'd like to enjoy the (hopefully) stable KDE 4.2 and it's eyecandy...
And BTW, the new nvidia cards (8000+ series) are even worse with QT4 apps, I've used a HP with a 8400GS and it was almost unusable: very ugly artifacts + really poor performace. QT3 apps run fine, though...

Anonymous said...

Great help. Thank you.
But one more question:
What is the power consumption?

Unknown said...

It drains just below 6W on minimum settings, and it's possible to achieve well under 7W on usable settings (wifi on, medium brightness). That's more than 12 hours of battery life.
I've discussed this matter on a mailing list, thinkpad-linux IIRC, but it'd be a good idea to post it here too, I'll do so ASAP.

Anonymous said...

Hey n0rdik0,

i really appreciate your guide. Since i'm rather new to linux, i started off with ubuntu, but your guide really makes me want to try Archlinux.
Do you use the newest kernel version? 2.6.29? I will try to build one on my own, but if you could update your config i'd be very thankful.
Did you patch your kernel with something like linux-phc to make it consume only 6W in idle?

Thank you again!

Anonymous said...

Forgot one thing:

Can you recommend any mailing-list or forum concerning thinkpad and linux?
I already know thinkwiki, but something more interactive for asking questions would be nice.

Greetings.

Unknown said...

Hi mikar,

I will post soon a separate article about the power consuption and all the possible tips and trick related, I will link it from this one. Almost all your quiestions will be answered there.

Here are the answers that wont be in the post:
- I do not use any special kernel, I use the stock one from Arch ABS repositories (2.6.28 as of now) compiled with the configuration posted.

- If you are new to linux I would recommend you Mandriva or Suse. I personally don't like Ubuntu, it is much harder to use and configure than the other two, I really don't understand all the hype about Ubuntu.
If you want to try Arch I would recommend you to install it first on some spare box or virtual machine to see if you like it.

I'll try to post the article tonight, stay tuned!

And if you have any more questions, don't hesitate to ask :)

Anonymous said...

Thanks for the hint, i sure will try out suse soon.
i've got ubuntu, mint and zenwalk up and running and will try out some more distributions.
There's much to discover but few spare time :(

But actually i managed to get archlinux running. I was struggling with grub from ubuntu install but now it works. Still have to make gnome work though.
Also probably forgot to choose the correct firmware from packetlist. Got only base and base-devel and nothing else. But it's a test-install anyway.


anyways thanks for the quick response. a power consumption "guide" would be great!

thanks again for all the useful information.

greetings.

Unknown said...

Hi mikar, the "guide" is posted, hope it helps!

mikar said...

Hey n0rdik0,

of course your guide helps. It's highly appreciated. Thank you very much for the effort.
Since i'm new to linux, i still have to apply some braincells and much google to get it to work, but with your guides i'm pretty sure i can handle it.

mikar said...

Hey,

maybe you can help me:
modprobe thinkpad_ec force_io=1 gives me FATAL: Module thinkpad_ec not found. Where do I get it?

Also my screen is not fullsized. My desktop doesnt fill up the hole display, although the wallpaper does.

and: under vista i have no whine, while in archlinux i constantly hear that high pitched sound. any chance to make it go away?

Thanks

mikar said...

fyi: turning usb autosuspend on fixed the whine. thank god.

and for the resolution / display thing: it only is under linux distributions. no matter which one i install, my desktop always is not fully filling up the screen.
usually it gets back to normal when i disable the second output HDMI-2 and make my 1440x900 the only screen. but doing that in archlinux did not help. maybe i shall make that command xrandr --output HDMI-2 --off automatically executed? but how do i do it?

thanks again

Unknown said...

Well, for the thinkpad_ec module, you have to install this package: http://aur.archlinux.org/packages.php?ID=3985
If you are not using Arch, check out the sourceforge page for further info.

I didn't have any issue with the resolution, the graphic mode worked automagically with the new X....
If you want to run any command the is a method for Autostart for any desktop manager, in xfce and kde its in the usual configuration application.

Anyway, my hard drive died and Lenovo already sent me a new one, so I'll have to do everything again. If I run into any problem I'll share the solution here.

Unknown said...

I (almost) have my system up and running again and I didn't have these issues.
There _may_ be some noise that goes away when I turn off bluetooth, but it's barely audible, I didn't even noticed it before you pointed it out.
About the video issue, make sure you have the intel drivers and you don't have any xorg.conf file, everything works autodetected.

meteore said...

Hey,

Thanks a lot for the detailed info. I am planning on using it when I order my X200s, soon. Related to this, and since I didn't find your announced 'review' post -- what is your overall impression? do you recommend the machine? over the X200? In particular, isn't 1400x900 too much to fit in 12,1".

Y por lo demás, pues bienvenido a Munich el año que viene ;).

Álvaro.

Unknown said...

Well, when I wrote this guide there was only one review online, the one on laptopmag.com I believe. Now there are at least 4 or 5 complete and detailed reviews out there, so I decided it wasn't worth it to add one more.

You will have to decide for yourself which one suits best your needs.
The 1440x900 screen is awesome for me, but I always want as much info on the screen as possible, and I don't have any problem with small texts. This screen also has the advandage of LED lighting, so it's brighter and uses less power than the CCFL 1280 screen of the X200. Keep in mind that you can always make the text bigger using a larger system font/greater zoom and enjoy the LED screen...
I don't need a webcam, or 3G, or a powerful processor, I appreciate as much battery life as I can get and (the most important reason) I had the money, so I went for the X200s. If you want a 1440 screen but a bit bigger, check out the T400, it's a X200 with a 14.1" screen and quite cheaper. It also has a pretty decent battery life.

I only can say one thing about this wonder: if I won the lottery tomorrow, I would change many things in my life but my laptop wouldn't be one of them. ;)

BTW, I bought mine here: http://www.notebooksandmore.net/product_info.php?info=p6564_ThinkPad-X200s-NS45KGE---7469-5KG.html (german store), paying 50 euro for a keyboard change to spanish and 50 euro shipping to Spain.

____

De año que viene nada, apenas me quedan 5 mesecitos :D

meteore said...

Thanks! I will be ordering it with the German student discount ;).

http://www.campusdiscount.de/product_info.php/info/p1879_ThinkPad-X200s-NS45KGE---7469-5KG.html

Do you advise to take an additional battery for weight/size reduction? (the 9-cell weights alone 510gr!)

Another important question: any news with 3D acceleration? The app I want to use intensively with this laptop needs crucially to do its 2D via 3D accel, http://texmacs.org... does it run smoothly in your system?

----

Cuando aparezcas por aquí, dame un toque y nos tomamos una cerveza! [ a l v a r o a t m i n i n p u n t o e s ]

Unknown said...

Well, the 9 cell does look ugly since it's asymmetric on the back, but the total weight is just 1.3Kg, with battery for 7 hours of heavy computing or 13 hours of reading pdfs. That's about the weight of some of the 10" netbooks around.

Spare batteries usually aren't worth the cost. If you don't need so much time you should get a model with a 4 or 6 cell battery, you will also save some money... for beers, for example ;)

About the 3D performace, this night the new xorg+drivers went into Arch repos, and it seems to be good, looks like it really uses the cards potential (1050 fps in glxgears), so check the benchmarks online and compare to and card you know. Form the top of my head, I think the X4500 is like an nVidia 7400m.

mikar said...

With 9-cell my X200s weighs 1504 g.
I think i get 1300 g only with my 6-cell-battery.

But i post for another reason.
Did you hear of finit-arc?
You should give it a try.
It reduced my boot speed to 11 secs from grub to desktop.

Dag Wieers said...

Hi, great article.

We are currently looking into an issue with memdisk not being able to boot disk images on certain Thinkpads (like my Thinkpad X200s).

Did you succeed in using memdisk with the extracted BIOS firmware harddisk image from Lenovo's update ISO as explained at ThinkWiki ?

On my X200s it doesn't work and the system stops after "Starting PC DOS..." while for others (X200, T400) it does work. I am now looking for someone with an X200s where it also works so we can look into what is causing it to fail.

More information at:

http://syslinux.zytor.com/archives/2009-May/012508.html

Your help is needed :)

Unknown said...

Mikar: no, I haven't tried to speed up the boot, as I always use the sleep mode when commuting to work, so I boot the computer less than once a week. Since the sleep works beatifully, I enjoy a 2-3 seconds "boot time".

Dag: I'll try to take a look at it and get back to you.

mikar said...

In case somebody wonders:
With Kernel 2.6.29(.*) there is no sound coming from pc speakers when plugged into the docking station.
In version 2.6.30-rc7 sound is working, but I got segmentation faults (using jfs).
2.6.30-rc7-git4 is working for me now.

I think that's pretty much the only thing that isn't working OOB when installing Arch now.

While I'm at it: If you'd like to try undervolting with your X200s, i've found 21 20 19 17 to be stable values (using linux-phc).
There is no noticable difference in power consumption, but cpu temperature decreases by 15 ° C at most.

One question though: Do any you experience Xorg crashes? I've had them very frequently. Downgrading xorg-server helped but Xorg still crashes once in a while.

Unknown said...

Stable undervolting and frequent crashes? Doesn't sound all that stable to me ;)

I'm not concerned about temperature at all, this is by far the coolest notebook I've had. And the coldest too (har har).

I've had two xorg crashes tops, in several months, so its pretty stable for me. Worth noting, I don't use any effects, not compiz nor Kwin4 bells and whistles, maybe there's something broken in the 3D handling of the intel driver...

mikar said...

Thanks for responding.
Unfortunately it's not the undervolting that causes Xorg to crash. That way it would be easy to turn off.

Did you perform an update of xorg-server, mesa, intel-dri or xf86-video-intel since April the 5th to 11th?

I think it's a problem with libgl, mesa, intel-dri and xf86-video-intel all released at 11th April.
If my guess is right, versions affected would be anything from 7.4-1 up (libgl, mesa) respectively 7.4-2 (intel-dri), 2.6.3-3 for xf86-video-intel and 1.6.0-3 for xorg-server.

And for the record:
I switched back from 30-rc7-git4 to rc7 since git4 recently caused a segfault too plus it was less stable.

Unknown said...

I've got here:
- libgl 7.4.2-2
- intel-dri 7.4.2-1
- video-intel 2.7.1-1
- xorg 1.6.1.901-1
And (almost) no problems at all.

As I said before, I recently switched to x64 so I can't say about previous versions. Anyway, I don't remember any particular problems.

oub said...

the modem:


I am thinking of buying a X200(s), so far I have had excellent results
with the X41/60 and got the modem to work by buying a driver from
linuxant.


I cannot find the information nor on the web nor in lenovos web site.

Could you tell me please which chipset the modems uses (either in
windows, if you still have installed that or using )

cat "/proc/asound/card"*"/codec#" * > & /tmp/modemchip


Thanks very much

Uwe Brauer

Unknown said...

This is a great laptop except it was just released so if you're buying it now, it makes you an "early adopter" and pioneer to help Lenovo discover issues.I like very much all lenovo, Lenovo ThinkPad, Lenovo ThinkPad X1 Carbon, ThinkPad, ultrabook lenovo.Because it,s look very beautiful and thinest.
click this link
lenovo thinkpad x1 carbon

Schuladmins said...

Great article - thank you! Hope it will be continued for new versions.