thinkpads.com Support Community Forum Index Bill Morrow's thinkpads.com Open Forum - The Original Thinkpad Support Forum
Follow ThinkpadsForum on Twitter
 Support this forum, shop at newmodeus.com
 Support the forum, shop at newmodeus.com
System backups occur about 7:00 am EDT and last about 10 minutes. This will slow performance. RSS feeds have been added to the forum.
Donate if you wish to:
bill at thinkpads dot com

It is currently Wed Jul 23, 2014 9:32 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Wed Sep 19, 2012 2:42 pm 
Offline

Joined: Wed Sep 19, 2012 2:31 pm
Posts: 7
Location: Espoo, Finland
I'm using a Thinkpad X21 with Debian Squeeze as a server (irc bouncer etc.). I'd like to turn the display backlight off to save power and the backlight CCFL tubes itself but I haven't found a way to do so.

The screen goes blank automatically after some time but the backlight still stays on.

DPMS via xset does not work because X is not installed.

Fn+F3 should turn the LCD off but it doesn't work. I think I saw some bug reports for thinkpad-acpi about this problem.

The commands:
setterm -powersave powerdown
and
setterm -powerdown 5 (note: 5 minute timeout)
...don't seem to work either.

Is there a way to do it at all? Or do I just have to keep it on, brightness at minimum? What should the BIOS setting "Screen Blanking" (enabled/disabled) do? I think changing it didn't have any effect.


Top
 Profile  
 
PostPosted: Wed Sep 19, 2012 6:16 pm 
Offline
Senior ThinkPadder
Senior ThinkPadder

Joined: Sun Aug 07, 2005 5:41 pm
Posts: 2654
Location: Paragould AR USA
You are correct about Fn + F3 being the key combo to blank the LCD. But since it's an ACPI event it doesn't seem to work with newer kernels. At least it doesn't for me running Xubuntu 12.04 on a T43.

_________________
Collection = T500 - T400 - X61s - T61(14" WSXGA+) - T60p(UXGA) - X40 - T43p- T42p - A31P - A30P - 600E - 770


Top
 Profile  
 
PostPosted: Fri Sep 21, 2012 8:01 am 
Offline
Moderator
Moderator

Joined: Tue Jun 07, 2005 6:57 am
Posts: 9666
Here is how I do it in Arch XFCE with xset...

Using xev, I saw that Fn+F3 is mapped to XF86Battery.
Code:
KeyPress event, serial 41, synthetic NO, window 0x2e00001,
    root 0xb0, subw 0x0, time 382189, (797,429), root:(803,503),
    state 0x10, keycode 244 (keysym 0x1008ff93, XF86Battery), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 41, synthetic NO, window 0x2e00001,
    root 0xb0, subw 0x0, time 382189, (797,429), root:(803,503),
    state 0x10, keycode 244 (keysym 0x1008ff93, XF86Battery), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False


I created the following file /etc/acpi/actions/blank.sh as root and made it executable.
Code:
#! /bin/sh

/usr/bin/xset dpms force off


I created a keyboard shortcut (an option in XFCE: Applications Menu > Settings > Keyboard > Application Shortcuts).
Command: /etc/acpi/actions/blank.sh
Shortcut: XF86Battery

Fn+F3 now turns off the backlight. Moving the trackpoint or pressing a keyboard key turns the backlight back on.

FWIW, for other Fn+F* keys that aren't already mapped and create only an acpi event, I have a corresponding file in /etc/acpi/events/

ACPI events can be seen by running acpi_listen from terminal.
Code:
$ acpi_listen
button/f24 F24 00000080 00000000 K
button/fnf11 FF11 00000080 00000000 K


One example is how I turn on and off bluetooth with Fn+F9.
/etc/acpi/events/bluetoothconf
Code:
event=button/f24.*
action=/etc/acpi/actions/bluetooth.sh

/etc/acpi/actions/bluetooth.sh
Code:
#!/bin/bash

BT_RFKILL=$(rfkill list | grep tpacpi_bluetooth_sw | sed 's/\([0-9]\+\):.*/\1/')
BT_STATE=$(/usr/sbin/rfkill list $BT_RFKILL | grep "Soft blocked: yes")

if [ "x" == "x$BT_STATE" ]; then
   /usr/sbin/rfkill block $BT_RFKILL
else
   /usr/sbin/rfkill unblock $BT_RFKILL
fi

exit 0


Another example is how I connect and disconnect my home WiFi profile with Fn+F11.
/etc/acpi/events/netcfg_home-wirelessconf
Code:
event=button/fnf11.*
action=/etc/acpi/actions/netcfg_home-wireless.sh

/etc/acpi/actions/netcfg_home-wireless.sh
Code:
#!/bin/bash

WLAN_STATE=$(netcfg current)

if [ "x" == "x$WLAN_STATE" ]; then
   /usr/bin/netcfg home-wireless
else
   /usr/bin/netcfg -a
fi

exit 0

_________________
DKB


Top
 Profile  
 
PostPosted: Fri Sep 21, 2012 8:11 am 
Offline
Senior ThinkPadder
Senior ThinkPadder

Joined: Sun Aug 07, 2005 5:41 pm
Posts: 2654
Location: Paragould AR USA
Some very useful info here, DKB! :thumbs-UP:

_________________
Collection = T500 - T400 - X61s - T61(14" WSXGA+) - T60p(UXGA) - X40 - T43p- T42p - A31P - A30P - 600E - 770


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


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

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group