Skip to content

power: Show sleep warning conditional to new GSettings key

Currently, GNOME settings daemon displays a notification warning the user before the sleeping the device. This is generally a very useful feature. However, with the adoption of new platforms in GNOME like phones and tablets, this can be a problem. In such devices, the desired behavior is to sleep as soon as possible and by default. Therefore, having a notification pop-up (which can potentially trigger some other haptic feedback like a LED) just because the device is doing what it is supposed to do (go to sleep) can be problematic.

Since currently there is no reliable way for GNOME settings daemon to detect whether it is running in one of those devices, a new GSettings key to turn on and off the notification behavior has been added. This way, distributions which mainly target these devices such as Mobian and postmarketOS can simply toggle a setting instead of carrying dowstream patches. That would also apply to device-specific images from other distributions that could also simply carry an override.

Closes #656 (closed)

I tried to go with the more general solution that I could think of here. If maintainers believe this is not generic enough, I would be happy to find and implement some more generic solution instead.

Merge request reports