X cannot start with multiple monitors, multiple "Max streams reached, can't add stream", and backtrace
Brief summary of the problem:
When multiple monitors are connected to Radeon RX 7900 XT, [drm] Max streams reached, can't add stream
and backtraces are printed, and X does not start.
This happens most of time, but not always. I don't know why and when X starts successfully.
In this case, console is still available, so I can log in to the system. However, startx from shell also fails.
And even when X successfully started with multiple monitors connected, display outputs eventually freezes. In this case, keyboard inputs seems to be still received and processed (with no graphical response), so I was able to shutdown the machine (not sure this is always so, but this happened at least one time).
When only single monitor (Dell S2721QS) is connected, X successfully starts. I can connect the second monitor after X starts, and is seems to work for a while. However, the graphics freezes eventually. I don't play games on this machine. Just using Firefox and alacritty (OpenGL-accelerated terminal).
Expected result
LXDM (login manager) successfully starts after the system booted.
Actual result
Case 1
- LXDM fails to start when two monitors are connected at boot time.
- kernel emits log lines such as
[drm] Max streams reached, can't add stream 000000004d6a0d84 !
multiple times.- Looks like random timings, sometimes no "Max streams reached" lines...
- dmesg prints multiple backtraces.
Case 2
- X successfully starts with multiple monitors.
- The graphics eventually freezes.
- I don't know when and how this happens.
Hardware description:
-
CPU: Ryzen 9 7950X
-
GPU:
-
03:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 31 [Radeon RX 7900 XT/7900 XTX] [1002:744c] (rev cc)
- GIGABYTE, Radeon RX 7900 XT GAMING OC 20G
-
1a:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Raphael [1002:164e] (rev c1)
- iGPU of Ryzen 9 7950X
-
-
System Memory: 32GB (16x2), DDR5, 5600MHz
-
Display(s):
- Dell S2721QS (4K 60Hz)
- LG 27UL650 (4K 60Hz)
-
Type of Display Connection: <TODO: DP, HDMI, DVI, etc>
- Dell S2721QS: DP, DisplayPort-0
- LG 27UL650: DP, DisplayPort-1
System information:
- Distro name and Version: Gentoo Linux
- Kernel version:
Linux atri 6.1.1-gentoo #1 SMP PREEMPT_DYNAMIC Sun Dec 25 23:20:30 JST 2022 x86_64 AMD Ryzen 9 7950X 16-Core Processor AuthenticAMD GNU/Linux
- Custom kernel: Additional CPU optimizations patch from gentoo-sources
-
MNATIVE_AMD=y
to build with-march=native
- https://github.com/graysky2/kernel_compiler_patch/blob/master/more-uarches-for-kernel-5.17%2B.patch#L498-L507
-
- AMD official driver version: not sure
- Other:
- complete kernel config: https://gitlab.freedesktop.org/-/snippets/7280
- Above 4K decoding and Re-Size BAR is disabled, but the issue reproduces even when they are enabled.
How to reproduce the issue:
- Boot the system with multiple monitors (described above) connected.
- X won't start. In my environment, LXDM does not start.
Attached files:
Log files (for system lockups / game freezes / crashes)
Uploaded to https://gitlab.freedesktop.org/-/snippets/7280.
(dmesg
for single/dual monitor boot, kernel config, Xorg.0.log
for single/dual monitor boot, lsmod
, lspci -k
, xrandr -q --verbose
for dual monitor)