Bug#785017: mate-power-manager: brightness is reset to maximum on every restart
flos
lonicerae at gmail.com
Mon May 11 15:58:22 UTC 2015
Package: mate-power-manager
Version: 1.8.1+dfsg1-5
Severity: normal
Dear MATE Maintainer,
Currently the mate-power-manager could not save the brightness settings after
changes. A workaround would be using the 'dconf-editor' or 'gsettings' tools to
change the value of the key 'brightness-ac' of schema org.mate.power-manager.
I modify the gpm-backlight.c a little so that we can save the brightness
settings after every brightness adjustment when ac power supply is used.
It seems to me that call back function 'brightness_changed_cb' was attached to
'backlight->priv->brightness' mistakenly. I think we should distinguish the
backlight object from the brightness object.
Please correct me and please review the patch in the attachment.
Thank you very much!
Best Regards,
Flos
-- System Information:
Debian Release: 8.0
APT prefers stable
APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.16.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages mate-power-manager depends on:
ii dbus-x11 1.8.16-1
ii libatk1.0-0 2.14.0-1
ii libc6 2.19-18
ii libcairo2 1.14.0-2.1
ii libcanberra-gtk0 0.30-2.1
ii libcanberra0 0.30-2.1
ii libdbus-1-3 1.8.16-1
ii libdbus-glib-1-2 0.102-1
ii libfontconfig1 2.11.0-6.3
ii libfreetype6 2.5.2-3
ii libgdk-pixbuf2.0-0 2.31.1-2+b1
ii libglib2.0-0 2.42.1-1
ii libgnome-keyring0 3.12.0-1+b1
ii libgtk2.0-0 2.24.25-3
ii libmate-panel-applet-4-1 1.8.1+dfsg1-3
ii libnotify4 0.7.6-2
ii libpango-1.0-0 1.36.8-3
ii libpangocairo-1.0-0 1.36.8-3
ii libpangoft2-1.0-0 1.36.8-3
ii libunique-1.0-0 1.1.6-5
ii libupower-glib3 0.99.1-3.2
ii libx11-6 2:1.6.2-3
ii libxext6 2:1.3.3-1
ii libxrandr2 2:1.4.2-1+b1
ii libxrender1 1:0.9.8-1+b1
ii mate-notification-daemon [notification-daemon] 1.8.1-3
ii mate-power-manager-common 1.8.1+dfsg1-5
ii notification-daemon 0.7.6-2
ii policykit-1 0.105-8
ii systemd 215-17
ii upower 0.99.1-3.2
Versions of packages mate-power-manager recommends:
ii udisks 1.0.5-1+b1
Versions of packages mate-power-manager suggests:
ii mate-polkit 1.8.0+dfsg1-4
-- no debconf information
-------------- next part --------------
A non-text attachment was scrubbed...
Name: save_ac_brightness_settings.patch
Type: text/x-diff
Size: 1585 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-mate-team/attachments/20150511/8746e982/attachment.patch>
-------------- next part --------------
Output of 'mate-power-manager --verbose' when adjusting the brightness of the screen with self-built packages:
TI:23:00:05 TH:0x1c64a70 FI:gpm-button.c FN:gpm_button_filter_x_events,121
- Key 232 mapped to key brightness-down
TI:23:00:05 TH:0x1c64a70 FI:gpm-button.c FN:gpm_button_emit_type,81
- emitting button-pressed : brightness-down
TI:23:00:05 TH:0x1c64a70 FI:gpm-manager.c FN:gpm_manager_button_pressed_cb,904
- Button press event type=brightness-down
TI:23:00:05 TH:0x1c64a70 FI:gpm-backlight.c FN:gpm_backlight_button_pressed_cb,436
- Button press event type=brightness-down
TI:23:00:05 TH:0x1c64a70 FI:gpm-brightness.c FN:gpm_brightness_helper_get_value,113
- executing /usr/sbin/mate-power-backlight-helper --get-brightness retval: 0
TI:23:00:05 TH:0x1c64a70 FI:gpm-brightness.c FN:gpm_brightness_helper_set_value,144
- executing pkexec /usr/sbin/mate-power-backlight-helper --set-brightness 6 retval: 0
TI:23:00:05 TH:0x1c64a70 FI:gpm-brightness.c FN:gpm_brightness_helper_get_value,113
- executing /usr/sbin/mate-power-backlight-helper --get-brightness retval: 0
(mate-power-manager:24552): GLib-CRITICAL **: Source ID 18 was not found when attempting to remove it
TI:23:00:05 TH:0x1c64a70 FI:gpm-backlight.c FN:gpm_backlight_button_pressed_cb,473
- emitting brightness-changed : 60 <------------------------------------------------------------------ P1
TI:23:00:05 TH:0x1c64a70 FI:gpm-backlight.c FN:brightness_changed_cb,644
- on_battery: 0
TI:23:00:05 TH:0x1c64a70 FI:gpm-backlight.c FN:gpm_backlight_brightness_evaluate_and_set,298
- 1. main brightness 0.600000
TI:23:00:05 TH:0x1c64a70 FI:gpm-backlight.c FN:gpm_backlight_brightness_evaluate_and_set,307
- Setting initial brightness level
TI:23:00:05 TH:0x1c64a70 FI:gpm-backlight.c FN:gpm_backlight_brightness_evaluate_and_set,320
- 2. battery scale 1.000000, brightness 0.600000
TI:23:00:05 TH:0x1c64a70 FI:gpm-backlight.c FN:gpm_backlight_brightness_evaluate_and_set,339
- 3. idle scale 1.000000, brightness 0.600000
TI:23:00:05 TH:0x1c64a70 FI:gpm-brightness.c FN:gpm_brightness_trust_cache,561
- using cache for value 60 (probably okay)
TI:23:00:05 TH:0x1c64a70 FI:gpm-backlight.c FN:gpm_backlight_brightness_evaluate_and_set,347
- values are the same, no action
TI:23:00:05 TH:0x1c64a70 FI:gpm-backlight.c FN:brightness_changed_cb,647
- saving brightness for ac supply: 60 <---------------------------------------------------------------- P2
TI:23:00:08 TH:0x1c64a70 FI:gpm-button.c FN:gpm_button_filter_x_events,121
- Key 233 mapped to key brightness-up
TI:23:00:08 TH:0x1c64a70 FI:gpm-button.c FN:gpm_button_emit_type,81
- emitting button-pressed : brightness-up
TI:23:00:08 TH:0x1c64a70 FI:gpm-manager.c FN:gpm_manager_button_pressed_cb,904
- Button press event type=brightness-up
TI:23:00:08 TH:0x1c64a70 FI:gpm-backlight.c FN:gpm_backlight_button_pressed_cb,436
- Button press event type=brightness-up
TI:23:00:08 TH:0x1c64a70 FI:gpm-brightness.c FN:gpm_brightness_helper_get_value,113
- executing /usr/sbin/mate-power-backlight-helper --get-brightness retval: 0
TI:23:00:08 TH:0x1c64a70 FI:gpm-brightness.c FN:gpm_brightness_helper_set_value,144
- executing pkexec /usr/sbin/mate-power-backlight-helper --set-brightness 8 retval: 0
TI:23:00:08 TH:0x1c64a70 FI:gpm-brightness.c FN:gpm_brightness_helper_get_value,113
- executing /usr/sbin/mate-power-backlight-helper --get-brightness retval: 0
TI:23:00:08 TH:0x1c64a70 FI:gpm-backlight.c FN:gpm_backlight_button_pressed_cb,454
- emitting brightness-changed : 80 <------------------------------------------------------------------- P3
TI:23:00:08 TH:0x1c64a70 FI:gpm-backlight.c FN:brightness_changed_cb,644
- on_battery: 0
TI:23:00:08 TH:0x1c64a70 FI:gpm-backlight.c FN:gpm_backlight_brightness_evaluate_and_set,298
- 1. main brightness 0.800000
TI:23:00:08 TH:0x1c64a70 FI:gpm-backlight.c FN:gpm_backlight_brightness_evaluate_and_set,307
- Setting initial brightness level
TI:23:00:08 TH:0x1c64a70 FI:gpm-backlight.c FN:gpm_backlight_brightness_evaluate_and_set,320
- 2. battery scale 1.000000, brightness 0.800000
TI:23:00:08 TH:0x1c64a70 FI:gpm-backlight.c FN:gpm_backlight_brightness_evaluate_and_set,339
- 3. idle scale 1.000000, brightness 0.800000
TI:23:00:08 TH:0x1c64a70 FI:gpm-brightness.c FN:gpm_brightness_trust_cache,561
- using cache for value 80 (probably okay)
TI:23:00:08 TH:0x1c64a70 FI:gpm-backlight.c FN:gpm_backlight_brightness_evaluate_and_set,347
- values are the same, no action
TI:23:00:08 TH:0x1c64a70 FI:gpm-backlight.c FN:brightness_changed_cb,647
- saving brightness for ac supply: 80 <---------------------------------------------------------------- P4
^C
More information about the pkg-mate-team
mailing list