Previous Thread
Next Thread
Print Thread
Linux screen tearing in portrait mode #116880 02/18/20 09:03 PM
Joined: Sep 2014
Posts: 101
P
phulshof Offline OP
Senior Member
OP Offline
Senior Member
P
Joined: Sep 2014
Posts: 101
I'm using MAME on my Linux cocktail setup (Intel HD4400 IPG), using a 16:10 (1920x1200) monitor in portrait mode. Unfortunately, this gives me screen tearing. I've tried different settings, both in MAME and in the graphics driver, in order to get rid of this problem, but while it works just fine in landscape mode (no screen tearing there), I can't seem to get rid of the screen tearing in portrait mode. Is there any way to solve this issue?

Re: Linux screen tearing in portrait mode [Re: phulshof] #116935 02/24/20 05:22 AM
Joined: Mar 2009
Posts: 57
M
mochamame Offline
Member
Offline
Member
M
Joined: Mar 2009
Posts: 57
I don't understand. If you setup mame.ini to use opengl and vsync turned on, then all you should need to do is tell your graphics driver to sync opengl to vblank. I know the ways to do this with nvidia drivers but not Intel, but I'm sure you can find a way.

Re: Linux screen tearing in portrait mode [Re: phulshof] #116938 02/24/20 02:18 PM
Joined: Aug 2008
Posts: 19
R
RomKnight Offline
Member
Offline
Member
R
Joined: Aug 2008
Posts: 19
Not in unix but in windows after same issues a long time ago, i ended up with the following options enabled in mame.ini (and still in use):


waitvsync 0
syncrefresh 1
autoframeskip 0
frameskip 0
seconds_to_run 0
throttle 1
sleep 1
speed 1
refreshspeed 0

I hope this helps.

Re: Linux screen tearing in portrait mode [Re: phulshof] #117004 03/06/20 12:56 PM
Joined: Sep 2014
Posts: 101
P
phulshof Offline OP
Senior Member
OP Offline
Senior Member
P
Joined: Sep 2014
Posts: 101
i'll try out those settings.
I wonder how an LCD in portrait mode prints it pixels though. Does it still print them line by line, and if so: does the order of printing change between portrait and landscape mode? How does MAME print its lines when rotated? Does it take this into account?
I could imagine that if an LCD prints its pixels line by line, but doesn't change it's printing order between landscape and portrait (and why should it?), and MAME prints its line from top to bottom on a rotated screen, that this might cause some tearing. I saw the Windows version supports triple buffering; how does it do that, and is it possible to do the same in Linux?

Re: Linux screen tearing in portrait mode [Re: phulshof] #117005 03/06/20 01:53 PM
Joined: Feb 2004
Posts: 2,145
Vas Crabb Offline
Very Senior Member
Offline
Very Senior Member
Joined: Feb 2004
Posts: 2,145
The actual scan sequence of the panel doesn't change when the screen is in portrait mode. With a few exceptions, the screen doesn't handle the rotation at all, the GPU reads the pixels out in a different order. Some GPUs and drivers don't seem to deal with it well. Back in 2008 at work I had a Quadro that showed bad tearing when scrolling in MS office apps on a screen in portrait mode. It didn't have a problem with the screen in landscape mode. Might just be a bad card/driver you've got.

Re: Linux screen tearing in portrait mode [Re: phulshof] #117006 03/06/20 02:03 PM
Joined: Mar 2001
Posts: 16,499
R
R. Belmont Offline
Very Senior Member
Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 16,499
Syncrefresh is a really bad idea, it makes the game run at the monitor's refresh rate. There are almost zero drivers in MAME where 60 or 70/72/74 Hz is right. Waitvsync is the correct flag; if your graphics driver doesn't respect it (which is unfortunately a thing on Linux), try different -video settings.

Re: Linux screen tearing in portrait mode [Re: phulshof] #117007 03/06/20 02:10 PM
Joined: Sep 2014
Posts: 101
P
phulshof Offline OP
Senior Member
OP Offline
Senior Member
P
Joined: Sep 2014
Posts: 101
Since I'm using an Intel HD 4400 IGP, would it help to switch to Windows for this, or am I likely to run into the same issues there?

Re: Linux screen tearing in portrait mode [Re: phulshof] #117008 03/06/20 02:56 PM
Joined: Mar 2001
Posts: 16,499
R
R. Belmont Offline
Very Senior Member
Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 16,499
Try different -video settings first, and different backend drivers for bgfx. One of them might have the magic the driver wants.

That said, from what Vas said, it's quite possible cards don't bother with vsync when the monitor is in portrait mode.

Re: Linux screen tearing in portrait mode [Re: R. Belmont] #117009 03/06/20 07:26 PM
Joined: Aug 2008
Posts: 19
R
RomKnight Offline
Member
Offline
Member
R
Joined: Aug 2008
Posts: 19
Originally Posted by R. Belmont
Syncrefresh is a really bad idea, it makes the game run at the monitor's refresh rate. There are almost zero drivers in MAME where 60 or 70/72/74 Hz is right. Waitvsync is the correct flag; if your graphics driver doesn't respect it (which is unfortunately a thing on Linux), try different -video settings.



This might explain some WTF moments like the ball in arkanoid collision detection in vaus sides as sometimes I swear I at the right place in time to it the ball.

I'll try waitvsync but isn't it this one that adds input lag by enabling vsync? I need to reread what all those do. Been a while since I've done it.

Anyway as far as tearing goes, i don't notice it with above settings. I may have to decide between tearing, accuracy, lag apparently...

Thanks for the hints.

/edit
Well, syncrefresh or waitvsync have no influence on tearing (for me). I do feel something different in gameplay though, especially in sf2, snowbors... like the games are faster. But i've been wrong before.

Last edited by RomKnight; 03/06/20 11:23 PM.

Who's Online Now
1 registered members (1 invisible), 39 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
ShoutChat Box
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics8,775
Posts115,470
Members4,899
Most Online890
Jan 17th, 2020
Powered by UBB.threads™ PHP Forum Software 7.7.3