/dev/dri/card0 periodically invalidated while DPMS is off causing window manager to lose modesetting
Brief summary of the problem:
Occasionally, after turning off dpms to my monitor, my wm will report that /dev/dri/card0 invalided
, and will not be able to find some of my monitors modes again. Other drm scanning tools such as drm_info correctly report the monitors and the modesettings, but my window manager (sway) loses this information and requires me to unplug/replug the display port cable to correctly detect the monitor.
Hardware description:
- CPU: ryzen 3900x
- GPU: Navi 5700 XT
- System Memory: 32G
- Display(s): 2x 1440p144 DP monitors, 1x 4k60 DP monitor
- Type of Diplay Connection: All DP1.4
System infomration:
- Distro name and Version: Arch Linux
- Kernel version: 5.9.6 (will test with the latest stable 5.9.* as well as LTS)
- Custom kernel: N/A
- AMD package version: N/A
How to reproduce the issue:
- let the machine go idle, with an idle timeout that turns off dmps
- Wait certain amount of time (???)
- Move mouse/hit keys to wake up monitors
- One or more monitors will be unrecognized or forced to a low resolution (480p60)
This bug is very hard to reproduce reliably and I would like to get some dmesg logs for it but the biggest issue with that it is impossible to know when this bug actually happens, I must leave my machine idling for an unknown amount of time, and when I come back it is unknown whether the bug actually occurred, and if so when it occurred.
See also the relevant wlroots bug report, as it's still unknown if this is a kernel bug or not: https://github.com/swaywm/wlroots/issues/2474
Attached files:
- dmesg log is a work in progress, this is hard to reproduce, and the logs come out to be 100s of MB
- sway debugging log excerpt of when connection was lost: https://0x0.st/inn1.txt
- simultaneous
drm_info
https://0x0.st/inUH.txt log andsway_msg -t get_outputs
https://0x0.st/inU-.txt- You can see in the former libdrm correctly reports Connector 0, while in sway DP-1 is incorrectly reported as 480p only.