This forum has been archived. All content is frozen. Please use KDE Discuss instead.

command line to enable/disable automatic suspend

Tags: None
(comma "," separated)
luebking
Karma
0
For instance, but you could als try unloading powerdevil and if that fails (the dbus calls return a boolean) enter the loading branch of your script:

Code: Select all
if `qdbus org.kde.kded /kded unloadModule powerdevil`;  then
   # powerdevil was loaded, is now gone
   xset dpms 360 480 480
   xset +dpms # do dpms the xorg way
else
   # powerdevil was stopped, restart it
   qdbus org.kde.kded /kded loadModule powerdevil
fi


Whether you need powerdevil or not is hard to say
I don't use it on my Desktop PC because xdpms works nicely for the screen and the tower shall please not suspend just because i left for a coffee while letting it do some highload CPU job - ie. i've no interest in this box suspending automatically (different from a notebook or tablet where battery is crucial and you might simply forget to power it down)
novazur
Registered Member
Posts
41
Karma
0
OS
I tried that. I thought it worked but... When I unload module, I let the PC and when I come back, I find it suspended, and when I resume, I can see the the powerdevil module is loaded. I don't know what loads the module automaticaly...
(I hope you will understand what I mean)
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
After running the unloadModule command, please run "qdbus org.kde.kded /kded loadedModules" and see if Powerdevil is present in that list.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
novazur
Registered Member
Posts
41
Karma
0
OS
bcooksley wrote:After running the unloadModule command, please run "qdbus org.kde.kded /kded loadedModules" and see if Powerdevil is present in that list.

Already verified that, it is not loaded... That's why I speak about something that loads it after...
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Hm, that would require explicit action on the application's behalf, as Powerdevil is a "Startup service" meaning it won't be started on demand.
After you have unloaded Powerdevil, do you access it's configuration module, or anything else which otherwise allows you to control Powerdevil (such as the Battery applet).


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
novazur
Registered Member
Posts
41
Karma
0
OS
bcooksley wrote:After you have unloaded Powerdevil, do you access it's configuration module, or anything else which otherwise allows you to control Powerdevil (such as the Battery applet).

I don't think. Not volontary.
I just run my script to unload module. Verify if not loaded, then leave the PC. And when I come back, i find it suspended. And when I resume, I find module loaded, of course (?).

I'll do a new try to be sure.
novazur
Registered Member
Posts
41
Karma
0
OS
novazur wrote:I'll do a new try to be sure.


I tried again, and this time, no suspend... but, session/screen lock (!?!)
I'll try again several times, and see...
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Can you please ensure that no screen saver is enabled elsewhere, which may be configured to lock the screen?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
novazur
Registered Member
Posts
41
Karma
0
OS
bcooksley wrote:Can you please ensure that no screen saver is enabled elsewhere, which may be configured to lock the screen?


I'll check that, even if i'm sure i never configured any screen saver... And the screen lock, I only had that 1 time.
novazur
Registered Member
Posts
41
Karma
0
OS
After several trys, I can say that I think that's the updates of kde which load the module, so suspend is enable again.
Of course, I don't update kde in each gentoo update, so I don't have this problem each time.
So, unloading this module is not a perfect solution for me, but I don't have better for the moment...

Editing config would be the solution, but reloading it doesn't work each time as mentionned in viewtopic.php?f=66&t=117836&p=301043&hilit=kwriteconfig#p300962.
novazur
Registered Member
Posts
41
Karma
0
OS
novazur wrote:After several trys, I can say that I think that's the updates of kde which load the module, so suspend is enable again.


Not true. I just unloaded powerdevil module to start updates, without any kde update, and I found my PC suspended.
I don't know what to think...
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
It is possible that the module isn't unloading fully. Try disabling the module through System Settings, then logging out and back in again.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
luebking
Karma
0
Not true. I just unloaded powerdevil module to start updates, without any kde update, and I found my PC suspended.


Well, it may be the update process itself?
colinw
Registered Member
Posts
13
Karma
0
Hi - I asked a similar question and was referred to this thread. Although it's two years later, I believe the issues I'm having fit in as a logical continuation of this thread. So..

I am using kde5 and plasma shell. powerdevil is installed on my (debian) system, but does not seem to be loaded. In fact, I only see two loaded modules:
>qdbus org.kde.kded /kded loadedModules
networkstatus
ktimezoned

also:
>qdbus org.kde.kded /kded loadModule powerdevil
false

>qdbus org.kde.kded /kded unloadModule powerdevil
false

Any ideas? My system settings include a Suspend Session option under "Energy Saving", which works fine. My goal is the same as novazur's.
luebking
Karma
0
You need to operate on org.kde.kded5 ;-)


Bookmarks



Who is online

Registered users: Bing [Bot], gfielding, Google [Bot], Sogou [Bot]