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

[SOLVED] Enable/Disable screensaver in Powerdevil

Tags: None
(comma "," separated)
User avatar
Hans
Administrator
Posts
3304
Karma
24
OS
I use Electric Sheep as screensaver on my netbook, and it's stunning! However, it uses some CPU power when running, so I only want to enable the screensaver when the AC is plugged in (or maybe rather, when the power profile is set to "Performance"); otherwise, the screensaver should either be disabled or set to "Blank".

The question is, is this possible with Powerdevil?

I thought that dbus might be the key here, but couldn't figure out how to manipulate the screensaver options.


Problem solved? Please click on "Accept this answer" below the post with the best answer to mark your topic as solved.

10 things you might want to do in KDE | Open menu with Super key | Mouse shortcuts
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
At this time Powerdevil does not support different screen saver selections. This would definitely be a nice idea though, you might want to file a feature request.

In the interim, if you can figure out how to change the screensaver from a script, then you can probably get Powerdevil to do it that way.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
Hans
Administrator
Posts
3304
Karma
24
OS
I could make a script that runs
Code: Select all
qdbus org.kde.krunner /ScreenSaver SimulateUserActivity


every x seconds, but that feels a little bit hackish. There's also another problem I didn't think of yesterday: I want to lock my screen after y minutes, but then my screensaver is automatically started I think.

So yeah, the best workaround would probably to change the screensaver somehow.

I'll file a bug on Monday, when my exam is over. Got to get away from the computer if I want to get any study done...


Problem solved? Please click on "Accept this answer" below the post with the best answer to mark your topic as solved.

10 things you might want to do in KDE | Open menu with Super key | Mouse shortcuts
User avatar
Hans
Administrator
Posts
3304
Karma
24
OS
Instead of doing a research on how dbus works, I used the easy (and hackish) way:

1. Make two copies of ~/.kde4/share/config/kscreensaverrc. (I added the prefix _powersave and _performance).
2. Modify one to change the screensaver to kblank.desktop (or change other options if you want to).
3. Make two scripts to copy kscreensaverrc_[powersafe/performance] to kscreensaverrc.
4. Make the scrips executable and set Powerdevil to execute respective script a specific power profile is activated.

Of course there are better ways to do this, but since no one's has told me how, this is my temporary solution. ;)


Problem solved? Please click on "Accept this answer" below the post with the best answer to mark your topic as solved.

10 things you might want to do in KDE | Open menu with Super key | Mouse shortcuts


Bookmarks



Who is online

Registered users: Bing [Bot], daret, Google [Bot], sandyvee, Sogou [Bot]