Bug 491429

Summary: Kwin forces VRR despite it is off, easy repro step included
Product: [Plasma] kwin Reporter: Leopard <yurnerolinux>
Component: compositingAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED UPSTREAM    
Severity: normal CC: xaver.hugl
Priority: NOR    
Version First Reported In: 6.1.3   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: drm_info output
second time it occurred, monitor locked to 78 hz
48 hz now

Description Leopard 2024-08-08 11:05:54 UTC
SUMMARY

Kwin has completely borked VRR handling as of now. Set VRR to Auto ( means no VRR at desktop etc ) , play a game that switches between some locked fps between main menu/gameplay etc, return to desktop afterwards. Open up your monitors refresh rate ( not FPS ) counter, see how it jumps between lowest hz of VRR range and highest. ( Respectively 48 and 165 for me ).

If easier repro step wanted ( no game ) , open MPV with wayland context and Vulkan. Notice how VRR is enabled and jumpy. Afterwards set a window rule for MPV to DISABLE vrr open MPV again. Notice how vrr is not disabled at all. Return to desktop, notice how desktop acts like VRR is forced. Disable VRR from KDE settings, notice how it doesnt change anything.

Restarting the system fixes the issue, until you repro again.

STEPS TO REPRODUCE
1. It was a bit long so i couldnt breakdown it to three steps. Written above.

OBSERVED RESULT

VRR itself ignoring any setting and window rules with steps above.

EXPECTED RESULT

To not do that.


SOFTWARE/OS VERSIONS

Linux/KDE Plasma: Arch Linux ( EndevaourOS )
KDE Plasma Version: 6.1.3

ADDITIONAL INFORMATION

System info:

Kernel 6.10.3
7900 XTX gpu usee with display port
Comment 1 Zamundaaa 2024-08-08 11:45:09 UTC
Please attach the output of drm_info when in this error state.
Comment 2 Leopard 2024-08-08 12:20:34 UTC
Created attachment 172394 [details]
drm_info output
Comment 3 Leopard 2024-08-08 12:21:42 UTC
@Zamundaa Added. One important repro step might be "you do that VRR window rule setting while window is on while video itself is paused."
Comment 4 Leopard 2024-08-09 08:10:43 UTC
Created attachment 172429 [details]
second time it occurred, monitor locked to 78 hz
Comment 5 Leopard 2024-08-09 08:30:02 UTC
Created attachment 172430 [details]
48 hz now
Comment 6 Zamundaaa 2024-08-09 13:23:31 UTC
According to the drm_info output, vrr is actually disabled, so the driver is wrongly keeping it enabled and not KWin. Please report it at https://gitlab.freedesktop.org/drm/amd/-/issues