2022-08-24 10:31:56

by Bastien Nocera

[permalink] [raw]
Subject: "Powered" transitional state

Hey,

We're running into problems in GNOME in more recent times with changes
in Bluetooth adapter power either taking a long time, or sometimes
failing. To that end, I added a new "state" API in gnome-bluetooth that
I'll also need to replicate in bluez.

My idea would be to add a property to the org.bluez.Adapter1 interface:

string PowerState

The power state of an adapter.

The power state will show whether the adapter is turning off,
or turning on, as well as being on or off.

Possible values:
"on" - powered on
"off" - powered off
"turning-on" - transitioning from "off" to "on"
"turning-off" - transitioning from "on" to "off"

This should allow any program to show the transitional state, not just
the one that requested the change, and will also show transitional
states that were the results of other system changes, like rfkill
changes.

Any comments before I start working on implementing this?

Cheers