tildearrow / kwin-lowlatency

archived - X11 full-screen unredirection and lots'a settings for KWin
373 stars 10 forks source link

Multiple monitors with different refresh rates #7

Open rokups opened 5 years ago

rokups commented 5 years ago

I am very excited about this project. Upstream kwin does bad job when it deals with multiple monitors of different refresh rates. They get locked down to lowest available refresh rate. Do you plan to solve this and allow each monitor run at it's own refresh rate? I found that Option "TearFree" "true" option somewhat remedies the situation but it is not perfect. There still is some stuttering, albeit almost inperceivable.

tildearrow commented 5 years ago

In a future it may be possible to do this, but the problem is that I feel this will require a major rewrite of the rendering/sync code to be able to handle multiple monitors. Furthermore, if I recall correctly most graphics cards only support synchronizing to a single monitor (which is why e.g. NVIDIA has an environment variable called __GL_SYNC_DISPLAY_DEVICE to set this monitor). It is likely I am wrong, however.

But I will be considering this for an upcoming version.

rokups commented 5 years ago

Sounds like this would get real ugly. What if i have 144hz and 60hz monitor, would it be any simpler to run one of them at 120hz and another on 60hz and have them in sync while 60hz monitor would skip every other frame?

tildearrow commented 5 years ago

It wouldn't be that simpler. Even if your other display runs at half the framerate there still are minor random timing differences that may cause lots of stuttering for the 60Hz display in some cases.

Right now I will be pretty busy but I am going to take a look at how I can solve this when it's night for me.

Tony556 commented 5 years ago

Found an additional bug with multiple refreshrate monitors!

Left - 144hz

Right - 75hz

Using MaxFPS=144 & RefreshRate=144 in ~/.config/kwinrc (as some apps such as Firefox were still locked to 75(?)hz without it.)

With kwin-lowlatency (AUR 5.15.5-1): https://streamable.com/tqelw

With normal kwin (kwin-5.15.4-1): https://streamable.com/2ynsa

Fullscreening Discord (from the AUR) seems to lock both monitors down to 75hz only when using kwin-lowlatency

tildearrow commented 5 years ago

So I just began testing KWin-lowlatency under a multi-monitor setup and just found another bug: if unredirection is on, and an application is full-screen in a monitor, the compositor severely slows down for the other monitors.

Tony556 commented 5 years ago

Additional note, @tildearrow, is that Discord itself seems to always run at 60(?)fps. I'm not sure if that is part of the bug you and I are experiencing or not (and I doubt the Discord framelock outside of fullscreen is a bug with your implementation).

svenmauch commented 4 years ago

So I just began testing KWin-lowlatency under a multi-monitor setup and just found another bug: if unredirection is on, and an application is full-screen in a monitor, the compositor severely slows down for the other monitors.

I just noticed the same issue with my setup and came across this issue. I am using three monitors, all run on 60 Hz. If one of them has a full screen app running, the others seem to lock to 15 fps.

Is there a more specific issue I can refer to in case more info is needed?

Kodehawa commented 4 years ago

Additional note, @tildearrow, is that Discord itself seems to always run at 60(?)fps. I'm not sure if that is part of the bug you and I are experiencing or not (and I doubt the Discord framelock outside of fullscreen is a bug with your implementation).

This is actually an issue on Chromium. Chromium is locked to 60fps on multi-monitor setups, somehow, and Discord uses Electron, which uses Chromium.