Fail to read EDID after resuming from suspend since kernel 6.2
Brief summary of the problem:
Initially reported at bugzilla.kernel.org. Since upgrading past Linux kernel 6.2, my system has been unable to read the EDID after resuming from suspend. I get the following error:
[ 135.566642] EDID block 0 is all zeroes
[ 135.566831] amdgpu 0000:0f:00.0: [drm] User-defined mode not supported: "2560x1440": 144 592000 2560 2568 2600 2666 1440 1465 1470 1543 0x60 0x9
[ 135.566836] amdgpu 0000:0f:00.0: [drm] User-defined mode not supported: "2560x1440": 144 807923 2560 2784 3072 3584 1440 1441 1444 1565 0x20 0x6
After this, the only available mode is 640x480. This happens with both my displays, a monitor and a TV. I have a Radeon RX 6800 XT that previously worked fine in this regard. I usually override the EDID with drm.edid_firmware
, but removing this has not helped.
I failed to bisect the issue the first time, as I didn't realise that it sometimes takes two attempts to trigger it. I was successful the next time, tracking it down to 2db98059ff67e205be8a820f4e99c15f765e3c5a. I suspect the kernel is just broken at this point anyway, due to further changes being required. I was not able to build v6.2.8 with just this reverted, but I was after reverting all the following first, and then the issue went away.
- 5f2d0ed49036a0218685e7d9d03539bdbdc66f78
- 794aca0ec214bb23ff4fcb28c053ac6fdfa3ce07
- 90b575f52c6ab35979968e2e4d9cbd9f1eb3901c
All these commits are by @jani so tagging them here. Given that these commits concern overriding the EDID, you would have thought the issue would not occur without drm.edid_firmware
set, but I have double-checked. Perhaps enabling CONFIG_DRM_LOAD_EDID_FIRMWARE
is enough to trigger it.
Hardware description:
- CPU: AMD Ryzen 5 3600
- GPU: Advanced Micro Devices, Inc. [AMD/ATI] Navi 21 [Radeon RX 6800/6800 XT / 6900 XT] [1002:73bf] (rev c1)
- System Memory: 32GB
- Display(s): ViewSonic XG270QC + LG OLED55CX5LB
- Type of Display Connection: HDMI
System information:
- Distro name and Version: Gentoo Linux
- Kernel version: 6.3.0-rc3 (latest tested)
- Custom kernel: I build my own vanilla kernel.
- AMD official driver version: N/A
How to reproduce the issue:
Suspend and then resume from anywhere (Wayland, Xorg, VT). Upon resume, the display will be set to 640x480. Sometimes it doesn't occur the first time. I think it's always occurred by the second time.