Saturday, November 24, 2007

xcalib and Linux screen savers - Part 2

In my recent post I recommended to use the notification methods of the screen savers for reloading the LUTs when the screen saver unblanks. I got a report that the method below does not work with the gnome screen saver - probably because of a problem in gnome screen saver.

The question is: what did gnome screen saver wrong - I don't know (I haven't tested it myself) but I guess it's a timing problem and the way gnome screen saver activates and deactivates. All the following applies only to gnome screen saver and not to e.g. xscreensaver. When the screen saver blanks it dims the screen to fade to the nice graphics that appear little later. For this fading the screen saver uses the LUTs - ouch - they were altered by xcalib for a reason before! When the user moves the mouse, the screen saver fades again to the desktop. At the same time it sends the message via D-Bus that it unblanks and xcalib can step in with the script, mentioned in the previous post. However, fading has not finished and at its end the LUTs are set to their default value.

One solution for this is to add a delay in the script of the previous post so that xcalib is started when the screen saver has finished its unblanking task.
The other solution is to apply a patch that is mentioned here which saves the LUTs inside gnome screen saver and reloads them when unblanking is finished. I hope this patch is integrated into gnome screen saver so we don't have to worry about these problems anymore.