[gpm] brightness controls lock up keyboard



hello,

I'm trying to fix a problem with my laptop that has been bothering me for over a year now. There was a simple workaround in gnome2, but it no longer works in gnome3, so any advice would be appreciated.

The problem is, there is some sort of a feedback loop on my laptop (MSI PR200) in that setting display brightness by software generates an evdev input event in the keyboard device. Similar thing apparently happens on Samsung N130 series with samsung-backlight module, see [1].
Gnome-power-manager, or its equivalent on GNOME3, cannot handle the situation and gets stuck in what I presume is a sorcerer's-aprentice mode, reacting to events that result from its own actions. Sometimes this feedback loop stops (my guess is a race condition), but that can take ten or more minutes.
While this is happening, Xorg eats 100% CPU and keyboard mostly doesn't work (all the normal key events are presumably spammed out by the brightness events). In gnome2, this was also accompanied by unpleasant backlight flicker. This doesn't seem to be a problem in gnome3 anymore, but perhaps the flicker is so rapid I can't notice it.

This happens at -every- brightness change, including AC plug-in/out and screen blank. So basically whenever I plug in the AC adapter, laptop becomes unusable.

In gnome2, it was possible to kill gnome-power-manager and the problem stopped. Alternately, remapping XF86MonBrightnessUp/Down keysyms to no-ops and restarting g-p-m blocked its ability to handle brightness events and order was restored.
Unfortunately, this doesn't seem to help in gnome3: killing upowerd has no effect, nor does remapping the keys. (My guess is that some component of the system remembers the keysyms and I can't easily restart that component over the new keymap.)

Another option for me is to specify acpi_backlight=vendor on the kernel command line, but that kills the whole ACPI backlight subsystem and I can no longer control brightness at all.
Note that for me, killing the part of GNOME handling backlight would be sufficient, because the brightness keys work fine with kernel ACPI support alone.

My guess is that the kernel is sending wrong events, or maybe competing for backlight control with g-p-m. But I can't go hunting for kernel bugs when I don't know how the correct output is supposed to look.

So my questions are, in order of importance:

1. Is there a workaround I can use? Is there a way to make gnome3 ignore brightness controls?

2. Is this a bug in gnome-power-manager, or whatever the component in gnome3 is responsible for this, or is it a kernel problem?

3. If it is a kernel problem, what kind of events does the gnome3 part expect to see? I have two relevant event devices: the keyboard and some "Video Bus" that only sends brightness up/down events, as far as I could see. Pressing brightness control key sends events over both devices, setting brightness by software sends an event to the keyboard only. Also, turning off ACPI backlight stops the events on the keyboard, but keeps them on the Video Bus.

thanks for any hints
m.

P.S. i'm not on the list so please cc me in replies

[1] ubuntu bugreport, https://bugs.launchpad.net/ubuntu/+source/linux/+bug/756509
[2] openSUSE bugreport, https://bugzilla.novell.com/show_bug.cgi?id=692441


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]