Open requested to merge guidog/phosh:hotspot-inhibit into main
Introduce a manager object that can track different systems and add/remove inhibitors as needed. As a first action add an inhibitor when we're acting as a wifi hotspot as both are common on mobile: quick suspend and use as hotspot:
$ systemd-inhibit WHO UID USER PID COMM WHAT WHY NetworkManager 0 root 917 NetworkManager sleep NetworkManager needs to turn off networks ... foo 1000 foo 472926 phosh sleep WiFi hotspot active
The new class is also a good seed for adding device dependent policy e.g.: when on device
a that lacks feature
b during suspend then add an inhibitor (see https://source.puri.sm/Librem5/OS-issues/-/issues/272). The feature list could live in gmobile.
Marked as draft as only mildly tested. It would be nice to only inhibit if there's also devices connected to the hotspot.
@Jarrah this could be a base for !1173 (comment 1630959)