power: Do not compute percentage on keyboard disappearing
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 <email address hidden>
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 https://github.com/endlessm/gnome-settings-daemon/pull/43
- mwleeds
usb-protection: Relax the whitelist to all HIDs and HUBs
We discriminate keyboards when the screen is locked, i.e. we allow them
so that the user can input their password.
But when the keyboard is behind a hub, e.g. the laptop on a docking
station, then the keyboard does not work.
The mouse is probably also commonly used to unlock the screen before
typing the password.
Because this protection is enabled by default, and we don't want to get
in the way of the user and their session, with this commit we expand the
class of allowed devices to all HIDs and HUBs.
Stricter protection features might be evaluated in the future.