udlfb - SDL in X every 2-3 seconds blanks


#1

Bernie,

The udlfb driver works great for me except in one scenario - thanks for this!

SDL works great in the console using fbcon & udlfb, but in x.org-fbdev or x.org-displaylink it causes a screen blank to occur consistently every 2-3 seconds. It only happens with an SDL application in lxde or any other window manager. SDL based applications work without fault when not in X.

I have “ReportDamage” on for X - FYI…

TIA!


#2

Hi - Interesting! I haven’t yet tried that scenario (SDL/DirectFB access while X is also running and using the same framebuffer).

It’s interesting, because the SDL portion of the rendering won’t know to report damage. So for that scenario to work, it might be better to turn ReportDamage off, and rely on fb_defio to catch all the framebuffer writes (from both X and SDL) via the same page faulting mechanism.

The latest udlfb has fb_defio enabled by default. And it also has some fixes for intentional screen blanking operations, which may be relevant to what you describe.

You can grab and install the latest udlfb via

 sudo apt-get install module-assistant 
 sudo module-assistant prepare 
 git clone [http://git.plugable.com/webdav/udlfb/](http://git.plugable.com/webdav/udlfb/) 
 cd udlfb 
 make 
 sudo make install 
 sudo depmod -a 

And then set ReportDamage off in xorg.conf.

Can you check if that combination of two changes helps? And if not, can you describe the blanking a little more - is it the whole screen that blanks or just the SDL portion?

Thanks!
Bernie


#3

Bernie you are da’ man!!! Great solution!

Yey!!! The only thing I did was grab the latest udlfb (i’m on http://archlinuxarm.org/ btw so I didn’t use module assistant) as above & set ReportDamage off now all of the SDL applications are non-blanking ones!

(FYI - before it would blank the entire screen not just the SDL area, i also changed monitor to an older one that didn’t have “auto image adjust” which may or not have been related - it blanked more on that monitor with the auto stuff)

including my xorg.conf below for reference in case there was some other setting that could be in play (such as having the “damage” extension off too)

Regardless thank you very very much!

 ################################################# 

 Section "Files" 
ModulePath "/usr/lib/xorg/modules" 
ModulePath "/usr/local/lib/xorg/modules" 
ModulePath "/usr/local/lib/xorg/modules/drivers" 
FontPath "/usr/share/fonts/local" 
FontPath "/usr/share/fonts/misc" 
FontPath "/usr/share/fonts/Type1" 
FontPath "/usr/share/fonts/TTF" 
FontPath "/usr/share/fonts/75dpi" 
FontPath "/usr/share/fonts/100dpi" 
 EndSection 

 Section "Module" 
 Load "ddc" 
 Load "dbe" 
SubSection "extmod" 
Option "omit xfree86-dga" 
EndSubSection 
 Load "dri" 
 Load "extmod" 
 Load "glx" 
 Load "bitmap" 
 Load "type1" 
 Load "freetype" 
 Load "record" 
 #Load "shadowfb" 
 EndSection 

 Section "ServerFlags" 
 Option "AllowMouseOpenFail" "true" 
 #Option "AIGLX" "false" 
 #Option "AutoAddDevices" "false" 
 #Option "AutoEnableDevices" "false" 
 Option "AllowEmptyInput" "true" 
 Option "DontZap" "false" 
 Option "Xinerama" "false" 
 Option "Clone" "false" 
 #Option "BlankTime" "0" 
 #Option "StandbyTime" "0" 
 #Option "SuspendTime" "0" 
 #Option "OffTime" "0" 
 EndSection 

 Section "DRI" 
 Group "video" 
 Mode 0666 
 EndSection 

 Section "Extensions" 
 #Option "DAMAGE" "True" 
 Option "DAMAGE" "False" 
 Option "RENDER" "Enable" 
 EndSection 
 ############### DisplayLink Stuff ############### 

 Section "Device" 
Identifier "DisplayLinkDevice" 
#driver "displaylink" 
driver "fbdev" 
Option "fbdev" "/dev/fb0" 
#Option "ReportDamage" "true" 
Option "ReportDamage" "false" 
 EndSection 

 Section "Monitor" 
Identifier "DisplayLinkMonitor" 
 EndSection 

 Section "Screen" 
Identifier "DisplayLinkScreen" 
Device "DisplayLinkDevice" 
Monitor "DisplayLinkMonitor" 
#SubSection "Display" 
 #Depth 8 
 ##Modes "1280x1024" 
 #Modes "800x600" 
#EndSubSection 
 EndSection 

By the way, I can’t seem to get any OpenGL applications to work, not related to this issue -and I suspect it could be the fact that OpenGL is not supported for displaylink - a known issue . They usually result in :
“UNREACHABLE executed!.” … an error which I’ve never seen before - i did go down the virtualgl road but got another error

./vglrun glxspheres 
 ERROR: ld.so: object 'libdlfaker.so' from LD\_PRELOAD cannot be preloaded: ignored. 
 ERROR: ld.so: object 'librrfaker.so' from LD\_PRELOAD cannot be preloaded: ignored. 
 Polygons in scene: 62464 
 ERROR (584): Could not obtain RGB visual with requested properties 
 terminate called after throwing an instance of 'rrerror' 
 Aborted 

. Just thought I would mention that one too in case you have seen it.


#4