Quick freeze when starting xrandr or wezterm

There’s something in the kernel log when the freeze happens:

[drm] PCIE GART of 512M enabled (table at 0x00000081FEB00000).
amdgpu 0000:03:00.0: amdgpu: PSP is resuming...
amdgpu 0000:03:00.0: amdgpu: reserve 0x1300000 from 0x81fc000000 for PSP TMR
amdgpu 0000:03:00.0: amdgpu: RAS: optional ras ta ucode is not available
amdgpu 0000:03:00.0: amdgpu: RAP: optional rap ta ucode is not available
amdgpu 0000:03:00.0: amdgpu: SECUREDISPLAY: securedisplay ta ucode is not available
amdgpu 0000:03:00.0: amdgpu: SMU is resuming...
amdgpu 0000:03:00.0: amdgpu: smu driver if version = 0x00000035, smu fw if version = 0x00000040, smu fw program = 0, smu fw version = 0x00525c00 (82.92.0)
amdgpu 0000:03:00.0: amdgpu: SMU driver if version not matched
amdgpu 0000:03:00.0: amdgpu: SMU is resumed successfully!
[drm] DMUB hardware initialized: version=0x07002A00
amdgpu 0000:03:00.0: amdgpu: ring gfx_0.0.0 uses VM inv eng 0 on hub 0
amdgpu 0000:03:00.0: amdgpu: ring comp_1.0.0 uses VM inv eng 1 on hub 0
amdgpu 0000:03:00.0: amdgpu: ring comp_1.1.0 uses VM inv eng 4 on hub 0
amdgpu 0000:03:00.0: amdgpu: ring comp_1.2.0 uses VM inv eng 6 on hub 0
amdgpu 0000:03:00.0: amdgpu: ring comp_1.3.0 uses VM inv eng 7 on hub 0
amdgpu 0000:03:00.0: amdgpu: ring comp_1.0.1 uses VM inv eng 8 on hub 0
amdgpu 0000:03:00.0: amdgpu: ring comp_1.1.1 uses VM inv eng 9 on hub 0
amdgpu 0000:03:00.0: amdgpu: ring comp_1.2.1 uses VM inv eng 10 on hub 0
amdgpu 0000:03:00.0: amdgpu: ring comp_1.3.1 uses VM inv eng 11 on hub 0
amdgpu 0000:03:00.0: amdgpu: ring sdma0 uses VM inv eng 12 on hub 0
amdgpu 0000:03:00.0: amdgpu: ring sdma1 uses VM inv eng 13 on hub 0
amdgpu 0000:03:00.0: amdgpu: ring vcn_unified_0 uses VM inv eng 0 on hub 8
amdgpu 0000:03:00.0: amdgpu: ring jpeg_dec uses VM inv eng 1 on hub 8
amdgpu 0000:03:00.0: amdgpu: ring mes_kiq_3.1.0 uses VM inv eng 14 on hub 0
amdgpu 0000:03:00.0: [drm] Cannot find any crtc or sizes
[drm] ring gfx_32792.1.1 was added
[drm] ring compute_32792.2.2 was added
[drm] ring sdma_32792.3.3 was added
[drm] ring gfx_32792.1.1 ib test pass
[drm] ring compute_32792.2.2 ib test pass
[drm] ring sdma_32792.3.3 ib test pass

Seems very similar to Best practices for multigpu in clamshell/docked mode in Fedora 41. Did you find a fix @four20grazeit?

Disabling the GPU power management with a kernel parameter (amdgpu.runpm=0) does fix the problem, but it’s not a great solution.

So I guess the problem is just that wezterm and xrandr wake up the dGPU when they start. It’s not really a problem for xrandr, but for wezterm it is, because I start it very often.

I tried setting a preferred adapter in wezterm config and setting webgpu_force_fallback_adapter to true, but that doesn’t change anything. It probably still enumerates the GPUs.

And changing the frontend to “Software” triggers a render bug that makes the term unusable.

So I guess I’ll have to find a new shell.