After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 767037 - GsdPowerManager: keep internal keyboard backlight in sync with UPower
GsdPowerManager: keep internal keyboard backlight in sync with UPower
Status: RESOLVED DUPLICATE of bug 773403
Product: gnome-settings-daemon
Classification: Core
Component: power
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
: 767036 (view as bug list)
Depends on:
Blocks: 767040
 
 
Reported: 2016-05-30 19:35 UTC by Marco Trevisan (Treviño)
Modified: 2017-05-24 15:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GsdPowerManager: keep internal keyboard backlight in sync with UPower (1.94 KB, patch)
2016-05-30 19:35 UTC, Marco Trevisan (Treviño)
needs-work Details | Review

Description Marco Trevisan (Treviño) 2016-05-30 19:35:11 UTC
Keyboard backlight could be changed by other components too, and
if this happens a signal is emitted, thus we should update the cached value
accordingly.

In theory at this point we could even delete the manual update of kbd_brightness_now
(as per https://paste.gnome.org/pzwyqpkq4), as this is implicit, but we can still keep this around.

Let me know what you prefer.
Comment 1 Marco Trevisan (Treviño) 2016-05-30 19:35:14 UTC
Created attachment 328759 [details] [review]
GsdPowerManager: keep internal keyboard backlight in sync with UPower

Keyboard backlight could be changed by other components too, and
if this happens a signal is emitted, thus we should update the cached value
accordingly
Comment 2 Bastien Nocera 2016-05-31 08:37:30 UTC
Review of attachment 328759 [details] [review]:

> GsdPowerManager: keep internal keyboard backlight in sync with UPower

Please update with the actual style we use.

::: plugins/power/gsd-power-manager.c
@@ +1955,3 @@
+        GsdPowerManager *manager = GSD_POWER_MANAGER (user_data);
+
+        if (g_strcmp0 (signal_name, "BrightnessChanged") == 0) {

Please follow the style for one-line conditionals.
Comment 3 Bastien Nocera 2016-10-14 17:11:45 UTC
*** Bug 767036 has been marked as a duplicate of this bug. ***
Comment 4 Hans de Goede 2016-10-24 08:49:45 UTC
I've recently independently wrote a patch fixing the same issue, see bug 773403 and only noticed this bug just now.

Since this bug has not seen an updated patch in 5 months, and since my patch is more complete:

1) It properly removes the signal handler which the patch attached to this bug does not do.
2) It properly calls backlight_iface_emit_changed (if the brightness has actually changed, upower
     will also emit BrightnessChanged when g-s-d has just written it itself)

I suggest marking this bug as a duplicate of bug 773403, which tracks the new patch.
Comment 5 Rui Matos 2017-05-24 15:26:30 UTC

*** This bug has been marked as a duplicate of bug 773403 ***