KDE Desktop Sharing(krfb), RealVNC Viewer, screen savers.

openSUSE 12.2 (x86_64)

When using RealVNC Viewer as a client to connect to KDE Desktop Sharing(krfb-4.8.5-2.4.1.x86_64) things work as expected. However, if a screen saver has been set(blank screen in this case), the VNC session does not properly reset or disengage the screen saver. The VNC session lights up the screen, but the screen goes dark/blank again within seconds resulting in a slow and extremely annoying flashing of the VNC session. The VNC session is unusable like this.

If the screen saver is disengaged by activity at the actual server console then the VNC session becomes stable, as it should be.

I have tried disabling the screen saver, via the KDE configuration, while this blinking is occurring, but the blinking continues. If the screen saver is disabled prior to it blanking the screen, as when it is disabled at the console, the VNC session behaves properly. However, the VNC session should work properly regardless of screen savers.

Has anyone else seen this? Is there a fix?

Yes, I have observed the exact same behavior using Kubuntu 12.04. I was able to find a workaround/fix by using xdg-screensaver to suspend the screensaver.

Since the VNC session is virtually unusable with the screen blanking still active, I used the following steps to log in remotely via ssh to run the necessary xdg-screensaver command:

  1. In the remote shell, set the DISPLAY variable to that of the console session (usually ‘:0.0’):

    $ DISPLAY=:0.0

Note: You must be logged in as the same user logged in on the console in order for this to work.

  1. Run ‘xlsclients -l’ to find a WindowID that can be passed to the ‘xdg-screensaver suspend’ comand. Choose the WindowID of an existing window which will remain in existence for the duration of the suspension. (See the xdg-screensaver(1) man page.)

  2. Run ‘xdg-screensaver suspend <WindowID>’. For example, if the WindowID is 0x1e00012, the command is:

    $ xdg-screensaver suspend 0x1e00012

Note: It may be necessary to turn off the screensaver by running ‘xdg-screensaver reset’ before running the suspend command.

You may also wish to run ‘xdg-screensaver resume <WindowID>’ to re-enable the screensaver and any associated screen locking at the end of your VNC session.

Hope this helps.