Skip to content

backend/kms: Check all connectors for primary gpu - #2624

Open
Drakulix wants to merge 1 commit into
masterfrom
fix-check-all-connectors_noble
Open

backend/kms: Check all connectors for primary gpu#2624
Drakulix wants to merge 1 commit into
masterfrom
fix-check-all-connectors_noble

Conversation

@Drakulix

Copy link
Copy Markdown
Member
  • I have disclosed use of any AI generated code in my commit messages.
    • If you are using an LLM, and do not fully understand the changes it is making to the code base, do not create a PR.
    • In our experience, AI generated code often results in overly complex code that lacks enough context for a proper fix or feature inclusion. This results in considerably longer code reviews. Due to this, AI authored or partially authored PRs may be closed without comment.
  • I understand these changes in full and will be able to respond to review comments.
  • My change is accurately described in the commit message.
  • My contribution is tested and working as described.
  • I have read the Developer Certificate of Origin and certify my contribution under its conditions.

Alternative to github.com//pull/2621

@petegee

petegee commented Jul 24, 2026

Copy link
Copy Markdown

Ill close 2621 then?

@Drakulix

Copy link
Copy Markdown
Member Author

Ill close 2621 then?

Does this work on your machine?

@petegee

petegee commented Jul 27, 2026

Copy link
Copy Markdown

Ill close 2621 then?

Does this work on your machine?

do you mean try your fix? I haven't tried. I will try later today if i get the chance.

@petegee

petegee commented Jul 29, 2026

Copy link
Copy Markdown

Ill close 2621 then?

Does this work on your machine?

I built a custom .deb from your branch in a Noble container, and installed it on my 24 install, and it might have improved things? The terminal UI app used to be pretty flakey, but is now pretty solid. However when lauching Chromium or FF it pretty quickly wedges.

@Drakulix

Copy link
Copy Markdown
Member Author

Ill close 2621 then?

Does this work on your machine?

I built a custom .deb from your branch in a Noble container, and installed it on my 24 install, and it might have improved things? The terminal UI app used to be pretty flakey, but is now pretty solid. However when lauching Chromium or FF it pretty quickly wedges.

Do the apps end up choosing the correct gpu?

@petegee

petegee commented Jul 29, 2026

Copy link
Copy Markdown

Its hard cause launching chromium or FF almost always wedges. From an ssh term on another machine i can get this after it wedges trying to run chromium on integrated mode:

pete@pop-os:~$ sudo dmesg | tail -50
[sudo] password for pete:
[  821.027885] amdgpu 0000:65:00.0: amdgpu: ring jpeg_dec_0 uses VM inv eng 1 on hub 8
[  821.027886] amdgpu 0000:65:00.0: amdgpu: ring mes_kiq_3.1.0 uses VM inv eng 13 on hub 0
[  821.027887] amdgpu 0000:65:00.0: amdgpu: ring vpe uses VM inv eng 4 on hub 8
[  821.032183] amdgpu 0000:65:00.0: amdgpu: GPU reset(5) succeeded!
[  821.032194] amdgpu 0000:65:00.0: [drm] device wedged, but recovered through reset
[  821.038894] [drm:amdgpu_cs_ioctl [amdgpu]] *ERROR* Failed to initialize parser -125!
[  956.833390] amdgpu 0000:65:00.0: amdgpu: Dumping IP State
[  956.838412] amdgpu 0000:65:00.0: amdgpu: Dumping IP State Completed
[  956.838549] amdgpu 0000:65:00.0: amdgpu: [drm] AMDGPU device coredump file has been created
[  956.838552] amdgpu 0000:65:00.0: amdgpu: [drm] Check your /sys/class/drm/card0/device/devcoredump/data
[  956.838554] amdgpu 0000:65:00.0: amdgpu: ring gfx_0.0.0 timeout, signaled seq=24860, emitted seq=24862
[  956.838561] amdgpu 0000:65:00.0: amdgpu:  Process cosmic-comp pid 9240 thread cosmic-com:cs0 pid 9278
[  956.838564] amdgpu 0000:65:00.0: amdgpu: Starting gfx_0.0.0 ring reset
[  958.842468] amdgpu 0000:65:00.0: amdgpu: MES failed to respond to msg=RESET
[  958.842489] amdgpu 0000:65:00.0: amdgpu: failed to reset legacy queue
[  958.842493] amdgpu 0000:65:00.0: amdgpu: reset via MES failed and try pipe reset -110
[  958.842496] amdgpu 0000:65:00.0: amdgpu: Ring gfx_0.0.0 reset failed
[  958.842500] amdgpu 0000:65:00.0: amdgpu: GPU reset begin!
[  961.210185] amdgpu 0000:65:00.0: amdgpu: MES failed to respond to msg=REMOVE_QUEUE
[  961.210199] amdgpu 0000:65:00.0: amdgpu: failed to unmap legacy queue
[  961.445237] [drm:gfx_v11_0_cp_gfx_enable.isra.0 [amdgpu]] *ERROR* failed to halt cp gfx
[  961.446943] amdgpu 0000:65:00.0: amdgpu: MODE2 reset
[  961.475718] amdgpu 0000:65:00.0: amdgpu: GPU reset succeeded, trying to resume
[  961.476196] [drm] PCIE GART of 512M enabled (table at 0x000000801FB00000).
[  961.476254] amdgpu 0000:65:00.0: amdgpu: SMU is resuming...
[  961.482045] amdgpu 0000:65:00.0: amdgpu: SMU is resumed successfully!
[  961.493165] amdgpu 0000:65:00.0: amdgpu: [drm] DMUB hardware initialized: version=0x09003D00
[  961.801072] amdgpu 0000:65:00.0: amdgpu: ring gfx_0.0.0 uses VM inv eng 0 on hub 0
[  961.801080] amdgpu 0000:65:00.0: amdgpu: ring comp_1.0.0 uses VM inv eng 1 on hub 0
[  961.801081] amdgpu 0000:65:00.0: amdgpu: ring comp_1.1.0 uses VM inv eng 4 on hub 0
[  961.801082] amdgpu 0000:65:00.0: amdgpu: ring comp_1.2.0 uses VM inv eng 6 on hub 0
[  961.801083] amdgpu 0000:65:00.0: amdgpu: ring comp_1.3.0 uses VM inv eng 7 on hub 0
[  961.801084] amdgpu 0000:65:00.0: amdgpu: ring comp_1.0.1 uses VM inv eng 8 on hub 0
[  961.801084] amdgpu 0000:65:00.0: amdgpu: ring comp_1.1.1 uses VM inv eng 9 on hub 0
[  961.801085] amdgpu 0000:65:00.0: amdgpu: ring comp_1.2.1 uses VM inv eng 10 on hub 0
[  961.801086] amdgpu 0000:65:00.0: amdgpu: ring comp_1.3.1 uses VM inv eng 11 on hub 0
[  961.801087] amdgpu 0000:65:00.0: amdgpu: ring sdma0 uses VM inv eng 12 on hub 0
[  961.801088] amdgpu 0000:65:00.0: amdgpu: ring vcn_unified_0 uses VM inv eng 0 on hub 8
[  961.801089] amdgpu 0000:65:00.0: amdgpu: ring jpeg_dec_0 uses VM inv eng 1 on hub 8
[  961.801090] amdgpu 0000:65:00.0: amdgpu: ring mes_kiq_3.1.0 uses VM inv eng 13 on hub 0
[  961.801091] amdgpu 0000:65:00.0: amdgpu: ring vpe uses VM inv eng 4 on hub 8
[  961.809850] amdgpu 0000:65:00.0: amdgpu: GPU reset(6) succeeded!
[  961.809878] amdgpu 0000:65:00.0: [drm] device wedged, but recovered through reset
[  961.848010] [drm:amdgpu_cs_ioctl [amdgpu]] *ERROR* Failed to initialize parser -125!
[  962.991844] cosmic-app-libr[9704]: segfault at 26c ip 000071c866612d2c sp 000071c8071f52a0 error 6 in libwayland-client.so.0.23.1[8d2c,71c866610000+6000] likely on CPU 0 (core 0, socket 0)
[  962.991857] Code: c3 00 00 00 01 81 fb 00 00 f0 00 77 61 49 8b 04 24 48 c1 e8 03 39 d8 72 65 39 c3 74 21 49 8b 44 24 10 43 8d 54 2d 00 48 09 d1 <48> 89 0c d8 31 c0 48 83 c4 18 5b 41 5c 41 5d 5d c3 0f 1f 00 be 08
[  962.992476] cosmic-workspac[9707]: segfault at 224 ip 00007afed51abd2c sp 00007afe59fec670 error 6 in libwayland-client.so.0.23.1[8d2c,7afed51a9000+6000] likely on CPU 15 (core 3, socket 0)
[  962.992492] Code: c3 00 00 00 01 81 fb 00 00 f0 00 77 61 49 8b 04 24 48 c1 e8 03 39 d8 72 65 39 c3 74 21 49 8b 44 24 10 43 8d 54 2d 00 48 09 d1 <48> 89 0c d8 31 c0 48 83 c4 18 5b 41 5c 41 5d 5d c3 0f 1f 00 be 08
[  962.993646] cosmic-files-ap[9802]: segfault at 224 ip 0000782969136d2c sp 00007829403fa370 error 6 in libwayland-client.so.0.23.1[8d2c,782969134000+6000] likely on CPU 13 (core 1, socket 0)
[  962.993656] Code: c3 00 00 00 01 81 fb 00 00 f0 00 77 61 49 8b 04 24 48 c1 e8 03 39 d8 72 65 39 c3 74 21 49 8b 44 24 10 43 8d 54 2d 00 48 09 d1 <48> 89 0c d8 31 c0 48 83 c4 18 5b 41 5c 41 5d 5d c3 0f 1f 00 be 08

And on Nvidia mode when chromium causes it to wedge:

pete@pop-os:~$ sudo dmesg | tail -50
[ 1178.258263] amdgpu 0000:65:00.0: amdgpu: 	 Faulty UTCL2 client ID: TCP (0x8)
[ 1178.258264] amdgpu 0000:65:00.0: amdgpu: 	 MORE_FAULTS: 0x0
[ 1178.258265] amdgpu 0000:65:00.0: amdgpu: 	 WALKER_ERROR: 0x0
[ 1178.258266] amdgpu 0000:65:00.0: amdgpu: 	 PERMISSION_FAULTS: 0x5
[ 1178.258266] amdgpu 0000:65:00.0: amdgpu: 	 MAPPING_ERROR: 0x0
[ 1178.258267] amdgpu 0000:65:00.0: amdgpu: 	 RW: 0x1
[ 1188.303336] amdgpu 0000:65:00.0: amdgpu: Dumping IP State
[ 1188.306552] amdgpu 0000:65:00.0: amdgpu: Dumping IP State Completed
[ 1188.306716] amdgpu 0000:65:00.0: amdgpu: [drm] AMDGPU device coredump file has been created
[ 1188.306719] amdgpu 0000:65:00.0: amdgpu: [drm] Check your /sys/class/drm/card0/device/devcoredump/data
[ 1188.306722] amdgpu 0000:65:00.0: amdgpu: ring gfx_0.0.0 timeout, signaled seq=22688, emitted seq=22690
[ 1188.306730] amdgpu 0000:65:00.0: amdgpu:  Process chrome pid 14307 thread chrome:cs0 pid 14393
[ 1188.306733] amdgpu 0000:65:00.0: amdgpu: Starting gfx_0.0.0 ring reset
[ 1190.310610] amdgpu 0000:65:00.0: amdgpu: MES failed to respond to msg=RESET
[ 1190.310622] amdgpu 0000:65:00.0: amdgpu: failed to reset legacy queue
[ 1190.310624] amdgpu 0000:65:00.0: amdgpu: reset via MES failed and try pipe reset -110
[ 1190.310627] amdgpu 0000:65:00.0: amdgpu: Ring gfx_0.0.0 reset failed
[ 1190.310631] amdgpu 0000:65:00.0: amdgpu: GPU reset begin!
[ 1192.696846] amdgpu 0000:65:00.0: amdgpu: MES failed to respond to msg=REMOVE_QUEUE
[ 1192.696862] amdgpu 0000:65:00.0: amdgpu: failed to unmap legacy queue
[ 1192.931805] [drm:gfx_v11_0_cp_gfx_enable.isra.0 [amdgpu]] *ERROR* failed to halt cp gfx
[ 1192.933483] amdgpu 0000:65:00.0: amdgpu: MODE2 reset
[ 1192.963158] amdgpu 0000:65:00.0: amdgpu: GPU reset succeeded, trying to resume
[ 1192.963621] [drm] PCIE GART of 512M enabled (table at 0x000000801FB00000).
[ 1192.963677] amdgpu 0000:65:00.0: amdgpu: SMU is resuming...
[ 1192.968631] amdgpu 0000:65:00.0: amdgpu: SMU is resumed successfully!
[ 1192.980457] amdgpu 0000:65:00.0: amdgpu: [drm] DMUB hardware initialized: version=0x09003D00
[ 1193.288014] amdgpu 0000:65:00.0: amdgpu: ring gfx_0.0.0 uses VM inv eng 0 on hub 0
[ 1193.288021] amdgpu 0000:65:00.0: amdgpu: ring comp_1.0.0 uses VM inv eng 1 on hub 0
[ 1193.288023] amdgpu 0000:65:00.0: amdgpu: ring comp_1.1.0 uses VM inv eng 4 on hub 0
[ 1193.288023] amdgpu 0000:65:00.0: amdgpu: ring comp_1.2.0 uses VM inv eng 6 on hub 0
[ 1193.288024] amdgpu 0000:65:00.0: amdgpu: ring comp_1.3.0 uses VM inv eng 7 on hub 0
[ 1193.288025] amdgpu 0000:65:00.0: amdgpu: ring comp_1.0.1 uses VM inv eng 8 on hub 0
[ 1193.288026] amdgpu 0000:65:00.0: amdgpu: ring comp_1.1.1 uses VM inv eng 9 on hub 0
[ 1193.288026] amdgpu 0000:65:00.0: amdgpu: ring comp_1.2.1 uses VM inv eng 10 on hub 0
[ 1193.288027] amdgpu 0000:65:00.0: amdgpu: ring comp_1.3.1 uses VM inv eng 11 on hub 0
[ 1193.288028] amdgpu 0000:65:00.0: amdgpu: ring sdma0 uses VM inv eng 12 on hub 0
[ 1193.288029] amdgpu 0000:65:00.0: amdgpu: ring vcn_unified_0 uses VM inv eng 0 on hub 8
[ 1193.288030] amdgpu 0000:65:00.0: amdgpu: ring jpeg_dec_0 uses VM inv eng 1 on hub 8
[ 1193.288031] amdgpu 0000:65:00.0: amdgpu: ring mes_kiq_3.1.0 uses VM inv eng 13 on hub 0
[ 1193.288032] amdgpu 0000:65:00.0: amdgpu: ring vpe uses VM inv eng 4 on hub 8
[ 1193.296470] amdgpu 0000:65:00.0: amdgpu: GPU reset(8) succeeded!
[ 1193.296483] amdgpu 0000:65:00.0: [drm] device wedged, but recovered through reset
[ 1193.314883] [drm:amdgpu_cs_ioctl [amdgpu]] *ERROR* Failed to initialize parser -125!
[ 1194.454120] cosmic-app-libr[13243]: segfault at 25c ip 000074b8e2c01d2c sp 000074b89b7f82a0 error 6 in libwayland-client.so.0.23.1[8d2c,74b8e2bff000+6000] likely on CPU 3 (core 3, socket 0)
[ 1194.454135] Code: c3 00 00 00 01 81 fb 00 00 f0 00 77 61 49 8b 04 24 48 c1 e8 03 39 d8 72 65 39 c3 74 21 49 8b 44 24 10 43 8d 54 2d 00 48 09 d1 <48> 89 0c d8 31 c0 48 83 c4 18 5b 41 5c 41 5d 5d c3 0f 1f 00 be 08
[ 1194.454751] cosmic-files-ap[14024]: segfault at 224 ip 000071bfd607fd2c sp 000071bfbc5f1370 error 6 in libwayland-client.so.0.23.1[8d2c,71bfd607d000+6000] likely on CPU 2 (core 2, socket 0)
[ 1194.454761] Code: c3 00 00 00 01 81 fb 00 00 f0 00 77 61 49 8b 04 24 48 c1 e8 03 39 d8 72 65 39 c3 74 21 49 8b 44 24 10 43 8d 54 2d 00 48 09 d1 <48> 89 0c d8 31 c0 48 83 c4 18 5b 41 5c 41 5d 5d c3 0f 1f 00 be 08
[ 1194.455090] cosmic-workspac[13145]: segfault at 224 ip 0000792821878d2c sp 000079279e5ef670 error 6 in libwayland-client.so.0.23.1[8d2c,792821876000+6000] likely on CPU 2 (core 2, socket 0)
[ 1194.455097] Code: c3 00 00 00 01 81 fb 00 00 f0 00 77 61 49 8b 04 24 48 c1 e8 03 39 d8 72 65 39 c3 74 21 49 8b 44 24 10 43 8d 54 2d 00 48 09 d1 <48> 89 0c d8 31 c0 48 83 c4 18 5b 41 5c 41 5d 5d c3 0f 1f 00 be 08

and while chromium is breify still responsive:
pete@pop-os:~$ nvidia-smi
Thu Jul 30 09:46:17 2026
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 595.84 Driver Version: 595.84 CUDA Version: 13.2 |
+-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA GeForce RTX 4070 ... Off | 00000000:64:00.0 Off | N/A |
| N/A 29C P8 7W / 52W | 2MiB / 8188MiB | 0% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| No running processes found |
+-----------------------------------------------------------------------------------------+

pete@pop-os:~$ lsof -w /dev/dri/renderD* 2>/dev/null | awk '{print $1, $NF}' | sort -u
chrome /dev/dri/renderD128
chrome /dev/dri/renderD129
COMMAND NAME
cosmic-ap /dev/dri/renderD128
cosmic-co /dev/dri/renderD129
cosmic-pa /dev/dri/renderD128
cosmic-wo /dev/dri/renderD129
xdg-deskt /dev/dri/renderD128
Xwayland /dev/dri/renderD128

@Drakulix

Copy link
Copy Markdown
Member Author

And on Nvidia mode when chromium causes it to wedge:

Note that pop-os' nvidia mode does nothing for cosmic. I strongly suggest to not use it.

The wedging however seems entirely unrelated to the problem this PR tries to solve and your amd-card is probably your integrated gpu, so I guess it works? How did you test your PR then?

@petegee

petegee commented Jul 31, 2026

Copy link
Copy Markdown

Yes the iGPU is AMD 890M.

Neither your fix, nor mine, have fixed the issue. I have built and installed from both branches and tested on my POP 24.04. Neither have fixed the wedging. I tried the comp from the 1COSMIC 1.5 release today, and that didnt change it either.

Not sure what to do next. Is there anything you want me to try?

@Drakulix
Drakulix requested a review from a team July 31, 2026 09:43
@Drakulix

Copy link
Copy Markdown
Member Author

Yes the iGPU is AMD 890M.

Neither your fix, nor mine, have fixed the issue. I have built and installed from both branches and tested on my POP 24.04. Neither have fixed the wedging. I tried the comp from the 1COSMIC 1.5 release today, and that didnt change it either.

Not sure what to do next. Is there anything you want me to try?

No, the wedging is a kernel bug, so nothing to be done from the compositor side.

I'll go ahead with this fix then, since a couple of additional reports came up regarding device selection.

@Drakulix
Drakulix requested a review from a team July 31, 2026 10:36
@petegee

petegee commented Aug 1, 2026

Copy link
Copy Markdown

No, the wedging is a kernel bug, so nothing to be done from the compositor side.

Oh? Is this a known issue? Is there an upstream fix? GH issue?

Some things make me wonder tho:

  • Pop 22.04 with 7.0.9 is stable as on the exact same machine. Daily driver.
  • Pop 24 with 7.0.11 is not stable - wedges

@petegee

petegee commented Aug 1, 2026

Copy link
Copy Markdown

I have been working through this with claude, and the updating to Mesa to 26.1.6 from ppa:kisak/kisak-mesa has significantly improved things for me. I we still get the odd and non-disruptive ring reset, but no longer do we get the full wedge crash/restart - so 24.04 is now pretty usable. This is what claude wants to add to this converstation:

The remaining wedging I reported turned out to be below the compositor — gfx_0.0.0 ring stalls on gfx1150 under normal desktop load, with guilty-process attribution rotating across clients (firefox, chrome, code, and cosmic-comp itself). Ruled out: MES fw 0x80→0x88, amdgpu.cwsr_enable=0, AMD_DEBUG=nongg, mesa_glthread=false, multi-GPU path. Mesa 25.1.5 → constant stalls escalating to MES failure + MODE2 (session death); Mesa 25.3.x (kisak) → occasional stalls with clean per-ring recovery. Kernel 7.0.11. So cosmic-comp is exonerated for #2149; shipping Mesa ≥26.1.6 (or the gfx115x fixes) for 24.04 would remove the fatal escalation for Strix users.

https://gitlab.freedesktop.org/drm/amd/-/work_items?show=eyJpaWQiOiI1NTQ4IiwiZnVsbF9wYXRoIjoiZHJtL2FtZCIsImlkIjoxNTQ1NjZ9

@Drakulix
Drakulix force-pushed the fix-check-all-connectors_noble branch from 9c95ebf to 12f1875 Compare August 20, 2026 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants