Bug 461915 - VRR enable/disable requires full modeset on i915 devices
Summary: VRR enable/disable requires full modeset on i915 devices
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.26.3
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL: https://gitlab.freedesktop.org/drm/in...
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-16 18:56 UTC by Nowa Ammerlaan
Modified: 2022-11-16 23:29 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nowa Ammerlaan 2022-11-16 18:56:06 UTC
SUMMARY

While Adaptive Sync worked fine with my AMD card, it does not on my Intel Arc card. 
After some debugging and help from the folks over at the i915 bug tracker, we found that the root of the problem is that amdgpu allows for enabling/disabling VRR on the fly, while i915 requires a full modeset to toggle this setting.

Even when the "Adaptive Sync" setting is set to "Always" it does not work. It appears that kwin does not enable VRR immediately  when it enables the monitor. While the "Automatic" setting might prove difficult with the i915 driver because of this requirement, it should be possible to get the "Always" setting working on i915 devices by enabling VRR immediately when enabling the monitor. Triggering a full modeset when changing the setting from "Never" to "Always" or the other way around would also be required. 

To fix the VRR behaviour when set to "Automatic" a full modeset would be required every time a full screen application is started or stopped. This might not be desirable, and therefore maybe a helpful pop-up note explaining that the "Automatic" setting does not currently work with i915 is a better idea.

STEPS TO REPRODUCE
1. Start wayland session
2. Enable VRR
3. Start full screen application

OBSERVED RESULT

No syncing of the refresh rate

EXPECTED RESULT

The refresh rate of the monitor is synchronized to the content 

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Gentoo Linux, kernel 6.1.0-rc5
KDE Plasma Version: 5.26.3
KDE Frameworks Version: 5.100.0
Qt Version: 5.15.5

ADDITIONAL INFORMATION

See also: https://gitlab.freedesktop.org/drm/intel/-/issues/7542
Comment 1 Zamundaaa 2022-11-16 23:29:26 UTC
To be honest I don't think this is a thing that should be worked around in kwin, as it can cause other complications