Adaptive sync stops working after DPMS power cycle causes monitor to hotplug
Brief summary of the problem:
I recently implemented GPU reset support, as implemented by wlroots 0.18.0, into the labwc compositor, in a rollup package of the wlroots 0.18 supporting patches and some of my own which are waiting for that to be merged, located at the Arch User Repository labwc-wlroots-018-git
package.
I coerced a GPU reset by playing a game (Stray) with the DirectX 12 switch, which usually crashes within a few minutes of gameplay. The compositor recovered, but adaptive sync stopped working for my primary monitor. It manages to work temporarily, if I restart the compositor completely, but then stops working again if I DPMS power cycle the monitor in question. I have no other adaptive sync monitor to test with.
Hardware description:
- CPU: AMD Ryzen 7 5700X
- GPU: Navi 22 [Radeon RX 6700/6700 XT/6750 XT / 6800M/6850M XT] [1002:73DF] (Radeon 6700 XT)
- System Memory: 64 GiB
- Display(s): LG 24UD58-B, Dell P2414H
- Type of Display Connection: DP, DP
System information:
- Distro name and Version: Arch Linux
- Kernel version: Linux laharl 6.9.9-1-cachyos #1 (closed) SMP PREEMPT_DYNAMIC Fri, 12 Jul 2024 05:37:27 +0000 x86_64 GNU/Linux
- Custom kernel: linux-cachyos
- AMD official driver version: N/A
How to reproduce the issue:
- Install a desktop environment which supports recovering from a GPU reset, such as Plasma, or my
labwc-wlroots-018-git
AUR package. - Enable adaptive sync in the environment.
- Install Steam.
- Install Stray.
- Set Stray to use
-dx12
command line option. - Launch the game.
- Get into a new game.
- Play long enough to coax a GPU reset
Alternately, use some debug fs setting to coax a GPU reset.
- Note the primary display is now blanking itself any time the refresh rate dips below the full refresh rate.
- Quit the compositor.
- Restart it.
- Adaptive sync now works.
- DPMS power off or hotplug the LG display
- DPMS now broken.
EDIT: Cancel the above, it's simpler to apply:
- Install labwc-wlroots-018-git or its equivalent branch.
- Enable adaptiveSync in configuration.
- Start labwc.
- Power off the LG monitor with DPMS.
- Wait for it to completely go idle.
- Power it back on.
Log files (for system lockups / game freezes / crashes)
- Dmesg log (full log)
- Xorg log
- N/A as I'm using a Wayland session
- Any other logs
- journalctl.vrr.txt.gz (2.1 GiB compressed to 28 MiB)
Other info
This seems to be an issue with the GPU reset procedure. The dmesg.vrr.txt log above should show something useful about the reset, I hope. Or maybe the incredibly large journal log above.
Edit: This seems to be triggered simply by DPMS cycle hotplug or unplugging the monitor now. It has nothing to do with GPU recovery.