[Xorg-driver-geode] The update of the "Xorg-geode-screensaver bug"

Cui, Hunk Hunk.Cui at amd.com
Thu May 6 20:38:14 PDT 2010


Hi, 

Binary package hint: xserver-xorg-video-geode
    On Ubuntu and Fedora, when the screensaver is opened and then start(after 1 minute when I set), the screen will be in chaos. Few seconds later, the screen turns to be black as usual. If the user move the mouse or press the key, the screen can not be back again. We can not assure if this bug has been reported in the community.
     You can use the xscreensaver tools link: http://www.jwz.org/xscreensaver/download.html. I don’t suggest use the gnome-screensaver to duplicated the bug on Ubuntu. Because the gnome-screensaver running on startx-desktop. The xscreensaver is a client program running on Xorg. When you installed it, you can run ‘xscreensaver-demo’ to setup the screensaver environment, after exit the demo interface, run ‘xscreensaver -nosplash’ as a Linux common user (su username), it will start the screensaver after some times.
           In my ubuntu workstation environment, when I used the VESA-driver, the phenomenon is normal after wait for 1 minute, if you move the mouse or press the key, the screen can be back again. Once use the Geode-driver, the screen will be in black after wait for 1 minute, if you move the mouse or press the key, the screen can not be back again.
    My xf86-video-geode version is 2.11.7, XServer version is 1.7.1
BTW: Before running the xscreensaver on startx-desktop, If allow any program running on the local machine to access your X server, you must run 'xhost +localhost' , then run 'xscreensaver -command' (as a common Linux user).

    With the debug of xscreensaver (client program). I found that if eschewing “fade to black when blanking”. (the xscreensaver old version <5.0). The screensaver is properly display on Gnome-desktop. The specifically methods is modified the xscreensaver sourcecode (windows.c -> raise_window function). If your xsceensaver version >= 5.0, then you can setup the dialog box “System -> Preferences -> Screensaver -> Advanced”, Not click the “fade to block when blanking” option. If the fading is true (Default: true), then when the screensaver activates, the current contents of the screen will fade to black instead of simply winking out. This only works on certain systems. A fade will also be done when switching graphics hacks (when the cycle timer expires.).
    So through this method and setup, Now the screensaver is properly display on our Geode platform. The next phase, I will research the “fading” function is whether or not affected the parts of geode driver.

            Through compare the ‘fading’ option and ‘not fading’ option, print the Xserver and Geode-driver debugging information on the SSH terminal. I found the ‘fading’ option trigger the Geode-driver (lx_display.c -> lx_crtc_gamma_set function), but the ‘not fading’ option does not trigger this function.
            I had a test, the following change:

static void
lx_crtc_gamma_set(xf86CrtcPtr crtc, CARD16 * red, CARD16 * green,
    CARD16 * blue, int size)
{
    unsigned int dcfg;
    int i;

            DebugP("lx_crtc_gamma_set /by Hunk\n");
#if 0
    assert(size == 256);

    for (i = 0; i < 256; i++) {
            unsigned int val = (*red << 8) | *green | (*blue >> 8);

            df_set_video_palette_entry(i, val);
    }

    /* df_set_video_palette_entry automatically turns on
     * gamma for video - if this gets called, we assume that
     * RandR wants it set for graphics, so reverse cimarron
     */

    dcfg = READ_VID32(DF_DISPLAY_CONFIG);
    dcfg &= ~DF_DCFG_GV_PAL_BYP;
    WRITE_VID32(DF_DISPLAY_CONFIG, dcfg);
#endif
}

After re-make the Geode-driver, when I run the ‘fading’ option, the client program ( xscreensaver ) also print the debugging information about “fading…/ fading done”, now the screensaver is properly display. So through the test, I am sure that the main reason is upper function (lx_crtc_gamma_set). 
The ‘not display screensaver’ bug reason was found.

I will follow it….

Thanks,
Hunk Cui
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-driver-geode/attachments/20100507/33d5d47b/attachment.html>


More information about the Xorg-driver-geode mailing list