Kernel panics in Linux 6.7.0+ when VRR is enabled
Brief summary of the problem:
VRR is causing random kernel panics when switching between fullscreen applications since Linux 6.7.0.
Hardware description:
- CPU: AMD Ryzen 7 3700X
- GPU: Sapphire Pulse AMD RX 6700 XT - 09:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 22 [Radeon RX 6700/6700 XT/6750 XT / 6800M/6850M XT] [1002:73df] (rev c5)
- System Memory: OLOy 32 GB DDR4-3200 CL16 Memory
- Mobo: ASRock B450M Pro4
- Display(s): Alienware 240Hz AW2521HF 1920x1080 with VRR and TearFree enabled
- Type of Display Connection: DP
System information:
- Distro name and Version: Arch Linux running Xfce 4.18 (X11) with compositing disabled
- Kernel version: Linux main 6.7.3-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 01 Feb 2024 10:30:35 +0000 x86_64 GNU/Linux
- AMD official driver version: N/A
How to reproduce the issue:
I'm able to reproduce the panics 100% with this method in Xfce:
- Enable both VariableRefresh and TearFree in an X11 conf file (e.g. /etc/X11/xorg.conf.d/20-amdgpu.conf)
- Load up a video in mpv (I have hardware decoding enabled) and make it fullscreen. I test a 60fps video so the monitor's refresh rate is reduced when fullscreen.
- Hold the "Show Desktop" hot key to rapidly switch between fullscreen mpv and a blank desktop. My keyboard repeat rate is 48, so it's pretty quick.
Within 10 seconds the system freezes and keyboard lights start blinking, indicating a kernel panic. Disabling TearFree seems to make it happen less frequently. When VariableRefresh is false I'm unable to reproduce the panics.
A user on reddit said they get the system freezes in sway on a 6750 XT. Disabling VRR fixed it for them.
Log files
Unfortunately nothing is being written to any log files when the freezes happen.