How can I switch power profiles in KDE (Powerdevil) via DBUS/qdbus?

0

I want to switch power profiles in Powerdevil (the Power Management interface in KDE 4) between "Presentation" and "Performance" (default) from the command line.

Basically, I need this to disable screen locking/saver while watching a movie with vlc; vlc uses xdg-screensaver to disable the screensaver, but this apparently does not affect the Powerdevil profile (should it?) mplayer for example, is not affected by this, because it triggers manual keypresses (which has other drawbacks though).

It is probably possible via DBUS/qdbus, but I have not found anything.

blueyed

Posted 2010-08-26T10:44:07.670

Reputation: 1 071

Answers

1

A little googling found this:

qdbus org.kde.powerdevil /modules/powerdevil setProfile Profilename

but cannot test now (i'm on Gnome at work)...

Or you can assign a keyboard shortcut/input action to switch profiles if everything else fails ...

Mr Shunz

Posted 2010-08-26T10:44:07.670

Reputation: 2 037

qdbus org.kde.powerdevil /modules/powerdevil setProfile Presentation works. Thanks! – blueyed – 2010-09-03T19:43:44.390