Bug 299367

Summary: KDE's screensaver does not "listen" to Inhibit Dbus command.
Product: [Unmaintained] kscreensaver Reporter: firewalker <firew4lker>
Component: generalAssignee: kscreensaver bugs tracking <kscreensaver-bugs-null>
Status: RESOLVED UNMAINTAINED    
Severity: normal CC: arthur, clearmartin, firew4lker, matteorr, oliver.henshaw
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description firewalker 2012-05-04 12:44:50 UTC
When playing a movie with a player like vlc, smplayer e.t.c. screen saver starts after it's timeout reached. Actually KDE does not listen to Inhibit Dbus commands. 

E.g. The following command doesn't prevent the screensaver from starting.

dbus-send --session --print-reply --dest=org.freedesktop.ScreenSaver /ScreenSaver  org.freedesktop.ScreenSaver.Inhibit string:xxxx string:"Testing D-Bus Interface"

Or

qdbus org.freedesktop.ScreenSaver /ScreenSaver org.freedesktop.ScreenSaver.Inhibit "xxxx" "Testing D-Bus Interface"

Where xxxx: I tried Window ID (0x220001a for example), PID, Window title.

After the time out the screen saver will pop up.

If I run qdbus org.freedesktop.ScreenSaver /ScreenSaver org.freedesktop.ScreenSaver.Lock the screen saver will start locked. So I believe that the issue is with the Inhibit method. 


Reproducible: Always

Steps to Reproduce:
1. Issue the inhibit Dbus command, or start a movie with vlc.
2. Wait for the screensaver timeout.
Actual Results:  
Screensaver started.

Expected Results:  
Screensaver shouldn't have started.

http://forum.kde.org/viewtopic.php?f=66&t=100920&p=221384#p221384
Comment 1 matteorr 2012-09-04 23:41:43 UTC
I am having the same issue.  Neither totem nor Caffeine prevent screen from turning off.
Comment 2 Oliver Henshaw 2013-03-08 16:30:58 UTC
1. Media players should use the org.freedesktop.ScreenSaver interface - see https://trac.videolan.org/vlc/ticket/7824 for vlc (fixed in the upcoming 2.1) and http://bugzilla.mplayerhq.hu/show_bug.cgi?id=1887 for mplayer (seems to have stalled).

2. The qdbus method won't work because the inhibition only lasts until qdbus exits and so disappears from the session bus. The Inhibit-calling process needs to stay alive and on the session bus for the duration of the movie.

Perhaps you could use the battery applet or per-activity power management in the meantime? See http://drfav.wordpress.com/2011/10/04/power-management-a-new-screencast/ for example.
Comment 3 Oliver Henshaw 2013-03-08 16:32:07 UTC
(In reply to comment #1)
> I am having the same issue.  Neither totem nor Caffeine prevent screen from
> turning off.

I'm not sure about totem but I think Caffeine should work. Can you re-test both in kde 4.10?
Comment 4 firewalker 2013-03-08 17:07:46 UTC
Just for extra info. How can someone keep it alive on the system bus?
Comment 5 Martin Kostolný 2013-09-07 11:18:03 UTC
SMPlayer is successfully inhibiting screensaver since KDE version 4.10 (or sooner). VLC has still the issue. I'm using KDE 4.11.0. I don't know about Caffeine (is that the inhibit screen saver panel applet?) - I use "Enable Power Management" checkbox on battery popup to do the work.
Comment 6 Andrew Crouthamel 2018-09-04 04:06:43 UTC
Hello! Sorry to be the bearer of bad news, but this project has been unmaintained for many years and I will be closing this bug. Please re-test and file a new bug with kscreenlocker if the issue persists.