Bug 455966 - KWin stuck at 60 fps on a multi-monitor setup
Summary: KWin stuck at 60 fps on a multi-monitor setup
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: compositing (other bugs)
Version First Reported In: 5.25.1
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-26 18:24 UTC by La Mayenne
Modified: 2022-06-27 18:04 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description La Mayenne 2022-06-26 18:24:06 UTC
I have two monitors : one at 60Hz and another one at 144Hz(same 1920x1080 resolution).
When both are plugged in, I can see from the "Show FPS effect" that KWin is stuck at 60 fps (it's also noticeable since the animations aren't as smooth as they should be).
Though, when I unplug the 60Hz monitor(thus only leaving the 144Hz one), KWin refreshes at a super-smooth 144 fps.
(and yes I checked in System Settings and the 144Hz monitor is actually refreshing at 144 fps; in fullscreen games the higher refresh rate is noticeable, even with both monitors plugged in).
I realized that when composition is enabled, all apps, including games, are stuck at KWin's framerate(here 60 fps).
But when I take a game in fullscreen(take Minecraft for example), composition will be disabled, and then Minecraft and my others apps I have running will be refreshing at 144 fps.
I also saw in System Settings that if I change the refresh rate for my 60Hz monitor to 75 fps(which is the max that Plasma Settings will let me put), KWin will now be stuck at 75 fps instead of 60.
I'm taking a guess here that KWin refreshes at the lowest refresh rate of all connected displays, but that isn't ideal when you're using a high-refresh rate display.

Do you have any solution to this?
(Already tried putting "MaxFPS=144" and "RefreshRate=144" in ~/.config/kwinrc but it didn't work, even with a full system reboot)
Thanks in advance.

Software & OS versions, if that can help.
Linux Kernel version : 5.18.6 (64-bit system)
KDE Plasma Version: 5.25.1
KDE Frameworks Version: 5.95.0
Qt Version: 5.15.5
Distribution : Arch Linux
Nvidia graphics card with proprietary drivers.
Using X.org and not Wayland, if that helps.
Comment 1 La Mayenne 2022-06-27 18:04:58 UTC
I found the answer on this thread: https://www.reddit.com/r/kde/comments/j5weun/kwin_stuck_on_60fps/
"In nvidia-settings Allow Flipping was enabled in the OpenGL settings. Disabling that fixed it".
It was as easy as to disable "Allow Flipping" in nvidia-settings. Now everything seems much smoother and KWin's fps counter now shows 144 all the time!
-> Setting this as resolved!