You are not logged in.

#1 2019-05-17 22:43:17

cybe-arch
Member
Registered: 2007-09-02
Posts: 56
Website

[SOLVED] Issues with hybrid graphics in sway

I have Lenovo ThinkPad X1 Extreme with the following graphic cards:

00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 630 (Mobile)
01:00.0 VGA compatible controller: NVIDIA Corporation GP107M [GeForce GTX 1050 Ti Mobile] (rev a1)

Everything work as expected when I only use the Intel card, but when I try to activate both GPU's with (according to sway wiki):

lsmod tells me that both i915 and nouveau are loaded. There are two devices in /dev/dri: card0 and card1

So I try to start sway

WLR_DRM_DEVICES=/dev/dri/card0:/dev/dri/card1 sway

This results in ~10 seconds hang, then sway starts, but only the Intel card is used.

dmesg gives me:

[   51.122665] ------------[ cut here ]------------
[   51.122665] nouveau 0000:01:00.0: timeout
[   51.122695] WARNING: CPU: 1 PID: 1328 at drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgf100.c:224 gf100_vmm_invalidate+0x1ba/0x1d0 [nouveau]
[   51.122695] Modules linked in: btusb btrtl btbcm btintel uvcvideo videobuf2_vmalloc bluetooth videobuf2_memops videobuf2_v4l2 videobuf2_common wacom videodev hid_generic usbhid hid media ecdh_generic sd_mod uas usb_storage scsi_mod joydev mousedev arc4 intel_rapl x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm snd_soc_skl snd_soc_hdac_hda iwlmvm snd_hda_ext_core irqbypass snd_soc_skl_ipc snd_soc_sst_ipc snd_hda_codec_hdmi mac80211 crct10dif_pclmul snd_soc_sst_dsp crc32_pclmul snd_soc_acpi_intel_match snd_soc_acpi ghash_clmulni_intel snd_hda_codec_realtek nouveau snd_soc_core snd_hda_codec_generic 8250_dw nls_iso8859_1 snd_compress mei_hdcp ac97_bus nls_cp437 snd_pcm_dmaengine vfat iTCO_wdt snd_hda_intel fat iTCO_vendor_support snd_hda_codec iwlwifi wmi_bmof intel_wmi_thunderbolt aesni_intel snd_hda_core aes_x86_64 crypto_simd snd_hwdep thinkpad_acpi snd_pcm input_leds cryptd glue_helper cfg80211 intel_cstate nvram processor_thermal_device mei_me ledtrig_audio snd_timer tpm_crb
[   51.122704]  intel_uncore mxm_wmi idma64 snd intel_rapl_perf psmouse tpm_tis ucsi_acpi tpm_tis_core pcspkr ttm mei rfkill i2c_i801 tpm typec_ucsi thunderbolt intel_lpss_pci intel_lpss intel_pch_thermal intel_soc_dts_iosf typec wmi soundcore ac battery e1000e rng_core int3403_thermal int340x_thermal_zone int3400_thermal evdev pcc_cpufreq acpi_thermal_rel mac_hid crypto_user acpi_call(OE) ip_tables x_tables ext4 crc32c_generic crc16 mbcache jbd2 serio_raw atkbd libps2 xhci_pci crc32c_intel xhci_hcd i8042 serio i915 intel_gtt i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops drm agpgart
[   51.122711] CPU: 1 PID: 1328 Comm: sway Tainted: G        W  OE     5.1.2-arch1-1-ARCH #1
[   51.122711] Hardware name: LENOVO 20MF000XMX/20MF000XMX, BIOS N2EET36W (1.18 ) 01/08/2019
[   51.122735] RIP: 0010:gf100_vmm_invalidate+0x1ba/0x1d0 [nouveau]
[   51.122735] Code: 40 10 48 8b 78 10 48 8b 5f 50 48 85 db 75 04 48 8b 5f 10 e8 f8 04 06 da 48 89 da 48 c7 c7 68 9e 2d c1 48 89 c6 e8 30 ff b0 d9 <0f> 0b e9 5a ff ff ff e8 1a fc b0 d9 66 2e 0f 1f 84 00 00 00 00 00
[   51.122736] RSP: 0018:ffffbbdf046e79a0 EFLAGS: 00010286
[   51.122736] RAX: 0000000000000000 RBX: ffff9faab9f91670 RCX: 0000000000000000
[   51.122737] RDX: 0000000000000007 RSI: 0000000000000082 RDI: 00000000ffffffff
[   51.122737] RBP: ffff9faab7d1c620 R08: 000000000000061e R09: 0000000000000004
[   51.122737] R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000001
[   51.122738] R13: ffff9faaa06b4200 R14: ffff9faaa060fa40 R15: 0000000000000012
[   51.122738] FS:  00007fc18886a300(0000) GS:ffff9faabe440000(0000) knlGS:0000000000000000
[   51.122739] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   51.122739] CR2: 0000558f6f08a778 CR3: 000000085e242006 CR4: 00000000003606e0
[   51.122740] Call Trace:
[   51.122763]  ? gf100_vmm_invalidate_pdb+0x30/0x30 [nouveau]
[   51.122785]  nvkm_vmm_ptes_unmap_put+0x1e7/0x2b0 [nouveau]
[   51.122808]  nvkm_vmm_put_locked+0x1eb/0x230 [nouveau]
[   51.122831]  nvkm_uvmm_mthd+0x249/0x710 [nouveau]
[   51.122833]  ? preempt_count_add+0x79/0xb0
[   51.122844]  nvkm_ioctl+0xd8/0x170 [nouveau]
[   51.122855]  nvif_object_mthd+0x108/0x130 [nouveau]
[   51.122868]  ? nvkm_object_dtor+0xbe/0x100 [nouveau]
[   51.122880]  ? nvkm_object_del+0x5e/0x80 [nouveau]
[   51.122891]  nvif_vmm_put+0x5c/0x80 [nouveau]
[   51.122917]  nouveau_vma_del+0x70/0xb0 [nouveau]
[   51.122941]  nouveau_channel_del+0x9e/0x120 [nouveau]
[   51.122964]  ? nouveau_abi16_usif+0xc0/0xc0 [nouveau]
[   51.122988]  nouveau_abi16_chan_fini.isra.0+0xa0/0x100 [nouveau]
[   51.123011]  nouveau_abi16_ioctl_channel_free+0x6f/0x80 [nouveau]
[   51.123017]  drm_ioctl_kernel+0xb2/0xf0 [drm]
[   51.123023]  drm_ioctl+0x25f/0x3f0 [drm]
[   51.123046]  ? nouveau_abi16_usif+0xc0/0xc0 [nouveau]
[   51.123073]  nouveau_drm_ioctl+0x65/0xc0 [nouveau]
[   51.123074]  do_vfs_ioctl+0xa4/0x630
[   51.123075]  ksys_ioctl+0x60/0x90
[   51.123076]  __x64_sys_ioctl+0x16/0x20
[   51.123077]  do_syscall_64+0x5b/0x180
[   51.123078]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[   51.123079] RIP: 0033:0x7fc18a736cbb
[   51.123080] Code: 0f 1e fa 48 8b 05 a5 d1 0c 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 75 d1 0c 00 f7 d8 64 89 01 48
[   51.123080] RSP: 002b:00007ffe0a58b658 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[   51.123081] RAX: ffffffffffffffda RBX: 0000559ec6ca1300 RCX: 00007fc18a736cbb
[   51.123081] RDX: 00007ffe0a58b6a8 RSI: 0000000040046443 RDI: 000000000000000e
[   51.123082] RBP: 00007ffe0a58b6a8 R08: 000000000000001f R09: 0000559ec6ca28e0
[   51.123082] R10: 0000000000000005 R11: 0000000000000246 R12: 0000000040046443
[   51.123082] R13: 000000000000000e R14: 00007fc1868d94f5 R15: 0000559ec6c642f8
[   51.123083] ---[ end trace 0c8a93b8498a83a7 ]---

Running on latest kernel (5.1.2-arch1-1-ARCH)

It's probably a nouveau driver issue with GP107M, right?

... Or did anyone get it to work?

Last edited by cybe-arch (2019-05-21 08:36:03)

Offline

#2 2019-05-18 10:54:41

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,431

Re: [SOLVED] Issues with hybrid graphics in sway

Likely yes, I don't think nouveau has sensible support for these cards yet.

Offline

#3 2019-05-21 08:18:49

cybe-arch
Member
Registered: 2007-09-02
Posts: 56
Website

Re: [SOLVED] Issues with hybrid graphics in sway

Thanks V1del.

GP107M seems to correspond to the NV130 (pascal) family and that seems to be marked as WIP in the nouveau featureMatrix

Last edited by cybe-arch (2019-05-21 08:32:39)

Offline

#4 2019-05-27 03:59:36

hedgepigdaniel
Member
Registered: 2014-01-07
Posts: 42

Re: [SOLVED] Issues with hybrid graphics in sway

Are you sure the card0 (which you've put first) is the intel card and not vice versa? did you try the other way around? To find out, try

udevadm info -a -n /dev/dri/card[0/1]

My understanding is that sway supports outputs on multiple GPUs, but only renders on a single GPU (the first one when WLR_DRM_DEVICES is specified). Since nouveau doesn't support any rendering features on newer cards, its important that the intel GPU is chosen for rendering.

On the nouveau feature matrix page, kernel mode setting is listed as working for all nvidia chips up to NV160, so I think it should work with sway as an output.

I have a Dell XPS 15 9560, and sway starts fine for me with

WLR_DRM_DEVICES=/dev/dri/card0:/dev/dri/card1 sway

. There are no outputs wired to the nvidia card (which is card1) though, so its difficult to verify that its really working.

Offline

#5 2019-05-27 04:17:41

hedgepigdaniel
Member
Registered: 2014-01-07
Posts: 42

Re: [SOLVED] Issues with hybrid graphics in sway

Another things to add, I'm running with the noaccel option set for nouveau (I can't remember why I needed it)

Offline

Board footer

Powered by FluxBB