Xfce Forum

Sub domains
 

You are not logged in.

#1 2011-11-21 08:36:15

kiran.majer
Member
Registered: 2011-11-04
Posts: 11

xfce power manager dbus inhibit - does it work?

Does anybody know if inhibition of the power manager via dbus is possible? I'm using Xfce Power Manager 1.0.10, the org.freedesktop.PowerManagement.Inhibit.HasInhibit method returns false and the Inhibit/UnInhibit method don't seem to work.

Background: I'm writing a small script, which monitors the cpu usage of certain processes (like libflash). If the cpu load excesses a given threshold, monitor power management (and screen savers) will be paused, until cpu usage is back to the idle level.
I can control the standard dpms features and the screen saver e.g. with xset. But I can not control advanced features like dimming or automatic suspend/hibernate.

Offline

#2 2012-01-16 18:15:44

thomask
Member
Registered: 2012-01-04
Posts: 2

Re: xfce power manager dbus inhibit - does it work?

Have you found a solution to inhibit xfce4-power-management programmatically?

Offline

#3 2012-01-24 08:32:01

kiran.majer
Member
Registered: 2011-11-04
Posts: 11

Re: xfce power manager dbus inhibit - does it work?

thomask wrote:

Have you found a solution to inhibit xfce4-power-management programmatically?

Unfortunately not, at least not via dbus. According to  http://wiki.xfce.org/releng/4.10/roadma … er-manager the dbus service has to be (re)implemented.
So maybe one could use xconf-query to change the corresponding power-manager settings (didn't find them yet) or use a brute force kill-and-restart approach (not very nice).

Offline

#4 2015-02-15 19:13:13

cworth
Member
Registered: 2014-10-21
Posts: 2

Re: xfce power manager dbus inhibit - does it work?

Not with dbus, but the following does what I want. Here is an example to change the amount of time before sleep when plugged in:

>xfce4-power-manager-settings --> System --> Drag slider to 34 minutes

>cat .config/xfce4/xfconf/xfce-perchannel-xml/xfce4-power-manager.xml | grep 34
    <property name="inactivity-on-ac" type="uint" value="34"/>

>xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/inactivity-on-ac
34

Set it to 20 minutes:
>xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/inactivity-on-ac -s 20

Notes: the config file is not updated for 5-10 seconds after making the change.  You may have to close and re-open xfce4-power-manager-settings to see the updated value.  Setting a value of zero to prevent sleep/hibernation did not work for me, but setting a large value did.

Last edited by cworth (2015-02-19 16:38:16)

Offline

Board footer

Powered by FluxBB