Xfce Forum

Sub domains
 

You are not logged in.

#1 2016-04-03 11:12:52

Speranskiy
Member
Registered: 2016-02-02
Posts: 12

Let xfce4-power-manager to respect new settings

Hi there!
I've made a script, that toggles xfce4-power-manager setting using xfconf-query (sleep timeouts). The problem is xfce4-power-manager doesn't see the changes and proceeds to suspend the system. Also I've found that restarting xfce4-power-manager using

xfce4-power-manager --restart

applies the changes.
Is there another way to apply the  power-manager related changes made by xfconf-query?

P.S. I think it's a reason why caffeine doesn't work for me.

Offline

#2 2016-04-03 12:06:57

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,996

Re: Let xfce4-power-manager to respect new settings

That is strange - it should take immediate effect with xfconf-query. Can we do some sanity checks:

ps -ef | grep power-manager
ps -ef | grep xfconfd

You can also run xfce4-power-manager in debug mode to see what happens when you make the change using xfconf-query and when the timeout occurs/should occur:

xfce4-power-manager -q
xfce4-power-manager --no-daemon --debug

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

#3 2016-04-03 12:41:54

Speranskiy
Member
Registered: 2016-02-02
Posts: 12

Re: Let xfce4-power-manager to respect new settings

Hi Toz!
Yes, it's returning errors

TRACE[xfpm-xfconf.c:202] xfpm_xfconf_property_changed_cb(): Property modified: /xfce4-power-manager/dpms-enabled
TRACE[xfpm-dpms.c:200] xfpm_dpms_settings_changed_cb(): Configuration changed
TRACE[xfpm-xfconf.c:202] xfpm_xfconf_property_changed_cb(): Property modified: /xfce4-power-manager/inactivity-on-battery
(xfce4-power-manager:17564): xfce4-power-manager-CRITICAL **: egg_idletime_alarm_set: assertion 'timeout != 0' failed
TRACE[xfpm-xfconf.c:202] xfpm_xfconf_property_changed_cb(): Property modified: /xfce4-power-manager/inactivity-on-ac
(xfce4-power-manager:17564): xfce4-power-manager-CRITICAL **: egg_idletime_alarm_set: assertion 'timeout != 0' failed

Seems like 0 is wrong option to have it set to "Never". If I use GUI it's setting to 14 when I have "Never" chosen. If I set 7 using xfconf-query, I have "Never" in GUI but the system suspends in 7 minutes of inactivity. Let me try 14, but I'm pretty sure it won't work.

Sanity checks: smile

[speranza@mbox ~]$ ps -ef | grep power-manager
speranza 17564 17475  0 15:29 pts/0    00:00:00 xfce4-power-manager --no-daemon --debug
speranza 17608 17598  0 15:30 pts/1    00:00:00 grep --colour=auto power-manager
[speranza@mbox ~]$ ps -ef | grep xfconfd
speranza   903   697  0 11:28 ?        00:00:00 /usr/lib/xfce4/xfconf/xfconfd
speranza 17611 17598  0 15:30 pts/1    00:00:00 grep --colour=auto xfconfd

Offline

#4 2016-04-03 13:29:09

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,996

Re: Let xfce4-power-manager to respect new settings

What happens if you set the value to the far right? 5 or 6 hours. Does that work?

Does "Presentation Mode" work for you" It's intent is to temporarily override pm settings while activated:

Ticking this option temporarily overrides any suspend settings in Power Manager Settings and will prevent interruptions due to inactivity in the course of giving a presentation.

...though I don't believe it started working properly until 1.5.2 and finally fixed in 1.6.0.


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

#5 2016-04-03 13:39:36

Speranskiy
Member
Registered: 2016-02-02
Posts: 12

Re: Let xfce4-power-manager to respect new settings

I checked and found that 14 is disabled but lower numbers works, so 13 is 13 minutes timeout. It's weird.

Offline

#6 2016-04-03 13:58:28

Speranskiy
Member
Registered: 2016-02-02
Posts: 12

Re: Let xfce4-power-manager to respect new settings

"Presentation Mode" works! Thank you for the idea! My script will become much more simpler!

Offline

Board footer

Powered by FluxBB