Allow configuring VSync to which screen it locks
What I Want
If VSync is enabled (which now can only be disabled by an Environment variable, see !707 (merged)), KWin locks its framerate to one screen, which, for one screen, is fine. However, on a multi-monitor setup, it locks on the screen it likes the most. I couldn’t get, how it decides that, as it seems to be independent of their refresh rates, priority, position is xrandr or even port used. So, to allow users to fix this (in my view broken) auto selection, there should be a setting for that.
My Setup
Hardware:
- Processor: AMD Ryzen 5 1600X
- Graphics: AMD Radeon RX 6600 XT
Software:
- Debian GNU/Linux trixie/sid
- KDE Plasma Version: 5.27.5
- KDE Frameworks Version: 7.107.0
- Qt Version: 5.15.10
- Kernel Version: 6.4.0-1-amd64
- Graphics Platform: X11
I have three displays, all running at their max configurations, screen priorities configured at that order:
- 2560x1440, 165 Hz
- 1920x1080, 60 Hz
- 1280x1024, 75 Hz, rotated 90° clockwise
These are connected via two DP & one HDMI connector on my graphics card, but how they are connected seems not to matter (see below).
Expected Result
Without (much) additional configuration, KWin should lock on the 165 Hz screen, either because
- its configured as the primary screen
- it has the highest refresh rate of all screens
Actual Result
KWin locks on the 60 Hz screen. I know that for sure, because all screens have pairwise different refresh rates and because I checked the framerate with the “Show FPS” tool listed in “Desktop Effects”.
What I tried so far
Trying all permutations of display -> graphics card port and disconnecting displays temporarily reveals that KWin seems to prefer the screens in that order (numbering from above): 2, 1, 3. Meaning that with all 3 displays, it always locks on 60 fps without me giving a chance to divert from that. If I let display 2 disconnected, KWin locks on 165 fps, independent of connection too.
I searched the web & this issue tracker for debugging configurations I could try: I tried disabling VSync via environment variables written in ~/.config/plasma-workspace/env/kwin.sh
or changing the max fps configuration in ~/.config/kwinrc
, but they did not change anything (disconnecting display 2 to have 165 fps even works too), so I reverted them.
I searched for duplicate issues here, but didn’t found anything.