drm: TTY + AMD Dual GPU (incl. laptops with iGPU + dGPU)
Issue Description: gamescope fails to initialize due to its DRM module not finding any connected (display) connector on a Framework 16 laptop with RX 7700S dGPU.
Expected Behavior: The eDP-1 connection should read as "connected" in the logs, and gamescope should start.
Actual Behavior: The eDP-1 connection reads as "disconnected" in the logs, and gamescope fails to start.
Command: STEAM_MULTIPLE_XWAYLANDS=1 gamescope -W 2560 -H 1600 -r 165 -e --xwayland-count 2 -- steam -gamepadui -steamdeck
[gamescope] [Info] console: gamescope version 3.14.29-9-g94271f31
[gamescope] [Info] vulkan: selecting physical device 'AMD Radeon RX 7700S (RADV NAVI33)': queue family 1 (general queue family 0)
[gamescope] [Info] vulkan: physical device supports DRM format modifiers
[gamescope] [Info] wlserver: [backend/headless/backend.c:67] Creating headless backend
[gamescope] [Info] wlserver: [libseat] [libseat/backend/seatd.c:64] Could not connect to socket /run/seatd.sock: No such file or directory
[gamescope] [Info] wlserver: [libseat] [libseat/libseat.c:76] Backend 'seatd' failed to open seat, skipping
[gamescope] [Info] wlserver: [libseat] [libseat/libseat.c:73] Seat opened with backend 'logind'
[gamescope] [Info] wlserver: [backend/session/session.c:108] Successfully loaded libseat session
[gamescope] [Info] drm: opening DRM node '/dev/dri/card1'
[gamescope] [Info] drm: Connectors:
[gamescope] [Info] drm: DP-1 (disconnected)
[gamescope] [Info] drm: eDP-1 (disconnected)
[gamescope] [Info] drm: cannot find any connected connector!
[gamescope] [Error] drm: Failed to find a primary plane
Failed to create backend.
Possibly related to: https://github.com/ValveSoftware/gamescope/issues/1125
Is this a gamescope bug? If the connector reads as disconnected... I am not really sure what we can do about it?
Can you send output of drm_info?
Maybe we are missing some dpms/code to "connect" or something... But I haven't seen that before... :/
Sure! Thanks for asking. The computer is a Framework 16 laptop with dGPU. I'm attaching the output of drm_info here as "drm_info.txt":
drm_info.txt
I see that drm_info indeed reports eDP-1 as disconnected, but it is definitely connected-- the screen is on and working!
Same issue here with a Zephyrus G14 2022 (680M + 6700S). If i disable the 6700S it works fine but once I enable it gamescope can't seem to find the connector. It looks for the screen on the dGPU. The screen is connected to the iGPU.
drm_info_dgpu_igpu.txt
drm_info_igpu_only.txt
I too have the exact same issue; same exact laptop as @rothn.
I have somewhat resolved this by using my laptop MUX switch. It switches the connector from the iGPU to the dGPU and thus it works.
I have somewhat resolved this by using my laptop MUX switch. It switches the connector from the iGPU to the dGPU and thus it works.
Unfortunately, my laptop does not have a manual MUX switch (even in the UEFI) apart from physically removing the dGPU module. Which is possible on this Framework, but not practical.
Is there a command-line argument or variable to force Gamescope to run on the iGPU?
Is there a command-line argument or variable to force Gamescope to run on the iGPU?
Man, that would be great. Hopefully the devs let us know. I did not see anything like that in the help or the source when I looked.
After some searching, I was able to force Gamescope to run on my dGPU:
MESA_VK_DEVICE_SELECT="1002:73df" gamescope -e -O DP-1 -- steam -bigpicture
To list the available devices, I had to run the following:
MESA_VK_DEVICE_SELECT="list" vkgears
Which returned the following output:
selectable devices:
GPU 0: 1002:73df "AMD Radeon RX 6700M (RADV NAVI22)" discrete GPU 0000:03:00.0
GPU 1: 1002:1638 "AMD Radeon Graphics (RADV RENOIR)" integrated GPU 0000:06:00.0
Hope this helps!
Edit: It's also worth mentioning that gamescope has the following option that seems to do the same thing, though I haven't had the chance to try it:
--prefer-vk-device prefer Vulkan device for compositing (ex: 1002:7300)
gamescope -e -O DP-1 --prefer-vk-device 1002:73df -- steam -bigpicture should achieve the same thing to choose a Vulkan device for compositing fwiw. does choosing a Vulkan device explicitly fix the disconnected connector issue as it appeared in drm_info?
does choosing a Vulkan device explicitly fix the disconnected connector issue as it appeared in drm_info?
I'm not sure, as I haven't experienced the disconnected connector issue. In my case, gamescope would ignore any output I selected and always run on my laptop's built-in monitor unless I explicitly select my dGPU
I think I found the problem. The MUX switch isn't activating properly in the TTY, as on my system, it's still connected to the iGPU with no way of directly forcing the screen to connect to the dGPU directly. Running the following command in a TTY (where 1002:15bf is the AMD Radeon 780M iGPU in my laptop's AMD Ryzen 9 7940HS) works as expected:
gamescope --mangoapp -e -O DP-1 --prefer-vk-device 1002:15bf -- steam -steamdeck -steamos3
Could the below failure by default be the result of gamescope attempting to run on a GPU that isn't able to connect to the screen via the MUX?
[gamescope] [Error] drm: Failed to find a primary plane
Failed to create backend.
That is also what happens on my laptop without the -O DP-1 --prefer-vk-device 1002:15bf part of the command. As Framework has not released an option in the UEFI to use the manual MUX even in the UEFI (which does exist as the laptop has AMD Smart Access Graphics on Windows), could this issue be tripping up Gamescope?
@cameronbosch yes, very good call there. it's actually in OP's DRM info as well now that I take a closer look. It shows the laptop's iGPU connected on /dev/dri/card2 with eDP attached to the internal display, while the dGPU is present first on /dev/dri/card1 without any connectors attached to displays.
I think what happens here is that when gamescope tries to run on the dGPU in the DRM backend it needs to use atomic modesetting and KMS. This ends up being an issue because a KMS device is already claimed and being used by the iGPU. if OP were to try gamescope --prefer-vk-device 1002:15bf -W 2560 -H 1600 -r 165 -e --xwayland-count 2 -- steam -gamepadui -steamdeck it should work, with the caveat that it will be compositing on the iGPU.
I can't say that I know enough about kernel modesetting to figure if there's a better way we can handle this situation within gamescope that will let us use non-active dGPUs to composite, but this does at least seem to be the source of the issue as filed here.
I also noticed that running games in full screen would often cause both KWin's Wayland session and (more commonly) Gamescope to lock up; requiring me to switch to a TTY and then back to Gamescope. This would sometimes need to happen three to six times before I could play for a few minutes.
On KWin this is even worse, as doing the TTY and back swtich only makes the screen go black (not a kernel panic as the caps lock key on my keyboard doesn't blink) and I then have to hard reset the computer. In this case, this can happen even with the game in windowed mode.
This could be an AMD Mesa or a recent Linux kernel issue introduced since at least kernel version 6.7 and not before (it still happens and is getting worse and more common since 6.12) as I have seen other users on Framework's forums have this exact same issue with their AMD based laptops.
Also, on bootup, by removing the loglevel=3 message from my GRUB boot parameters, this message that appears to be what I think is a kernel oops appears before the laptop then continues to boot normally.
loglevel=3 message from my GRUB boot parameters, this message that appears to be what I think is a kernel oops appears before the laptop then continues to boot normally.amdgpu 0000:03:00.0: [drm] Unsupported pwrseq engine id: 2!
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: ------------[ cut here ]------------
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: WARNING: CPU: 10 PID: 323 at drivers/gpu/drm/amd/amdgpu/../display/dc/dcn31/dcn31_panel_cntl.c:186 dcn31_panel_cntl_construct.cold+0x1e/0x2e [amdgpu]
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: Modules linked in: ext4 crc32c_generic mbcache usbhid(+) ccp jbd2 amdgpu(+) crct10dif_pclmul crc32_pclmul amdxcp crc32c_intel i2c_algo_bit drm_ttm_helper polyval_clmulni polyval_generic ttm ghash_clmulni_intel drm_exec sha512_ssse3 gpu_sched sha256_ssse3 drm_suballoc_helper sha1_ssse3 drm_buddy nvme aesni_intel ucsi_acpi drm_display_helper typec_ucsi gf128mul nvme_core cec hid_sensor_hub crypto_simd hid_multitouch roles hid_generic cryptd sp5100_tco crc16 video nvme_auth typec i2c_hid_acpi wmi i2c_hid vboxnetflt(OE) vboxnetadp(OE) vboxdrv(OE) pkcs8_key_parser i2c_dev crypto_user
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: CPU: 10 UID: 0 PID: 323 Comm: (udev-worker) Tainted: G OE 6.12.10-arch1-1 #1 ac0cff2c6581af0a10f6e278cbc98026cc1e3dec
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: Tainted: [O]=OOT_MODULE, [E]=UNSIGNED_MODULE
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: Hardware name: Framework Laptop 16 (AMD Ryzen 7040 Series)/FRANMZCP09, BIOS 03.05 11/13/2024
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: RIP: 0010:dcn31_panel_cntl_construct.cold+0x1e/0x2e [amdgpu]
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: Code: 2e c1 e8 e6 55 d8 f1 e9 82 ac f1 ff 48 8b 42 10 48 8b 38 48 85 ff 74 04 48 8b 7f 08 89 ca 48 c7 c6 18 0d 2e c1 e8 c3 55 d8 f1 <0f> 0b b8 0f 00 00 00 48 8b 53 08 e9 0b e2 f1 ff 48 8b 7f 08 5b 48
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: RSP: 0018:ffff985280e375c0 EFLAGS: 00010246
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: RAX: 0000000000000000 RBX: ffff89b8c1773240 RCX: 0000000000000027
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: RDX: 0000000000000000 RSI: 0000000000000001 RDI: ffff89c79ff218c0
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: RBP: ffff985280e375f8 R08: 0000000000000000 R09: ffff985280e37330
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: R10: ffffffffb3cb5528 R11: 0000000000000003 R12: ffff89b8cc0cb100
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: R13: ffff89b8cf7f1600 R14: ffffffffc1165180 R15: 0000000000000000
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: FS: 00007d191cc6b880(0000) GS:ffff89c79ff00000(0000) knlGS:0000000000000000
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: CR2: 000063dd6241a000 CR3: 000000010f9da000 CR4: 0000000000f50ef0
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: PKRU: 55555554
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: Call Trace:
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: <TASK>
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: ? dcn31_panel_cntl_construct.cold+0x1e/0x2e [amdgpu 339295965688ae1ec04f4a1eca4d6cba2ce4f47c]
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: ? __warn.cold+0x93/0xf6
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: ? dcn31_panel_cntl_construct.cold+0x1e/0x2e [amdgpu 339295965688ae1ec04f4a1eca4d6cba2ce4f47c]
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: ? report_bug+0xff/0x140
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: ? handle_bug+0x58/0x90
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: ? exc_invalid_op+0x17/0x70
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: ? asm_exc_invalid_op+0x1a/0x20
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: ? dcn31_panel_cntl_construct.cold+0x1e/0x2e [amdgpu 339295965688ae1ec04f4a1eca4d6cba2ce4f47c]
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: dcn32_panel_cntl_create+0x37/0x50 [amdgpu 339295965688ae1ec04f4a1eca4d6cba2ce4f47c]
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: link_create+0xa1b/0xd10 [amdgpu 339295965688ae1ec04f4a1eca4d6cba2ce4f47c]
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: create_links+0x148/0x440 [amdgpu 339295965688ae1ec04f4a1eca4d6cba2ce4f47c]
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: dc_create+0x337/0x6a0 [amdgpu 339295965688ae1ec04f4a1eca4d6cba2ce4f47c]
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: amdgpu_dm_init+0x358/0x2020 [amdgpu 339295965688ae1ec04f4a1eca4d6cba2ce4f47c]
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: ? srso_alias_return_thunk+0x5/0xfbef5
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: ? srso_alias_return_thunk+0x5/0xfbef5
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: ? vprintk_emit+0x156/0x330
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: ? srso_alias_return_thunk+0x5/0xfbef5
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: ? dev_vprintk_emit+0x181/0x1b0
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: dm_hw_init+0x13/0x30 [amdgpu 339295965688ae1ec04f4a1eca4d6cba2ce4f47c]
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: amdgpu_device_init.cold+0x15e3/0x20d5 [amdgpu 339295965688ae1ec04f4a1eca4d6cba2ce4f47c]
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: amdgpu_driver_load_kms+0x19/0x70 [amdgpu 339295965688ae1ec04f4a1eca4d6cba2ce4f47c]
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: amdgpu_pci_probe+0x19d/0x410 [amdgpu 339295965688ae1ec04f4a1eca4d6cba2ce4f47c]
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: local_pci_probe+0x42/0x90
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: pci_device_probe+0x22f/0x270
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: really_probe+0xdb/0x340
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: ? pm_runtime_barrier+0x54/0x90
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: ? __pfx___driver_attach+0x10/0x10
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: __driver_probe_device+0x78/0x110
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: driver_probe_device+0x1f/0xa0
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: __driver_attach+0xba/0x1c0
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: bus_for_each_dev+0x8c/0xe0
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: bus_add_driver+0x112/0x1f0
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: driver_register+0x72/0xd0
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: ? __pfx_amdgpu_init+0x10/0x10 [amdgpu 339295965688ae1ec04f4a1eca4d6cba2ce4f47c]
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: do_one_initcall+0x58/0x310
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: do_init_module+0x60/0x230
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: init_module_from_file+0x89/0xe0
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: idempotent_init_module+0x11e/0x310
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: __x64_sys_finit_module+0x5e/0xb0
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: do_syscall_64+0x82/0x190
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: ? srso_alias_return_thunk+0x5/0xfbef5
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: ? srso_alias_return_thunk+0x5/0xfbef5
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: ? syscall_exit_to_user_mode+0x37/0x1c0
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: ? srso_alias_return_thunk+0x5/0xfbef5
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: ? do_syscall_64+0x8e/0x190
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: ? srso_alias_return_thunk+0x5/0xfbef5
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: ? syscall_exit_to_user_mode+0x37/0x1c0
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: ? srso_alias_return_thunk+0x5/0xfbef5
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: ? do_syscall_64+0x8e/0x190
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: ? srso_alias_return_thunk+0x5/0xfbef5
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: ? syscall_exit_to_user_mode+0x37/0x1c0
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: ? srso_alias_return_thunk+0x5/0xfbef5
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: ? do_syscall_64+0x8e/0x190
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: ? srso_alias_return_thunk+0x5/0xfbef5
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: ? do_syscall_64+0x8e/0x190
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: ? srso_alias_return_thunk+0x5/0xfbef5
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: ? srso_alias_return_thunk+0x5/0xfbef5
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: entry_SYSCALL_64_after_hwframe+0x76/0x7e
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: RIP: 0033:0x7d191d462ffd
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d e3 fc 0c 00 f7 d8 64 89 01 48
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: RSP: 002b:00007ffdb86464a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: RAX: ffffffffffffffda RBX: 000063dd623f7a10 RCX: 00007d191d462ffd
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: RDX: 0000000000000004 RSI: 00007d191cc6505d RDI: 000000000000002c
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: RBP: 00007ffdb8646560 R08: 0000000000000001 R09: 00007ffdb86464f0
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: R10: 0000000000000040 R11: 0000000000000246 R12: 00007d191cc6505d
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: R13: 0000000000020000 R14: 000063dd623f9450 R15: 000063dd624062b0
Feb 02 19:49:30 cameron-frameworklaptop16 kernel: </TASK>
Feb 02 18:37:03 cameron-frameworklaptop16 kernel: ---[ end trace 0000000000000000 ]---
Thanks for the edit; I was having trouble trying to get that formatting to work! ;)
For a hybrid graphics Zephyrus G14 2022 (GA402RK), it often fails to detect my USB-C monitor (or when I use the HDMI). I figured out that I need to use my right USB-C port, but even then, sometimes it fails to detect it. Not a solution, but at least a clue if anyone is experiencing the same as me.
This issue is persistant in asus tuf gamming fx505dy. Unfortunately the bios does not have a disable igpu option :(
I'm also interested in a solution.
I disabled my iGPU in BIOS thinking everything will then run off my dGPU. Instead it just left my USB 4 monitors without video.
At a loss here
I disabled my iGPU in BIOS thinking everything will then run off my dGPU. Instead it just left my USB 4 monitors without video.
At a loss here
Check your manufacturers spec sheet, it's possible those USB 4 ports are wired to the iGPU and without it, external monitors won't work.
@checkinindza I suspect you may be correct. When I think about most dGPUs, almost none use USB4 for output. Getting an HDMI adapter to see if it works and improves performance.
I still find it odd that gamescope would have issues with the iGPU and not the dGPU given the traditional use of the APU from the SD. You would think that, if the USB4 ports are hardwired to the iGPU, gamescope would handle that fine and would instead choke on the dGPU. I’m finding the opposite.
EDIT: This is a Chinese mini pc (minisforum HX100G), so spec sheet details are limited.
I see that
drm_infoindeed reports eDP-1 as disconnected, but it is definitely connected-- the screen is on and working!
Just you wait till you see mine. Zero display connectors.
Clearly relying on display connectors for gamescope is just wrong. As you an see my system reports zero display connectors yet i have a working screen and hdmi out. I have the same issues as you might imagine. Gamescope in Drm/embedded mode fails to start.