Summary: | XRandr backlight notifications are lost | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | xorg | Reporter: | Alexander Mezin <mezin.alexander> | ||||||||||
Component: | Driver/intel | Assignee: | Chris Wilson <chris> | ||||||||||
Status: | RESOLVED FIXED | QA Contact: | Intel GFX Bugs mailing list <intel-gfx-bugs> | ||||||||||
Severity: | normal | ||||||||||||
Priority: | low | ||||||||||||
Version: | git | ||||||||||||
Hardware: | Other | ||||||||||||
OS: | Linux (All) | ||||||||||||
Whiteboard: | |||||||||||||
i915 platform: | i915 features: | ||||||||||||
Attachments: |
|
Description
Alexander Mezin
2014-06-05 18:53:03 UTC
Created attachment 100485 [details]
Xorg.0.log
Hmm, interesting thought about udev notifcations. When I last looked at this, I looked at how you could poll(/sys/class/backlight/*/brightness) to detect the changes. That doesn't work very well with X's select() mechanism. However, we could use the udev notification... Created attachment 100492 [details] [review] Hook up a backlight udev monitor Something like this should work. It will likely lose the backlight value over modesetting, but that is due to another bug that needs to be fixed first. However, this should be enough for you to test whether the GUI updates when you press the backlight keys. Created attachment 100493 [details] [review] Hook up a backlight udev monitor Sadly, no improvement at all. Xev prints "RRNotify" only when backlight is at 100% brightness, or at some random moments as before. Created attachment 100503 [details] [review] Hook up a backlight monitor Ah, the arguments to RRChangeOutputProperty() specify whether to send an event or not. Let's try that again. Now it works, thanks commit c6cd10f536e099277cdc46643725a5a50ea8b525 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Thu Jun 5 22:43:37 2014 +0100 sna: Hook up a backlight udev monitor for external changes Changes to the backlights are notified through uevents. Hooking up a udev monitor to listen out for external changes to the backlight (e.g. through ACPI function keys, or by the user writing to /sys/class/backlight directly) is easier than enabling polling on the backlight sysfs file using X's select() mechanism. Since we listen to backlight changes, we have to be careful not to confuse the side-effects of disabling connectors (which may cause either ourselves or the kernel to turn off the backlight) with the user value. Many thanks to Alexander Mezin for the suggestion to use udev for tracking the notifications for external changes to the backlight. Reported-by: Alexander Mezin <mezin.alexander@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79699 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.