Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to map scanout buffer 2 monitors #435

Open
rowanG077 opened this issue Oct 24, 2023 · 7 comments
Open

Failed to map scanout buffer 2 monitors #435

rowanG077 opened this issue Oct 24, 2023 · 7 comments

Comments

@rowanG077
Copy link

rowanG077 commented Oct 24, 2023

  • Linux distribution and its version: NixOS unstable
  • Linux kernel version 6.5.0
  • Xorg version (if used): Using wayland
  • Desktop environment in use: Hyprland
  • two 2560x1440 monitors

I'm running hyprland on Aarch64 with this adapter: https://www.startech.com/en-nl/display-video-adapters/usb32dp24k60

When in use with one monitor it works without issues. However if I plug in the second monitor the monitor is "recognized" in hyprland but the monitor itself does not display anything.

Looking into dmesg I can see spam of

[18033.491780] evdi: [E] evdi_painter_grabpix_ioctl:1076 Failed to map scanout buffer

messages. Sometimes a message

[18033.491780] evdi: [E] evdi_cursor_set:131 Failed to map cursor.

appears. But this is much, much rarer. Without the second monitor attached dmesg is clean.

Does anyone have a clue what is going wrong here? Is something misconfigured on my side?

@arcenik
Copy link

arcenik commented Oct 9, 2024

I have a simmilar issue, using hyprland/wayland with nvidia drivers

  • Distro: Arch Linux
  • Kernel: 6.11.2-arch1-1
  • evdi 1.14.6-0
  • displaylink 6.0-0
  • nvidia 560.35.03-11
  • wayland 1.23.1-1

The screen is detected and connect but it remain black.

The kernel logs:

kernel: evdi: [I] (card0) Notifying display power state: on
kernel: evdi: [I] (card0) Notifying mode changed: 1024x600@60; bpp 32; pixel format XR24 little-endian (0x34325258)
kernel: evdi: [I] (card0) Notifying display power state: on
kernel: ------------[ cut here ]------------
kernel: ioremap on RAM at 0x000000015c2dd000 - 0x000000015c534fff
kernel: WARNING: CPU: 10 PID: 1431 at arch/x86/mm/ioremap.c:216 __ioremap_caller+0x2cd/0x340
kernel: Modules linked in: xt_CHECKSUM xt_MASQUERADE xt_conntrack ipt_REJECT nf_reject_ipv4 xt_tcpudp nft_compat nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv>
kernel:  videobuf2_memops snd_rawmidi i2c_piix4 typec_ucsi ideapad_laptop aesni_intel snd_soc_cs35l41_lib mdio_devres snd_hwdep videobuf2_v4l2 snd_seq_device mii gf128mul cryp>
kernel: CPU: 10 UID: 0 PID: 1431 Comm: ThreadedDevice_ Tainted: P        W  OE      6.11.2-arch1-1 #1 6667b52d0e7397e7c0c02157894d188bad0541b5
kernel: Tainted: [P]=PROPRIETARY_MODULE, [W]=WARN, [O]=OOT_MODULE, [E]=UNSIGNED_MODULE
kernel: Hardware name: LENOVO 82N6/LNVNB161216, BIOS GKCN65WW 01/16/2024
kernel: RIP: 0010:__ioremap_caller+0x2cd/0x340
kernel: Code: 1f fe ff ff 80 3d 6b 49 13 02 00 75 9d 48 8d 54 24 28 48 8d 74 24 18 48 c7 c7 3e 62 80 82 c6 05 51 49 13 02 01 e8 b3 de 01 00 <0f> 0b e9 79 ff ff ff 83 fd 04 75 >
kernel: RSP: 0018:ffffb5561c33f7f8 EFLAGS: 00010286
kernel: RAX: 0000000000000000 RBX: ffff999d6b0de800 RCX: 0000000000000027
kernel: RDX: ffff99abedf21a48 RSI: 0000000000000001 RDI: ffff99abedf21a40
kernel: RBP: 0000000000000001 R08: 0000000000000000 R09: ffffb5561c33f678
kernel: R10: ffffffff830b3fe8 R11: 0000000000000003 R12: 0000000000258000
kernel: R13: ffff999d63cbc300 R14: 0000000000000000 R15: 000000015c2dd000
kernel: FS:  000078c0360006c0(0000) GS:ffff99abedf00000(0000) knlGS:0000000000000000
kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
kernel: CR2: 000078bfc4004118 CR3: 000000013b73a000 CR4: 0000000000f50ef0
kernel: PKRU: 55555554
kernel: Call Trace:
kernel:  <TASK>
kernel:  ? __ioremap_caller+0x2cd/0x340
kernel:  ? __warn.cold+0x8e/0xe8
kernel:  ? __ioremap_caller+0x2cd/0x340
kernel:  ? report_bug+0xff/0x140
kernel:  ? console_unlock+0x84/0x130
kernel:  ? handle_bug+0x3c/0x80
kernel:  ? exc_invalid_op+0x17/0x70
kernel:  ? asm_exc_invalid_op+0x1a/0x20
kernel:  ? __ioremap_caller+0x2cd/0x340
kernel:  ? __ioremap_caller+0x2cd/0x340
kernel:  ? __nv_drm_gem_nvkms_map+0x60/0xa0 [nvidia_drm 642bde39f19425cc4d1989f872978c8194025324]
kernel:  __nv_drm_gem_nvkms_map+0x60/0xa0 [nvidia_drm 642bde39f19425cc4d1989f872978c8194025324]
kernel:  __nv_drm_gem_nvkms_prime_vmap+0x28/0x40 [nvidia_drm 642bde39f19425cc4d1989f872978c8194025324]
kernel:  nv_drm_gem_vmap+0x27/0x60 [nvidia_drm 642bde39f19425cc4d1989f872978c8194025324]
kernel:  drm_gem_vmap+0x22/0x50
kernel:  dma_buf_vmap+0x82/0x110
kernel:  evdi_gem_vmap+0x71/0x120 [evdi 8d9463ecdee08f7b83d22946c7ec042d57dab732]
kernel:  evdi_painter_grabpix_ioctl+0x3d5/0x580 [evdi 8d9463ecdee08f7b83d22946c7ec042d57dab732]
kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
kernel:  ? __check_object_size+0x50/0x220
kernel:  ? __pfx_evdi_painter_grabpix_ioctl+0x10/0x10 [evdi 8d9463ecdee08f7b83d22946c7ec042d57dab732]
kernel:  drm_ioctl_kernel+0xb3/0x100
kernel:  drm_ioctl+0x27a/0x510
kernel:  ? __pfx_evdi_painter_grabpix_ioctl+0x10/0x10 [evdi 8d9463ecdee08f7b83d22946c7ec042d57dab732]
kernel:  __x64_sys_ioctl+0x97/0xd0
kernel:  do_syscall_64+0x82/0x190
kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
kernel:  ? syscall_exit_to_user_mode+0x10/0x200
kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
kernel:  ? do_syscall_64+0x8e/0x190
kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
kernel:  ? do_syscall_64+0x8e/0x190
kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
kernel:  ? ttwu_queue_wakelist+0xd0/0xf0
kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
kernel:  ? try_to_wake_up+0x22f/0x660
kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
kernel:  ? wake_up_q+0x4e/0x90
kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
kernel:  ? futex_wake+0x187/0x1b0
kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
kernel:  ? __x64_sys_futex+0x127/0x1e0
kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
kernel:  ? syscall_exit_to_user_mode+0x10/0x200
kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
kernel:  ? do_syscall_64+0x8e/0x190
kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
kernel:  ? syscall_exit_to_user_mode+0x10/0x200
kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
kernel:  ? do_syscall_64+0x8e/0x190
kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
kernel:  ? do_user_addr_fault+0x36c/0x620
kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
kernel:  ? exc_page_fault+0x81/0x190
kernel:  entry_SYSCALL_64_after_hwframe+0x76/0x7e
kernel: RIP: 0033:0x78c063c34ced
kernel: Code: 04 25 28 00 00 00 48 89 45 c8 31 c0 48 8d 45 10 c7 45 b0 10 00 00 00 48 89 45 b8 48 8d 45 d0 48 89 45 c0 b8 10 00 00 00 0f 05 <89> c2 3d 00 f0 ff ff 77 1a 48 8b >
kernel: RSP: 002b:000078c035fff4e0 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
kernel: RAX: ffffffffffffffda RBX: 000078c035fff680 RCX: 000078c063c34ced
kernel: RDX: 000078c035fff550 RSI: 00000000c0286442 RDI: 00000000000000af
kernel: RBP: 000078c035fff530 R08: 000078c030005170 R09: 0000000000000001
kernel: R10: 0000000000000004 R11: 0000000000000246 R12: 000078bfc4004320
kernel: R13: 000078c035fff550 R14: 00000000000000af R15: 000078c035fff580
kernel:  </TASK>
kernel: ---[ end trace 0000000000000000 ]---
kernel: [drm] [nvidia-drm] [GPU ID 0x00000100] Failed to ioremap_wc NvKmsKapiMemory 0x0000000056d4f7e1
kernel: ------------[ cut here ]------------
kernel: WARNING: CPU: 10 PID: 1431 at drivers/dma-buf/dma-buf.c:1540 dma_buf_vmap+0xf1/0x110
kernel: Modules linked in: xt_CHECKSUM xt_MASQUERADE xt_conntrack ipt_REJECT nf_reject_ipv4 xt_tcpudp nft_compat nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv>
kernel:  videobuf2_memops snd_rawmidi i2c_piix4 typec_ucsi ideapad_laptop aesni_intel snd_soc_cs35l41_lib mdio_devres snd_hwdep videobuf2_v4l2 snd_seq_device mii gf128mul cryp>
kernel: CPU: 10 UID: 0 PID: 1431 Comm: ThreadedDevice_ Tainted: P        W  OE      6.11.2-arch1-1 #1 6667b52d0e7397e7c0c02157894d188bad0541b5
kernel: Tainted: [P]=PROPRIETARY_MODULE, [W]=WARN, [O]=OOT_MODULE, [E]=UNSIGNED_MODULE
kernel: Hardware name: LENOVO 82N6/LNVNB161216, BIOS GKCN65WW 01/16/2024
kernel: RIP: 0010:dma_buf_vmap+0xf1/0x110
kernel: Code: c0 01 89 43 28 48 85 c9 74 1c 48 8b 43 30 48 8b 53 38 49 89 04 24 49 89 54 24 08 eb c3 0f 0b b8 ea ff ff ff eb bc 0f 0b 0f 0b <0f> 0b eb b4 b8 ea ff ff ff eb ad >
kernel: RSP: 0018:ffffb5561c33f8b8 EFLAGS: 00010282
kernel: RAX: 00000000fffffff4 RBX: ffff999d63cbcc00 RCX: 0000000000000027
kernel: RDX: 0000000000000000 RSI: 0000000000000001 RDI: ffff99abedf21a40
kernel: RBP: ffffb5561c33f8e0 R08: 0000000000000000 R09: ffffb5561c33f6f8
kernel: R10: ffffffff830b3fe8 R11: 0000000000000003 R12: ffffb5561c33f8f0
kernel: R13: ffff999d63cbc300 R14: ffffb5561c33f990 R15: ffff999d09699018
kernel: FS:  000078c0360006c0(0000) GS:ffff99abedf00000(0000) knlGS:0000000000000000
kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
kernel: CR2: 000078bfc4004118 CR3: 000000013b73a000 CR4: 0000000000f50ef0
kernel: PKRU: 55555554
kernel: Call Trace:
kernel:  <TASK>
kernel:  ? dma_buf_vmap+0xf1/0x110
kernel:  ? __warn.cold+0x8e/0xe8
kernel:  ? dma_buf_vmap+0xf1/0x110
kernel:  ? report_bug+0xff/0x140
kernel:  ? handle_bug+0x3c/0x80
kernel:  ? exc_invalid_op+0x17/0x70
kernel:  ? asm_exc_invalid_op+0x1a/0x20
kernel:  ? dma_buf_vmap+0xf1/0x110
kernel:  ? dma_buf_vmap+0x82/0x110
kernel:  evdi_gem_vmap+0x71/0x120 [evdi 8d9463ecdee08f7b83d22946c7ec042d57dab732]
kernel:  evdi_painter_grabpix_ioctl+0x3d5/0x580 [evdi 8d9463ecdee08f7b83d22946c7ec042d57dab732]
kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
kernel:  ? __check_object_size+0x50/0x220
kernel:  ? __pfx_evdi_painter_grabpix_ioctl+0x10/0x10 [evdi 8d9463ecdee08f7b83d22946c7ec042d57dab732]
kernel:  drm_ioctl_kernel+0xb3/0x100
kernel:  drm_ioctl+0x27a/0x510
kernel:  ? __pfx_evdi_painter_grabpix_ioctl+0x10/0x10 [evdi 8d9463ecdee08f7b83d22946c7ec042d57dab732]
kernel:  __x64_sys_ioctl+0x97/0xd0
kernel:  do_syscall_64+0x82/0x190
kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
kernel:  ? syscall_exit_to_user_mode+0x10/0x200
kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
kernel:  ? do_syscall_64+0x8e/0x190
kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
kernel:  ? do_syscall_64+0x8e/0x190
kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
kernel:  ? ttwu_queue_wakelist+0xd0/0xf0
kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
kernel:  ? try_to_wake_up+0x22f/0x660
kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
kernel:  ? wake_up_q+0x4e/0x90
kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
kernel:  ? futex_wake+0x187/0x1b0
kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
kernel:  ? __x64_sys_futex+0x127/0x1e0
kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
kernel:  ? syscall_exit_to_user_mode+0x10/0x200
kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
kernel:  ? do_syscall_64+0x8e/0x190
kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
kernel:  ? syscall_exit_to_user_mode+0x10/0x200
kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
kernel:  ? do_syscall_64+0x8e/0x190
kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
kernel:  ? do_user_addr_fault+0x36c/0x620
kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
kernel:  ? exc_page_fault+0x81/0x190
kernel:  entry_SYSCALL_64_after_hwframe+0x76/0x7e
kernel: RIP: 0033:0x78c063c34ced
kernel: Code: 04 25 28 00 00 00 48 89 45 c8 31 c0 48 8d 45 10 c7 45 b0 10 00 00 00 48 89 45 b8 48 8d 45 d0 48 89 45 c0 b8 10 00 00 00 0f 05 <89> c2 3d 00 f0 ff ff 77 1a 48 8b >
kernel: RSP: 002b:000078c035fff4e0 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
kernel: RAX: ffffffffffffffda RBX: 000078c035fff680 RCX: 000078c063c34ced
kernel: RDX: 000078c035fff550 RSI: 00000000c0286442 RDI: 00000000000000af
kernel: RBP: 000078c035fff530 R08: 000078c030005170 R09: 0000000000000001
kernel: R10: 0000000000000004 R11: 0000000000000246 R12: 000078bfc4004320
kernel: R13: 000078c035fff550 R14: 00000000000000af R15: 000078c035fff580
kernel:  </TASK>
kernel: ---[ end trace 0000000000000000 ]---
kernel: evdi: [E] evdi_painter_grabpix_ioctl:1076 Failed to map scanout buffer
kernel: evdi: [W] evdi_painter_connect:886 (card0) Double connect - replacing 00000000d367d6ae with 00000000d367d6ae
kernel: evdi: [I] (card0) Connected with Task 1197 (DesktopManagerE) of process 1163 (DisplayLinkMana)
kernel: evdi: [I] (card0) Connector state: connected

kernel: evdi: [I] (card0) Notifying mode changed: 1024x600@60; bpp 32; pixel format XR24 little-endian (0x34325258)
kernel: evdi: [I] (card0) Notifying display power state: on
kernel: [drm] [nvidia-drm] [GPU ID 0x00000100] Failed to ioremap_wc NvKmsKapiMemory 0x0000000077bf745d
kernel: evdi: [E] evdi_painter_grabpix_ioctl:1076 Failed to map scanout buffer
kernel: evdi: [I] (card0) Opened by Task 1376 (gnome-shell) of process 1376 (gnome-shell)
kernel: [drm] [nvidia-drm] [GPU ID 0x00000100] Failed to ioremap_wc NvKmsKapiMemory 0x00000000903ab520
kernel: evdi: [E] evdi_painter_grabpix_ioctl:1076 Failed to map scanout buffer

kernel: evdi: [E] evdi_painter_grabpix_ioctl:1076 Failed to map scanout buffer
kernel: evdi: [E] evdi_painter_grabpix_ioctl:1076 Failed to map scanout buffer
kernel: evdi: [E] evdi_painter_grabpix_ioctl:1076 Failed to map scanout buffer
kernel: evdi: [E] evdi_painter_grabpix_ioctl:1076 Failed to map scanout buffer
kernel: evdi: [E] evdi_painter_grabpix_ioctl:1076 Failed to map scanout buffer
kernel: evdi: [E] evdi_painter_grabpix_ioctl:1076 Failed to map scanout buffer
kernel: evdi: [E] evdi_painter_grabpix_ioctl:1076 Failed to map scanout buffer
kernel: evdi: [E] evdi_painter_grabpix_ioctl:1076 Failed to map scanout buffer
kernel: evdi: [E] evdi_painter_grabpix_ioctl:1076 Failed to map scanout buffer
kernel: evdi: [E] evdi_painter_grabpix_ioctl:1076 Failed to map scanout buffer
kernel: evdi: [E] evdi_painter_grabpix_ioctl:1076 Failed to map scanout buffer
kernel: evdi: [E] evdi_painter_grabpix_ioctl:1076 Failed to map scanout buffer

@arcenik
Copy link

arcenik commented Oct 9, 2024

I've just updated evdi to 1.14.7 and I have the same result

@piotrminkina
Copy link

It seems that the same problem is with me in version 1.14.6 and 1.14.7. The two external monitors are detected and even the mouse pointer is visible, but nothing else is displayed on those screens. It also seems to be a Wayland-specific problem, because when I force a GNOME session to start in X11, I can see the desktop on both monitors. This is not a solution for me, as I have a very large difference in pixel density on the built-in screen on my laptop compared to the external monitors. The fonts on the built-in screen are very small and not very readable.

My logs from dmesg: dmesg.log.gz.

@piotrminkina
Copy link

I noticed that the evdi driver works together with the nouveau driver, even in Wayland. So the problem is with the evdi module working together with the NVidia proprietary driver. I have the driver version 565.57.01, installed according to the instructions https://rpmfusion.org/Howto/NVIDIA.

@piotrminkina
Copy link

I also noticed that this problem occurs when the Nvidia GPU is selected by gnome-shell as the primary GPU, and the display engine is Wayland. This problem does not occur when Intel is selected as the primary GPU.

The problem does not occur under the following conditions:

$ journalctl -b0 | grep -E 'GPU.+primary'
gru 09 17:06:54 orilla gnome-shell[2553]: Boot VGA GPU /dev/dri/card1 selected as primary
gru 09 17:07:02 orilla gnome-shell[5637]: Boot VGA GPU /dev/dri/card1 selected as primary

$ drm_info -j | jq 'with_entries(.value |= .driver.desc)'
{
  "/dev/dri/card1": "Intel Graphics",
  "/dev/dri/card0": "NVIDIA DRM driver",
  "/dev/dri/card5": "Extensible Virtual Display Interface"
}

$ echo $XDG_SESSION_TYPE
wayland

$ glxinfo | egrep "OpenGL vendor|OpenGL renderer"        
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) Graphics (RPL-S)

@mathias-ewald
Copy link

Any updates? I am seeing the same problem.

@sand-39
Copy link

sand-39 commented Mar 27, 2025

I have had the same behaviour (black screen except for mouse).

I have the same success as @piotrminkina by disabling Wayland via /etc/gdm3/custom.conf.

I have NVIDIA and don't have the option of Intel graphics.

Choosing Nouveau driver did not work for me.

OS: Ubuntu 24.10 (It stopped working when I upgraded from 24.04)
Graphics: NVIDIA GeForce GTX 1050 Ti
Docking station: HP USB C/A Universal Dock G2
Firmware: 1.1.23.0 Rev.B

I had trouble getting it to work on 24.04 as well and had to manually install the latest driver (at the time) from Synaptics and choose the correct version of the NVIDIA drivers to get a working combination. (Sorry, I can't remember the combination.)

With the upgrade to 24.10, the previous version(s) did not work (and any newer version from the Synaptics website also did not work) I removed the manually installed version and reverted to the Ubuntu repository version. I did not find this post at the time and did not try disabling Wayland when using the latest versions from the Synaptics site..

$ apt list displaylink*
displaylink-driver/stable,now 6.1.0-17 amd64 [installed]

$ apt list evdi
evdi/stable,now 1.14.8-133 amd64 [installed,automatic]

Not sure where the mismatch between displaylink-driver, evdi and NVIDIA driver lies, but choosing X11 worked.

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

No branches or pull requests

5 participants