Comment 26 for bug 527157

Revision history for this message
Dmitriy Geels (dmig) wrote :

Oh yeah! #24 is really dirty one!

But it gave me a clue, how this bug should be fixed:
Patching StepUp/StepDown handlers is very bad practice, because these methods may be called by some other applications. We need to prevent calls to these methods depending on some parameter.

The problem itself: bios changes brightness on keypress and reports acpi keypress event, instead of just reporting event (this might be fixable in DSDT), then some process handles this event and issues dbus calls to org.gnome.SettingsDaemon.Power.Screen.StepUp/StepDown methods. Then g-p-m changes brightness too; g-p-m has no ways to determine, whether it should change brightness when handling StepUp/StepDown dbus calls, or not. Neither 'some process' do.

The solution, how I see it: find code, which handles acpi keypresses (that's not g-p-m, g-s-d may be?) and add user-changeable option there to disable acpi brightness keypresses handle (e.g. gconf parameter).