Hardware encoding with Radeon RX 7900 XTX

Hello
Recently upgraded my old machine to this beast
Radeon RX 7900 XTX

Fresh install of linux mint

Drivers
https://www.amd.com/en/support
https://amdgpu-install.readthedocs.io/en/latest/install-installing.html

I installed successfully with below.

amdgpu-install --usecase=graphics,opencl --vulkan=amdvlk,pro

Simple encoding with shotcut errors out
[lots of non errors omitted]

[AVIOContext @ 0x5651236a15c0] Statistics: 281456 bytes read, 2 seeks
[AVIOContext @ 0x56512575dc00] Statistics: 281456 bytes read, 2 seeks
[h264 @ 0x565125005a00] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x565124fb62c0] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x56512579da80] Reinit context to 1920x1088, pix_fmt: yuv420p
[producer avformat] audio: total_streams 1 max_stream 1 total_channels 2 max_channels 2
[AVIOContext @ 0x565126068a80] Statistics: 830473 bytes read, 2 seeks
[AVHWDeviceContext @ 0x7ff078205900] Trying to use DRM render node for device 0.
[AVHWDeviceContext @ 0x7ff078205900] libva: VA-API version 1.7.0
[AVHWDeviceContext @ 0x7ff078205900] libva: Trying to open /tmp/.mount_shotcuLMVN8i/usr/bin/lib/va/radeonsi_drv_video.so
[AVHWDeviceContext @ 0x7ff078205900] libva: Found init function __vaDriverInit_1_7
amdgpu: unknown (family_id, chip_external_rev): (145, 1)
[AVHWDeviceContext @ 0x7ff078205900] libva: /tmp/.mount_shotcuLMVN8i/usr/bin/lib/va/radeonsi_drv_video.so init failed
[AVHWDeviceContext @ 0x7ff078205900] libva: va_openDriver() returns 2
[AVHWDeviceContext @ 0x7ff078205900] Failed to initialise VAAPI connection: 2 (resource allocation failed).
Failed to create VAAPI device.
[consumer avformat] Failed to initialize VA-API: -5
[h264_vaapi @ 0x7ff078201fc0] A hardware frames reference is required to associate the encoding device.
Failed with exit code 11
Failed with exit code 11

I do not know if the driver you installed supports VA-API. I never go to the AMD website to install the AMD driver on Linux. I use the one made by Mesa in the OS distribution.

That might be part of it…
Linux Mint does not support this card yet (older kernel)
Which is why I installed the driver.

Note I do dual boot to windows 11
And it is hardware encoding on there

Any solution do you have?
I have an AMD Radeon RX 7900 XTX too. I’m using Ubuntu 22.04 LTS and kernel 6.2.

I tried same thing on Ubuntu 22.04 LTS, kernel 6.2.

Install AMD GPU Driver by
$ amdgpu-install --usecase=workstation -y --vulkan=pro --opencl=rocr,legacy

No hardware encoder is detected.

After seeing above suggestion, I removed AMD GPU Driver
$ amdgpu-uninstall

Then install Mesa latest driver by adding PPA. Looks mesa drivers are latest.

$ glxinfo | grep OpenGL
OpenGL vendor string: AMD
OpenGL renderer string: AMD Radeon RX 7900 XTX (gfx1100, LLVM 15.0.7, DRM 3.49, 6.2.0-26-generic)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 23.3~git2308190600.caf15a~oibaf~j (git-caf15a3 2023-08-19 jammy-oibaf-ppa)
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6 (Compatibility Profile) Mesa 23.3~git2308190600.caf15a~oibaf~j (git-caf15a3 2023-08-19 jammy-oi
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 23.3~git2308190600.caf15a~oibaf~j (git-caf15a3 2023-08-19 jammy-oibaf-ppa)
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

But Hardware encoder is not detected. When I press Detect, it returns “Nothing Found”. Just click on h264_vaapi, hevc_vaapi and tried to export the video. I see same error with bcairns.

This topic was automatically closed after 90 days. New replies are no longer allowed.