Fedora Linux Support Community & Resources Center
  #1  
Old 14th August 2009, 04:10 AM
David Batson Offline
Registered User
 
Join Date: Jul 2009
Posts: 1,234
linuxopera
Solution for double resume problem on ThinkPad when using hotkeys

After some reading and experimenting, I found the solution to stop Suspend to RAM and Suspend to Disk (Hibernation) from needing to be resumed twice (or thrice) when invoked with the ThinkPad hotkeys Fn+F4 (suspend to ram) and Fn+F12 (hibernate)

On my T42 I had to edit the file /home/<user>/.Xmodmap to include the lines:

Code:
keycode 150 =
keycode 213 =
You need to log-out / log-in for the changes to take effect.

If you do not have that file, you can create it as root using gedit. In Nautilus you need to have View > Show Hidden Files checked to see this file in your home directory.

I found which keys to add to .Xmodmap by running the command: xmodmap -pke
Search for the lines that have XF86Sleep (suspend to ram) or XF86Suspend (hibernate to disk) in them to get the keycodes.

Apparently this can be set with xbindkeys, but since I got it to work with .Xmodmap, I am not going to explore this option.
http://bbs.archlinux.org/viewtopic.php?id=74806

Now if I can just figure out how to turn off the display backlight using Fn+F3 and radeontool - I will be all set.
__________________
Fedora 19 Gnome on a ThinkPad X220, i5-2540M CPU, Intel HD Graphics 3000, Intel N 6205 wireless, and Sierra Wireless 754S Mobile Hotspot (AT&T)
Reply With Quote
  #2  
Old 16th August 2009, 12:47 AM
David Batson Offline
Registered User
 
Join Date: Jul 2009
Posts: 1,234
linuxopera
Quote:
Originally Posted by David Batson View Post
Now if I can just figure out how to turn off the display backlight using Fn+F3 and radeontool - I will be all set.
Well, I finally cracked this nut.

I created the following file as root: /etc/acpi/events/blank
Code:
event=ibm/hotkey HKEY 00000080 00001001
action=/etc/acpi/actions/blank.sh
I additionally created the this file as root: /etc/acpi/actions/blank.sh
[Note that radeontool needs to be installed.]
Code:
#!/bin/bash 

RADEONTOOL='/usr/sbin/radeontool' 

STATUS=`$RADEONTOOL light|awk '/The radeon backlight looks / {print $5}'`; 

if [ $STATUS == "on" ] ; then 
        $RADEONTOOL light off 
elif [ $STATUS == "off" ] ; then 
        $RADEONTOOL light on 
fi
Next I ran the command as root: chmod +x /etc/acpi/actions/blank.sh
Then I ran the command as root: chmod u+s /usr/sbin/radeontool
Finally, I found I needed to run this command as root for the hokey sequence to work: /etc/rc.d/init.d/acpid restart

Now the hotkey combo Fn+F1 will turn off (and back on) the display backlight. Normally the hotkey combo Fn+F3 is used for this, but since Fedora invokes the screensaver and lock with Fn+F3, I decided to use the unused Fn+F1 combo. FYI, you can find out what keys are used for what in the file: /usr/share/hal/fdi/information/10freedesktop/30-keymap-module-thinkpad-acpi.fdi

FWIW: A different option than using radeontool would be to use DPMS. See following for more info.
http://www.thinkwiki.org/wiki/How_to..._.28Standby.29
One difference I notice using DPMS is that the display backlight is turned back on by moving the mouse (TrackPoint). When using radeontool, the hotkey sequence Fn+F3 is needed to turn the display backlight back on (or off).

I also discovered an optional way for using a hotkey such as the "Access IBM" or "ThinkVantage" button to accomplish the same thing. Go to System > Preferences > Keyboard Shortcuts. Click on Add then for "Name" type a description such as Blank Screen in the top box, and for "Command" a command such as /etc/acpi/actions/blank.sh in the bottom box and click on Apply. Next click on the right side for the Shortcut and press the applicable hotkey such as "Access IBM". It should now work.

FWIW, I notice the followiing webpage says radeontool should no longer be used, and instead "Backlight can be modified through sysfs". Great! But I have no idea how, and did not run across the necessary information in my searches on how to modify sysfs. Anyway, radeontool works fine for me. Radeontool is in Fedora 11's repos.
http://www.thinkwiki.org/wiki/Radeontool
__________________
Fedora 19 Gnome on a ThinkPad X220, i5-2540M CPU, Intel HD Graphics 3000, Intel N 6205 wireless, and Sierra Wireless 754S Mobile Hotspot (AT&T)
Reply With Quote
  #3  
Old 21st August 2009, 07:01 PM
jbkt23 Offline
Registered User
 
Join Date: Mar 2006
Posts: 552
windows_xp_2003firefox
Thanks for the solutions.
__________________
jbkt23
Reply With Quote
Reply

Tags
double, hotkeys, problem, resume, solution, thinkpad

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Suspend/resume issue FC6 + Thinkpad icantux Hardware & Laptops 11 24th February 2007 01:19 AM
Resume faulty on Thinkpad T21 timefortea Hardware & Laptops 0 18th November 2006 10:26 AM
No sound after resume with FC5 on ThinkPad 600X Cabbage Hardware & Laptops 5 30th August 2006 06:56 PM
FC4 occasionally hangs on resume, Thinkpad 600E nlippincott Hardware & Laptops 1 31st July 2005 02:41 PM


Current GMT-time: 21:55 (Thursday, 27-11-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
Tianjin World Financial Center - Cagayan River, Cagayan de Oro Travel Photos on Instagram - Kurali City Photos on Instagram