[ltp] xbacklight = 1?

Stefan /*St0fF*/ Hübner linux-thinkpad@linux-thinkpad.org
Fri, 13 Jun 2008 11:47:54 +0200


Hi!

I have X61Tablet and am running gentoo/KDE.  I've made an autostart script that runs

xrandr --output LVDS --set BACKLIGHT_CONTROL combination

upon logging in.  This is neccessary for the intel driver, as the default "kernel" parameter doesn not work correctly. 
By that my brightness-script works fine:

#############################################################
#!/bin/bash

# aktuelle brightness auslesen
act=$(cat /sys/class/backlight/acpi_video1/actual_brightness)

# prüfen, was getan werden soll, default ist "min"
if [ "$#" -eq "1" ]
then    case $1 in
         up)     if [ "$act" -lt "100" ]
                 then    act=$((act+5))
                 fi ;;
         down)   if [ "$act" -gt "20" ]
                 then    act=$((act-5))
                 fi ;;
         max)    act=100;;
         *)      act=20;;
         esac
else    act=20
fi
echo $act > /sys/class/backlight/acpi_video1/brightness
#############################################################

You might use that instead of xbacklight.  Invocation:

brightness [param]

param:	up   - increase brightness of the backlight
	down - decrease brightness of the backlight
	max  - maximise brightness
	none - minimise brightness

This works fine since 2.6.23-kernel with IBM-ACPI included.

Hope it helps.
St0fF

P.S. I just released a program on sourceforge "X61acpid", which uses this script upon ACPI-Events like plugging the psu 
or pressing the brightness up/down keys.

Yves-Alexis Perez schrieb:
> On Fri, Jun 13, 2008 at 09:53:34AM +0200, Arno Trautmann wrote:
>> Hi,
>>
>> I hope, this is the right list for this question and you can give me a  
>> hint; it’s about xbacklight:
>>
>> I have a X61s, Arch Linux, using xbacklight. When I don’t use the  
>> machine for some minutes, the screen turns black. ok, great so far.
>> Returning to the keyboard, the screen turns bright, wonderful. But  
>> mostly it is going to brightnes level 100. Good, so I do a
>>
>> xbacklight = 0
>>
>> because I’m fine with the remaining brightnes at level 0. But if I enter  
>> this, the screen doesn‘t change at all, but stays bright. If I type a
>>
>> xbacklight = 1,
>>
>> it turns to level 1 and is dark. Now I can put it back to 100, and then  
>> putting it to 0 succeeds… this ist quite a strange thing I really would  
>> like to understand. Some kind of bug – but where? xbacklight, hardware  
>> or anything else? It’s not a serious problem, just a bit annoying.
>>
> I have the same thing on a T61 running debian sid. I think the problem
> is in the Xorg intel driver, which doesn't read the firmware backlight
> value before setting it, or something like that.
> 
> Cheers,