Friday, July 27, 2007

Me and Thinkpad R61

At the start of a week I bought long wanted Thinkpad. It's shiny new R61 with Santa Rosa platform, Intel Core 2 Duo Processor T7100 (1.83GHz), Intel X3100 graphics card, 14.1" WXGA+ TFT, 1GB RAM etc. Unfortunately with Windows Vista included :-(.
My first day was like WOW Vista is really eye candy with that aero stuff, but at the end of the day I was totally pissed of how slow everything is (1GB RAM only is not enough for vista :-x) and started download of latest Ubuntu (Feisty Fawn later upgraded to Gutsy Gibbon) to try what is going to work out of box. Well first I had downgraded to Windows XP in case Linux wouldn't handle all those new technologies in that black magic box. After 2 days of installing I can say that neither WXP nor Ubuntu can handle everything in my R61. I still don't know how to run wifi in WXP, I get stuck when I'm installing some Intel chipset upgrade by ThinkVantage update manager and there's more. In Linux wifi is working but all those function keys, sound and suspend still refuse to run properly. Today I got to work brightness so I'm putting some info here.

Brightness was set by HAL by default and the way HAL did it was quite weird on R61. I found out that when I used brightness up/down button the HAL was calling /usr/lib/hal/scripts/hal-system-lcd-set-brightness. So I disabled this script by renaming it (does anybody know how to disable it properly?) to hal-system-lcd-set-brightness-disabled and used the information from following post on Ubuntu forums to get it work my way: very helpful post

My way

install xbacklight:
sudo apt-get install xbacklight
create scripts:
/etc/acpi/thinkpad-brightness-up.sh
#!/bin/sh
xbacklight -inc 10%

/etc/acpi/thinkpad-brightness-down.sh
#!/bin/sh
xbacklight -dec 10%

and bind events with scripts by creating event files:
/etc/acpi/events/thinkpad-brightness-up
event=video LCD0 00000086 00000000
action=/etc/acpi/thinkpad-brightness-up.sh

/etc/acpi/events/thinkpad-brightness-down
event=video LCD0 00000087 00000000
action=/etc/acpi/thinkpad-brightness-down.sh


That's it. There is only one small problem: the small pop-up window showing the amount of brightness don't change state now, but that don't really bothers me :-).

Edit
There is still some problem with brightness control. After reboot acpid starts to return error messages about display not being found after calling xbacklight and brightness control don't work. It has someting to do with calling the xbacklight from script as root. The only solution I found by now is to restart acpid manually when X server is running by
sudo /etc/init.d/acpid restart

6 comments:

Anonymous said...

pity if you don't have intel wifi. and the LCD brightness worked for me instantly (i don't have HAL installed though)

you may also want to take a look at my z61m howto

Anonymous said...

oh, and thinkwiki is very good source of information

Q said...

Hey, thanks for link, I'll look to it.
Maybe something would apply to my R61 too ;-).
Wifi is problem in windows, in ubuntu it worked out of box. I managed to fix sound a while ago with patch from link
Finally I can watch movies and listen to music :-)

Anonymous said...

Try the following in your scripts:

export HOME=/home/BLAHBLAH
export DISPLAY=:0

/usr/bin/xbacklight -dec 20%

where BLAHBLAH has to be changed to your username, of course.
This way Fn-Home/End work for me.

chanapong said...

Lenovo ThinkPad R61 notebook

Kfir said...

export HOME=/home/BLAHBLAH
saved my day ;-)

Thanks