You are not logged in.
Hi
Can someone clarify how applications can make requests for screensaver and power management inhibition? Sometimes I see in Xfce power manager's menu an item stating that my web browser is currently inhibiting power management and
$ xfce4-screensaver-command -q
tells
The screensaver is inactive
The screensaver is being inhibited by:
Application="xfce4-power-manager"; Since="2021-04-29T19:36:58+03"; Reason="Inhibit requested";
BTW, it would be great, if inhibition would be shown in the panel without opening power manager's menu.
Offline
Does xfce4-power-manager have some automatic mechanism to inhibit DMPS when playing video? Or does it depend on player?
Offline
Can xfce4-power-manager inhibit XScreenSaver, too?
Offline
Can someone clarify how applications can make requests for screensaver and power management inhibition?
A dbus call by the application making a request for the power manager to inhibit power management. A good tool to see this in action is d-feet. For example:
- d-feet viewing session bus, org.xfce.PowerManager, org.freedesktop.Inhibit interface. Note that there are 4 methods that can be called:
- Double-click on the "Inhibit" method, add in the two parameters it is looking for ("my app","testing inhibit") and press Execute (make note of the "method output" value):
- xfce-power-manager showing myapp inhibiting power management:
- Double-click the Unhibit method, enter in the value from above and press Execute:
- xfce4-power-manager is not longer being inhibited:
Sometimes I see in Xfce power manager's menu an item stating that my web browser is currently inhibiting power management
I believe chrome/chromium does, firefox doesn't, it is using the dbus method to do so.
and
$ xfce4-screensaver-command -q
tells
The screensaver is inactive
The screensaver is being inhibited by:
Application="xfce4-power-manager"; Since="2021-04-29T19:36:58+03"; Reason="Inhibit requested";
xfce4-power-manager can inhibit xfce4-screensaver in the same manner. Note that the org.xfce.Screensaver interface also has an Inhibit method:
BTW, it would be great, if inhibition would be shown in the panel without opening power manager's menu.
You could create an enhancement request for this feature.
Does xfce4-power-manager have some automatic mechanism to inhibit DMPS when playing video? Or does it depend on player?
Both. xfce4-power-manager has a "Presentation Mode" that does just that. Also, any app can inhibit power management via above. Some already do - I believe vlc has an option. xfce4-power-manager also has a hidden heartbeat-command setting. Its not well documented but discussed here.
Can xfce4-power-manager inhibit XScreenSaver, too?
I'm not sure, its been a while since I've used xscreensaver. You could use the heartbeat-command from above.
Personally, I just enable Presentation Mode when I need to prevent the screensaver/power saving features. I have it bound to a keyboard shortcut to toggle it on/off and it displays an icon in the panel when it is enabled.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Oh, how does it display an icon on panel when presentation mode is enabled?
Offline
Right-click the Power-Manager plugin and select Properties. Make sure that "Show Presentation Mode Indicator is selected. Then use this command to toggle its state (you can bind it to a keyboard shortcut):
xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/presentation-mode -T
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Oh, the Presentation Mode Indicator is available in PM version 1.7.0, but I am using an older one. No wonder I did not find it.
Offline
I wonder which bus and interface video players use when they want to inhibit? I did not find org.freedesktop.ScreenSaver using d-feet. They might not know anything about Xfce.
EDIT: there is summary on how some current audio/video players and such do inhibition and how current XScreenSaver deals with them:
https://github.com/Zygo/xscreensaver/bl … -systemd.c
Last edited by jarnos (2021-05-16 14:45:02)
Offline
EDIT: there is summary on how some current audio/video players and such do inhibition and how current XScreenSaver deals with them:
https://github.com/Zygo/xscreensaver/bl … -systemd.c
That's a good link to describe the complexities around the issue.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
[ Generated in 0.015 seconds, 7 queries executed - Memory usage: 557.72 KiB (Peak: 574.56 KiB) ]