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

Disable suspend or change value from the command line

Tags: None
(comma "," separated)
User avatar
Gen2ly
Registered Member
Posts
6
Karma
0
OS
Hello, I'm working on a script so that I can watch movies without the computer screen blanking or the computer going to sleep. I've figured out how the do the former but I need to learn how to do the later. I'd like to be able to disable suspend or change it's value from the command line. I was hoping that somebody knows how to do this??? Thank you.
User avatar
JanGerrit
Moderator
Posts
647
Karma
3
OS
If you use KDE 4 try
Code: Select all
qdbus org.kde.powerdevil /modules/powerdevil setProfile <Profilename>


Replace <Profilename> with the name of a preconfigured profile you added (I think there's something like this called "Presentation" or something similar)


Image
User avatar
Gen2ly
Registered Member
Posts
6
Karma
0
OS
Hmm, good thinking, JanGerrit. Hadn't thought of that. I'd like to be able to write this script generically so that other people can use it to. Came across today that dbus has an inhibit command i can use. Not the same thing but looks like powerdevil doesn't have the ability to disable power management.

Code: Select all
qdbus org.freedesktop.PowerManagement /org/freedesktop/PowerManagement \
  org.freedesktop.PowerManagement.Inhibit.Inhibit


Probably will have to use this instead then.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
The FreeDesktop Power Management interface is likely similar to MPRIS, and is therefore probably provided by Powerdevil ( it appears to be on my system... )


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]