You are not logged in.

#1 2014-02-03 10:14:40

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,420

[FIXED!] tearing in sdl (GL) apps

Problem:
If you have compositing extension enabled, sdl 1.2 based opengl apps will produce tearing unless you manage to disable backing store.

Causes:
* In the past SDL relied on the environment variable: SDL_VIDEO_X11_BACKINGSTORE to enable backing store functionalities.
* Now SDL asks X server if it supports backing store extension, and X server says "YES!" even if backing store is disabled in xorg.conf, but composite extension is enabled.

Solution:
The arch sdl package now has the patch, so this thread is useless.

Install https://aur.archlinux.org/packages/sdl-nobackingstore/
it will bring the environment variable functionality back into sdl and disable backing store by default.

if you want backingstore back, then run (before launching the sdl app):

export SDL_VIDEO_X11_BACKINGSTORE=1

if you want to disable it again, or you want to be sure it is disabled, run (before launching the sdl app):

unset SDL_VIDEO_X11_BACKINGSTORE

References:
https://devtalk.nvidia.com/default/topi … disabled-/
https://bugs.freedesktop.org/show_bug.cgi?id=74158
https://bugzilla.libsdl.org/show_bug.cgi?id=2383

Last edited by kokoko3k (2014-09-28 07:11:20)


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#2 2014-02-06 17:35:12

minasmax
Member
Registered: 2014-02-06
Posts: 2

Re: [FIXED!] tearing in sdl (GL) apps

I can confirm that this works for me with XBMC.

Offline

#3 2014-02-12 20:14:47

Awebb
Member
Registered: 2010-05-06
Posts: 6,602

Re: [FIXED!] tearing in sdl (GL) apps

This does not work for me in xbmc. What am I doing wrong? I installed the patched packagepackage and set the variable in the .xinitrc before executing xbmc-standalone.

Offline

#4 2014-02-13 01:47:03

Vash63
Member
Registered: 2012-09-22
Posts: 30

Re: [FIXED!] tearing in sdl (GL) apps

This works for me on Intel graphics with XBMC. Awebb, I believe having the variable enabled is similar to just not patching it - if you want to test the fix, don't set the variable or unset it if it's already set.

Offline

#5 2014-02-13 21:46:57

Awebb
Member
Registered: 2010-05-06
Posts: 6,602

Re: [FIXED!] tearing in sdl (GL) apps

Oh,you are right, I misread that part. This is what you get for fixing stuff, when it is time for you to be in bed smile

Offline

#6 2014-02-14 00:02:55

bleomycin
Member
Registered: 2012-10-23
Posts: 20

Re: [FIXED!] tearing in sdl (GL) apps

Thank you! This solved my xbmc tearing under intel! Is this a permanent solution or will I need to install sdl again at some point?

Offline

#7 2014-02-14 10:35:07

Awebb
Member
Registered: 2010-05-06
Posts: 6,602

Re: [FIXED!] tearing in sdl (GL) apps

Until SDL and/or X are fixed, you will need to patch and install SDL like this for every SDL update. I don't even know if there already is a bug report at either projects.

Offline

#8 2014-02-14 16:31:36

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,420

Re: [FIXED!] tearing in sdl (GL) apps

I submitted this  (just edited the first post):
https://bugzilla.libsdl.org/show_bug.cgi?id=2383
But by now nobody seems to care, maybe you could add youselves to the cc list...


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#9 2014-02-21 07:54:47

hplgonzo
Member
Registered: 2012-05-10
Posts: 3

Re: [FIXED!] tearing in sdl (GL) apps

@kokoko3k

thanks a lot for this workaround.
i can finally use xbmc again.

Offline

#10 2014-03-05 09:08:11

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,420

Re: [FIXED!] tearing in sdl (GL) apps

So, it seems that at least sdl wouldn't need an upgrade anymore.
The bug has been marked has wontfix because they don't have plans to release another 1.x sdl version.
But the fix will be in sdl 2.x release which will be compatible with the 1.x branch.


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#11 2014-03-07 11:53:57

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: [FIXED!] tearing in sdl (GL) apps

I see that the SDL_VIDEO_X11_BACKINGSTORE patch has gone into Fedora.

Offline

#12 2014-03-08 13:33:11

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,420

Re: [FIXED!] tearing in sdl (GL) apps


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#13 2014-03-17 19:47:47

Xenphor
Member
Registered: 2011-07-01
Posts: 47

Re: [FIXED!] tearing in sdl (GL) apps

This problem affects mame as well but the package fixed it.

Offline

#14 2014-05-13 07:08:53

Xenphor
Member
Registered: 2011-07-01
Posts: 47

Re: [FIXED!] tearing in sdl (GL) apps

I was wondering, does this also affect the 32 bit library as well? A lot of games use 32 bit libraries so that could be an issue.

Offline

#15 2014-05-13 09:15:27

firekage
Member
From: Eastern Europe, Poland
Registered: 2013-06-30
Posts: 623

Re: [FIXED!] tearing in sdl (GL) apps

Xenphor wrote:

This problem affects mame as well but the package fixed it.

I'm not an expert when it comes to patching system or kernel. I have a question - i need only to install this package from aur by yapurt -S <package name> and it will be fixed? In post number one this is the suggested metod. I would like to be sure of what i'm going to do.

Also, this tearing is in sdl apps - smplayer, for an exmaple? Video tearing?

Last edited by firekage (2014-05-13 09:17:02)

Offline

#16 2014-05-13 10:30:43

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,420

Re: [FIXED!] tearing in sdl (GL) apps

@Xenphor:
When i did the package, i was on 32bit, so yes, it affects 32bit library too.

@firekage:
Yes, you just need to install the aur package.
smplayer can use sdl as a backend, so it may affect it too.


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#17 2014-05-13 16:08:46

Xenphor
Member
Registered: 2011-07-01
Posts: 47

Re: [FIXED!] tearing in sdl (GL) apps

So is there a variable I can use to have the pkgbuild install the 32bit version as well or do I have to edit it somehow?

Offline

#18 2014-05-13 16:23:03

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,420

Re: [FIXED!] tearing in sdl (GL) apps

Another PKGBUILD has to be made for lib32-sdl-nobackingstore by changing gcc parameters and library install path.
...i could try to make one in my spare time

-edit
Maybe tomorrow (maybe) smile

Last edited by kokoko3k (2014-05-13 16:24:14)


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#19 2014-05-13 17:30:46

Xenphor
Member
Registered: 2011-07-01
Posts: 47

Re: [FIXED!] tearing in sdl (GL) apps

That's cool.

Last edited by Xenphor (2014-05-13 17:45:37)

Offline

#20 2014-05-14 07:02:47

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,420

Re: [FIXED!] tearing in sdl (GL) apps


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#21 2014-05-15 05:26:54

Xenphor
Member
Registered: 2011-07-01
Posts: 47

Re: [FIXED!] tearing in sdl (GL) apps

cool thanks.

Offline

#22 2014-06-23 08:44:33

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,420

Re: [FIXED!] tearing in sdl (GL) apps

.

Last edited by kokoko3k (2014-06-28 11:35:30)


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

Board footer

Powered by FluxBB