Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ThinkPad T500 Fn hotkeys
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
widremann
Veteran
Veteran


Joined: 14 Mar 2005
Posts: 1314

PostPosted: Mon Mar 22, 2010 4:31 am    Post subject: ThinkPad T500 Fn hotkeys Reply with quote

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
View user's profile Send private message
FlorianSchmidt
Tux's lil' helper
Tux's lil' helper


Joined: 20 May 2008
Posts: 77
Location: Germany

PostPosted: Mon Mar 22, 2010 7:41 am    Post subject: Reply with quote

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
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3942
Location: Hamburg

PostPosted: Mon Mar 22, 2010 8:56 am    Post subject: Reply with quote

FlorianSchmidt wrote:
Code:
xset dpms force off
You can put it into /etc/acpi/defaults.sh
Back to top
View user's profile Send private message
widremann
Veteran
Veteran


Joined: 14 Mar 2005
Posts: 1314

PostPosted: Mon Mar 22, 2010 2:59 pm    Post subject: Reply with quote

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
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3942
Location: Hamburg

PostPosted: Mon Mar 22, 2010 4:06 pm    Post subject: Reply with quote

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
View user's profile Send private message
widremann
Veteran
Veteran


Joined: 14 Mar 2005
Posts: 1314

PostPosted: Tue Mar 23, 2010 3:21 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum