[ltp] X61 Brightness Question
Hendrik-Jan Heins
linux-thinkpad@linux-thinkpad.org
Wed, 15 Aug 2007 00:36:21 +0200
2007/8/14, Henrique de Moraes Holschuh <hmh@hmh.eng.br>:
> On Tue, 14 Aug 2007, Hendrik-Jan Heins wrote:
> > 2007/8/14, Henrique de Moraes Holschuh <hmh@hmh.eng.br>:
> > > On Tue, 14 Aug 2007, Hendrik-Jan Heins wrote:
> > > > I knew the 0xffff mask, but not the 0xffffff
> > >
> > > Always read the thinkpad-acpi docs, people :-) I keep it up-to-date.
> > >
> > I know I know... sorry :-$
> > I used the 0.15 patch for kernel 2.6.22-1. And as far as I know, when
> > I got it, the docs weren't there yet.
>
> That's unlikely, I document stuff in the patch that implements the
> functionality, so Documentation/thinkpad-acpi.txt should always be
> up-to-date with whatever is in the code, even while bissecting...
>
hmmmm
I just noticed I never actually got your module in the kernel! I was
still working with version 0.14.
I just now redid everything with 0.15.
Unfortunatly, I see no difference in effects, except for the fact that
I now NEED the video module to get brightness working
> > > > I implemented 2 small scripts in my acpi events based on the
> > > > brightness keys (I kicked out the "video" module again), and now I can
> > > > easily change the brightness of the screen.
> > > > The only trouble is that the brightness level is not picked up in
> > > > /sys/class/backlight or /proc/acpi/ibm/brightness
> > >
> > > thinkpad-acpi not yet supports the brightness stuff in new thinkpads.
> > >
> > > BTW, probably you *will* have to make peace with the video module sooner or
> > > later.
> > >
> > ? Why? I mean I have nothing agains the video module, but it just
> > doesn't seem like a usefull item to me right now.
>
> The new thinkpads are moving to generic ACPI video handling, and that's the
> ACPI video driver's business.
>
Yup, I'm seeing that now.
> > > > What I currently do is change the setting thru /proc/acpi/ibm/cmos
> > >
> > > Look at the -latest- thinkpad-acpi docs, search for brightness_mode. It
> > > should have a fix for *that*, at least. But it should also be activated
> > > automatically in anything Lenovo... are you using the very latest
> > > thinkpad-acpi from ibm-acpi.sf.net?
> > >
> > As far as I know, I am running the latest version. The patch I use is
> > called: "thinkpad-acpi-0.15-2007-0723_v2.6.22.1.patch"
>
> Yeah, that's the latest. And it should be using CMOS-only for brightness in
> any Lenovo box. Weird. Does using brightness_mode=2 as a module parameter
> make the brightness interface of thinkpad-acpi work for you?
>
The brightness_mode=2 option doesn't seem to do much. I tried it with
and without, but I saw no difference.
Actually now I do see 0-7 brightness levels in
/sys/class/backlight/thinkpad_screen/actual_brightness
Shouldn't I see more levels?
The scripts I'm using to set brightness:
____________________
$ cat /etc/acpi/events/thinkpad-bright-up
# /etc/acpi/events/thinkpad-bright-up
# This is called when the user presses the brightness up button and calls
# /etc/acpi/brightup.sh for further processing.
# Optionally you can specify the placeholder %e. It will pass
# through the whole kernel event message to the program you've
# specified.
event=video LCD0 00000086 00000000
action=/etc/acpi/brightup.sh
_____________________________
$ cat /etc/acpi/events/thinkpad-bright-down
# /etc/acpi/events/thinkpad-bright-down
# This is called when the user presses the brightness up button and calls
# /etc/acpi/brightdown.sh for further processing.
# Optionally you can specify the placeholder %e. It will pass
# through the whole kernel event message to the program you've
# specified.
event=video LCD0 00000087 00000000
action=/etc/acpi/brightdown.sh
_____________________________
$ cat /etc/acpi/brightup.sh
#!/bin/sh
# up the brightness by one level
echo 4 > /proc/acpi/ibm/cmos
_____________________________
$ cat /etc/acpi/brightdown.sh
#!/bin/sh
# lower the brightness by one level
echo 5 > /proc/acpi/ibm/cmos
______________________________
> > I noticed that when using a US 105 key keyboard in KDE, you do get
> > some support for those keys: they are assigned key 174 and 176 (as
> > seen in xev).
>
> That's KDE stuff snooping the CMOS NVRAM, I think...
>
> --
> "One disk to rule them all, One disk to find them. One disk to bring
> them all and in the darkness grind them. In the Land of Redmond
> where the shadows lie." -- The Silicon Valley Tarot
> Henrique Holschuh
>
Hendrik-Jan