View previous topic :: View next topic |
Author |
Message |
widremann Veteran
Joined: 14 Mar 2005 Posts: 1314
|
Posted: Mon Mar 22, 2010 4:31 am Post subject: ThinkPad T500 Fn hotkeys |
|
|
I've installed Gentoo on my ThinkPad T500 and most stuff works fine. Switchable graphics doesn't, but that's a topic for another day (after vga switcheroo is finished). The thing that bugs me most, however, is that I simply cannot figure out a way to turn off the backlight with Fn-F3. Before, I could use radeontool. But that doesn't work with this radeon card, apparently (HD 3650). xrandr offers no help. Googling has been fruitless as most people don't seem to care about turning off the screen (or if they do, they don't let on). So, at long last, I am asking how to turn off the screen on a T500 using Linux. |
|
Back to top |
|
|
FlorianSchmidt Tux's lil' helper
Joined: 20 May 2008 Posts: 77 Location: Germany
|
Posted: Mon Mar 22, 2010 7:41 am Post subject: |
|
|
Hi widremann,
I don't know how to exactly turn on your function key. But if "xev" can display the key-event you should be able to bind
Code: |
xset dpms force off
|
to it.
cu
Florian _________________ -bash: :wq: command not found |
|
Back to top |
|
|
toralf Developer
Joined: 01 Feb 2004 Posts: 3942 Location: Hamburg
|
Posted: Mon Mar 22, 2010 8:56 am Post subject: |
|
|
FlorianSchmidt wrote: | Code: | xset dpms force off |
| You can put it into /etc/acpi/defaults.sh |
|
Back to top |
|
|
widremann Veteran
Joined: 14 Mar 2005 Posts: 1314
|
Posted: Mon Mar 22, 2010 2:59 pm Post subject: |
|
|
toralf wrote: | FlorianSchmidt wrote: | Code: | xset dpms force off |
| You can put it into /etc/acpi/defaults.sh |
That can't work because xset has to be connected to an X server.
Furthermore, that option only works when there's an X server running, not on the console.
Also, it seems to turn itself back on very easily, such as that doing xset dpms force off will only last for a second.
And finally, DPMS must be using some mechanism to control the backlight and that mechanism should be available elsewhere. |
|
Back to top |
|
|
toralf Developer
Joined: 01 Feb 2004 Posts: 3942 Location: Hamburg
|
Posted: Mon Mar 22, 2010 4:06 pm Post subject: |
|
|
widremann wrote: | That can't work because xset has to be connected to an X server. | Therefore the acpi script should contains sth like Code: | DISPLAY="DISPLAY=:0.0"
XUSR=$(w | grep -e xdm -e startx -e xinit | fgrep -v grep | cut -f1 -d' ' | sort -u | tail -n 1)
if [[ -n "$XUSR" ]]; then
if [[ "$XUSR" != "root" ]]; then
XUSR="su - $XUSR -c"
else
XUSR="logger"
fi
else
XUSR="logger"
fi
| so that a code like this works for a lot of use cases: Code: | ibm) case $action in
hotkey) case $value in
00001002) $XUSR "$DISPLAY qdbus org.kde.screensaver /ScreenSaver Lock || $DISPLAY xlock"
;;
00001003) $XUSR "$DISPLAY xset dpms force off"
;;
00001004) suspend_to mem
;;
00001007) $XUSR "$DISPLAY /home/tfoerste/workspace/bin/monitor.sh"
;;
00001008) $XUSR "$DISPLAY /home/tfoerste/workspace/bin/monitor.sh auto"
;;
|
|
|
Back to top |
|
|
widremann Veteran
Joined: 14 Mar 2005 Posts: 1314
|
Posted: Tue Mar 23, 2010 3:21 am Post subject: |
|
|
That will suffice. I'd still like to have a global solution, but since I'll be using X most of the time, I think it should be fine. |
|
Back to top |
|
|
|