Check out our Monthly Survey Page to see what our users are running.
Bad (perceived) frame pacing on AMDGPU when vsync is turned off inside games
Page: 1/3»
  Go to:
ridge 29 Oct 2022
Using KDE Plasma and the open source AMDGPU driver, same kernel now as then (Arch's zen kernel package), just to get that out of the way first.

But yeah, this is an odd one, back when I was using an Nvidia card (GTX 1060) with its proprietary driver, I would limit my framerate and turn off vsync, just to shave off a little input lag when playing games. The perceived frame pacing would be smooth and everything was fine. Tearing doesn't really bother me all that much.

When I later switched to an AMD GPU (RX 6700 XT), I noticed that whenever I'm not using vsync in games, I will get periodic microstutters. Doesn't matter if I'm limiting my framerate, or whether I'm logged into the X11 or Wayland session; the latter which has (some sort of?) forced vsync, I'm aware.
But anyway, they both get that stutter anyway, it's disabling vsync inside of the games that make it happen, regardless whether the game is a native or Windows build.

This was obviously not the case on my Nvidia hardware, so what gives? Anyone know what's different and if I can make it work the way I used to have it? That is, disabling vsync in games while keeping the frame-pacing smooth in conjunction with a framerate limiter.

Cheers!

Edit: Just tried gamescope, no dice :S In fact, it adds input lag.

Edit 2: 60hz, framerate itself doesn't drop, and it happens with both limited (66 is my usual limit) and unlimited framerates. Will be experimenting with Mesa's different present modes soon 😊

Last edited by ridge on 31 Oct 2022 at 6:17 am UTC
This topic has an answer marked - jump to answer.
Kuduzkehpan 29 Oct 2022
i had nvidia gpu and i have screen tearing whatever vsync is on of off.
switched to Rx 6750xt no screen tearing no issues so far. Performance is also high with all desktop effects are on. Ultra settings @1080p 60 stable fps at most games. ofc amdgpu opensource drivers are in use.
could you use gpu cpu info tools for debug. heat speed etc. so we can figure it out. have fun
DefaultX-od 29 Oct 2022
Damn, good on me that I've got Nvidia 3060 Ti! I have never trusted AMD, to be honest...
But that's on the GPU side of things, but what about their CPUs? Have you noticed anything suspicious? Do you put your PC in the sleep mode? Do you use VMware, is it working with AMD CPU? I'm asking because I was thinking about buying theirs since it cost less than Intel, but performance seems to be the same.
ridge 30 Oct 2022
could you use gpu cpu info tools for debug. heat speed etc. so we can figure it out. have fun

Yeah of course, my bad :)
I've done some monitoring while playing before and nothing crazy, temps are fine (always under 60C on both CPU and GPU), usually set my GPU profile to "3D_FULL_SCREEN" when playing games, but they still stutter in the default boot state. Again, only with vsync set to off inside games.

With vsync, the GPU is absolutely fantastic. 1080p screen here as well, playing most of my games with high settings, a lot of them supersampled. Battlefield 5 at ultra with 200% resolution scale is absurdly good.

Other than that I'm not entirely sure what else you need to know, CPU and GPU usage is also fine, not too low and not maxed out (as expected from the older titles I play).

asking because I was thinking about buying [AMD's cpu] since it cost less than Intel, but performance seems to be the same.

Nothing but happy with my AMD CPUs throughout the years! Though, and sorry, but I can't compare much to Intel since my last Intel processor was an i5-760 hahah.

I don't use sleep mode, I just turn my PC off when I go to sleep for the night. Sleep mode works fine though, I tested it once or twice, no issues.

VMware works swimmingly with my AMD CPU, both the Ryzen 7 7700X and Ryzen 5 5600H on my laptop. Always use VMware for Paint.net and Vegas Pro. If you're looking to go for one of the Ryzen 5000 CPUs (assuming that because of cost); go for it! If you're thinking about a Ryzen 7000 processor, I say wait a bit, the cost of entry when buying all new parts is way too high. Fantastic CPU though, and I don't regret getting it, I'm even aircooling it just fine. Was a fantastic upgrade from the Ryzen 5 2600.
Kuduzkehpan 30 Oct 2022
i had stop using İntel after p4 3ghz-ht cpus. Thus there were celeron cpu with low cost and low speed but has more performance than at same genaration original intel cpus because of that celeron cpu had has 3mb L1 cache memory so codes processed faster than any intel cpu at that time. But then company find that why celeron has more potential than intel cpu L1 L2 L3 cache memories. than they just removed reduced size of memories on celeron cpus. So thats just devil action for me.
why a company reduces own cpus power while not loosing any money by that way ?? İ switched to amd 939 socket cpus and my journay has begun. these days amd cpu more efficient than intel in any way. Virtualizations+processing+rendering multitusking.
And back to point; it seems driver related issue. could you downgrade your open source drivers ? or install properiatary drivers ? and try
if they stutters too ?
kodatarule 30 Oct 2022
Is the issue present if you enable gamemode ? I remember when I had AMD that this was happening as the default Mesa profile is set to power save and doesn't flip to performance when you fire up a game(gamemode will do that for you)
ridge 30 Oct 2022
Is the issue present if you enable gamemode ?

Aye, another one I missed, just gotten so used to it running with all my game shortcuts. I also set the GPU profile to 3D_FULL_SCREEN next to that. Gamemode doesn't do that for me, but I know that's an issue with RDNA2 that AMD needs to figure out.

could you downgrade your open source drivers ? or install properiatary drivers ?

Good catch, will experiment with this when I find the time.

Last edited by ridge on 30 Oct 2022 at 7:56 pm UTC
Shmerl 31 Oct 2022
What kind of microstutters? Does framerate drop to some very low values?

I'm using RX 6800 XT and haven't noticed such kind of issue (KDE Wayland session), i.e. GPU is usually fully loaded with something like Cyberpunk 2077.

I also usually disable vsync in games and limit framerate (with libstrangle if game doesn't have a built in limiter) to monitor refresh rate - 1 (179 in my case).

I also have adaptive sync with LFC though, so that helps avoid tearing.

I don't enable any GPU overclocking settings - all defaults.

If you have some strange behavior you can reproduce consistently with something, you can report a bug I suppose to AMD drm bug tracker.

Last edited by Shmerl on 31 Oct 2022 at 5:47 am UTC
ridge 31 Oct 2022
Does framerate drop to some very low values?

The frame rate itself doesn't drop, oddly enough, it's just like it's an issue with the delivery of them. Extremely tiny stutters that are just big enough to notice, the pacing of the frames end up feeling weird, even if a frametime graph suggests otherwise. Even in X11 without compositing.

Normally I'd shrug this off with "well, vsync is off so I guess that's why frames are being delivered weird", but I'm so curious as to how my Nvidia card managed to deliver smooth, non-stuttery presentation without vsync 😁

Edit: In my case, just a good old 60hz monitor, no freesync

Last edited by ridge on 31 Oct 2022 at 5:49 am UTC
Shmerl 31 Oct 2022
Well, stutter by definition means that framerate drops during that. I.e. you get let's say 60 fps most of the time and suddenly for a brief moment it drops to 10 fps. Or to phrase it in different terms, your frametime (time between displayed frames) spikes to higher value, which you see as stuttering image.

You can use some HUD graph like Mesa Vulkan overlay to observe the value of framerate and frametime and log the above and then look into some patterns.

Also, with 60 Hz, make sure you don't limit it to 60 fps but to 59. Unlike vsync logic, limiting on the edge of refresh rate will cause some breaking. So limit it to minus one.

Last edited by Shmerl on 31 Oct 2022 at 5:53 am UTC
ridge 31 Oct 2022
You can use some HUD graph like Mesa Vulkan overlay to observe the value of framerate and frametime and log the above and then look into some patterns.

Is Mesa's vulkan overlay any different than MangoHud's graphs? I'll put it on my todo, cheers.
Shmerl 31 Oct 2022
Is Mesa's vulkan overlay any different than MangoHud's graphs? I'll put it on my todo, cheers.

Haven't used Mango HUD, but I think it was forked from Mesa Vulkan overlay and diverged into its own direction.

But similar idea I suppose. If Mango HUD can log the values you need - you can use that all the same for analysis.

Last edited by Shmerl on 31 Oct 2022 at 5:56 am UTC
ridge 31 Oct 2022
But similar idea I suppose. If Mango HUD can log the values you need - you can use that all the same for analysis.

Yeah I've been using MangoHud's frame time graph and logging functionality, which check out, no spikes upwards.

I usually limit to 66FPS by the way, but that's just a habit I got from using Nvidia's "fast sync" on Windows years ago, where any frames delivered before the next refresh are discarded (bloody fantastic solution that was, wish we had that).

Unlimited framerates exhibit the same issue. I've updated the main post thanks to your good questions.
Will try 59fps as my limit, thanks! :)

Last edited by ridge on 31 Oct 2022 at 6:01 am UTC
Shmerl 31 Oct 2022
You can also play around with Vulkan present mode I suppose. It's something you can override and it's more comprehensive logic than vsync idea.

Search about MESA_VK_WSI_PRESENT_MODE usage here: https://docs.mesa3d.org/envvars.html

Details on logic here: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkPresentModeKHR.html

Last edited by Shmerl on 31 Oct 2022 at 6:04 am UTC
Shmerl 31 Oct 2022
Oh, wait. I just realized - you have no adaptive sync! So limiting to 59 won't be good for you. Try limiting to 60 exactly then. Anything else will be causing tearing for sure.

Or instead of limiting try using one of the alternatives to vsync from those present modes. I think one of them is similar to what AMD call "enhanced sync".

Last edited by Shmerl on 31 Oct 2022 at 6:13 am UTC
Shmerl 31 Oct 2022
There was some discussion here: https://www.gamingonlinux.com/forum/topic/5185/
ridge 31 Oct 2022
Oh, wait. I just realized - you have no adaptive sync!

Oh, right! Yeah didn't think about that myself either but it makes sense now that you bring it up haha. Not worried about tearing BTW.

Or instead of limiting try using one of the alternatives to vsync from those present modes. I think one of them is similar to what AMD call "enhanced sync".

Yeah, saw your link; had no idea about these envvars! Gonna experiment with those when I have time 😁 Really appreciate it.
ridge 25 May 2024
Hi! Long time no see =)

Today I updated to Plasma 6.1 Beta and Mesa 24.1, and sure enough, frame pacing is OK now with vsync off!
Turns out implicit synchronisation was the problem all along, explicit sync was the solution. Very happy about this development.

Suppose that solves the thread at long last. Thanks to everyone who posted educated inputs.
Shmerl 26 May 2024
About better frame pacing, amdgpu buddy allocator improvements were also merged and should come out in Linux 6.10. I've been using these patches over 6.8 and 6.9 so far.
zastrix 29 May 2024
Hey hey! I've been banging my head around this for the last few days.

How did your stutter look like? Was it always stuttery or does it happen in an (not exactly set) interval? Like once every 10-30 seconds?

Currently running fedora kinoite 40, but I did manage to overlay the 6.10 kernel and run mesa-git inside steam flatpak (although I'm not sure if it works correctly). KDE is 6.0.5 which should have the explicit sync implementation.

If your stutter was always happening I'm planning to get an SSD to just temporarily install ArchLinux (which as you can guess is not something I'd want to do for a small test :D).

At least for me the framegraphs were smooth on both MangoHud and DXVK_HUD.
Shmerl 30 May 2024
6.10 has the buddy allocator fix, so that helps.
While you're here, please consider supporting GamingOnLinux on:

Reward Tiers: Patreon. Plain Donations: PayPal.

This ensures all of our main content remains totally free for everyone! Patreon supporters can also remove all adverts and sponsors! Supporting us helps bring good, fresh content. Without your continued support, we simply could not continue!

You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
Login / Register