Skip to content

KeyboardBrightnessController: Drop isValid() check for upower interface

Nicolas Fella requested to merge work/nico/keyboard-brightness-dbus into master

isValid() seems to be racy when upower is just starting up (because we DBus-activated it earlier in BatteryController).

This causes us to think keyboard brightness control is not available even when it actually is.

To address this always make a call to the interface. The call will block until the interface is ready to either give us the correct result or we know it's not available because we get a relevant DBus error.

As a bonus print a warning message if we get any unexpected errors

BUG: 486067

Merge request reports

Loading