screen saver for wsdisplay on vesafb and Xorg wsfb?

Matthieu Herrb matthieu.herrb at
Tue Aug 1 08:35:29 PDT 2006

Jeremy C. Reed wrote:
> Following is an email I originally sent to the NetBSD X11 list. If you 
> have any ideas on how I can test a screensaver (to power off display) 
> please let me know. I'd like to find out if I have a problem with Xorg 
> xf86-video-wsfb or with NetBSD's wsdisplay or vesafb or maybe I don't have 
> a problem at all :) - Jeremy
> For two months, I have been using Xorg xf86-video-wsfb driver with 
> NetBSD's wsdisplay(4) on NetBSD's vesafb (missing man page?).
> (vesa not mentioned in wsdisplay(4) either.) This is on i386 NetBSD 
> 3.99.2x.
> I can't turn off my display with xset.
> The wsfb_driver.c has:
>       pScreen->SaveScreen = WsfbSaveScreen;
> which is:
> WsfbSaveScreen(ScreenPtr pScreen, int mode)
> {
>         ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
>         WsfbPtr fPtr = WSFBPTR(pScrn);
>         int state;
>         TRACE_ENTER("SaveScreen");
>         if (!pScrn->vtSema)
>                 return TRUE;
>         if (mode != SCREEN_SAVER_FORCER) {
>                 state = xf86IsUnblank(mode)?WSDISPLAYIO_VIDEO_ON:
>                                             WSDISPLAYIO_VIDEO_OFF;
>                 ioctl(fPtr->fd,
>                       WSDISPLAYIO_SVIDEO, &state);
>         }
>         return TRUE;
> }
> I see WSDISPLAYIO_SVIDEO in /usr/src/sys/arch/i386/bios/vesafb.c.
> How can I troubleshoot why I have no screen blank? What commands can I 
> try?

Normally the console screenblanker uses the same ioctl to activate it 
while in text mode. So if you set display.vblank=on 
display.screen_off=600 using wsconsctl, you should see the console 
screenblanker work when X isn't running.

> (Note that I can screenblank fine using unichrome or via on the same 
> system.)
> Also where are the WSDISPLAYIO_* settings documented?

In the source code. I wish the wscons authors had provided documentation 
  (and also some design documentation), but this was done in an era were 
documentation was optional...

> The screen does turn off when I close the lid (or close most of the way). 
> (With no ACPI in kernel it reboots though.)
> I have no idea if the wsfb "CloseScreen" function is used, but I am 
> guessing it is not as the screen will blank out side of X if lid is closed 
> too.

You mean CloseScreen or SaveScreen ? CloseScreen is meant to be called 
at the end of the X server generation, not  for screen saving. 
SaveScreen may be called by the APM hooks it they are correctly called.

Also when closing the lid, powering down the backlight is normally 
handled by the BIOS (APM or ACPI, or whatever for non-i386 laptops). It 
is possible that bugs/limitations in the BSD apm hooks in the X server 
prevent the BIOS from completing the operation.

I've at least one additional report of laptops running OpenBSD that 
suspend correctly when closing the lid, unless X is running.
Matthieu Herrb
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4033 bytes
Desc: S/MIME Cryptographic Signature
URL: <>

More information about the xorg mailing list