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 671505 - power: unable to get brightness from control-center Screen & Brightness panel
power: unable to get brightness from control-center Screen & Brightness panel
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: power
3.3.x
Other Linux
: Normal major
: ---
Assigned To: Richard Hughes
gnome-settings-daemon-maint
: 671821 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2012-03-06 22:47 UTC by Cosimo Cecchi
Modified: 2012-03-11 13:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
power: fix broken abs_to_percentage() logic (1.10 KB, patch)
2012-03-06 22:58 UTC, Cosimo Cecchi
committed Details | Review

Description Cosimo Cecchi 2012-03-06 22:47:18 UTC
g-c-c and g-s-d 3.3.91

When I try to open the Screen & Brightness panel from g-c-c, the brightness slider is not displayed. I get this error on the command line:

screen-cc-panel-WARNING **: Error getting brightness: Timeout was reached

It looks like g-c-c calls into g-s-d there; the corresponding g-s-d output is the following;

power-plugin-CRITICAL **: abs_to_percentage: assertion `value < min' failed
GLib-GIO-CRITICAL **: g_dbus_method_invocation_return_gerror: assertion `error != NULL' failed
GLib-CRITICAL **: g_error_free: assertion `error != NULL' failed

This might be a regression from this commit http://git.gnome.org/browse/gnome-settings-daemon/commit/plugins/power?id=d361fcee80bbcf8cf2dd692eb91b05800b29f5fb
Comment 1 Cosimo Cecchi 2012-03-06 22:58:55 UTC
Created attachment 209117 [details] [review]
power: fix broken abs_to_percentage() logic

(value < min) and (value > max) will *always* fail, and this function
will always return -1.
Comment 2 Bastien Nocera 2012-03-07 10:21:06 UTC
I blame hughsie for blindly committing my untested patch ;)

Thanks!

Attachment 209117 [details] pushed as 065b20e - power: fix broken abs_to_percentage() logic
Comment 3 Bastien Nocera 2012-03-11 13:14:50 UTC
*** Bug 671821 has been marked as a duplicate of this bug. ***