Conversation
xfce4-power-manager implements org.freedesktop.PowerManagement.Inhibit by disabling DPMS, which powers a blanked panel back on. Every scheduled refresh therefore lights the monitor of an idle machine, and it stays lit for a full DPMS timeout afterwards. Use a logind block inhibitor on Xfce instead. It blocks sleep and shutdown with no display side effects, and the fd is released automatically if we exit unexpectedly. Falls back to the old interface if logind is unavailable.
Member
|
I'd like to hold off on this for a month or so until we start evaluating packages for the next Mint release. We'll probably ship the newer Xfce (4.20+), and it looks like there are improvements in power management there. We may even be able to use Gtk.Application.inhibit/uninhibit() instead of calling a session manager ourselves (commit a6a9f57 made mintupdate a GApplication. It's trivial to use GtkApplication instead). We may still end up needing both logind and session manager involvement, but I want to wait until we have a clearer picture (and a usable desktop to test on). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1093.
On Xfce the inhibitor calls
org.freedesktop.PowerManagement.Inhibit, which xfce4-power-managerimplements by disabling DPMS. Disabling DPMS powers a blanked panel back on, so a scheduled refresh
lights the monitor of an idle machine every couple of hours, and it stays lit for a full DPMS
timeout after the refresh finishes.
This takes a logind
sleep:shutdownblock inhibitor on Xfce instead — same protection, no displayside effects — and falls back to the existing interface if logind is unavailable. The inhibitor fd
is also released automatically if we exit unexpectedly.
Measured on Mint 22.3 Xfce with the panel off, from inside the graphical session: connector held
Offfor 25 s with the inhibitor active (X idle 892 s -> 917 s),xset qreports DPMSEnabled,and
systemd-inhibit --listshowsmintupdate ... shutdown:sleep block. Before the patch the sametest had the panel back on 0.2 s after
Inhibitwith DPMSDisabled.