Linux Screen "Tearing"

General area for talk about ZSNES. The best place to ask for related questions as well as troubleshooting.

Moderator: ZSNES Mods

Post Reply
kbocek
New Member
Posts: 8
Joined: Thu Nov 08, 2007 7:22 pm

Linux Screen "Tearing"

Post by kbocek »

I've got zsnes 1.51 compiled and running on a couple of CentOS 4 & 5 boxes. However I'm seeing some screen "tearing" on some animations and full-screen scrolls. For example, the swinging pendulum that opens Chrono Trigger shows some tearing. I've done my research and tried various video modes and zsnes filters but am at a loss at what to try next.

Both were configured with:

Code: Select all

$ ./configure --enable-release --disable-cpucheck --disable-debugger --enable-libao force_arch=i686
OpenGL is enabled and these are pretty powerful Core 2 Duo hosts with recent Nvidia drivers installed.

Can anyone make any suggestions on what to try next?

Thanks,
Kirk Bocek
Starman Ghost
Trooper
Posts: 535
Joined: Wed Jul 28, 2004 3:26 am

Post by Starman Ghost »

Try enabling vsync or triple buffering.
[code]<Guo_Si> Hey, you know what sucks?
<TheXPhial> vaccuums
<Guo_Si> Hey, you know what sucks in a metaphorical sense?
<TheXPhial> black holes
<Guo_Si> Hey, you know what just isn't cool?
<TheXPhial> lava?[/code]
kbocek
New Member
Posts: 8
Joined: Thu Nov 08, 2007 7:22 pm

Post by kbocek »

Thanks for the reply Starman. Yes, I had seen this suggestion posted previously. What I really need is some Linux- or Nvidia-specific advice.

In the case of the Nvidia proprietary driver the setup should be as follows.

Add to /etc/profile:

Code: Select all

export __GL_SYNC_TO_VBLANK=1
Add to /etc/X11/xorg.conf:

Code: Select all

Section "Device"
     ...
     Option  "TripleBuffer"  "true"
EndSection
Restart X.

However, I've done these steps and am still seeing the tearing.

Any Nvidia experts out there who might have any suggestions?
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

If you have compiled using SDL 1.2.10 or later, you can toggle VSync in ZSNES, assuming your video card actually adheres to VSync.
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
kbocek
New Member
Posts: 8
Joined: Thu Nov 08, 2007 7:22 pm

Post by kbocek »

I thought the snes vsync option was Windows-only. I don't see any such option in the generated configuration files. Where is it located?
Starman Ghost
Trooper
Posts: 535
Joined: Wed Jul 28, 2004 3:26 am

Post by Starman Ghost »

I don't know much about the linux port, but it can probably be accessed via the gui in options/video and in the filters tab.
[code]<Guo_Si> Hey, you know what sucks?
<TheXPhial> vaccuums
<Guo_Si> Hey, you know what sucks in a metaphorical sense?
<TheXPhial> black holes
<Guo_Si> Hey, you know what just isn't cool?
<TheXPhial> lava?[/code]
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

kbocek wrote:I thought the snes vsync option was Windows-only. I don't see any such option in the generated configuration files. Where is it located?
I'm trying to recall if I added this pre or post 1.51.

Never mind, it was added post 1.51.
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
kbocek
New Member
Posts: 8
Joined: Thu Nov 08, 2007 7:22 pm

Post by kbocek »

Deathlike2 wrote: I'm trying to recall if I added this pre or post 1.51.

Never mind, it was added post 1.51.
So what's the plan on the next release then?

:P
Agozer
16-bit Corpse | Nyoron~
Posts: 3534
Joined: Sun Aug 01, 2004 7:14 pm
Location: Nokia Land

Post by Agozer »

The plan is that it will be released. Just wait.
whicker: franpa is grammatically correct, and he still gets ripped on?
sweener2001: Grammatically correct this one time? sure. every other time? no. does that give him a right? not really.
Image
DancemasterGlenn
Veteran
Posts: 637
Joined: Sat Apr 21, 2007 8:05 pm

Post by DancemasterGlenn »

Agozer wrote:The plan is that it will be released. Just wait.
I'm pretty sure the last stable revision had vsync... you could give that a try.
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

I honestly don't think the new revision will fix this, even what I have added post 1.51. If your video card isn't enforcing vsync by default, then it is your video card that is at fault.

For the sake of reference people, this is the SDL (pretty much anything but Windows/DOS) version and many things don't quite apply to every port.
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
grinvader
ZSNES Shake Shake Prinny
Posts: 5632
Joined: Wed Jul 28, 2004 4:15 pm
Location: PAL50, dood !

Post by grinvader »

Well, you could also say our code is at fault.

Except it's not our code and it royally stinks compared to the winport.
So heh.
皆黙って俺について来い!!

Code: Select all

<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
kbocek
New Member
Posts: 8
Joined: Thu Nov 08, 2007 7:22 pm

Post by kbocek »

DancemasterGlenn wrote: I'm pretty sure the last stable revision had vsync... you could give that a try.
Groovy. I'm back to my previous question. Where is the vsync option located in the config files?

I see the vsync option in the Windows port. Where is it in the linux version?
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

What version of SDL are you using? Consider updating it or use an older stable version.
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
kbocek
New Member
Posts: 8
Joined: Thu Nov 08, 2007 7:22 pm

Post by kbocek »

Deathlike2 wrote:What version of SDL are you using? Consider updating it or use an older stable version.
I'm running zsnes on two different hosts. One is CentOS 4 with SDL 1.2.7. I don't know if I can upgrade without breaking other X apps.

The other is CentOS 5 with SDL 1.2.10. It still displays the tearing artifacts.

I am still unclear whether or not there is a vsync switch within the linux version. Some seem to say yes, but can't tell me where it is located.
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

kbocek wrote:
Deathlike2 wrote:What version of SDL are you using? Consider updating it or use an older stable version.
I'm running zsnes on two different hosts. One is CentOS 4 with SDL 1.2.7. I don't know if I can upgrade without breaking other X apps.

The other is CentOS 5 with SDL 1.2.10. It still displays the tearing artifacts.

I am still unclear whether or not there is a vsync switch within the linux version. Some seem to say yes, but can't tell me where it is located.
AFAIK, VSync is enforced at all times, prior to SDL 1.2.10.

Anyways, my history is a bit off.

ZSNES 1.50 or later when compiled with SDL 1.2.10 will allow ZSNES to take advantage of SDL's OpenGL VSync toggle.

A GUI+cfg toggle option was added post ZSNES 1.51 (r4808), which can be obtained via SVN, however, don't complain to us if the audio is borked (assuming you paid no attention to any of the existing threads). Check ~/.zsnes/zsnesl.cfg for the option.

A quick google of the problem shows that there may have been an SDL/OpenGL/VSync issue with SDL's code itself, therefore you need to update your SDL libs to 1.2.12 (including dev libs if you are compiling).
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
kbocek
New Member
Posts: 8
Joined: Thu Nov 08, 2007 7:22 pm

Post by kbocek »

Deathlike2 wrote: A GUI+cfg toggle option was added post ZSNES 1.51 (r4808), which can be obtained via SVN, however, don't complain to us if the audio is borked (assuming you paid no attention to any of the existing threads). Check ~/.zsnes/zsnesl.cfg for the option.
Hey, I never complain when people are giving freely of their time for cool projects like zsnes.

I'll keep on eye on future zsnes releases and see what I can find about SDL. So far all the games I've tried have been very playable. The tearing has been minimal. I'm mostly trying to recreate the perfect console experience. :D
DancemasterGlenn
Veteran
Posts: 637
Joined: Sat Apr 21, 2007 8:05 pm

Post by DancemasterGlenn »

kbocek wrote:I'm mostly trying to recreate the perfect console experience. :D
bsnes?
orwannon
Rookie
Posts: 12
Joined: Fri Jan 21, 2005 11:08 pm

Post by orwannon »

DancemasterGlenn wrote:
kbocek wrote:I'm mostly trying to recreate the perfect console experience. :D
bsnes?
No, byuu's doing that. ;)
DancemasterGlenn
Veteran
Posts: 637
Joined: Sat Apr 21, 2007 8:05 pm

Post by DancemasterGlenn »

orwannon wrote:
DancemasterGlenn wrote:
kbocek wrote:I'm mostly trying to recreate the perfect console experience. :D
bsnes?
No, byuu's doing that. ;)
Haha.
Farad'n

Post by Farad'n »

I had the exact same problem and I solved it by using the driconf program to enable vsync.

http://dri.freedesktop.org/wiki/DriConf

The property is called "Synchronization with vertical refresh" and I chose "Always synchronize...". The tearing is gone now.

I use the open source ATI drivers with ZSNES 1.51. I don't know if it works with the Nvidia drivers, but it might.
Post Reply