Do not perform a synchronous DBus call to update the brightness in real time when the slider move, because at least on some hardware the call is slow, which leads to the UI bogging down and looking frozen.
To fix this, cap the update rate in response to slider motion. This makes the brightness apply slightly slower, but prevent most bogging down (if the rate is well chosen, at least).
Ideally we would perform asynchronous DBus calls, but:
We should still not spam the bus anyway, so it's orthogonal to the fix here
That's IMO something that would better be done after migrating from dbus-glib to GDBus, as the GDBus APIs are different (and nicer), and thus would somewhat double the work necessary (and make the migration harder).
To test this, you need dimable hardware supported by mate-power-manager ("most" laptops should work). Then, open the slider of the Brightness applet, and drag it up and down with the mouse. Without this patch, you might get a weird experience where the slider jumps seemingly erratically, depending on your hardware (about ⅔ of the laptops I manager to try out were impacted). With this patch, moving the slider should be smooth, whichever hardware you have.
Do not perform a synchronous DBus call to update the brightness in real time when the slider move, because at least on some hardware the call is slow, which leads to the UI bogging down and looking frozen.
To fix this, cap the update rate in response to slider motion. This makes the brightness apply slightly slower, but prevent most bogging down (if the rate is well chosen, at least).
Ideally we would perform asynchronous DBus calls, but:
To test this, you need dimable hardware supported by mate-power-manager ("most" laptops should work). Then, open the slider of the Brightness applet, and drag it up and down with the mouse. Without this patch, you might get a weird experience where the slider jumps seemingly erratically, depending on your hardware (about ⅔ of the laptops I manager to try out were impacted). With this patch, moving the slider should be smooth, whichever hardware you have.