Bug 111655

Summary: Screensaver and DPMS turn on while slide showing
Product: [Frameworks and Libraries] kdelibs Reporter: Alexander Darovsky <adarovsky>
Component: kdeuiAssignee: Aaron J. Seigo <aseigo>
Status: CONFIRMED ---    
Severity: wishlist CC: agateau, djarvie, faure, frederic.coiffier, kde-bugs, kde-bugzilla, l.lunak
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: a patch which solves screensaver and DPMS issues

Description Alexander Darovsky 2005-08-28 18:09:22 UTC
Version:           1.2.0 (using KDE 3.4.2, Gentoo)
Compiler:          gcc version 3.3.4 20040623 (Gentoo Linux 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6)
OS:                Linux (i686) release 2.6.12-gentoo-r6

When slide show mode is on, Gwenview does not turn off screensaver and DPMS, and this results in a bit annoying screen blanking.

This problem is pretty easy to solve, and below I will attach a small patch. The solution is taken from Kaffeine. Gwenview will just simulate a key press in a minute interval via XTest extension, if it's available.
Comment 1 Alexander Darovsky 2005-08-28 18:12:33 UTC
Created attachment 12410 [details]
a patch which solves screensaver and DPMS issues

The patch is created against release 1.2.0. I have no possibility to check out
latest CVS or SVN version, but I hope it could be applied...
Comment 2 Lubos Lunak 2005-09-14 16:32:19 UTC
Do they really do that? That's a horrible hack.
Comment 3 Alexander Darovsky 2005-09-14 19:31:35 UTC
Yes. I have copied it almost letter by letter.

I think, this is a solution. We can turn off KDE screen saver and DPMS using API, but we can not guarantee that it will work in eny environment. For example, MPlayer tries to turn off KDE screensaver and X screensaver, and turn off DPMS while playing. I have no idea if it will work in Gnome, for example. If the program is to be used in any environment, emulating a keypress seems to be an universal solution.
Comment 4 Frédéric COIFFIER 2006-10-13 16:17:10 UTC
This problem isn't solved in gwenview 1.4.0
If the hack is too horrible, maybe the use of the KDE API (I don't know if this one exists) could be an acceptable solution.
In any way, a slideshow, which is stopped after 5 minutes because of screensaver, is not very useful.
Comment 5 Daniel Hahler 2007-05-09 21:29:05 UTC
Confirmed for gwenview 1.4.1 / KDE 3.5.6.
Comment 6 Daniel Hahler 2007-05-09 22:30:27 UTC
JFI: in KDE 4 KPresentationControls should get used to fix this.
Comment 7 Frédéric COIFFIER 2009-07-18 13:31:18 UTC
Tested with KDE 4.3rc2 : During a slideshow, the screen doesn't standby.
But it still suspends.
Comment 8 Aurelien Gateau 2009-08-12 12:23:29 UTC
Since KDE 4.3, Gwenview uses KNotificationRestrictions [1] to block the screensaver. Therefore I reassign the bug to kdelibs.

[1]: http://api.kde.org/4.x-api/kdelibs-apidocs/kdeui/html/classKNotificationRestrictions.html
Comment 9 David Faure 2009-11-13 20:55:16 UTC
knotificationrestrictions.cpp seems to be maintained by Aaron, re-assigning.
(and indeed the file doesn't mention DPMS anywhere)
Comment 10 Christoph Feck 2010-09-01 00:01:00 UTC
*** Bug 181585 has been marked as a duplicate of this bug. ***