You are not logged in.

#1 2024-01-24 08:49:05

woodape
Member
Registered: 2015-03-25
Posts: 159

[SOLVED] libva and vdpau related segfaults

I can't seem to get anything related to libva and vdpau to work after a recent update. This seems to affect several games on Steam and hardware acceleration with Firefox, VLC, mpv.

For example, VLC gives a black screen with any video file:

VLC media player 3.0.20 Vetinari (revision 3.0.20-0-g6f0d0ab126b)
[000063dc95146550] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
DRI3 not available
failed to load driver: zink
[000063dc952180e0] main audio output error: too low audio sample frequency (0)
[0000722268ca3c60] main decoder error: failed to create audio output
[000063dc952180e0] vlcpulse audio output error: digital pass-through stream connection failure: Input/Output error
[000063dc952180e0] main audio output error: module not functional
[0000722268ca3c60] main decoder error: failed to create audio output
MESA: error: CreateSwapchainKHR failed with VK_ERROR_INITIALIZATION_FAILED
MESA: error: zink: could not create swapchain
libva error: vaGetDriverNames() failed with unknown libva error
[0000722248001f50] glconv_vaapi_x11 gl error: vaInitialize: unknown libva error
[0000722248001f50] glconv_vaapi_drm gl error: vaInitialize: unknown libva error
[0000722248001f50] glconv_vaapi_drm gl error: vaInitialize: unknown libva error
Xlib:  extension "DRI2" missing on display ":0".
libva error: vaGetDriverNames() failed with operation failed
[0000722248001f50] glconv_vaapi_drm gl error: vaInitialize: operation failed
MESA: error: CreateSwapchainKHR failed with VK_ERROR_INITIALIZATION_FAILED
MESA: error: zink: could not create swapchain

mpv with --hwdec=auto segfaults:

 (+) Video --vid=1 (*) 'Encoded by: ImEverlasting' (hevc 1920x1080 23.976fps)
 (+) Audio --aid=1 --alang=eng (*) (eac3 6ch 48000Hz)
     Subs  --sid=1 --slang=eng (subrip)
     Subs  --sid=2 --slang=eng 'SDH' (subrip)
[1]    2493 segmentation fault (core dumped)  mpv --hwdec=auto mm.mkv

looking at the dumped core:

Program terminated with signal SIGSEGV, Segmentation fault.
#0  va_DRM_GetDrmDriverName (fd=<optimized out>) at ../libva/va/drm/va_drm_utils.c:40
40	    drmVersionPtr drm_version = drmGetVersion(fd);

I now get these errors in my Sway log:

00:00:00.003 [INFO] [sway/main.c:333] Starting sway version 1.9-dev-a4e85332 (Jan 24 2024, branch 'master')
00:00:00.003 [DEBUG] [sway/server.c:167] Initializing Wayland server
00:00:00.004 [INFO] [wlr] [libseat] [libseat/backend/seatd.c:64] Could not connect to socket /run/seatd.sock: No such file or directory
00:00:00.004 [INFO] [wlr] [libseat] [libseat/libseat.c:76] Backend 'seatd' failed to open seat, skipping
00:00:00.011 [INFO] [wlr] [libseat] [libseat/libseat.c:73] Seat opened with backend 'logind'
00:00:00.011 [INFO] [wlr] [backend/session/session.c:109] Successfully loaded libseat session
00:00:00.018 [INFO] [wlr] [backend/backend.c:212] Found 2 GPUs
00:00:00.018 [INFO] [wlr] [backend/drm/backend.c:203] Initializing DRM backend for /dev/dri/card2 (amdgpu)
00:00:00.018 [DEBUG] [wlr] [backend/drm/drm.c:111] Using atomic DRM interface
00:00:00.018 [DEBUG] [wlr] [backend/drm/drm.c:124] ADDFB2 modifiers unsupported
00:00:00.018 [INFO] [wlr] [backend/drm/drm.c:256] Found 6 DRM CRTCs
00:00:00.018 [INFO] [wlr] [backend/drm/drm.c:214] Found 12 DRM planes
00:00:00.019 [INFO] [wlr] [backend/drm/backend.c:203] Initializing DRM backend for /dev/dri/card1 (amdgpu)
00:00:00.019 [DEBUG] [wlr] [backend/drm/drm.c:111] Using atomic DRM interface
00:00:00.019 [DEBUG] [wlr] [backend/drm/drm.c:124] ADDFB2 modifiers unsupported
00:00:00.019 [INFO] [wlr] [backend/drm/drm.c:256] Found 5 DRM CRTCs
00:00:00.019 [INFO] [wlr] [backend/drm/drm.c:214] Found 10 DRM planes
00:00:00.029 [INFO] [wlr] [render/egl.c:206] Supported EGL client extensions: EGL_EXT_platform_base EGL_EXT_device_base EGL_EXT_device_enumeration EGL_EXT_device_query EGL_KHR_client_get_all_proc_addresses EGL_EXT_client_extensions EGL_KHR_debug EGL_KHR_platform_x11 EGL_EXT_platform_x11 EGL_EXT_platform_device EGL_MESA_platform_surfaceless EGL_EXT_explicit_device EGL_KHR_platform_wayland EGL_EXT_platform_wayland EGL_KHR_platform_gbm EGL_MESA_platform_gbm EGL_EXT_platform_xcb
00:00:00.032 [ERROR] [wlr] [EGL] command: eglQueryDevicesEXT, error: EGL_BAD_ALLOC (0x3003), message: "EGL_BAD_ALLOC error: In eglQueryDevicesEXT: Failed to allocate device list. "
00:00:00.033 [ERROR] [wlr] [EGL] command: eglQueryDevicesEXT, error: EGL_BAD_ALLOC (0x3003), message: "EGL_BAD_ALLOC error: In eglQueryDevicesEXT: Failed to allocate device list. "

when I run 'vainfo' I get:

Trying display: wayland
[1]    1693 segmentation fault (core dumped) vainfo

looking at that core dump I get:

[root@kiwi bam]# coredumpctl debug 1693
           PID: 1693 (vainfo)
           UID: 1000 (bam)
           GID: 1000 (bam)
        Signal: 11 (SEGV)
     Timestamp: Wed 2024-01-24 10:30:36 SAST (1min 10s ago)
  Command Line: vainfo
    Executable: /usr/bin/vainfo
 Control Group: /user.slice/user-1000.slice/session-3.scope
          Unit: session-3.scope
         Slice: user-1000.slice
       Session: 3
     Owner UID: 1000 (bam)
       Boot ID: 37600786fe7943ebb6ea313e71bee3cf
    Machine ID: a3a2693a50a746608b8ef3fc720386ed
      Hostname: kiwi
       Storage: /var/lib/systemd/coredump/core.vainfo.1000.37600786fe7943ebb6ea313e71bee3cf.1693.1706085036000000.zst (present)
  Size on Disk: 64.8K
       Message: Process 1693 (vainfo) of user 1000 dumped core.

                Stack trace of thread 1693:
                #0  0x000076e07b50d8c7 n/a (libva-wayland.so.2 + 0x28c7)
                #1  0x000076e07b690cdf vaInitialize (libva.so.2 + 0x5cdf)
                #2  0x00006547aa1582a6 n/a (vainfo + 0x22a6)
                #3  0x000076e07b350cd0 n/a (libc.so.6 + 0x27cd0)
                #4  0x000076e07b350d8a __libc_start_main (libc.so.6 + 0x27d8a)
                #5  0x00006547aa158875 n/a (vainfo + 0x2875)
                ELF object binary architecture: AMD x86-64

likewise with 'vdpauinfo':

display: :0   screen: 0
Error creating VDPAU device: 1

My 2 GPUs from 'lspci -v':

01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Lexa XT [Radeon PRO WX 3200] (rev 10) (prog-if 00 [VGA controller])
	Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Lexa XT [Radeon PRO WX 3200]
	Flags: bus master, fast devsel, latency 0, IRQ 134
	Memory at e0000000 (64-bit, prefetchable) [size=256M]
	Memory at f0000000 (64-bit, prefetchable) [size=2M]
	I/O ports at e000 [size=256]
	Memory at f7e00000 (32-bit, non-prefetchable) [size=256K]
	Expansion ROM at f7e40000 [disabled] [size=128K]
	Capabilities: [48] Vendor Specific Information: Len=08 <?>
	Capabilities: [50] Power Management version 3
	Capabilities: [58] Express Legacy Endpoint, MSI 00
	Capabilities: [a0] MSI: Enable+ Count=1/1 Maskable- 64bit+
	Capabilities: [100] Vendor Specific Information: ID=0001 Rev=1 Len=010 <?>
	Capabilities: [150] Advanced Error Reporting
	Capabilities: [200] Physical Resizable BAR
	Capabilities: [270] Secondary PCI Express
	Capabilities: [2b0] Address Translation Service (ATS)
	Capabilities: [2c0] Page Request Interface (PRI)
	Capabilities: [2d0] Process Address Space ID (PASID)
	Capabilities: [320] Latency Tolerance Reporting
	Capabilities: [328] Alternative Routing-ID Interpretation (ARI)
	Capabilities: [370] L1 PM Substates
	Kernel driver in use: amdgpu
	Kernel modules: amdgpu

03:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Polaris 20 XL [Radeon RX 580 2048SP] (rev ef) (prog-if 00 [VGA controller])
	Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Polaris 20 XL [Radeon RX 580 2048SP]
	Flags: bus master, fast devsel, latency 0, IRQ 135
	Memory at c0000000 (64-bit, prefetchable) [size=256M]
	Memory at d0000000 (64-bit, prefetchable) [size=2M]
	I/O ports at d000 [size=256]
	Memory at f7d00000 (32-bit, non-prefetchable) [size=256K]
	Expansion ROM at 000c0000 [disabled] [size=128K]
	Capabilities: [48] Vendor Specific Information: Len=08 <?>
	Capabilities: [50] Power Management version 3
	Capabilities: [58] Express Legacy Endpoint, MSI 00
	Capabilities: [a0] MSI: Enable+ Count=1/1 Maskable- 64bit+
	Capabilities: [100] Vendor Specific Information: ID=0001 Rev=1 Len=010 <?>
	Capabilities: [150] Advanced Error Reporting
	Capabilities: [200] Physical Resizable BAR
	Capabilities: [270] Secondary PCI Express
	Capabilities: [2b0] Address Translation Service (ATS)
	Capabilities: [2c0] Page Request Interface (PRI)
	Capabilities: [2d0] Process Address Space ID (PASID)
	Capabilities: [320] Latency Tolerance Reporting
	Capabilities: [328] Alternative Routing-ID Interpretation (ARI)
	Capabilities: [370] L1 PM Substates
	Kernel driver in use: amdgpu
	Kernel modules: amdgpu

I have the following packages installed:

local/amdgpu-pro-oglp 23.30_1697785-1 (Radeon_Software_for_Linux)
    AMDGPU Pro OpenGL driver
local/amf-amdgpu-pro 23.30_1697785-1 (Radeon_Software_for_Linux)
    AMDGPU Pro Advanced Multimedia Framework
local/vulkan-amdgpu-pro 23.30_1697785-1 (Radeon_Software_for_Linux)
    AMDGPU Pro Vulkan driver
local/vulkan-headers 1:1.3.274-1 (vulkan-devel)
    Vulkan header files
local/vulkan-icd-loader 1.3.274-1
    Vulkan Installable Client Driver (ICD) Loader
local/vulkan-tools 1.3.269-1 (vulkan-devel)
    Vulkan Utilities and Tools
local/glu 9.0.3-1
    Mesa OpenGL utility library
local/lib32-mesa 1:23.3.3-1
    An open-source implementation of the OpenGL specification (32-bit)
local/mesa 1:23.3.3-1
    An open-source implementation of the OpenGL specification
local/mesa-utils 9.0.0-3
    Essential Mesa utilities
local/mesa-vdpau 1:23.3.3-1
    VDPAU drivers
local/lib32-libva 2.20.0-1
    Video Acceleration (VA) API for Linux (32-bit)
local/libva 2.20.0-1
    Video Acceleration (VA) API for Linux
local/libva-utils 2.20.1-1
    Intel VA-API Media Applications and Scripts for libva
local/libva-vdpau-driver 0.7.4-6
    VDPAU backend for VA API

Please let me know if there's any other info anyone would need to help.

Last edited by woodape (2024-01-25 08:42:14)

Offline

#2 2024-01-24 11:15:46

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,027

Re: [SOLVED] libva and vdpau related segfaults

 eglQueryDevicesEXT, error: EGL_BAD_ALLOC (0x3003), message: "EGL_BAD_ALLOC error: In eglQueryDevicesEXT: Failed to allocate device list. "
00:00:00.033 [ERROR] [wlr] [EGL] command: eglQueryDevicesEXT, error: EGL_BAD_ALLOC (0x3003), message: "EGL_BAD_ALLOC error: In eglQueryDevicesEXT: Failed to allocate device list. "

Those are probably related to the issue.

Please post the output of

$ eglinfo -B
$ progl eglinfo -B

Your videocards are both from GCN4 family, which has excellent support with the amd opensource drivers.
Is there a specfiic reason you are using the amd proprietary drivers ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2024-01-24 11:43:03

woodape
Member
Registered: 2015-03-25
Posts: 159

Re: [SOLVED] libva and vdpau related segfaults

Thanks for the reply Lone_Wolf. I do a lot of OpenCL programming, and the proprietary drivers are the only ones that work on these cards for OpenCL, I figured it was the same for the remaining drivers. The wiki says that the 'mesa-vdpau' package only supports Radeon 600 and newer, and my RX580 is older than that.

$ eglinfo -B
GBM platform:
eglinfo: eglInitialize failed

Wayland platform:
EGL API version: 1.5
EGL vendor string: Mesa Project
EGL version string: 1.5
EGL client APIs: OpenGL OpenGL_ES
OpenGL core profile vendor: AMD
OpenGL core profile renderer: AMD Radeon RX 580 2048SP (radeonsi, polaris10, LLVM 16.0.6, DRM 3.56, 6.7.1-arch1-1)
OpenGL core profile version: 4.6 (Core Profile) Mesa 23.3.3-arch1.1
OpenGL core profile shading language version: 4.60
OpenGL compatibility profile vendor: AMD
OpenGL compatibility profile renderer: AMD Radeon RX 580 2048SP (radeonsi, polaris10, LLVM 16.0.6, DRM 3.56, 6.7.1-arch1-1)
OpenGL compatibility profile version: 4.6 (Compatibility Profile) Mesa 23.3.3-arch1.1
OpenGL compatibility profile shading language version: 4.60
OpenGL ES profile vendor: AMD
OpenGL ES profile renderer: AMD Radeon RX 580 2048SP (radeonsi, polaris10, LLVM 16.0.6, DRM 3.56, 6.7.1-arch1-1)
OpenGL ES profile version: OpenGL ES 3.2 Mesa 23.3.3-arch1.1
OpenGL ES profile shading language version: OpenGL ES GLSL ES 3.20

X11 platform:
EGL API version: 1.5
EGL vendor string: Mesa Project
EGL version string: 1.5
EGL client APIs: OpenGL OpenGL_ES
OpenGL core profile vendor: Mesa
OpenGL core profile renderer: zink Vulkan 1.3(AMD Radeon Pro WX 3200 Series (AMD_PROPRIETARY))
OpenGL core profile version: 4.6 (Core Profile) Mesa 23.3.3-arch1.1
OpenGL core profile shading language version: 4.60
OpenGL compatibility profile vendor: Mesa
OpenGL compatibility profile renderer: zink Vulkan 1.3(AMD Radeon Pro WX 3200 Series (AMD_PROPRIETARY))
OpenGL compatibility profile version: 4.6 (Compatibility Profile) Mesa 23.3.3-arch1.1
OpenGL compatibility profile shading language version: 4.60
OpenGL ES profile vendor: Mesa
OpenGL ES profile renderer: zink Vulkan 1.3(AMD Radeon Pro WX 3200 Series (AMD_PROPRIETARY))
OpenGL ES profile version: OpenGL ES 3.2 Mesa 23.3.3-arch1.1
OpenGL ES profile shading language version: OpenGL ES GLSL ES 3.20

Surfaceless platform:
EGL API version: 1.5
EGL vendor string: Mesa Project
EGL version string: 1.5
EGL client APIs: OpenGL OpenGL_ES
OpenGL core profile vendor: AMD
OpenGL core profile renderer: AMD Radeon Pro WX 3200 Series (radeonsi, polaris12, LLVM 16.0.6, DRM 3.56, 6.7.1-arch1-1)
OpenGL core profile version: 4.6 (Core Profile) Mesa 23.3.3-arch1.1
OpenGL core profile shading language version: 4.60
OpenGL compatibility profile vendor: AMD
OpenGL compatibility profile renderer: AMD Radeon Pro WX 3200 Series (radeonsi, polaris12, LLVM 16.0.6, DRM 3.56, 6.7.1-arch1-1)
OpenGL compatibility profile version: 4.6 (Compatibility Profile) Mesa 23.3.3-arch1.1
OpenGL compatibility profile shading language version: 4.60
OpenGL ES profile vendor: AMD
OpenGL ES profile renderer: AMD Radeon Pro WX 3200 Series (radeonsi, polaris12, LLVM 16.0.6, DRM 3.56, 6.7.1-arch1-1)
OpenGL ES profile version: OpenGL ES 3.2 Mesa 23.3.3-arch1.1
OpenGL ES profile shading language version: OpenGL ES GLSL ES 3.20

Device platform:
Device #0:

Platform Device platform:
EGL API version: 1.5
EGL vendor string: Mesa Project
EGL version string: 1.5
EGL client APIs: OpenGL OpenGL_ES
OpenGL core profile vendor: AMD
OpenGL core profile renderer: AMD Radeon Pro WX 3200 Series (radeonsi, polaris12, LLVM 16.0.6, DRM 3.56, 6.7.1-arch1-1)
OpenGL core profile version: 4.6 (Core Profile) Mesa 23.3.3-arch1.1
OpenGL core profile shading language version: 4.60
OpenGL compatibility profile vendor: AMD
OpenGL compatibility profile renderer: AMD Radeon Pro WX 3200 Series (radeonsi, polaris12, LLVM 16.0.6, DRM 3.56, 6.7.1-arch1-1)
OpenGL compatibility profile version: 4.6 (Compatibility Profile) Mesa 23.3.3-arch1.1
OpenGL compatibility profile shading language version: 4.60
OpenGL ES profile vendor: AMD
OpenGL ES profile renderer: AMD Radeon Pro WX 3200 Series (radeonsi, polaris12, LLVM 16.0.6, DRM 3.56, 6.7.1-arch1-1)
OpenGL ES profile version: OpenGL ES 3.2 Mesa 23.3.3-arch1.1
OpenGL ES profile shading language version: OpenGL ES GLSL ES 3.20

Device #1:

Platform Device platform:
EGL API version: 1.5
EGL vendor string: Mesa Project
EGL version string: 1.5
EGL client APIs: OpenGL OpenGL_ES
OpenGL core profile vendor: AMD
OpenGL core profile renderer: AMD Radeon RX 580 2048SP (radeonsi, polaris10, LLVM 16.0.6, DRM 3.56, 6.7.1-arch1-1)
OpenGL core profile version: 4.6 (Core Profile) Mesa 23.3.3-arch1.1
OpenGL core profile shading language version: 4.60
OpenGL compatibility profile vendor: AMD
OpenGL compatibility profile renderer: AMD Radeon RX 580 2048SP (radeonsi, polaris10, LLVM 16.0.6, DRM 3.56, 6.7.1-arch1-1)
OpenGL compatibility profile version: 4.6 (Compatibility Profile) Mesa 23.3.3-arch1.1
OpenGL compatibility profile shading language version: 4.60
OpenGL ES profile vendor: AMD
OpenGL ES profile renderer: AMD Radeon RX 580 2048SP (radeonsi, polaris10, LLVM 16.0.6, DRM 3.56, 6.7.1-arch1-1)
OpenGL ES profile version: OpenGL ES 3.2 Mesa 23.3.3-arch1.1
OpenGL ES profile shading language version: OpenGL ES GLSL ES 3.20

Device #2:

Platform Device platform:
EGL API version: 1.5
EGL vendor string: Mesa Project
EGL version string: 1.5
EGL client APIs: OpenGL OpenGL_ES
OpenGL core profile vendor: Mesa
OpenGL core profile renderer: llvmpipe (LLVM 16.0.6, 256 bits)
OpenGL core profile version: 4.5 (Core Profile) Mesa 23.3.3-arch1.1
OpenGL core profile shading language version: 4.50
OpenGL compatibility profile vendor: Mesa
OpenGL compatibility profile renderer: llvmpipe (LLVM 16.0.6, 256 bits)
OpenGL compatibility profile version: 4.5 (Compatibility Profile) Mesa 23.3.3-arch1.1
OpenGL compatibility profile shading language version: 4.50
OpenGL ES profile vendor: Mesa
OpenGL ES profile renderer: llvmpipe (LLVM 16.0.6, 256 bits)
OpenGL ES profile version: OpenGL ES 3.2 Mesa 23.3.3-arch1.1
OpenGL ES profile shading language version: OpenGL ES GLSL ES 3.20
-> % progl eglinfo -B

GBM platform:
eglinfo: eglInitialize failed

Wayland platform:
eglinfo: eglInitialize failed

X11 platform:
eglinfo: eglInitialize failed

Surfaceless platform:
/usr/bin/progl: line 30: 26718 Segmentation fault      (core dumped) "$@"

The stacktrace for that core dump is:

                Stack trace of thread 26718:
                #0  0x00007e91323a975b n/a (amdgpu_dri.so + 0x15a975b)
                #1  0x00007e91321c1f2b n/a (amdgpu_dri.so + 0x13c1f2b)
                #2  0x00007e91321c5a11 n/a (amdgpu_dri.so + 0x13c5a11)
                #3  0x00007e91321d28fc n/a (amdgpu_dri.so + 0x13d28fc)
                #4  0x00007e913220f939 n/a (amdgpu_dri.so + 0x140f939)
                #5  0x00007e913205d5ba n/a (amdgpu_dri.so + 0x125d5ba)
                #6  0x00007e9132060bba n/a (amdgpu_dri.so + 0x1260bba)
                #7  0x00007e91320e6809 n/a (amdgpu_dri.so + 0x12e6809)
                #8  0x00007e91320dfb5c eglInitialize (amdgpu_dri.so + 0x12dfb5c)
                #9  0x000059a74dad2f7f n/a (eglinfo + 0xbf7f)
                #10 0x000059a74dacb2b6 n/a (eglinfo + 0x42b6)
                #11 0x00007e91350b3cd0 n/a (libc.so.6 + 0x27cd0)
                #12 0x00007e91350b3d8a __libc_start_main (libc.so.6 + 0x27d8a)
                #13 0x000059a74dacb6e5 n/a (eglinfo + 0x46e5)
                ELF object binary architecture: AMD x86-64
...
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007e91323a975b in ?? () from /opt/amdgpu/lib/x86_64-linux-gnu/dri/amdgpu_dri.so

Offline

#4 2024-01-24 12:47:51

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,027

Re: [SOLVED] libva and vdpau related segfaults

The wiki says that the 'mesa-vdpau' package only supports Radeon 600 and newer, and my RX580 is older than that.

On amd cards you don't want to use vdpau as vaapi tends to perform much better. Note that the wiki says R600 and the RX cards came after the R cards.

the eglinfo indicates both card are using the mesa driver.

You mentioned using OpenCL a lot, but I don't see which opencl implementation is used.

Are you using extra/rocm-opencl-runtime or aur https://aur.archlinux.org/packages/opencl-amd ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#5 2024-01-24 13:10:50

woodape
Member
Registered: 2015-03-25
Posts: 159

Re: [SOLVED] libva and vdpau related segfaults

I'm using the opencl-legacy-amdgpu-pro driver. I tried all the rocm drivers and they didn't work. This one works fine.

The wiki is a little confusing here. It says Radeon R600, but that doesn't exist. The GPU series R600 is actually marketed as the Radeon HD2000, not Radeon R600. The wiki actually refers to the 'libva-mesa-driver' package as supporting the Radeon HD2000, which would be in the series R600, but the wiki discusses it like it's 2 different cards. The Radeon 600 (which is what I thought the wiki was referring to) is in the GPU series "Artic Islands/Polaris" and comes after my RX580. List of AMD graphics processing units

I'll take your word for it that what was meant was the R600, i.e. the Radeon HD2000 card.

Installing the 'libva-mesa-driver' package still results in the same segfault when calling 'vainfo'

Offline

#6 2024-01-24 13:25:14

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,027

Re: [SOLVED] libva and vdpau related segfaults

Ah, an older version of opencl-amd with legacy support .
That should work fine with amd opensource drivers.

I suggest you remove amdgpu-pro-oglp and vulkan-amdgpu-pro and install vulkan-radeon / lib32-vulkan-radeon .
(I'm 95% certain AMF can add extra capabilities for OpenCL and coexists with opensource drivers)

Post the output of

$ vainfo
$ clinfo --list
$ vulkaninfo --summary    #comes_with_vulkan-tools_package

Last edited by Lone_Wolf (2024-01-24 13:25:49)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#7 2024-01-24 14:08:44

woodape
Member
Registered: 2015-03-25
Posts: 159

Re: [SOLVED] libva and vdpau related segfaults

Alright, I uninstalled amdgpu-pro-oglp and vulkan-amdgpu-pro, installed vulkan-radeon and lib32-vulkan-radeon then rebooted.

Same segfault as before:

-> % vainfo
Trying display: wayland
[1]    1050 segmentation fault (core dumped)  vainfo

These are all identical platforms, I have looked through the unabridged clinfo before and couldn't spot any difference between the 3.

-> % clinfo --list
Platform #0: AMD Accelerated Parallel Processing
 +-- Device #0: gfx803
 `-- Device #1: Ellesmere
Platform #1: AMD Accelerated Parallel Processing
 +-- Device #0: gfx803
 `-- Device #1: Ellesmere
Platform #2: AMD Accelerated Parallel Processing
 +-- Device #0: gfx803
 `-- Device #1: Ellesmere
-> % vulkaninfo --summary
ERROR: [Loader Message] Code 0 : loader_scanned_icd_add: Could not get 'vkCreateInstance' via 'vk_icdGetInstanceProcAddr' for ICD libGLX_nvidia.so.0
vulkan: No DRI3 support detected - required for presentation
Note: you can probably enable DRI3 in your Xorg config
vulkan: No DRI3 support detected - required for presentation
Note: you can probably enable DRI3 in your Xorg config
vulkan: No DRI3 support detected - required for presentation
Note: you can probably enable DRI3 in your Xorg config
vulkan: No DRI3 support detected - required for presentation
Note: you can probably enable DRI3 in your Xorg config
vulkan: No DRI3 support detected - required for presentation
Note: you can probably enable DRI3 in your Xorg config
vulkan: No DRI3 support detected - required for presentation
Note: you can probably enable DRI3 in your Xorg config
vulkan: No DRI3 support detected - required for presentation
Note: you can probably enable DRI3 in your Xorg config
vulkan: No DRI3 support detected - required for presentation
Note: you can probably enable DRI3 in your Xorg config
vulkan: No DRI3 support detected - required for presentation
Note: you can probably enable DRI3 in your Xorg config
vulkan: No DRI3 support detected - required for presentation
Note: you can probably enable DRI3 in your Xorg config
vulkan: No DRI3 support detected - required for presentation
Note: you can probably enable DRI3 in your Xorg config
vulkan: No DRI3 support detected - required for presentation
Note: you can probably enable DRI3 in your Xorg config
==========
VULKANINFO
==========

Vulkan Instance Version: 1.3.274


Instance Extensions: count = 23
-------------------------------
VK_EXT_acquire_drm_display             : extension revision 1
VK_EXT_acquire_xlib_display            : extension revision 1
VK_EXT_debug_report                    : extension revision 10
VK_EXT_debug_utils                     : extension revision 2
VK_EXT_direct_mode_display             : extension revision 1
VK_EXT_display_surface_counter         : extension revision 1
VK_EXT_surface_maintenance1            : extension revision 1
VK_EXT_swapchain_colorspace            : extension revision 4
VK_KHR_device_group_creation           : extension revision 1
VK_KHR_display                         : extension revision 23
VK_KHR_external_fence_capabilities     : extension revision 1
VK_KHR_external_memory_capabilities    : extension revision 1
VK_KHR_external_semaphore_capabilities : extension revision 1
VK_KHR_get_display_properties2         : extension revision 1
VK_KHR_get_physical_device_properties2 : extension revision 2
VK_KHR_get_surface_capabilities2       : extension revision 1
VK_KHR_portability_enumeration         : extension revision 1
VK_KHR_surface                         : extension revision 25
VK_KHR_surface_protected_capabilities  : extension revision 1
VK_KHR_wayland_surface                 : extension revision 6
VK_KHR_xcb_surface                     : extension revision 6
VK_KHR_xlib_surface                    : extension revision 6
VK_LUNARG_direct_driver_loading        : extension revision 1

Instance Layers: count = 7
--------------------------
VK_LAYER_MANGOAPP_overlay         Mangoapp Layer               1.3.0    version 1
VK_LAYER_MANGOHUD_overlay_x86_64  Vulkan Hud Overlay           1.3.0    version 1
VK_LAYER_NV_optimus               NVIDIA Optimus layer         1.3.260  version 1
VK_LAYER_VALVE_steam_fossilize_32 Steam Pipeline Caching Layer 1.3.207  version 1
VK_LAYER_VALVE_steam_fossilize_64 Steam Pipeline Caching Layer 1.3.207  version 1
VK_LAYER_VALVE_steam_overlay_32   Steam Overlay Layer          1.3.207  version 1
VK_LAYER_VALVE_steam_overlay_64   Steam Overlay Layer          1.3.207  version 1

Devices:
========
GPU0:
	apiVersion         = 1.3.267
	driverVersion      = 23.3.3
	vendorID           = 0x1002
	deviceID           = 0x6981
	deviceType         = PHYSICAL_DEVICE_TYPE_DISCRETE_GPU
	deviceName         = AMD Radeon Pro WX 3200 Series (RADV POLARIS12)
	driverID           = DRIVER_ID_MESA_RADV
	driverName         = radv
	driverInfo         = Mesa 23.3.3-arch1.1
	conformanceVersion = 1.2.7.1
	deviceUUID         = 00000000-0100-0000-0000-000000000000
	driverUUID         = 414d442d-4d45-5341-2d44-525600000000
GPU1:
	apiVersion         = 1.3.267
	driverVersion      = 23.3.3
	vendorID           = 0x1002
	deviceID           = 0x6fdf
	deviceType         = PHYSICAL_DEVICE_TYPE_DISCRETE_GPU
	deviceName         = AMD Radeon RX 580 2048SP (RADV POLARIS10)
	driverID           = DRIVER_ID_MESA_RADV
	driverName         = radv
	driverInfo         = Mesa 23.3.3-arch1.1
	conformanceVersion = 1.2.7.1
	deviceUUID         = 00000000-0300-0000-0000-000000000000
	driverUUID         = 414d442d-4d45-5341-2d44-525600000000

That last bit of error code made me realize I still have some Nvidia packages installed from when I had an Nvidia card installed more than a year ago:

nvidia-utils
lib32-nvidia-utils

Offline

#8 2024-01-24 14:20:11

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

Re: [SOLVED] libva and vdpau related segfaults

Are you exporting GBM bending environments/still have an autogenerated /etc/X11/xorg.conf from that?

printenv

Offline

#9 2024-01-24 17:24:28

woodape
Member
Registered: 2015-03-25
Posts: 159

Re: [SOLVED] libva and vdpau related segfaults

I'm using Sway so I don't think an Xorg config should matter?

Here's the printenv:

ALACRITTY_LOG=/tmp/Alacritty-1251.log
ALACRITTY_SOCKET=/run/user/1000/Alacritty-wayland-1-1251.sock
ALACRITTY_WINDOW_ID=100865506481088
BINARYEN_ROOT=/usr
BROWSER=/usr/bin/qutebrowser
CLOUDS=/home/bam/clouds
COLORTERM=truecolor
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
DEBUGINFOD_URLS=https://debuginfod.archlinux.org
DISPLAY=:0
DOTFILES=/home/bam/.dotfiles
EDITOR=/usr/bin/nvim
HG=/usr/bin/hg
HOME=/home/bam
I3SOCK=/run/user/1000/sway-ipc.1000.653.sock
LANG=en_US.UTF-8
LOGNAME=bam
MAIL=/var/spool/mail/bam
MOTD_SHOWN=pam
MOZ_ENABLE_WAYLAND=1
OLDPWD=/home/bam
PAPERS_DIR=/home/bam/clouds/nextcloud/Papers
PATH=/home/bam/.yarn/bin:/home/bam/.config/yarn/global/node_modules/.bin:/usr/local/bin/gitfiles/:/home/bam/.bin/:/home/bam/git/personal/sway_tools/:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/lib/rustup/bin
PWD=/home/bam
QT_QPA_PLATFORM=wayland-egl;xcb
QT_QPA_PLATFORMTHEME=qt5ct
QT_SCALE_FACTOR=1
QT_WAYLAND_DISABLE_WINDOWDECORATION=1
R_LIBS_USER=/home/bam/.local/share/R/libs
SHELL=/bin/zsh
SHLVL=1
SSH_ASKPASS=/bin/qt4-ssh-askpass
SWAYSOCK=/run/user/1000/sway-ipc.1000.653.sock
TERM=alacritty
USER=bam
WAYLAND_DISPLAY=wayland-1
WINDOWID=100865506481088
WINDOW_MANAGER=sway
WINIT_HIDPI_FACTOR=1.0
WINIT_X11_SCALE_FACTOR=1
XCURSOR_SIZE=24
XDG_CONFIG_HOME=/home/bam/.config
XDG_CURRENT_DESKTOP=sway
XDG_RUNTIME_DIR=/run/user/1000
XDG_SEAT=seat0
XDG_SESSION_CLASS=user
XDG_SESSION_ID=1
XDG_SESSION_TYPE=wayland
XDG_VTNR=1
_=/usr/bin/printenv
dratRepo=/home/bam/git/r_dev/drat
ZSH=/home/bam/.oh-my-zsh
PAGER=less
LESS=-R
LSCOLORS=Gxfxcxdxbxegedabagacad
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=00:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.avif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:*~=00;90:*#=00;90:*.bak=00;90:*.crdownload=00;90:*.dpkg-dist=00;90:*.dpkg-new=00;90:*.dpkg-old=00;90:*.dpkg-tmp=00;90:*.old=00;90:*.orig=00;90:*.part=00;90:*.rej=00;90:*.rpmnew=00;90:*.rpmorig=00;90:*.rpmsave=00;90:*.swp=00;90:*.tmp=00;90:*.ucf-dist=00;90:*.ucf-new=00;90:*.ucf-old=00;90:
SSH_AUTH_SOCK=/run/user/1000/gnupg/S.gpg-agent.ssh
GPG_TTY=/dev/pts/0
BAM_SHELL_STUFF=1

Offline

#10 2024-01-24 17:41:45

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

Re: [SOLVED] libva and vdpau related segfaults

It matters for xwayland and should ideally simply not be present

Offline

#11 2024-01-24 18:29:39

woodape
Member
Registered: 2015-03-25
Posts: 159

Re: [SOLVED] libva and vdpau related segfaults

Just double checked, there's nothing really in the X11 directory:

-> % ls -R /etc/X11
/etc/X11:
xinit  xorg.conf.d

/etc/X11/xinit:
xinitrc  xinitrc.d  xserverrc

/etc/X11/xinit/xinitrc.d:
40-libcanberra-gtk-module.sh  50-systemd-user.sh  80xapp-gtk3-module.sh

/etc/X11/xorg.conf.d:

Offline

#12 2024-01-24 19:16:09

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

Re: [SOLVED] libva and vdpau related segfaults

Yeah that's fine. FWIW the stack trace is dying in some amdgpu module. Does it work if you explicitly invoke

LIBVA_DRIVER_NAME=radeonsi vainfo

Offline

#13 2024-01-24 19:24:35

woodape
Member
Registered: 2015-03-25
Posts: 159

Re: [SOLVED] libva and vdpau related segfaults

No, still seg faults and an identical stack trace.

You've got me thinking I need something with an Xorg config given the repeated warnings with the 'vulkaninfo' command about no DRI3 present. Is there a particular config I should try?

Edit:
I added the following to /etc/X11/xorg.conf.d/20-amd.conf

Section "OutputClass"
     Identifier "AMD"
     MatchDriver "amdgpu"
     Driver "amdgpu"
		Option      "DRI"    "3"
EndSection

I rebooted into i3 instead of Sway and vainfo and VLC works:

-> % vainfo
Trying display: wayland
Trying display: x11
vainfo: VA-API version: 1.20 (libva 2.20.1)
vainfo: Driver version: Mesa Gallium driver 23.3.3-arch1.1 for AMD Radeon RX 580 2048SP (radeonsi, polaris10, LLVM 16.0.6, DRM 3.56, 6.7.1-arch1-1)
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            :	VAEntrypointVLD
      VAProfileMPEG2Main              :	VAEntrypointVLD
      VAProfileVC1Simple              :	VAEntrypointVLD
      VAProfileVC1Main                :	VAEntrypointVLD
      VAProfileVC1Advanced            :	VAEntrypointVLD
      VAProfileH264ConstrainedBaseline:	VAEntrypointVLD
      VAProfileH264ConstrainedBaseline:	VAEntrypointEncSlice
      VAProfileH264Main               :	VAEntrypointVLD
      VAProfileH264Main               :	VAEntrypointEncSlice
      VAProfileH264High               :	VAEntrypointVLD
      VAProfileH264High               :	VAEntrypointEncSlice
      VAProfileHEVCMain               :	VAEntrypointVLD
      VAProfileHEVCMain               :	VAEntrypointEncSlice
      VAProfileHEVCMain10             :	VAEntrypointVLD
      VAProfileJPEGBaseline           :	VAEntrypointVLD
      VAProfileNone                   :	VAEntrypointVideoProc

So apparently the problem is with sway? or wayland in general?

Last edited by woodape (2024-01-24 19:28:55)

Offline

#14 2024-01-24 23:34:42

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

Re: [SOLVED] libva and vdpau related segfaults

probably sway. FWIW have you tried without that config and without xf86-video-amdgpu installed in the first place?

And generally speaking by the host of x errors, is xwayland installed?

Last edited by V1del (2024-01-24 23:41:01)

Offline

#15 2024-01-25 08:36:29

woodape
Member
Registered: 2015-03-25
Posts: 159

Re: [SOLVED] libva and vdpau related segfaults

I should have mentioned that I was using sway-git from the AUR because of this unfixed bug in the version of sway in the extra repository. This isn't a packaging issue, the extra version is the latest stable version, sway just hasn't released 1.9 with the fix yet. Using the version of sway in extra, everything works. I get the same output from vainfo as above.

Xwayland is installed. Removing xf86-video-amdgpu and the config above doesn't make a difference when using the extra version of sway.

I'm going to mark this as solved. Thanks for your help @V1del and @Lone_Wolf!

Last edited by woodape (2024-01-25 08:41:56)

Offline

#16 2024-01-29 15:24:12

jay716
Member
Registered: 2021-04-30
Posts: 3

Re: [SOLVED] libva and vdpau related segfaults

EDIT: While writing this reply, I find the issues and prs related to my problem - vainfo and mpv segfaults on intel and sway-git. Sorry for bumping this thread. smile
https://github.com/swaywm/sway/issues/7 … 1883856667 As the issue shows, sway recently drop wl_drm, which breaks something like libva and xwayland, etc.

Almost identical segfault backtrace of vainfo and mpv here, but with intel graphics Alder Lake i5-1240P.

Core was generated by `vainfo'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  va_DRM_GetDrmDriverName (fd=<optimized out>) at ../libva/va/drm/va_drm_utils.c:40
40	    drmVersionPtr drm_version = drmGetVersion(fd);
(gdb) bt
#0  va_DRM_GetDrmDriverName (fd=<optimized out>) at ../libva/va/drm/va_drm_utils.c:40
#1  VA_DRM_GetDriverNames (drivers=0x7ffc2a69b510, num_drivers=0x7ffc2a69b504, ctx=<optimized out>)
    at ../libva/va/drm/va_drm_utils.c:74
#2  0x00007230f0306cdf in va_new_opendriver (dpy=0x574bc107e5d0) at ../libva/va/va.c:681
#3  vaInitialize (minor_version=0x7ffc2a69b7d0, major_version=0x7ffc2a69b7d4, dpy=0x574bc107e5d0) at ../libva/va/va.c:743
#4  vaInitialize (dpy=dpy@entry=0x574bc107e5d0, major_version=major_version@entry=0x7ffc2a69b7d4,
    minor_version=minor_version@entry=0x7ffc2a69b7d0) at ../libva/va/va.c:727
#5  0x0000574bc02722a6 in main (argc=<optimized out>, argv=<optimized out>) at ../libva-utils-2.20.1/vainfo/vainfo.c:520

Both of mpv and vainfo dies on va_DRM_GetDrmDriverName.

I have these packages related installed as I have only one intel intergrated graphics card.

intel-media-driver
libva
libva-utils
libva-vdpau-driver
libvdpau-va-gl

Desktop is sway-im-git, which is sway-git with input method popup patches. (sway commit: e39b0b816b8fe58a8c8e0ca1c0082c5065d444cc).
sway on fa294a9094b673e99e5de0c456dc5a6b9ff7db55 works.
I switch to wayfire-git and everything works normally.

Offline

Board footer

Powered by FluxBB