AMDGPU kernel driver doesn't return error when setting invalid mode and shows black screen
Brief summary of the problem:
When you plug a monitor that supports 4K 60Hz into the HDMI port of an old GPU which only supports HDMI 1.x, mutter selects the unsupported 4K 60Hz mode, and it doesn't get an error from the AMDGPU kernel module, even though this mode is unsupported.
See also this mutter bug report. The mutter developers claim that they get the list of supported modes from the kernel, and select the preferred one (or lacking that, the first on the list of supported modes). They theorize that the kernel mistakenly advertises 4K 60Hz when it shouldn't.
Hardware description:
- CPU: AMD Ryzen 7 3700X
- GPU: AMD Radeon R7 250 (also reproducible with R7 260X)
- System Memory: 16 GB DDR4
- Display(s): Dell U2718Q (supports 4K 60Hz)
- Type of Diplay Connection: HDMI 1.x
System infomration:
- Distro name and Version: Fedora 34
- Kernel version: 5.11.12
- Custom kernel: no
- AMD package version: no
How to reproduce the issue:
- Use an old AMD GPU such as R7 250 or R7 260X (I tested these two, but there are possibly others)
- Plug a monitor that supports 4K 60Hz to the HDMI output of such a GPU
- Boot the system
Attached files:
dmesg
log file with DRM debugging enabled:
dmesg-2021.04.12-1.txt
journalctl -b 0
output with mutter's debug messages:
journalctl-2021.04.12-1.txt
modetest
output:
modetest-2021.04.12-1.txt