Version: (using KDE KDE 3.2.2) Installed from: SuSE RPMs OS: Linux I was trying to write an KRadeonSaver screensaver which should turn off the backlight on laptops with Radeon Mobility GPU-s. However, it seems to me that currently there is no mechanism which would signal the screensaver when it should (or is about to) exit. I have tried to turn the backlight on in destructor of my class derived from KScreenSaver class, but I have found that it isn't called when terminating the screensaver. Am I missing something, or this can become an legitimate feature request? :)
It's not very well documented (as in, not at all), but what when screen saver ends, it sends a SIGTERM signal to the actual screen saver process (your process). You need to implement a SIGTERM handler to catch the signal and do whatever it is you need to do before ending. Having said that, there is a serious race condition bug that I just reported (bug 81380) which may very well kill your process before you have a chance to completely clean up.
*** This bug has been marked as a duplicate of 81380 ***