pkexec mate-power-backlight-helper --set-brightness ... should update the value for the brightness applet
Actual behaviour
The applet remembers the previous value before mate-power-backlight-helper was called, so changing it via either the slider or scrolling over the icon results in a sudden jump of brightness (the latter with the recent scroll fix PR).
However, pressing the brightness keys on the laptop does keep the value in sync with the applet.
Steps to reproduce the behaviour
set brightness via applet (or via dedicated brightness keys) to 100%
run pkexec mate-power-backlight-helper --set-brightness 200 (i.e. set to a low value; max is over a thousand for me)
mouse over the icon and start to scroll down, or press the down key when the applet popup is open
instead of reducing the brightness from an already low value it jumps up to near 100% first and starts to reduce it from there
MATE general version
1.26.0
Package version
1.26.0
Linux Distribution
Ubuntu 22.04.1 LTS
Link to bugreport of your Distribution (requirement)
I logged in successfully from https://bugs.launchpad.net/ubuntu-mate/+bugs but then it asked me to log in again, which failed with the same saved password. But I'm happy to add a PR for this after some guidance.
How would one go about fixing this exactly? Is it possible to send a dbus message from gpm-backlight-helper.c to update the applet value? Or should we read the current actual brightness first before changing the value with the applet each time? Or perhaps update it only when the mouse hovers over the applet icon?
Expected behaviour
pkexec mate-power-backlight-helper --set-brightness ...
should update the value for the brightness appletActual behaviour
The applet remembers the previous value before
mate-power-backlight-helper
was called, so changing it via either the slider or scrolling over the icon results in a sudden jump of brightness (the latter with the recent scroll fix PR).However, pressing the brightness keys on the laptop does keep the value in sync with the applet.
Steps to reproduce the behaviour
pkexec mate-power-backlight-helper --set-brightness 200
(i.e. set to a low value; max is over a thousand for me)MATE general version
1.26.0
Package version
1.26.0
Linux Distribution
Ubuntu 22.04.1 LTS
Link to bugreport of your Distribution (requirement)
I logged in successfully from https://bugs.launchpad.net/ubuntu-mate/+bugs but then it asked me to log in again, which failed with the same saved password. But I'm happy to add a PR for this after some guidance.
How would one go about fixing this exactly? Is it possible to send a dbus message from
gpm-backlight-helper.c
to update the applet value? Or should we read the current actual brightness first before changing the value with the applet each time? Or perhaps update it only when the mouse hovers over the applet icon?