SDL reports wrong refresh rate (Linux)?

I’m making a game in SDL and I’ve been banging my head against the wall trying to figure out where stutters are coming from.

I’m on Linux using a combination of compton/ForcePipelineComposition/vsync. No matter what combination I tried, I couldn’t eliminate the stutters I was experiencing with a simple sprite moving across the screen.

If I pull up xrandr, I see that my two monitors are listed at:
1920x1200 59.95

SDL is reporting this as 60 fps. I suspect this might be causing issues, but I’m not entirely sure.

Is it possible SDL would report the wrong FPS that could result in attempted to vsync to a different refresh rate?

If it really is locking to the display’s refresh rate, it won’t matter if SDL thinks it’s 60 when it’s really 59.95, so long as you’re basing the time step in your game on how long it’s actually taking between frames (which can vary) instead of hard coding to 60.

The refreshrate you get from SDL is an integer, so it can’t return 59.95 - 60 is actually pretty accurate, I think I’ve seen it reporting 59 before (at least on Windows? I don’t remember the details)