web-dev-qa-db-ja.com

LinuxでVulkanがBadLengthで失敗しています(ポリリクエストが大きすぎるか、内部Xlib長エラー)

Vulkanに基づくものはすべて起動時に失敗します。システムは、X11とKDEを備えたArchLinuxです。 Bumblebee(optirun)はOpenGLで期待どおりに機能し、失敗しません。 optirunがないと、統合ビデオカード(またはドライバー、mesa)がサポートしていないように見えるため、Vulkanは失敗します。 optirunを使用すると、次の結果が得られます

$ optirun -vv vulkaninfo
[124888.207097] [DEBUG]Reading file: /etc/bumblebee/bumblebee.conf
[124888.208006] [DEBUG]optirun version 3.2.1 starting...
[124888.208080] [DEBUG]Active configuration:
[124888.208090] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf
[124888.208106] [DEBUG] X display: :8
[124888.208130] [DEBUG] LD_LIBRARY_PATH: /usr/lib/nvidia:/usr/lib32/nvidia:/usr/lib:/usr/lib32
[124888.208158] [DEBUG] Socket path: /var/run/bumblebee.socket
[124888.208180] [DEBUG] Accel/display bridge: auto
[124888.208194] [DEBUG] VGL Compression: proxy
[124888.208207] [DEBUG] VGLrun extra options: 
[124888.208220] [DEBUG] Primus LD Path: /usr/lib/primus:/usr/lib32/primus
[124888.208375] [DEBUG]Using auto-detected bridge virtualgl
[124889.370796] [INFO]Response: Yes. X is active.

[124889.370808] [INFO]Running application using virtualgl.
[124889.370905] [DEBUG]Process vglrun started, PID 19159.
X Error of failed request:  BadLength (poly request too large or internal Xlib length error)
  Major opcode of failed request:  151 (GLX)
  Minor opcode of failed request:  7 (X_GLXQueryVersion)
  Serial number of failed request:  9
  Current serial number in output stream:  9
[124889.595290] [DEBUG]SIGCHILD received, but wait failed with No child processes
[124889.595308] [DEBUG]Socket closed.
[124889.595321] [DEBUG]Killing all remaining processes.

システムに関するいくつかの情報

$ optirun --version
optirun (Bumblebee) 3.2.1

$ pacaur -Qi vulkan-tools 
Name            : vulkan-tools
Version         : 1.1.114-1

$ pacaur -Qi xorg-server 
Name            : xorg-server
Version         : 1.20.5-2

Journalctlからの情報

Aug 11 18:02:34 OrestArch kwin_x11[831]: qt.qpa.xcb: Unhandled client message:  "_NET_CURRENT_DESKTOP"
Aug 11 18:02:37 OrestArch kwin_x11[831]: qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 54472, resource id: 0, major code: 14 (GetGeometry), minor code: 0
Aug 11 18:02:37 OrestArch kwin_x11[831]: qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 54473, resource id: 0, major code: 14 (GetGeometry), minor code: 0
Aug 11 18:02:37 OrestArch kwin_x11[831]: qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 54474, resource id: 0, major code: 14 (GetGeometry), minor code: 0
Aug 11 18:02:37 OrestArch kwin_x11[831]: qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 54475, resource id: 0, major code: 14 (GetGeometry), minor code: 0
Aug 11 18:02:37 OrestArch kwin_x11[831]: qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 54476, resource id: 0, major code: 14 (GetGeometry), minor code: 0
Aug 11 18:02:37 OrestArch kwin_x11[831]: qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 54477, resource id: 0, major code: 14 (GetGeometry), minor code: 0
Aug 11 18:02:37 OrestArch kwin_x11[831]: qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 54478, resource id: 0, major code: 14 (GetGeometry), minor code: 0
Aug 11 18:02:37 OrestArch kwin_x11[831]: qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 54479, resource id: 0, major code: 14 (GetGeometry), minor code: 0
Aug 11 18:02:37 OrestArch kwin_x11[831]: qt.qpa.xcb: Unhandled client message:  "_NET_CURRENT_DESKTOP"
Aug 11 18:02:45 OrestArch wpa_supplicant[591]: nl80211: send_and_recv->nl_recvmsgs failed: -33
Aug 11 18:03:13 OrestArch kwin_x11[831]: qt.qpa.xcb: Unhandled client message:  "_NET_CURRENT_DESKTOP"
Aug 11 18:03:14 OrestArch kwin_x11[831]: qt.qpa.xcb: Unhandled client message:  "_NET_CURRENT_DESKTOP"
Aug 11 18:03:17 OrestArch kwin_x11[831]: qt.qpa.xcb: Unhandled client message:  "_NET_CURRENT_DESKTOP"
Aug 11 18:03:51 OrestArch kernel: bbswitch: enabling discrete graphics
Aug 11 18:03:51 OrestArch kernel: nvidia-nvlink: Nvlink Core is being initialized, major device number 236
Aug 11 18:03:51 OrestArch kernel: NVRM: loading NVIDIA UNIX x86_64 Kernel Module  430.40  Sun Jul 21 04:53:48 CDT 2019
Aug 11 18:03:52 OrestArch kernel: nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  430.40  Sun Jul 21 04:57:42 CDT 2019
Aug 11 18:03:52 OrestArch bumblebeed[571]: [127184.603240] [WARN][XORG] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
Aug 11 18:03:52 OrestArch bumblebeed[571]: [127184.603253] [WARN][XORG] (WW) Warning, couldn't open module mouse
Aug 11 18:03:52 OrestArch bumblebeed[571]: [127184.603261] [WARN][XORG] (WW) NVIDIA(0): Unable to get display device for DPI computation.
Aug 11 18:03:52 OrestArch bumblebeed[571]: [127184.603265] [WARN][XORG] (WW) NVIDIA(0): Option "NoLogo" is not used
Aug 11 18:03:52 OrestArch bumblebeed[571]: [127184.603272] [WARN][XORG] (WW) Warning, couldn't open module mouse
Aug 11 18:03:52 OrestArch bumblebeed[571]: [127184.603276] [ERROR][XORG] (EE) PreInit returned 2 for "<default pointer>"
Aug 11 18:03:52 OrestArch bumblebeed[571]: [127184.603280] [ERROR][XORG] (EE) PreInit returned 2 for "<default keyboard>"
Aug 11 18:03:52 OrestArch audit[21655]: ANOM_ABEND auid=1000 uid=1000 gid=1000 ses=2 pid=21655 comm="vulkaninfo" exe="/usr/bin/vulkaninfo" sig=11 res=1
Aug 11 18:03:52 OrestArch kernel: vulkaninfo[21655]: segfault at 10 ip 00007fc63ce62d14 sp 00007ffe39105e58 error 4 in libpthread-2.29.so[7fc63ce5e000+f000]
Aug 11 18:03:52 OrestArch kernel: Code: ff 48 8d 0d 6e a9 00 00 ba 4f 02 00 00 48 8d 35 f7 a7 00 00 48 8d 3d 0d a8 00 00 e8 46 ba ff ff 66 0f 1f 44 00 00 f3 0f 1e fa <8b> 47 10 49 89 f8 89 c2 81 e2 7f 01 00 00 83 e0 7c 0f 85 a5 00 00
Aug 11 18:03:52 OrestArch kernel: audit: type=1701 audit(1565535832.160:209): auid=1000 uid=1000 gid=1000 ses=2 pid=21655 comm="vulkaninfo" exe="/usr/bin/vulkaninfo" sig=11 res=1
Aug 11 18:03:52 OrestArch systemd[1]: Started Process Core Dump (PID 21664/UID 0).
-- Subject: A start job for unit [email protected] has finished successfully
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- A start job for unit [email protected] has finished successfully.
-- 
-- The job identifier is 5178.
Aug 11 18:03:52 OrestArch audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-coredump@13-21664-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Aug 11 18:03:52 OrestArch kernel: audit: type=1130 audit(1565535832.166:210): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-coredump@13-21664-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Aug 11 18:03:52 OrestArch systemd-coredump[21665]: Process 21655 (vulkaninfo) of user 1000 dumped core.

                                                   Stack trace of thread 21655:
                                                   #0  0x00007fc63ce62d14 __pthread_mutex_lock (libpthread.so.0)
                                                   #1  0x00007fc63b80e2cc n/a (libnvidia-glcore.so.430.40)
                                                   #2  0x00007fc63c967558 n/a (libGLX_nvidia.so.0)
                                                   #3  0x00007fc63c9621c9 n/a (libGLX_nvidia.so.0)
                                                   #4  0x00007fc63c9633d4 n/a (libGLX_nvidia.so.0)
                                                   #5  0x00007fc63d2363ca XCloseDisplay (libX11.so.6)
                                                   #6  0x00007fc63d3cb034 XCloseDisplay (libvglfaker.so)
                                                   #7  0x00007fc63c983fbf n/a (libGLX_nvidia.so.0)
                                                   #8  0x00007fc63d471b4d _dl_fini (ld-linux-x86-64.so.2)
                                                   #9  0x00007fc63d025e70 __run_exit_handlers (libc.so.6)
                                                   #10 0x00007fc63d025fae exit (libc.so.6)
                                                   #11 0x00007fc63d25b3d8 _XDefaultError (libX11.so.6)
                                                   #12 0x00007fc63d25b50a _XError (libX11.so.6)
                                                   #13 0x00007fc63d258398 n/a (libX11.so.6)
                                                   #14 0x00007fc63d259596 _XReply (libX11.so.6)
                                                   #15 0x00007fc63c960d92 n/a (libGLX_nvidia.so.0)
                                                   #16 0x00007fc63c98404a n/a (libGLX_nvidia.so.0)
                                                   #17 0x00007fc63c9843c9 vk_icdNegotiateLoaderICDInterfaceVersion (libGLX_nvidia.so.0)
                                                   #18 0x00007fc63d1d8216 n/a (libvulkan.so.1)
                                                   #19 0x00007fc63d1dce68 n/a (libvulkan.so.1)
                                                   #20 0x00007fc63d1de85e vkEnumerateInstanceExtensionProperties (libvulkan.so.1)
                                                   #21 0x000056501afa4736 n/a (vulkaninfo)
                                                   #22 0x000056501af9e2e7 n/a (vulkaninfo)
                                                   #23 0x00007fc63d00fee3 __libc_start_main (libc.so.6)
                                                   #24 0x000056501afa0f2e n/a (vulkaninfo)

どんな助けでも大歓迎です。前もって感謝します。

2
OrestH

これに対する解決策は、最新バージョンのNvidiaドライバーとprimus_vkをインストールすることでした。これは、デフォルトでBumblebeeがVulkanをサポートしていないためです。

1
OrestH