Skip to content

power: Do not compute percentage on keyboard disappearing

Phaedrus Leeds requested to merge fix-errors-on-kbd-unplug into master

When the module in charge of the keyboard backlight is rmmod-ed, upower emits a new signal to communicate to gsd that we don't have backlight anymore. This signal is carrying (value == -1, max == 0). In this case we do not want to calculate the new brightness.

Signed-off-by: Carlo Caione

Note 2020-09-03: Based on discussion on the Endless bug tracker, the steps to reproduce this are to unplug a Filco USB keyboard from a Mission One, but perhaps it's applicable on other hardware as well. The original PR for this was - mwleeds

Edited by Phaedrus Leeds

Merge request reports