To reach 0.1% frame time deviation in RetroArch (120Hz video mode) in frametime on GNU/Linux, simply disable C-STATES and DF C-STATES in BIOS.
On my BIOS (X600TM-ITX motherboard):
- Advanced\AMD CBS\CPU Common Options" and disable both "GLOBAL C-STATES" and "CORE PERFORMANCE BOOST"
- Advanced\AMD CBS\DF Common Options" and disable "DF CSTATES"
If your BIOS doesn't have these options, pass "processor.max_cstate=1" to the kernel to achieve a low-enough deviation around 1.7% which is enough for smooth "Sync to Exact" in well optimized cores like MAME and UAE. You'll still have DF C-STATES active, which are the "Infinity Fabric" C-STATES, but I don't know how to disable that from the Linux side of things.
ORIGINAL MESSAGE
Hi there,
I initially noticed that VSYNC offers perfectly smooth scrolls/movement with RetroArch (GenesisPlusGX core + 240p Test Suite is used for testing) on GNU/Linux + in-kernel AMDGPU + latest stable MESA (25.0.2).
The problem: I noticed that also enabling "Sync to Exact Content Framerate" makes scroll/movement not-so-perfect: there's no tearing, movement is "almost" perfectly smooth... but I see "something" is wrong, like a continuous imperfection in movement that is NOT present if I disable "Sync to Exact Content Framerate".
This happens when using both plain KMS/DRM graphics and also using Wayland (I have zero interest on X11, but X11 does the same thing). So, all in all, Wayland can be ruled out as a culprit here.
There are no processes causing CPU usage spikes. Nothing. This is a very light system where every service that is running has been allowed by me.
This is also using plain ALSA audio ONLY, no PulseAudio or any other audio servers are running here.
This happens in every video frequency I have tried (120hz, 140Hz, 240Hz on the higher-end displays...), except if I set a 60Hz mode and run ~60Hz content: in that case, with "Sync to Exact Content Framerate" enabled, I get perfect scrolls and movement, as good as with plain VSYNC without "Sync to Exact Content Framerate".
Of course that only works for ~60Hz content... 70Hz DOS games can't sync properly because of the 60Hz cap, and PAL/50Hz content doesn't move correctly either, so setting a 60Hz mode is not the solution.
This is with all my available monitors: Viewsonic XG2401, Viewsonic XG2431 and Alienware 2724HF. They all do the exact same thing.
Now, I have noticed that, with a 120Hz video mode, RetroArch detects ~120Hz correctly, but with a frametime deviation of 3.1% by default.
Supposedly, for optimal video sync on RetroArch, a frametime deviation of ~0.1% is desired, as documented in Libretro's "optimal-vsync" guide, so I suspect this deviation is what could be causing the strange "micro-micro-stuttering" I am seeing with "Sync to Exact Content Framerate" activated!
I could take that down to 1.2-1.3% by setting the performance level on my AMDGPU with:
Code: Select all
echo high > /sys/class/drm/card0/device/power_dpm_force_performance_levelI also tried setting the CPU governor to "performance" and verified it was indeed being used, but that made zero improvements, there's no way I can lower the frametime deviation from that 1.2-1.3%! I also asked in the RetroArch discord, but even if I got some nice support, we didn't get to any conclusion. Do you guys have an idea on what could be going on here? What could be getting me that 1.3% frametime deviation at 120Hz on GNU/Linux?

