You are not logged in.

#1 2026-06-26 12:00:52

Skilowi
Member
Registered: 2025-08-03
Posts: 31
Website

[SOLVED] Hardware acceleration for R7 340

Howdy. I wanted to utilize second GPU for encoding for OBS. Here is my setup:
Arch Linux, OBS 32.1.2
MSI Pro B650-P Wifi
Ryzen 7 7500F
2x 16GB Kingston DDR5
GPU1: Nvidia RTX4060
GPU2: AMD R7 340

https://obsproject.com/logs/IIYI4lu71VcFqNYX

Not a single mention of second GPU. Only obs-browser saying "blacklisted driver detected".
I installed AMF (Legacy Driver) (since 300 series is GCN 1.0 and Fuji), the amf-amdgpu-pro as recommended by https://wiki.archlinux.org/title/Hardwa … on#AMD/ATI but even reboots didnt change a thing.
amdgpu_top reports 0% utilization.
Could it be that this OEM GPU is so chopped off features it cannot support hardware encoding?

Last edited by Skilowi (2026-06-27 12:29:01)


Moron from Poland necromancing old ThinkPads and Computers.
I also learn Mechatronics.

Offline

#2 2026-06-26 12:13:28

Skilowi
Member
Registered: 2025-08-03
Posts: 31
Website

Re: [SOLVED] Hardware acceleration for R7 340

Here you can enjoy some more info which might be usable:

skilowi@Komputer ~ > lspci -vnnd ::03xx
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation AD107 [GeForce RTX 4060] [10de:2882] (rev a1) (prog-if 00 [VGA controller])
	Subsystem: NVIDIA Corporation Device [10de:1801]
	Flags: bus master, fast devsel, latency 0, IRQ 91, IOMMU group 12
	Memory at f5000000 (32-bit, non-prefetchable) [size=16M]
	Memory at f800000000 (64-bit, prefetchable) [size=8G]
	Memory at fa00000000 (64-bit, prefetchable) [size=32M]
	I/O ports at f000 [size=128]
	Expansion ROM at f6000000 [virtual] [disabled] [size=512K]
	Capabilities: <access denied>
	Kernel driver in use: nvidia
	Kernel modules: nouveau, nvidia_drm, nvidia

05:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Oland [Radeon HD 8570 / R5 430 OEM / R7 240/340/430 / Radeon 520 OEM] [1002:6611] (rev 87) (prog-if 00 [VGA controller])
	Subsystem: PC Partner Limited / Sapphire Technology Device [174b:1352]
	Flags: bus master, fast devsel, latency 0, IRQ 109, IOMMU group 15
	Memory at fb00000000 (64-bit, prefetchable) [size=4G]
	Memory at f6700000 (64-bit, non-prefetchable) [size=256K]
	I/O ports at e000 [size=256]
	Expansion ROM at f6740000 [disabled] [size=128K]
	Capabilities: <access denied>
	Kernel driver in use: amdgpu
	Kernel modules: radeon, amdgpu

After amf-amdgpu-pro installation:

skilowi@Komputer ~ > VK_DRIVER_FILES=/usr/share/vulkan/icd.d/amd_pro_icd64.json ffmpeg -hwaccel auto -vaapi_device /dev/dri/renderD128 -i WK.webm -c:v h264_amf -rc 1 -b:v 8M h264_amf_8M.mp4
ffmpeg version n8.1.2 Copyright (c) 2000-2026 the FFmpeg developers
  built with gcc 16.1.1 (GCC) 20260430
  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-frei0r --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-lcms2 --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libdav1d --enable-libdrm --enable-libdvdnav --enable-libdvdread --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgsm --enable-libharfbuzz --enable-libiec61883 --enable-libjack --enable-libjxl --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libplacebo --enable-libpulse --enable-librav1e --enable-librsvg --enable-librubberband --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpl --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-nvdec --enable-nvenc --enable-opencl --enable-opengl --enable-shared --enable-vapoursynth --enable-version3 --enable-vulkan --disable-decoder=magicyuv
  libavutil      60. 26.102 / 60. 26.102
  libavcodec     62. 28.102 / 62. 28.102
  libavformat    62. 12.102 / 62. 12.102
  libavdevice    62.  3.102 / 62.  3.102
  libavfilter    11. 14.102 / 11. 14.102
  libswscale      9.  5.102 /  9.  5.102
  libswresample   6.  3.102 /  6.  3.102
Input #0, matroska,webm, from 'WK.webm':
  Metadata:
    COMPATIBLE_BRANDS: iso6av01mp41
    MAJOR_BRAND     : dash
    MINOR_VERSION   : 0
    ENCODER         : Lavf62.12.102
  Duration: 00:01:48.98, start: 0.000000, bitrate: 284 kb/s
  Stream #0:0: Video: av1 (libdav1d) (Main), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 30 fps, 30 tbr, 1k tbn (default)
    Metadata:
      HANDLER_NAME    : ISO Media file produced by Google Inc.
      DURATION        : 00:01:48.966000000
  Stream #0:1(eng): Audio: opus, 48000 Hz, stereo, fltp (default)
    Metadata:
      DURATION        : 00:01:48.981000000
Stream mapping:
  Stream #0:0 -> #0:0 (av1 (libdav1d) -> h264 (h264_amf))
  Stream #0:1 -> #0:1 (opus (native) -> aac (native))
Press [q] to stop, [?] for help
0126-05-26 14:11:09 789C06C0 [AMFDeviceVulkanImpl]   Error: ../../../../../runtime/src/core/DeviceVulkanImpl.cpp(854):Assertion failed:Init() failed to vkCreateInstance, Error=-9
0126-05-26 14:11:09 789C06C0 [AMFDeviceVulkanImpl]   Error: ../../../../../runtime/src/core/DeviceVulkanImpl.cpp(672):AMF_ERROR 1 : AMF_FAIL: CreateInstance() failed
0126-05-26 14:11:09 789C06C0 [AMFContextImpl]   Error: ../../../../../runtime/src/core/ContextImpl.cpp(1072):AMF_ERROR 1 : AMF_FAIL: pDeviceVulkan->Init(pVulkanDevice)
[AMF @ 0x7fc364005340] AMF failed to initialise on the given Vulkan device: 1.
[h264_amf @ 0x55d97384abc0] Failed to create  hardware device context (AMF) : Function not implemented
[vost#0:0/h264_amf @ 0x55d9738c9240] [enc:h264_amf @ 0x55d9738ec780] Error while opening encoder - maybe incorrect parameters such as bit_rate, rate, width or height.
[vf#0:0 @ 0x55d9738d6440] Error sending frames to consumers: Function not implemented
[vf#0:0 @ 0x55d9738d6440] Task finished with error code: -38 (Function not implemented)
[vf#0:0 @ 0x55d9738d6440] Terminating thread with return code -38 (Function not implemented)
[vost#0:0/h264_amf @ 0x55d9738c9240] [enc:h264_amf @ 0x55d9738ec780] Could not open encoder before EOF
[vost#0:0/h264_amf @ 0x55d9738c9240] Task finished with error code: -22 (Invalid argument)
[vost#0:0/h264_amf @ 0x55d9738c9240] Terminating thread with return code -22 (Invalid argument)
[out#0/mp4 @ 0x55d97384d140] Nothing was written into output file, because at least one of its streams received no packets.
frame=    0 fps=0.0 q=0.0 Lsize=       0KiB time=N/A bitrate=N/A speed=N/A elapsed=0:00:00.04    
[aac @ 0x55d9738ca980] Qavg: 183.562
Conversion failed!

After I put new GPU in my BIOS cleared. Are there any settings which I should have set to make it work better?

Last edited by Skilowi (2026-06-26 14:25:04)


Moron from Poland necromancing old ThinkPads and Computers.
I also learn Mechatronics.

Offline

#3 2026-06-26 12:43:04

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,236

Re: [SOLVED] Hardware acceleration for R7 340

Hint: try higher listed options first.

VA-API on Radeon HD 2000 and newer GPUs via mesa.

The r7 340 is much newer then the HD 2000 .

remove the legacy amf-amdgpu-pro stuff and post the output of vainfo (comes with libva-utils) .


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

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#4 2026-06-26 13:12:39

Skilowi
Member
Registered: 2025-08-03
Posts: 31
Website

Re: [SOLVED] Hardware acceleration for R7 340

I -Rns'ed the amf-amdgpu-pro.

skilowi@Komputer ~ > vainfo
Trying display: wayland
Trying display: x11
vainfo: VA-API version: 1.23 (libva 2.23.0)
vainfo: Driver version: VA-API NVDEC driver [direct backend]
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            :	VAEntrypointVLD
      VAProfileMPEG2Main              :	VAEntrypointVLD
      VAProfileVC1Simple              :	VAEntrypointVLD
      VAProfileVC1Main                :	VAEntrypointVLD
      VAProfileVC1Advanced            :	VAEntrypointVLD
      VAProfileH264Main               :	VAEntrypointVLD
      VAProfileH264High               :	VAEntrypointVLD
      VAProfileH264ConstrainedBaseline:	VAEntrypointVLD
      VAProfileJPEGBaseline           :	VAEntrypointVLD
      VAProfileHEVCMain               :	VAEntrypointVLD
      VAProfileVP8Version0_3          :	VAEntrypointVLD
      VAProfileVP9Profile0            :	VAEntrypointVLD
      VAProfileAV1Profile0            :	VAEntrypointVLD
      VAProfileHEVCMain10             :	VAEntrypointVLD
      VAProfileHEVCMain12             :	VAEntrypointVLD
      VAProfileVP9Profile2            :	VAEntrypointVLD
      VAProfileHEVCMain444            :	VAEntrypointVLD
      VAProfileHEVCMain444_10         :	VAEntrypointVLD
      VAProfileHEVCMain444_12         :	VAEntrypointVLD

I think it's showing for my RTX.
running vainfo -a returns ~40kB text file and I don't know what should I pass in --device flag to point it toward my R7.

Last edited by Skilowi (2026-06-26 14:24:35)


Moron from Poland necromancing old ThinkPads and Computers.
I also learn Mechatronics.

Offline

#5 2026-06-26 14:17:23

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,286

Re: [SOLVED] Hardware acceleration for R7 340

Please use [ code ] and not [ quote ] for outputs.

Did you export an environment variable forcing VAAPI to the nvidia driver?

printenv | grep LIBVA

https://wiki.archlinux.org/title/Hardwa … ing_VA-API

Offline

#6 2026-06-26 14:28:50

Skilowi
Member
Registered: 2025-08-03
Posts: 31
Website

Re: [SOLVED] Hardware acceleration for R7 340

V1del wrote:

Please use [ code ] and not [ quote ] for outputs.

Did you export an environment variable forcing VAAPI to the nvidia driver?

printenv | grep LIBVA

https://wiki.archlinux.org/title/Hardwa … ing_VA-API

Fixed.

grep returned nothing.

I ran

export LIBVA_DRIVERS_PATH=/usr/lib/dri/radeonsi_drv_video.so

Now running vainfo returns:

skilowi@Komputer ~ > vainfo 
Trying display: wayland
Trying display: x11
vaInitialize failed with error code -1 (unknown libva error),exit

Moron from Poland necromancing old ThinkPads and Computers.
I also learn Mechatronics.

Offline

#7 2026-06-26 14:43:21

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,236

Re: [SOLVED] Hardware acceleration for R7 340

https://wiki.archlinux.org/title/Environment_variable wrote:

You can override the driver for VA-API by using the LIBVA_DRIVER_NAME environment variable:

Try LIBVA_DRIVER_NAME=radeonsi vainfo

(LIBVA_DRIVERS_PATH is typically only needed for drivers in non-standard paths.)


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

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#8 2026-06-26 16:42:48

Skilowi
Member
Registered: 2025-08-03
Posts: 31
Website

Re: [SOLVED] Hardware acceleration for R7 340

Lone_Wolf wrote:
https://wiki.archlinux.org/title/Environment_variable wrote:

You can override the driver for VA-API by using the LIBVA_DRIVER_NAME environment variable:

Try LIBVA_DRIVER_NAME=radeonsi vainfo

(LIBVA_DRIVERS_PATH is typically only needed for drivers in non-standard paths.)

skilowi@Komputer ~ > export LIBVA_DRIVER_NAME=radeonsi
skilowi@Komputer ~ > vainfo
Trying display: wayland
Trying display: x11
pci id for fd 6: 10de:2882, driver (null)
pci id for fd 7: 10de:2882, driver (null)
libva error: /usr/lib/dri/radeonsi_drv_video.so init failed
vaInitialize failed with error code 2 (resource allocation failed),exit

10de is nvidia, but I do not recognize 2882

https://wiki.archlinux.org/title/Hardwa … nit_failed 4.2 could be about that but I do not use wayland.


Moron from Poland necromancing old ThinkPads and Computers.
I also learn Mechatronics.

Offline

#9 2026-06-26 17:39:07

cryptearth
Member
Registered: 2024-02-03
Posts: 2,267

Re: [SOLVED] Hardware acceleration for R7 340

maybe i miss the point but why would you try to use that oem gpu in the first place? your 4060 should have enough power to support both playing games and streaming them

Online

#10 2026-06-26 17:59:10

Skilowi
Member
Registered: 2025-08-03
Posts: 31
Website

Re: [SOLVED] Hardware acceleration for R7 340

cryptearth wrote:

maybe i miss the point but why would you try to use that oem gpu in the first place? your 4060 should have enough power to support both playing games and streaming them

fair point.
But I do not do it for the final result, but for the way of doing this and things i will learn in process.
I want to build it purely for the sake of building it

Last edited by Skilowi (2026-06-26 18:02:06)


Moron from Poland necromancing old ThinkPads and Computers.
I also learn Mechatronics.

Offline

#11 2026-06-27 07:05:06

cryptearth
Member
Registered: 2024-02-03
Posts: 2,267

Re: [SOLVED] Hardware acceleration for R7 340

fair point

// long story cut short

as the gpu already uses the new amdgpu driver it should just show up in obs as encoder

according to https://www.techpowerup.com/gpu-specs/r … -oem.c2946 it's just a rebrand of the r7 240 - so if it doesn't show up in obs as encoder it either lacks the requirements for encoding (note: with such a card you likely can do only h264 anyway - but not h265 or av1) - or obs just can't deal with it

Online

#12 2026-06-27 11:19:09

Skilowi
Member
Registered: 2025-08-03
Posts: 31
Website

Re: [SOLVED] Hardware acceleration for R7 340

thats something I was suspecting - who would think that Fujitsu OEM GPU would be chopped from everything nice!

I found this table:
https://en.wikipedia.org/wiki/NVENC#Versions
If I want H.264 encoding I would have to buy some low power GTX950-ish GPU
For H.265 encoding Pascal GPU is needed. I could get here GTX1050 or Quadro P620 for lower TDP
For AV1 I would need second RTX40- GPU which misses the point (my wallet has bottom and it is not far).

I think I will go for P620 :-) (I think passively cooled 1650/1660 could also do)

Also about the TechPowerUp: I noticed in each GPU they have <chip> GPU Notes in which they note driver versions AND NVENC/NVDEC capabilities:
GT710 I have and GT1030 cant do ENC!

Last edited by Skilowi (2026-06-27 11:19:29)


Moron from Poland necromancing old ThinkPads and Computers.
I also learn Mechatronics.

Offline

#13 2026-06-27 12:28:34

Skilowi
Member
Registered: 2025-08-03
Posts: 31
Website

Re: [SOLVED] Hardware acceleration for R7 340

I think this topic is markable as [SOLVED]. When I will have issues with P620 I will open another topic.


Moron from Poland necromancing old ThinkPads and Computers.
I also learn Mechatronics.

Offline

#14 2026-06-28 11:56:25

cryptearth
Member
Registered: 2024-02-03
Posts: 2,267

Re: [SOLVED] Hardware acceleration for R7 340

Skilowi wrote:

here's the amd one: https://en.wikipedia.org/wiki/Video_Cod … ne#VCE_1.0
and, by coincidence, it lists:

Radeon R7 250E, 250X, 265 / R9 270, 270X, 280, 280X
Radeon R7 360, 370, 455 / R9 370, 370X

so - guess that makes it final: that r7 240 just doesn't support video encoding at all - and hence not shows up in obs

Skilowi wrote:

GT1030 cant do ENC!

oh had i learned that the hard way

// even longer story cut even shorter

point is: the board i had original had the pci-e x16 and a x1 slot next to eachother - so i needed a single-slot gpu - and due to case a low-profile one - the only single-slot low-profile available was the gt1030
and as i didn't know better back then - i ordered one - installed it - and faced the same issue
i eneded up replacing the board with one with space for a dual-slot gpu and got a 1650 dual-slot low-profile

in the end: although i later learned that with going for obs from cli and not monitor the stream on the stream system the igpu was just powerful enough - as my r9 290x once failed and i didn't had money for a new gpu for my main rig (i ended up with a 4gb 570) in the mean time i used the 1650 - and let me tell you: that'S not a great gaming gpu - even for just 1920x1080 with mid settings

Online

#15 2026-06-28 14:50:01

Skilowi
Member
Registered: 2025-08-03
Posts: 31
Website

Re: [SOLVED] Hardware acceleration for R7 340

cryptearth wrote:
Skilowi wrote:

here's the amd one: https://en.wikipedia.org/wiki/Video_Cod … ne#VCE_1.0
and, by coincidence, it lists:

Radeon R7 250E, 250X, 265 / R9 270, 270X, 280, 280X
Radeon R7 360, 370, 455 / R9 370, 370X

so - guess that makes it final: that r7 240 just doesn't support video encoding at all - and hence not shows up in obs

Skilowi wrote:

GT1030 cant do ENC!

oh had i learned that the hard way

// even longer story cut even shorter

point is: the board i had original had the pci-e x16 and a x1 slot next to eachother - so i needed a single-slot gpu - and due to case a low-profile one - the only single-slot low-profile available was the gt1030
and as i didn't know better back then - i ordered one - installed it - and faced the same issue
i eneded up replacing the board with one with space for a dual-slot gpu and got a 1650 dual-slot low-profile

in the end: although i later learned that with going for obs from cli and not monitor the stream on the stream system the igpu was just powerful enough - as my r9 290x once failed and i didn't had money for a new gpu for my main rig (i ended up with a 4gb 570) in the mean time i used the 1650 - and let me tell you: that'S not a great gaming gpu - even for just 1920x1080 with mid settings


And they started to put it into Radeon 7000 series! Too bad for my Windows 7 computer under my workshop with Crossfire XFX Radeon 6950! Pain!
and other AMD gpu I own is trashcan X800GT
on AGP slot.

Also I have heard that Pascal NVENC encoders are mediocre compared to Turing. If I can get some single slot 1660*  at reasonable price (basically what's the point of any pre-2020 non-RTX nvidia to cost more than 30 bucks?)

* 1650 and 1630 use not Turing and not Pascal but Maxwell NVENC! WTF?

So it is either 1660 or gotta search for some newer lower-end AMD.


Moron from Poland necromancing old ThinkPads and Computers.
I also learn Mechatronics.

Offline

#16 2026-06-28 15:15:46

cryptearth
Member
Registered: 2024-02-03
Posts: 2,267

Re: [SOLVED] Hardware acceleration for R7 340

if you go for amd you should get at least one of these:

VCE 3.4 by actual AMD Radeon Rx 400 series and AMD Radeon 500 series (both Polaris GPU family): RX 460, 470, 480; RX 550, 560, 570, 580
if you go for 570/580: look out - there're two models: 4gb and 8gb - if you can get a 8gb one you may could even use it for some lightweight local AI with llama.cpp and small models - but given you cling on a r 240 oem that might be over your desired budget

Online

#17 2026-06-28 15:38:51

Skilowi
Member
Registered: 2025-08-03
Posts: 31
Website

Re: [SOLVED] Hardware acceleration for R7 340

cryptearth wrote:

if you go for amd you should get at least one of these:

VCE 3.4 by actual AMD Radeon Rx 400 series and AMD Radeon 500 series (both Polaris GPU family): RX 460, 470, 480; RX 550, 560, 570, 580
if you go for 570/580: look out - there're two models: 4gb and 8gb - if you can get a 8gb one you may could even use it for some lightweight local AI with llama.cpp and small models - but given you cling on a r 240 oem that might be over your desired budget

It's not like I am very limited by budget (until tommorow I am ;-)), I just tried the 340 because I had it (bought it earlier to have not ancient GPU for PCI Passtrough /w Win7 VM).

As I see RX480/570 8GB goes for ~50 euros. Thing is I am not looking for full blown gaming GPU because I have one. Reason for this is power consumption and heat generation (it's sleeper build in LinkWorld case from late 90s - 51°C in idle is minimum even with Noctua fans). That's why I would prefer something lower-end that has lower TDP (earlier mentioned P620 makes 40W).

I looked at lowest GPU you mentioned: RX460 and RX550 - 50W of TDP is acceptable at its fullest. 550 goes for few euros more than P620. I think I will go for 550.

Last edited by Skilowi (2026-06-28 15:43:39)


Moron from Poland necromancing old ThinkPads and Computers.
I also learn Mechatronics.

Offline

Board footer

Powered by FluxBB