[ltp] Re: Re: T61 brightness/volume

Yves-Alexis Perez linux-thinkpad@linux-thinkpad.org
Tue, 29 Apr 2008 18:04:40 +0200


On Tue, Apr 29, 2008 at 12:49:16PM +0000, Yves-Alexis Perez wrote:
> On Tue, Apr 29, 2008 at 12:25:51PM +0000, Marcus Better wrote:
> > Hi,
> > 
> > Yves-Alexis Perez wrote:
> > > echo 10 > /sys/class/backlight/acpi_video1/brightness
> > 
> > I have a new Intel-based T61 and the brightness keys don't work. Surprise,
> > surprise :) I'm running mainline kernel 2.6.25 (x86_64), Debian with X.org
> > 7.3 and KDE 4, xserver-xorg-video-intel 2:2.3.0-1.
> > 
> > I can control brightness using xbacklight. The above command does set the
> > brightness, but it is promptly reset back to the previous setting when I
> > press any key - very strange.
> > 
> > The Fn-Home and Fn-End keys seem to generate two press/release input event
> > pairs on each press. Here I pressed and released them once each:
> 
> 
> Maybe KDE is in the path.
> 
> The "legacy" part was necessary on -rc7 or 8, I don't remember. I'm using an
> 2.6.25+thinkpad-acpi patch, and still no real success, except with xbacklight.
> What I need is to hack some stuff in powersaved so it can talk to xbacklight
> when brightness keys are pressed, I guess.

And btw, there are few problems:

- intel X driver doesnt look at the current backlight before setting it, so if
  you set the backlight using something like:
    echo 10 > /sys/class/backlight/acpi_video1/brightness 
  (or using powersave or stuff like that), it'll mess the brightness in
  xbacklight.
- acpi video.c ('video' module) driver adds two /sys/class/acpi_videoX (0 and
  1), with only one (the '1') working. This confuses hal (and thus
  gnome-power-manager for example). See
  http://people.freedesktop.org/~hughsient/quirk/quirk-backlight-index.html
  about Lenovo/Thinkpad laptops for info. The solution they give (removing
  video module) is not a good idea on our Thinkpads, said Hmh.
- another problem I have is that I have some delay before events arrive when I
  use the brightness keys. I watch them come using:
    acpi_listen
  and:
    input-events 5 #(which is the Video Bus)
  They come like 1 second _after_ the press.
  If I play with /proc/acpi/ibm/hotkey so brightness keys generate an event in
  the Thinkpad Acpi input even (which is 1), using:
    input-events 1
  I can see the event coming right when I press the key.
  So there's something weird in there, don't know where to report this nor if
  I'm the only one seeing it.

I don't know which way (hal or sysfs) is used by kde, but there is currently
no good way to set the backlight. I'd love a tiny daemon like pommed (for
macs) :)

Currently, I guess we'll have to wait for kernel guys to fix the acpi video.c
driver (so hal works correctly, and one can use gnome-power-manager, I don't
know if there are others hal-based), and to wait for X guys to fix the intel
driver so it reads the brightness before setting it, and one can use little
daemons setting stuff directly in /sys/class/backlight.

Hope that helps. If anybody else has some kind of update, it'd be nice :)

-- 
Yves-Alexis