Bug 128610 - kscreensaver does not launch screensaver after x minutes.
Summary: kscreensaver does not launch screensaver after x minutes.
Status: RESOLVED DUPLICATE of bug 75254
Alias: None
Product: kscreensaver
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal with 20 votes (vote)
Target Milestone: ---
Assignee: kscreensaver bugs tracking
URL:
Keywords:
: 129209 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-06-04 11:51 UTC by Sunny Sachanandani
Modified: 2008-05-19 17:59 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sunny Sachanandani 2006-06-04 11:51:25 UTC
Version:           3.5.3 (using KDE KDE 3.5.3)
Installed from:    Ubuntu Packages
Compiler:          gcc 4.0.3 glibc 2.3.6
OS:                Linux

No matter how much time I choose for kscreensaver (I tried 1 minute, 5 minutes as well as 10 minutes.) it does not start automatically. However the Test works fine and so does Locking the screen from KMenu bring up the screensaver when unlocking.
Comment 1 Sunny Sachanandani 2006-06-04 11:53:50 UTC
Well by the way: These are the kubuntu.org packages just released 3 days back.
I even tried purging all screensaver related software and also tried this for a fresh new user with an untouched .kde directory but the bug still persists.

If someone can confirm this here then it might be a KDE bug otherwise I will have to contact the kubuntu guys (since these are unofficial packages.).
Comment 2 Chris Howells 2006-06-04 13:35:51 UTC
Which screensaver? Can you try another one?
Comment 3 Stephan Kulow 2006-06-04 13:44:09 UTC
I have the bad feeling it's caused by my changes ;(
Comment 4 Chris Howells 2006-06-04 13:57:30 UTC
I can reproduce this also actually with any screensaver.
Comment 5 Stephan Kulow 2006-06-04 14:42:29 UTC
SVN commit 548008 by coolo:

tricky. we can't disable the X screensaver ourselves or 
we will think later some program disabled it. 
BUG: 128610


 M  +8 -4      lockeng.cc  
 M  +8 -3      xautolock.cc  


--- branches/KDE/3.5/kdebase/kdesktop/lockeng.cc #548007:548008
@@ -42,9 +42,6 @@
     XGetScreenSaver(qt_xdisplay(), &mXTimeout, &mXInterval,
                     &mXBlanking, &mXExposures);
 
-    // We'll handle blanking
-    XSetScreenSaver(qt_xdisplay(), 0, mXInterval, mXBlanking, mXExposures);
-
     mState = Waiting;
     mXAutoLock = 0;
     mEnabled = false;
@@ -158,6 +155,9 @@
         mXAutoLock->setDPMS(mDPMS);
 	//mXAutoLock->changeCornerLockStatus( mLockCornerTopLeft, mLockCornerTopRight, mLockCornerBottomLeft, mLockCornerBottomRight);
 
+        // We'll handle blanking 
+        XSetScreenSaver(qt_xdisplay(), mTimeout + 10, mXInterval, mXBlanking, mXExposures);
+
         mXAutoLock->start();
 
         kdDebug(1204) << "Saver Engine started, timeout: " << mTimeout << endl;
@@ -170,6 +170,7 @@
 	    mXAutoLock = 0;
 	}
 
+	XSetScreenSaver(qt_xdisplay(), 0, mXInterval, mXBlanking, mXExposures);
         kdDebug(1204) << "Saver Engine disabled" << endl;
     }
 
@@ -291,7 +292,6 @@
     kdDebug(1204) << "SaverEngine: stopping lock" << endl;
     emitDCOPSignal("KDE_stop_screensaver()", QByteArray());
 
-
     mLockProcess.kill();
 
     if (mXAutoLock)
@@ -300,6 +300,7 @@
     }
     processLockTransactions();
     mState = Waiting;
+    XSetScreenSaver(qt_xdisplay(), mTimeout + 10, mXInterval, mXBlanking, mXExposures);
 }
 
 void SaverEngine::lockProcessExited()
@@ -314,6 +315,7 @@
     }
     processLockTransactions();
     mState = Waiting;
+    XSetScreenSaver(qt_xdisplay(), mTimeout + 10, mXInterval, mXBlanking, mXExposures);
 }
 
 //---------------------------------------------------------------------------
@@ -322,6 +324,8 @@
 //
 void SaverEngine::idleTimeout()
 {
+    // disable X screensaver
+    XSetScreenSaver(qt_xdisplay(), 0, mXInterval, mXBlanking, mXExposures);
     startLockProcess( DefaultLock );
 }
 
--- branches/KDE/3.5/kdebase/kdesktop/xautolock.cc #548007:548008
@@ -192,6 +192,7 @@
 
     bool activate = false;
 
+    kdDebug() << now << " " << mTrigger << endl;
     if (now >= mTrigger)
     {
         resetTrigger();
@@ -202,6 +203,8 @@
     BOOL on;
     CARD16 state;
     DPMSInfo( qt_xdisplay(), &state, &on );
+
+    kdDebug() << "DPMSInfo " << state << " " << on << endl;
     // If DPMS is active, it makes XScreenSaverQueryInfo() report idle time
     // that is always smaller than DPMS timeout (X bug I guess). So if DPMS
     // saving is active, simply always activate our saving too, otherwise
@@ -217,9 +220,11 @@
 #ifdef HAVE_XSCREENSAVER
     static XScreenSaverInfo* mitInfo = 0;
     if (!mitInfo) mitInfo = XScreenSaverAllocInfo ();
-    XScreenSaverQueryInfo (qt_xdisplay(), DefaultRootWindow (qt_xdisplay()), mitInfo);
-    if (mitInfo->state == ScreenSaverDisabled)
-	activate = false;
+    if (XScreenSaverQueryInfo (qt_xdisplay(), DefaultRootWindow (qt_xdisplay()), mitInfo)) {
+        kdDebug() << "XScreenSaverQueryInfo " << mitInfo->state << " " << ScreenSaverDisabled << endl;
+        if (mitInfo->state == ScreenSaverDisabled)
+	    activate = false;
+    }
 #endif
 
     if(mActive && activate)
Comment 6 Sunny Sachanandani 2006-06-04 15:41:03 UTC
Thanks for the fix.

Now I have to bug the Kubuntu packagers to repackage kdesktop.


On 4 Jun 2006 12:42:35 -0000, Stephan Kulow <coolo@kde.org> wrote:
[bugs.kde.org quoted mail]
Comment 7 Patrick 2006-06-05 09:13:51 UTC
Sorry, I don't speak Code. But related with the screensaver issue is a problem with the Monitor's Power Saving Settings. When the dafault value of 30 mins is changed it will revert itself again to the default setting with the next boot. KDE ignores the new setting.
So is this related / fixed with this solution or not?

Kubuntu / 3.5.3
Comment 8 Chris Howells 2006-06-05 13:53:36 UTC
Patrick: No, this is unrelated. Please file a new bug report.
Comment 9 Keith Abraham 2006-06-05 14:58:43 UTC
I am also experiencing this bug on my Debian based Kanotix system
using kscreensaver 3.5.2 (kscreen saver is still at 3.5.2 in the
Debian unstable repository).

Given that I'm using kscreensaver 3.5.2 and that on my ssystem most
of the major elements of KDE have been upgraded to 3.5.3 it therefore
appears to me as if something in the recent KDE 3.5.3 upgrades has
broken kscreensaver.

Apologies for not being of greater help other than to indicate that
this bug may not be solely a Ubuntu issue. 
Comment 10 Colin J Thomson 2006-06-10 12:46:25 UTC
Still having a problem with the Screensaver here, FC4 kde-redhat-3.5.3 RPMS. 
Rex applied the above Patch which helped, in that the Screen went "black" after a set period and worked everytime, however none of the Screensavers worked.
So I set "Enable display power management" in Peripherals > Display On and set all options to "disabled" then the Screensaver worked but only once. 
IE the Screensaver works once here after initial login, but there after fails to start.
Comment 11 Cade Robinson 2006-06-12 16:24:43 UTC
I am also getting this in Debian SID with kdesktop 3.5.3-2 and kscreensaver 3.5.3-1.
If I use xscreensaver I can get that to launch but I don't want to use it.
Comment 12 Rex Dieter 2006-06-12 16:43:07 UTC
Colin, please submit a separate bug report.  There seems to be some odd kscreensaver-dpms interaction going on here.
Comment 13 Colin J Thomson 2006-06-12 21:21:27 UTC
Opened a new bug report #129062
Comment 14 Dan Breckenridge 2006-06-13 05:07:40 UTC
I recently upgraded my SuSE 10.0 system to KDE 3.5.3.  Now, my screen saver never kicks-in.  It used to work fine.  I tried the trick above to "enable display power management" and "disable all the options", but it did not work even once for me.  I am running 2 monitors with xinerama.  The only way I can get the monitor to blank is to "enable display power management" and set the standby option to some time (10 minutes).  This actually blanks both of the monitors.  It puts screen 1 in standby and just blanks screen 2.  I don't like this because I have to wait for  screen 1 to warm up again when I want to see it.  Screen 2 displays immediately which is the way they both used to work with kscreensaver and without display power management.
Comment 15 Kris Moore 2006-06-14 00:44:31 UTC
Problem exists under FreeBSD as well. After going from 3.5.2 to 3.5.3, the screensavers simply don't start automatically anymore. The preview / test options work fine. 
Comment 16 Stephan Kulow 2006-06-15 19:17:34 UTC
*** Bug 129209 has been marked as a duplicate of this bug. ***
Comment 17 Halim I 2006-06-15 21:18:59 UTC
Also seen under Slackware-current for all users and multiple screensavers/timers over various systems, but only on 3.5.3, not earlier versions.
Comment 18 Hobbsee 2006-06-27 17:37:29 UTC
Sent patch to Riddell.

Patch should be applied in next version of kubuntu kde 3.5.3 packages.
Comment 19 Sunny 2006-09-19 16:09:51 UTC
The problem appeared again with my latest update to 3.5.4 release 71.1.

The machine is SuSE 10.0 x86_64.

The screensaver starts at the set time (any screensaver), but the suspend and powerdown are never started.

This happens even after restart of KDE, and not other programs running.

There was no problem before the update.
Comment 20 Chris Jenks 2006-10-31 01:01:34 UTC
The screensaver problem persists on KDE 3.5.4-10 on my fresh Fedora Core 6 x86_64 install. The screensaver works properly under Root. On my user account the screen only goes blank after the time to Start Automatically, and the session never locks, unless the Enable Display Power Management box is checked. The screen saver works properly if this box is checked, and Standby after, Suspend after and Power off after can all be disabled.
Comment 21 Chris Jenks 2006-11-01 00:42:29 UTC
An update: Today my yum update downloaded a new version of KDE (3.5.5-0.2), so I thought this bug might be fixed. No, it isn't, and I was mistaken when I said that the bug is absent under root. I tracked the problem down to these lines in ~/.kde/share/config/kcmdisplayrc:

[DisplayEnergy]
displayEnergySaving=false
displayPowerOff=60
displayStandby=0
displaySuspend=30

  When a user account is first created, these lines are absent from kcmdisplayrc and the screensaver/session locking work properly. If Display Power Management is enabled, these lines are generated in kcmdisplayrc with displayEnergySaving set to true, and the screensaver/session locking continue to work properly. If the Display Power Management is then disabled, the lines are retained in kcmdisplayrc but displayEnergySaving is set to false - and this causes the screensaver to fail to start and the session to not be locked. All that happens is that the screen goes dark at the time the screensaver should start.

  Yours,

    Chris
Comment 22 Dmitri Koulikoff 2007-01-17 10:38:59 UTC
In my case ~/.kde/share/config/kcmdisplayrc cotains only two lines:
[$Version]
update_info=kcmdisplayrc.upd:kde3

But the behavior is the same: only black screeen and no lock.
Comment 23 Oswald Buddenhagen 2007-05-18 21:35:35 UTC
oh, yeah
Comment 24 Oswald Buddenhagen 2007-05-18 21:35:47 UTC

*** This bug has been marked as a duplicate of 75254 ***