Build Your Own Arcade Controls Forum

Software Support => GroovyMAME => Topic started by: Doozer on February 11, 2017, 12:30:56 am

Title: Groovymame - Groovy Arcade - Linux Xorg issue
Post by: Doozer on February 11, 2017, 12:30:56 am
If you are making regular upgrades to your Linux distribution, refrain yourself from upgrading to xorg-server-1.19.x version. The latest X versions does not handle the V-sync redraw properly.

The latest Xorg server working without issue with GM is v1.18.4.

If you still need to use Xorg 1.19x version, you have to enable the ShadowPrimary option in xorg.conf (see example below). The impact on input latency is negligible. Measured latency is 2 to 3 frames.

Quote
Option "ShadowPrimary" "boolean"

    This option enables a so-called "shadow primary" buffer for fast CPU access to pixel data, and separate scanout buffers for each display controller (CRTC). This may improve performance for some 2D workloads, potentially at the expense of other (e.g. 3D, video) workloads. Note in particular that enabling this option currently disables page flipping. The default is off.

Code: [Select]
Section "Device"
    Identifier "Radeon"
    Driver "radeon"
    Option "ShadowPrimary" "on"
EndSection

<@admin, can this thread be flagged sticky?>
Title: Re: Groovymame - Groovy Arcade - Linux Xorg issue
Post by: Calamity on February 11, 2017, 06:58:22 am
Great news Doozer!

How did you measure input latency? Those 2 to 3 frames are absolute total latency or relative the usual on Linux?
Title: Re: Groovymame - Groovy Arcade - Linux Xorg issue
Post by: Doozer on February 11, 2017, 08:43:44 am
Latency has been measured with a 1000 Hz hid device with a led wired to the input (a key press lights the led). With a 120 frames/s camera I did several captures with different games. Results are showing at least 1 frame better than in the past (1 year old). No idea from where it is coming from, but it is going the right way.

There is also new rendering mechanisms available to speed up 2D drawing and eliminate tearing within the X server. But I have not seen any test showing the benefits.