AMDGPU thinks it doesn't need to do a modeset on a commit, resulting in a frozen screen
Brief summary of the problem:
When using the latest release of KWin (5.25.90) the screen freezes when changing the refresh rate, but when only changing the screen resolution the screen becomes garbled/corrupted but that can be "fixed" by reverting the change of the resolution.
This supposedly happens because AMDGPU thinks it doesn't need to do a modeset for the commit, and so the compositor doesn't do one. The workaround to this is to always make KWin do a full modeset. (More will be explained in comments by Zamundaaa/Xavier Hugl (a KWin developer/maintainer))
This issue is also tracked/reported on the official KDE Bugs website here.
Hardware description:
- CPU: AMD Ryzen 9 4900HS
- GPU: Integrated/Dedicated: Vega 8, GeForce RTX 2060 Max-Q
- System Memory: 16GB
- Display(s): Laptop Screen (Sharp Corporation eDP-1-LQ156M1JW26)
- Type of Display Connection: eDP
- Product: ASUS Zephyrus G15 GA502IV (2020 Model)
System information:
- Distro name and Version: Arch Linux fully up-to-date as of 17.9.2022 (With multilib and kde-unstable repositories enabled)
- Kernel version:
Linux zephyrus 5.19.9-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 15 Sep 2022 16:08:26 +0000 x86_64 GNU/Linux
- AMD official driver version: Not sure?
- Graphics drivers: Mesa 22.1.7
How to reproduce the issue:
- Be on latest KDE Plasma beta release (5.25.90)
- Change the refresh rate and/or the screen resolution