On mer, 2008-08-06 at 20:07 -0400, Jim Paris wrote: > Hi, > > I upgraded to 2.6.26.1 and my X61 backlight (which has never really > worked right) gave me more troubles than usual, so I started to try to > track things down a little more, and found a mess that I'd like some > help sorting out. I assume your x61 works the same as my T61 intel. The current status (aiui) is that, on 2.6.26 and previous, brightness won't work in-kernel. The only solution I found was to use gnome-power-manager and video.ko with parameter brightness_switch_enabled. In this case, it seems to work fine. But I tried some fully experimental stuff (linux-acpi-2.6 git + drm-2.6 + patches), and I managed to have brightness keys working under X, in-kernel. I don't know when all those patches will be mainline, but I wouldn't assume before 2.6.28. > > - I'm loading ACPI video.ko too. It generates hotkey events correctly: > > video LCD0 00000086 00000000 > video LCD0 00000087 00000000 Same here. > > - Bug: two backlight devices show up: > /sys/class/backlight/acpi_video0 > /sys/class/backlight/acpi_video1 Yes, that is fixed in linux-acpi-2.6 but it doesn't work either. As if the wrong one was chosen. I needed the “opregion” patch from Matthew Garret. > - It seems that: > > - Writing to acpi_video0/brightness changes actual_brightness for > both, but has no actual effect. > > - Pressing hotkey buttons is the same as writing to > acpi_video0/brightness. > > - Writing to acpi_video1/brightness changes actual_brightness for > only acpi_video1, and actually works. Yes, acpi_video0 seems to be the “ghost” device for the discrete graphic card. > > - Gnome-power-manager saw the hotkeys but didn't change the > backlight. When using video.ko, you need the brightness_switch_enabled for the event to be passed userspace. I'm not sure how they are passed since wether or not brightness_switch_enabled is enabled (:) we see something in /proc/acpi/events. > > - With hotkey-setup gone, I can make g-p-m work correctly by: > echo N > /sys/module/video/parameters/brightness_switch_enabled > This causes acpi_video1/actual_brightness to NOT change when I hit > hotkeys, so now g-p-m does the right thing (sees that it is > unchanged, and changes it. Good!) That's the correct thing to do when using gnome-power-manager. > > It seems like this option should be unnecessary. It's as if the > BIOS thinks it's changing the brightness but failing to do so. > Is this a DSDT bug maybe? Or a bug in video.ko? Yeah. > > - After all this, brightness mostly works. There is still an issue with > plugging/unplugging the AC adapter. In single-user-mode: > > On AC: > # echo 0 > acpi_video1/brightness # dark > # echo 15 > acpi_video1/brightness # fully bright > Unplugged AC here # no change > # echo 15 > acpi_video1/brightness # no change > # echo 0 > acpi_video1/brightness # dark > # echo 15 > acpi_video1/brightness # --HALF-- bright > Plugged AC here # no change > # echo 15 > acpi_video1/brightness # no change > # echo 0 > acpi_video1/brightness # dark > # echo 15 > acpi_video1/brightness # fully bright > > Basically removing the AC adapter reduces the available brightness > range, BUT doesn't take effect until I actually try to change the > brightness. Check first in your bios the options for that. > > I don't know what should change the brightness in this case. > I could add an ACPI hook, but I'd need something like: > > b=$(((`cat acpi_video1/brightness` + 8) % 16)) > echo $(($b + 1) % 16)) > acpi_video1/brightness > echo $b > acpi_video1/brightness > > to ensure that the value actually gets changed, which just seems > like a hack. > > > By the way, the Debian package "acpi-support" also sets up a > modprobe.d file containing: > options thinkpad_acpi hotkey=enable,0xffffbf experimental=1 > which I have removed. Another broken userspace package? > Apparently this file was placed here to fix problems on someone's > x60; this whole setup is so complicated it seems like it would > be an endless problem of fixing one laptop by breaking another. I guess it'd be nice if you could file bugs saying a package shouldn't mess with hotkey. Cheers, -- Yves-Alexis
Attachment:
signature.asc
Description: This is a digitally signed message part
------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________ ibm-acpi-devel mailing list ibm-acpi-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel