Hi guys. Having some very specific issues with framerate and vsync in Godot 4

Let me outline my setup. I have three GPU's, connected to four monitors. I have:
GTX 1080ti - connected to PC CRT set to 85/120/240hz (main), and 144hz monitor (secondary)
Intel iGPU (i5 12600k) - connected to 60hz plasma
ATI Radeon HD 2400 - connected to 59.94hz CRT TV (15khz ntsc)

With vsync enabled, only the main monitor syncs properly. I tested multiple refresh rates, it doesn't matter, it just syncs to the primary monitor. Any display set to primary sync (mostly) right.

With my 85hz set as primary, the 60hz and 59.94hz TVs both have 85fps limits, and the 144hz monitor has 60fps limit.
With the 59.94hz TV set as primary, it has -almost- proper frame limit, implying Godot IS capable of non-integer fps limits, but the frame limits for everything else get all jumbled the same as before. It's like it's mixing up the monitors or something.
With the 144hz monitor set as primary, fps caps to 120fps, instead of 144 as it should.
My max fps in the project settings is 240fps.

I tried using RTSS to force a decimal fps cap for Godot, but it rounds to the nearest integer. 59.94 becomes 60, etc. I use this setup on all my media players and it works great. For example, I run mpv video player with RIFE interpolation, which renders on my 1080ti. I have the program set to render always on the 1080ti in Windows graphics options, and the framerate set to 59.94 in RTSS for mpv.exe. When I drag the window to my 59.94hz TV, it's buttery smooth with no skipped frames at all, a proper decimal frame cap on a passthrough GPU.

It seems Godot only wants to do decimal frame limits internally via primary monitor. And even then, it wasn't perfect, the cap was more like 59.95fps or 59.93fps.. it was skipping a frame about every 6 seconds or so, instead of 60fps cap skipping a frame every half second on 59.94hz. Better, but not perfect.
Even if it was perfect, that still doesn't solve the vsync detection issue, it is incredibly time consuming to set primary monitor constantly, and then the 144hz monitor is capped wrong as well.

Anyone have any insight at all on this? I have tried every vsync mode in the project preferences as well. Any info at all would be useful, I just want the engine to detect hz and set fps accordingly.

VSync is based on a VBlank of the monitor. The FPS counter you see on the screen (like in RivaTuner) is just an estimate for display purposes.

Godot should be able to sync to any frequency your monitor supports. However, the operating system and compositing engine may override the graphics API to monitor syncing.

You have a really weird setup, and multi-monitor syncing is a huge issue. Not just for Godot, it really has nothing to do with Godot. Just in general it's hard to have an app draw at a certain rate when monitors are syncing at random frequencies.

In general, you don't want to set an FPS limit. You just want to enable VSync (FIFO is guaranteed to be supported, aka double buffering) and let the OS and graphics drivers handle it.

    cybereality
    I set vsync off in Godot, and all my GPU utilities to handle vsync, and still Godot isn't correctly capping. I can see the frame skipping, even if the number of frames it's reporting is wrong in the debug output. All other programs are functioning as expected.
    In addition to that, again, the engine won't go above 120fps no matter what I try and it won't properly do 59.94fps, it's slightly off from 59.94 when setting that TV as main monitor. All other stuff works fine with vsync running on the Radeon catalyst drivers.
    There are definitely some Godot specific issues going on here, but it is a little muddy figuring out exactly what.
    And yeah, my setup is really weird, but I'm trying to make my game function as intended on every display imaginable from CRT's to plasma and oled and beyond. Some people will end up playing it on a 480i/p 59.94hz CRT TV, just because of the way the game is designed aesthetically and functionally, so I need to get it working on all these is the idea

    I believe VSync is working. This is handled by the graphics API (Vulkan for Godot 4 and OpenGL for 3) and has been well tested with many apps outside Godot. I would be very surprised if that didn't work. Godot does not use exclusive fullscreen, so does not set the rate of the monitor. It should default to whatever is set on the desktop (resolution and refresh rate).

    Most likely the frame skips you are seeing are not due to VSync but do to Godot's physics engine, which ticks at 60 Hz (or 60 FPS). I usually do my logic for movement in _process() (NOT _physics_process(), even though that's what it says in the documentation) because I run a 160 Hz monitor and it is choppy if I do the movement at 60 Hz. Godot 4.0 has physics interpolation, which might help here, but I have not tried it.

      cybereality
      I use a physics smoothing node, so that's not the issue. As it turns out, I'll just need to keep setting my main monitor to test out each one as I need to. I found that by enabling triple buffering on the Radeon card, that solves the frameskip from the ever-so-slightly-off cap when I use that TV as the main monitor. More input lag, but at least it's not frameskipping anymore, butter smooth motion.
      Triple buffering isn't needed for the other monitors at all, vsync is handled fine on those when I select them as main monitor. It might be the case that with the Radeon being so old, the drivers are just a little busted up. I'm still not sure why Godot jumbles up the monitor detection with its own in-engine vsync, but I doubt I'm going to make any headway by continuing to pursue that.
      Also, apparently Game Bar was the thing limiting my 144hz monitor to 120fps. Don't ask me why. Thanks Windows.

      AFAIK you have to set the primary monitor to the one you want to sync to. I've had that issue on Windows before, even in other apps (not Godot).

      But I'm on Linux now, and you can only really use the primary monitor for games (I just have 1 ultrawide now, I sold the other monitors cause it was hell).

        cybereality
        If I could use just a single ultrawide, I definitely would. Too bad none have CRT motion, I need 1ms mprt clarity. and also for testing environment purposes - As I said above this particular game will likely be played on a CRT by some, and it's extremely helpful when designing art to preview it on as many mediums as it will be viewed on.
        At least glad it works now, just somewhat tedious and non-optimal. For someone actually playing though, it will be fine, since they are sticking to the one display for the playsession, not flipping between them while doing the dev work like I am.

        cybereality
        I don't really know what this feeling is that your image is giving me. It's something between nostalgia, confusion, disgust and fear, like remembering a trippy nightmare from your childhood.
        Real question, CRTs are still being made? And sold?

          cybereality
          I saw this in person, it was a horrible horrible monitor ahaha. Basically big frankenstein LCD with visible seams, it was very bad, haha. If that thing was CRT it would have weighed about 400lbs, stand would break.

          packrat
          No, none are in production except very specialized flight equipment monitors for old planes still in commission, for commercial and military. Also, CNC machines and industrial things of that nature. Alot of that stuff runs on XP or older still.

          also obligatory infodump: MPRT not the same as response time, Motion Picture Response Time is the direct measurement of clarity during motion, whereas response time by itself as advertised is just pixel on/off usually. If you are interested, blurbusters has very good writeups on the subject. There are currently no OLED's that match CRT motion - but some LCD's can beat CRT in motion (XG2431 for example, you can configure 0.5ms mprt with custom strobing), but you will lose some image fidelity in those examples. infodump over

          On one of my rigs I have a 4K 144Hz HDR monitor that can do black frame insertion (and still work with variable refresh rate). As far as I'm concerned, it's way better than any CRT I've ever seen.

            cybereality
            Still-image quality yes, motion clarity no. BFI and strobing implementations is mimicking what CRT does naturally, as an impulsed display, it inherently is strobing as that's how the tech works.
            Even on still-image quality, a well-calibrated high-end CRT can beat LCD panels all-round there, short of DL-LCD (which you may see become more common in coming years). There is tons of misconceptions about display tech online, CRT about number 1 on that list. Again there are great writeups on blurbusters on impulsed displays and CRT motion clarity. As for image quality, I will give you some pics of my CRT monitor. I have spent probably hundreds of hours calibrating displays to get to this point over the years - so don't take it as a normal example, haha

            Motion clarity yes. I mean the overall experience is better with the best of what we have today.