You are not logged in.
I literally *just* got a new ThinkPad T61. But there's alot that's not working. Namely things related to thinkpad-acpi. I was wondering if anybody had tips for troubleshooting thinkpad-acpi?
Doesn't work:
- Mute
- Vol Down
- Vol up
- Lock Screen (Fn - F2)
- Battery Status (Fn - F3) ... trivial though given KDE's battery monitor
- Suspend to RAM (Fn - F4)
- Wireless Enable/Disable (Fn - F5)
- External Monitor Switching (Fn - F7)
- Touchpad Disable (Fn - F8)
- CD ROM Eject (Fn - F9)
- Suspend to Disk (Fn - F12)
- Screen Brightness Up (Fn - Home)
- Screen Brightness Down (Fn - End)
- Song Stop (Fn - Arrow Up)
- Song Play/Pause (Fn - Arrow Down)
- Song Previous (Fn - Left Arrow)
- Song Next (Fn - Right Arrow)
I can't use keytouch. Mute/Vol+/Vol- are using a different event from the Fn keys. Even different Fn keys are using different events.
I can manually control brightness by echoing values ( echo up > /proc/acpi/ibm/brightness ) ... but that blows.
kernel26tp in AUR doesn't work .. and cpufreq and the wifi are hosed in it too.
Seems there are a couple of variants of T61s floating around out there ... but nobody I have talked to has had such fail with their Fn keys. (Granted they were using other fail distros... but I digress).
Thanks for help/suggestions.
Res Publica Non Dominetur
Laptop: Arch x86 | Thinkpad X220 | Core i5 2410-M | 8 GB DDR3 | Sandy Bridge
Desktop: Arch x86_64 | Custom | Core i7 920 | 6 GB DDR3 | GeForce 260 GTX
Offline
If understood you right, you are using KDE. For the multimedia-buttons you have to activate the keyboard-layouts in the system-settings and then choose the right model.
Screen Brightness-buttons seem to work, but they write to the wrong file... You can check this: /proc/acpi/video/VID/LCD0/brightness changes the brightness-factor but it should be changing in /proc/acpi/video/VID1/LCD0/brightness.
Sorry for my bad english but I had too little sleep the last four weeks and I'm almost falling asleep right now...
now with 80% more sax-appeal!
"I hacked the Phrak, and all I got was this lousy signature"
Offline
not exactly what you are looking for, but xbindkeys will give you what you want
a few examples of the functionality you want:
"cmus-remote -C player-next"
Mod1+Right
"cmus-remote -C player-prev"
Mod1+Left
"amixer sset PCM 1-"
ordfeminine
"amixer sset PCM 1+"
masculine
Note: these key bindings are dependent on what you define the keys in your .xmodmaprc. By using 'xev' you can figure out/map whatever keys you want.
some comments: I cannot get my mute key to work, plus the system boots up muted. Fn keys for Brightness, screen shut off, screen light work out of the box for me. I purchased mine last February. check out powertop, its a great program to extend your battery life (~3.5hr total here on a fresh charge).
Offline
Screen Brightness-buttons seem to work, but they write to the wrong file... You can check this: /proc/acpi/video/VID/LCD0/brightness changes the brightness-factor but it should be changing in /proc/acpi/video/VID1/LCD0/brightness.
Good call! Now the question is how do I make it write to the correct one....
Last edited by georgia_tech_swagger (2008-08-22 20:59:41)
Res Publica Non Dominetur
Laptop: Arch x86 | Thinkpad X220 | Core i5 2410-M | 8 GB DDR3 | Sandy Bridge
Desktop: Arch x86_64 | Custom | Core i7 920 | 6 GB DDR3 | GeForce 260 GTX
Offline
haha! I ran with your hint on Google and got brightness working now at least:
A friend wrote me a script to catch the brightness buttons acpi events:
Place it into /etc/acpi/thinkpad-brightness-down.sh
#!/bin/bash
levels=(20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 100)
(( count = ${#levels[@]} -1 ))
current=$(cat /proc/acpi/video/VID1/LCD0/brightness | grep current | awk '{print $2}')
if [ "$current" -ne "${levels[0]}" ]
then
i=-1
for n in ${levels[@]}
do
if [ "$current" -eq "$n" ]
then
echo ${levels[$i]} > /proc/acpi/video/VID1/LCD0/brightness
fi
(( i += 1 ))
done
current=$(cat /proc/acpi/video/VID1/LCD0/brightness | grep current | awk '{print $2}')
# dcop khotkeys kmilod displayProgress "Brightness" $current
fi
AND
thinkpad-brightness-up.sh:#!/bin/bash
levels=(20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 100)
(( count = ${#levels[@]} -1 ))
current=$(cat /proc/acpi/video/VID1/LCD0/brightness | grep current | awk '{print $2}')
if [ "$current" -ne "${levels[$count]}" ]
then
i=1
for n in ${levels[@]}
do
if [ "$current" -eq "$n" ]
then
echo ${levels[$i]} > /proc/acpi/video/VID1/LCD0/brightness
fi
(( i += 1 ))
done
fi
current=$(cat /proc/acpi/video/VID1/LCD0/brightness | grep current | awk '{print $2}')
#dcop khotkeys kmilod displayProgress "Brightness" $current
and in /etc/acpi/events/thinkpad-brightness-up:
#Fn-Home
event=video LCD0 00000086 00000000
action=/etc/acpi/thinkpad-brightness-up.sh
AND thinkpad-brightness-down:
#Fn-end
event=video LCD0 00000087 00000000
action=/etc/acpi/thinkpad-brightness-down.sh
Res Publica Non Dominetur
Laptop: Arch x86 | Thinkpad X220 | Core i5 2410-M | 8 GB DDR3 | Sandy Bridge
Desktop: Arch x86_64 | Custom | Core i7 920 | 6 GB DDR3 | GeForce 260 GTX
Offline
and if you just make link with ln -sf from the place it writes to the real file ?
Offline
linking around in /proc seems to be a very very *bad* idea.
Res Publica Non Dominetur
Laptop: Arch x86 | Thinkpad X220 | Core i5 2410-M | 8 GB DDR3 | Sandy Bridge
Desktop: Arch x86_64 | Custom | Core i7 920 | 6 GB DDR3 | GeForce 260 GTX
Offline
I recently got a T61 as well, I've been able to get pretty much everything working. Some good sources to use are http://gentoo-wiki.com/Lenovo_Thinkpad_T61 and www.thinkwiki.org. I would recomend using the zen-sources patchset for your kernel if you want the latest kernels out there, kernel26tp is out of date atm (though the only feature that comes to mind that newer kernels offer that might make it worthwile is the wireless LED on the iwl3945/iwl4965).
The things I would look into getting set up is HDAPS (use the low power hdapsd) and tp_smapi.
Offline
I have just finished using xbindkeys to fix most of the Fn keys. I created my own homebrew sh script for video output switching (Fn-F7). This weekend I'll push out a package to AUR for all these T61 fixes rolled into one.
I thought to name it thinkpad-t61-decrapify or thinkpad-t61-tacos
My cohort suggested thinkpad-t61-magic.
Any suggestions for names?
Last edited by georgia_tech_swagger (2008-08-23 02:43:00)
Res Publica Non Dominetur
Laptop: Arch x86 | Thinkpad X220 | Core i5 2410-M | 8 GB DDR3 | Sandy Bridge
Desktop: Arch x86_64 | Custom | Core i7 920 | 6 GB DDR3 | GeForce 260 GTX
Offline
*sigh* .... Screwing around with suspend something was taking forever so I did a hard reset.
Anddddddddddd reiserfs corrupted tree. Great. Rebuild tree worked ... but nuked some files in it's recovery. So I'm reinstalling. And posting all my stuff here so I don't lose it:
====================
/usr/bin/thinkpad-vos.sh
#!/bin/bash
if xrandr -q | grep "VGA connected" > /dev/null ; then
xrandr --output LVDS --mode "1024x768" --output VGA --mode "1024x768"
else
xrandr --output LVDS --auto --output VGA --auto
fi
====================
~/.xbindkeysrc
#Lock
"dbus-send --session --dest=org.freedesktop.ScreenSaver --type=method_call --print-reply /ScreenSaver org.freedesktop.ScreenSaver.Lock"
m:0x0 + c:145
NoSymbol
#Eject
"eject"
m:0x0 + c:207
NoSymbol
#Suspend
"sudo pm-suspend"
m:0x0 + c:223
NoSymbol
#Hibernate
"sudo pm-hibernate"
m:0x0 + c:165
NoSymbol
#VolumeUp
"amixer sset PCM 1+"
m:0x0 + c:176
XF86AudioRaiseVolume
#VolumeDown
"amixer sset PCM 1-"
m:0x0 + c:174
XF86AudioLowerVolume
#Mute
"amixer sset PCM 0"
m:0x0 + c:160
XF86AudioMute
======================
/etc/sudoers
(username) ALL = (ALL) NOPASSWD: /usr/sbin/pm-hibernate
(username) ALL = (ALL) NOPASSWD: /usr/sbin/pm-suspend
Res Publica Non Dominetur
Laptop: Arch x86 | Thinkpad X220 | Core i5 2410-M | 8 GB DDR3 | Sandy Bridge
Desktop: Arch x86_64 | Custom | Core i7 920 | 6 GB DDR3 | GeForce 260 GTX
Offline
Oh -- and since this thread was originally intended to be about generic ACPI debugging but has since turned into a T61 fix-fest ... somebody please move this to the Linux on Laptops forum. Thanks.
Res Publica Non Dominetur
Laptop: Arch x86 | Thinkpad X220 | Core i5 2410-M | 8 GB DDR3 | Sandy Bridge
Desktop: Arch x86_64 | Custom | Core i7 920 | 6 GB DDR3 | GeForce 260 GTX
Offline
And posting all my stuff here so I don't lose it:
Thanks for posting this stuff. Getting my remaining T61 buttons set up has been on my to-do list for a long time, but I've been putting it off. You did the work for me.
Offline
A newer more complete xbindkeys that adds in Fn-F7 and multimedia keys. This assumes you've put my thinkpad-vos.sh script in /usr/bin ... and that you're using amarok for music.
#Lock
"dbus-send --session --dest=org.freedesktop.ScreenSaver --type=method_call --print-reply /ScreenSaver org.freedesktop.ScreenSaver.Lock"
m:0x0 + c:145
NoSymbol
#Eject
"eject"
m:0x0 + c:207
NoSymbol
#Suspend
"sudo pm-suspend"
m:0x0 + c:223
NoSymbol
#Hibernate
"sudo pm-hibernate"
m:0x0 + c:165
NoSymbol
#VideoSwitch
"thinkpad-vos.sh"
m:0x0 +c:214
NoSymbol
#VolumeUp
"amixer sset PCM 1+"
m:0x0 + c:176
XF86AudioRaiseVolume
#VolumeDown
"amixer sset PCM 1-"
m:0x0 + c:174
XF86AudioLowerVolume
#Mute
"amixer sset PCM 0"
m:0x0 + c:160
XF86AudioMute
#PlayPause
"dcop amarok player playPause"
m:0x0 + c:162
NoSymbol
#Stop
"dcop amarok player stop"
m:0x0 + c:164
NoSymbol
#Previous
"dcop amarok player prev"
m:0x0 + c:144
NoSymbol
#Next
"dcop amarok player next"
m:0x0 + c:153
NoSymbol
Res Publica Non Dominetur
Laptop: Arch x86 | Thinkpad X220 | Core i5 2410-M | 8 GB DDR3 | Sandy Bridge
Desktop: Arch x86_64 | Custom | Core i7 920 | 6 GB DDR3 | GeForce 260 GTX
Offline
cat .Xmodmap
keycode 166 = XF86Back
keycode 167 = XF86Forward
keycode 173 = XF86AudioPrev
keycode 174 = XF86AudioStop
keycode 172 = XF86AudioPlay
keycode 171 = XF86AudioNext
keycode 122 = XF86AudioLowerVolume
keycode 123 = XF86AudioRaiseVolume
keycode 121 = XF86AudioMute
That's how I configured my buttons and I set them as Gloabl shortcuts in the appropiate applications. Everythings working fine :-)
But I think I'll steel your solution for ejecting and that stuff :-) Nice work.
Offline
No problem. I won't push a build to AUR. It was pointed out to me that there are several T61 variants, so this might not work golden for everybody. I'll just update the wiki soon.
It's my understanding that thinkpad-acpi (formerly called ibm-acpi) should take care of this stuff. I know a T61's Fn/etc works out of the box on Fedora and Ubuntu. As to whether that's a hack like mine or proper thinkpad-acpi support .... who knows.
Res Publica Non Dominetur
Laptop: Arch x86 | Thinkpad X220 | Core i5 2410-M | 8 GB DDR3 | Sandy Bridge
Desktop: Arch x86_64 | Custom | Core i7 920 | 6 GB DDR3 | GeForce 260 GTX
Offline
The more universal solution to the Fn + F# hotkeys is to use thinkpad-acpi. This needs to be enabled before it can be used.
echo enable,0xffffffff >/proc/acpi/ibm/hotkey
Then you can configure the hotkeys through acpid. An example would be:
/etc/acpi/events/displaybtn
event=ibm/hotkey HKEY 00000080 00001007
action=/etc/acpi/actions/switchdisplay.sh
and
/etc/acpi/actions/switchdisplay.sh
#!/bin/csh
/usr/bin/xrandr --output VGA-0 --auto
This requires xrandr to be setup in your xorg.conf and would switch displays to the external screen or your laptops screen.
/etc/acpi/events/lockbtn
event=ibm/hotkey HKEY 00000080 00001002
action=/etc/acpi/actions/lock.sh
/etc/acpi/actions/lock.sh
#!/bin/bash
xscreensaver-command -lock
/etc/acpi/events/suspend
event=ibm/hotkey HKEY 00000080 00001004
action=/etc/acpi/actions/sleep.sh
/etc/acpi/actions/suspend.sh
#!/bin/bash
pm-suspend
/etc/acpi/events/hibernate
event=ibm/hotkey HKEY 00000080 0000100c
action=/etc/acpi/actions/hibernate.sh
/etc/acpi/actions/hibernate.sh
#!/bin/bash
pm-hibernate
For screen brightness, you need to load the thinkpad-acpi module with the option experimental=1. This may damage your screen, so use at your own risk.
/etc/acpi/events/thinkpad-brightness-down
event=ibm/hotkey HKEY 00000080 00001011
action=/etc/acpi/actions/thinkpad-brightness-down.sh
/etc/acpi/actions/thinkpad-brightness-down.sh
#!/bin/bash
echo down > /proc/acpi/ibm/brightness
/etc/acpi/events/thinkpad-brightness-up
event=ibm/hotkey HKEY 00000080 00001010
action=/etc/acpi/actions/thinkpad-brightness-up.sh
/etc/acpi/events/thinkpad-brightness-up.sh
#!/bin/bash
echo up > /proc/acpi/ibm/brightness
Instead of using that to set brightness, you could also use xbacklight -set 100 where 100 is the % you wish your brightness to be.
For example, my script for switching between battery and ac power is:
/etc/acpi/events/battery
event=battery BAT0 00000080 00000001
action=/etc/acpi/actions/power.sh
/etc/acpi/actions/power.sh
#!/bin/bash
if on_ac_power; then
# Reset to normal settings
hal-disable-polling --enable-polling --device /dev/scd0 # or whatever your CD drive is
xbacklight -set 100
xrandr --output TMDS-1 --auto
xrandr --output VGA --auto
echo crt_enable > /proc/acpi/ibm/video
echo dvi_enable > /proc/acpi/ibm/video
modprobe uhci_hcd
ethtool -s eth0 wol g
echo 0 > /sys/bus/pci/drivers/iwl3945/0000:03:00.0/power_level
echo 0 > /proc/sys/vm/laptop_mode
echo 10 > /proc/sys/vm/dirty_ratio
echo 5 > /proc/sys/vm/dirty_background_ratio
echo 500 > /proc/sys/vm/dirty_writeback_centisecs
echo max_performance > /sys/class/scsi_host/host0/link_power_management_policy
else
# Turn on power savings
echo 5 > /proc/sys/vm/laptop_mode
echo 0 > /proc/sys/kernel/nmi_watchdog
echo 1 > /sys/devices/system/cpu/sched_mc_power_savings
echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 1500 > /proc/sys/vm/dirty_writeback_centisecs
for i in /sys/bus/usb/devices/*/power/autosuspend; do echo 1 > $i; done
echo min_power > /sys/class/scsi_host/host0/link_power_management_policy
echo min_power > /sys/class/scsi_host/host1/link_power_management_policy
hal-disable-polling --device /dev/scd0
xbacklight -set 50
xrandr --output TMDS-1 --off
xrandr --output VGA --off
echo crt_disable > /proc/acpi/ibm/video
echo dvi_disable > /proc/acpi/ibm/video
rmmod uhci_hcd
ethtool -s eth0 wol d
echo 5 > /sys/bus/pci/drivers/iwl3945/0000:03:00.0/power_level
fi
You can bind the other buttons if you wish, those are the only ones that really matter to me. You can find a script to turn off the screen on www.thinkwiki.org. The wireless switch should work out of the box, so there is no need to set that up.
Offline
i'm having a bit of a quirk. I've copied down your script that includes the amarok play,pause, etc, thing. If I set the script to start automatically on bootup, the cd tray to eject.
Thus, I disabled it's autostart, however, now, when I press Fn+<up>, the cd tray ejects, rather than the music pausing. What's causing this? Your script? Or the acpi? If it's the acpi, how do I change it so it's Fn+<F9> to eject the tray instead?
Also, after prolonged use, I've noticed some slight high frequency humming from my HD. I've installed laptop-mode-tools, and the HD step down, and cpufreq, but, how can I be sure that it's being used? Is there some sort of test I can do?
Offline
i'm having a bit of a quirk. I've copied down your script that includes the amarok play,pause, etc, thing. If I set the script to start automatically on bootup, the cd tray to eject.
Thus, I disabled it's autostart, however, now, when I press Fn+<up>, the cd tray ejects, rather than the music pausing. What's causing this? Your script? Or the acpi? If it's the acpi, how do I change it so it's Fn+<F9> to eject the tray instead?
Also, after prolonged use, I've noticed some slight high frequency humming from my HD. I've installed laptop-mode-tools, and the HD step down, and cpufreq, but, how can I be sure that it's being used? Is there some sort of test I can do?
XBindKeys. Do you have a T61? These settings won't work perfectly on anything but a T61. And given different skews of T61's Lenovo has produced in the last 2 years, it may even be flaky on older T61s. But this should work on very recent T61s.
Res Publica Non Dominetur
Laptop: Arch x86 | Thinkpad X220 | Core i5 2410-M | 8 GB DDR3 | Sandy Bridge
Desktop: Arch x86_64 | Custom | Core i7 920 | 6 GB DDR3 | GeForce 260 GTX
Offline
I have a T61p.
How do I know what the code for the <F9> is? Like "c201" and stuff?
Offline
Hey guys I just got a t61, this isn't about the key bindings, but I was just wondering what you guys did about the thinkvantage partition? Do you keep it around or blow it away? I JUST got mine, so installing arch tonight. Vista will be long gone, but not sure if this partition matters for warranty reasons or any other reasons?
thanks! Only used the laptop a bit but it's looks are dead sexy...in a utilitarian sort of way. <3
Offline
You can either burn the recovery partition into 1CD+2DVDs or just keep the partition. I followed the guide at notebookreview.com to clean install a T61. Sadly, the forum is down. I'll give you the link once it's up again.
Offline
I just deleted it, it wouldn't really be that useful to me and I only got an 80 gb HD so it was eating up too much space. I don't think it effects the warranty, Lenovo is supposedly good about replacing hardware like the HD, ram, and some other things that they tell you how to do in the manual. It's really just personal preference.
http://forum.notebookreview.com/showthread.php?t=144783 should have answer all your questions on the partition/backup of the origional install if you had vista preinstalled.
Offline
I have a T61p.
How do I know what the code for the <F9> is? Like "c201" and stuff?
Run xev. KEEP YOUR MOUSE OUT OF THE WINDOW. Otherwise you'll flood the console with events and won't find the key info.
You'll get something like this after you press a key:
KeyPress event, serial 34, synthetic NO, window 0x2800001,
root 0x6a, subw 0x0, time 162660997, (497,652), root:(502,677),
state 0x4, keycode 110 (keysym 0xff6b, Break), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
I got the above by pressing Fn+Pause (Break).
keycode 110 = c:110 ... pretty sure you just leave all the m's at 0x0?
Notice to the right of keysym .... "Break" ... that goes where NoSymbol / XF86VolumeMute etc go. If the button does not have a symbol name, it'll literally say "NoSymbol" in xev output.
Last edited by georgia_tech_swagger (2008-08-27 22:15:12)
Res Publica Non Dominetur
Laptop: Arch x86 | Thinkpad X220 | Core i5 2410-M | 8 GB DDR3 | Sandy Bridge
Desktop: Arch x86_64 | Custom | Core i7 920 | 6 GB DDR3 | GeForce 260 GTX
Offline
I just deleted it, it wouldn't really be that useful to me and I only got an 80 gb HD so it was eating up too much space. I don't think it effects the warranty, Lenovo is supposedly good about replacing hardware like the HD, ram, and some other things that they tell you how to do in the manual. It's really just personal preference.
http://forum.notebookreview.com/showthread.php?t=144783 should have answer all your questions on the partition/backup of the origional install if you had vista preinstalled.
Cool. That's exactly what I was looking for. Even after backing up and removing the "extra" partition, cfdisk was throwing a weird error and failing. I ended up just using fdisk to remove the windows partition (I had already removed the thinkvantage one) and then re-running cfdisk through the installer and it was all peachy.
Unfortunately I had to head in to work, so I just have a base arch system waiting and ready at home. I know what I'm doing after work...<3
Good thread, I'm sure I'll be back for reference and questions about my new t61. Hopefully we can all collaborate this stuff into the wiki and show up all the other laptop wikis. <3
Offline
Anyone know which Thinkpad t61 wiki is the latest or most "official"?
Georgia_tech_swagger, have you put any work into a certain one yet?
thanks.
Offline