AMD AMF encoding / transcoding HELP

Lip90

Well-Known Member
Dec 12, 2018
31
0
46
34
Hey, I'm looking for help on how to use AMF AMD encode with my Ryzen 5650GE in lxc Jellyfin. In the last few days I've felt like I've searched the entire internet for a solution.

I found and tried the following:

https://jellyfin.org/docs/general/administration/hardware-acceleration/

https://amdgpu-install.readthedocs.io/en/latest/install-prereq.html

https://www.reddit.com/r/Proxmox/comments/xzwh61/lxc_gpu_passthrough_with_amd_gpu_pro_drivers/

None of that was successful.

How do I see if the correct driver is installed?

Infos PVE Host:

Code:
root@pve:~# pveversion
pve-manager/7.3-4/d69b70d4 (running kernel: 5.19.17-1-pve)

Code:
root@pve:~# ls -l /dev/dri
total 0
drwxr-xr-x 2 root root        100 Jan 25 17:24 by-path
crw-rw---- 1 root video  226,   0 Jan 25 17:24 card0
crw-rw---- 1 root video  226,   1 Jan 25 17:24 card1
crw-rw---- 1 root render 226, 128 Jan 25 17:24 renderD128

Code:
root@pve:~# hwinfo --gfx
24: PCI 3000.0: 0300 VGA compatible controller (VGA)           
  [Created at pci.386]
  Unique ID: H12M.1ac4w1lId8F
  Parent ID: JZZT.e+TNXSUNut3
  SysFS ID: /devices/pci0000:00/0000:00:08.1/0000:30:00.0
  SysFS BusID: 0000:30:00.0
  Hardware Class: graphics card
  Model: "ATI VGA compatible controller"
  Vendor: pci 0x1002 "ATI Technologies Inc"
  Device: pci 0x1638
  SubVendor: pci 0x1002 "ATI Technologies Inc"
  SubDevice: pci 0x1636
  Revision: 0xdc
  Driver: "amdgpu"
  Driver Modules: "amdgpu"
  Memory Range: 0xd0000000-0xdfffffff (ro,non-prefetchable)
  Memory Range: 0xe0000000-0xe01fffff (ro,non-prefetchable)
  I/O Ports: 0xf000-0xffff (rw)
  Memory Range: 0xfc400000-0xfc47ffff (rw,non-prefetchable)
  Memory Range: 0x000c0000-0x000dffff (rw,non-prefetchable,disabled)
  IRQ: 108 (no events)
  Module Alias: "pci:v00001002d00001638sv00001002sd00001636bc03sc00i00"
  Driver Info #0:
    Driver Status: amdgpu is active
    Driver Activation Cmd: "modprobe amdgpu"
  Config Status: cfg=new, avail=yes, need=no, active=unknown
  Attached to: #34 (PCI bridge)

42: PCI 2900.0: 0300 VGA compatible controller (VGA)
  [Created at pci.386]
  Unique ID: W2eL.24StTwgmuV9
  Parent ID: rBRC.oSK5i5+eFx4
  SysFS ID: /devices/pci0000:00/0000:00:01.2/0000:20:00.0/0000:21:06.0/0000:28:00.0/0000:29:00.0
  SysFS BusID: 0000:29:00.0
  Hardware Class: graphics card
  Model: "ASPEED AST1000/2000"
  Vendor: pci 0x1a03 "ASPEED Technology Inc."
  Device: pci 0x2000 "AST1000/2000"
  SubVendor: pci 0x1a03 "ASPEED Technology Inc."
  SubDevice: pci 0x2000
  Revision: 0x41
  Driver: "ast"
  Driver Modules: "ast"
  Memory Range: 0xfa000000-0xfaffffff (rw,non-prefetchable)
  Memory Range: 0xfb000000-0xfb01ffff (rw,non-prefetchable)
  I/O Ports: 0xc000-0xefff (rw)
  IRQ: 39 (no events)
  Module Alias: "pci:v00001A03d00002000sv00001A03sd00002000bc03sc00i00"
  Driver Info #0:
    XFree86 v4 Server Module: ast
  Config Status: cfg=new, avail=yes, need=no, active=unknown
  Attached to: #51 (PCI bridge)

Code:
root@pve:~# vainfo
error: can't connect to X server!
libva info: VA-API version 1.10.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_10
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.10 (libva 2.10.0)
vainfo: Driver version: Mesa Gallium driver 20.3.5 for AMD RENOIR (DRM 3.47.0, 5.19.17-1-pve, LLVM 11.0.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
      VAProfileHEVCMain10             : VAEntrypointEncSlice
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileVP9Profile0            : VAEntrypointVLD
      VAProfileVP9Profile2            : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc

LXC Config:
Code:
root@pve:~# cat /etc/pve/lxc/102.conf
arch: amd64
cores: 4
features: fuse=1
hostname: Fileserver
memory: 4096
net0: name=eth0,bridge=vmbr0,gw=192.168.1.1,hwaddr=06:C9:D8:65:5B:5B,ip=192.168.1.12/24,type=veth
onboot: 1
ostype: ubuntu
rootfs: local-lvm:vm-102-disk-1,size=35G
startup: order=9
swap: 512
lxc.cgroup2.devices.allow: c 226:* rwm
lxc.mount.entry: /dev/dri/card1 dev/dri/card1 none bind,optional,create=file
lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file


Infos Jellyfin LXC:

Code:
root@Fileserver:~# ls -l /dev/dri
total 0
crw-rw---- 1 root video           226,   1 Jan 25 17:24 card1
crw-rw---- 1 root systemd-network 226, 128 Jan 25 17:24 renderD128

Code:
root@Fileserver:~# vainfo
error: can't connect to X server!
libva info: VA-API version 1.7.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_7
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.7 (libva 2.6.0)
vainfo: Driver version: Mesa Gallium driver 21.2.6 for AMD RENOIR (DRM 3.47.0, 5.19.17-1-pve, LLVM 12.0.0)
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
      VAProfileHEVCMain10             : VAEntrypointEncSlice
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileVP9Profile0            : VAEntrypointVLD
      VAProfileVP9Profile2            : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc

Code:
root@Fileserver:~# hwinfo --gfx
23: PCI 3000.0: 0300 VGA compatible controller (VGA)           
  [Created at pci.386]
  Unique ID: H12M.1ac4w1lId8F
  Parent ID: JZZT.e+TNXSUNut3
  SysFS ID: /devices/pci0000:00/0000:00:08.1/0000:30:00.0
  SysFS BusID: 0000:30:00.0
  Hardware Class: graphics card
  Model: "ATI VGA compatible controller"
  Vendor: pci 0x1002 "ATI Technologies Inc"
  Device: pci 0x1638
  SubVendor: pci 0x1002 "ATI Technologies Inc"
  SubDevice: pci 0x1636
  Revision: 0xdc
  Driver: "amdgpu"
  Driver Modules: "amdgpu"
  Memory Range: 0xd0000000-0xdfffffff (ro,non-prefetchable)
  Memory Range: 0xe0000000-0xe01fffff (ro,non-prefetchable)
  I/O Ports: 0xf000-0xffff (rw)
  Memory Range: 0xfc400000-0xfc47ffff (rw,non-prefetchable)
  Memory Range: 0x000c0000-0x000dffff (rw,non-prefetchable,disabled)
  IRQ: 108 (no events)
  Module Alias: "pci:v00001002d00001638sv00001002sd00001636bc03sc00i00"
  Config Status: cfg=new, avail=yes, need=no, active=unknown
  Attached to: #33 (PCI bridge)

41: PCI 2900.0: 0300 VGA compatible controller (VGA)
  [Created at pci.386]
  Unique ID: W2eL.24StTwgmuV9
  Parent ID: rBRC.oSK5i5+eFx4
  SysFS ID: /devices/pci0000:00/0000:00:01.2/0000:20:00.0/0000:21:06.0/0000:28:00.0/0000:29:00.0
  SysFS BusID: 0000:29:00.0
  Hardware Class: graphics card
  Model: "ASPEED AST1000/2000"
  Vendor: pci 0x1a03 "ASPEED Technology Inc."
  Device: pci 0x2000 "AST1000/2000"
  SubVendor: pci 0x1a03 "ASPEED Technology Inc."
  SubDevice: pci 0x2000
  Revision: 0x41
  Driver: "ast"
  Driver Modules: "ast"
  Memory Range: 0xfa000000-0xfaffffff (rw,non-prefetchable)
  Memory Range: 0xfb000000-0xfb01ffff (rw,non-prefetchable)
  I/O Ports: 0xc000-0xefff (rw)
  IRQ: 39 (no events)
  Module Alias: "pci:v00001A03d00002000sv00001A03sd00002000bc03sc00i00"
  Driver Info #0:
    XFree86 v4 Server Module: ast
  Config Status: cfg=new, avail=yes, need=no, active=unknown
  Attached to: #50 (PCI bridge)
 
I have a ryzen 5700g and want to share the apu (cezanne Vega 8 from the cpu) with multiple containers on Ubuntu. Or at least one.
 
I stumbled on this one again. Using the official manual from jellyfin regarding Hardware acceleration on Ubuntu with jellyfin on docker I got it to work.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!