AMD Ryzen 7 "Renoir" 4750G APU and iGPU pass-thru (to Windows 10 guest)?

pottproll

New Member
Dec 3, 2020
8
0
1
30
needed it for LXC route anyway
pls let me know if youre making progress! Im pretty new to proxmox and linux..
I tried to passthrough the iGPU to a debian jellyfin vm but didnt get the hardware acceleration (vaapi in this case) working. Now im on kernel 5.11 and try to run it in lxc but even that doesnt work so far. The firmware-amd-graphics package conflicts with pve so I tried without it with mesa 20.3 from testing repo but cant get hw transcoding working.
jellyfin log:
Code:
[AVHWDeviceContext @ 0x5613f51e8540] libva: /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so init failed
[AVHWDeviceContext @ 0x5613f51e8540] Failed to initialise VAAPI connection: 2 (resource allocation failed).
Device creation failed: -5.
Failed to set value '/dev/dri/renderD128' for option 'vaapi_device': Input/output error
Error parsing global options: Input/output error
 

thex

New Member
Mar 25, 2021
13
2
3
39
I did get it running and it works great now. However it was quite a journey ;)

Code:
#important stuff for jellyfin in unprivileged lxc
#we need the renderer device passed through
lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file
lxc.cgroup.devices.allow: c 226:128 rwm
#we need to map some user/group IDs so that they are identical inside the guest
#mapping uid/gid 1000 to 1000 as my local media shares are mounted for this user and mapping the renderer group ID too (108)
lxc.idmap: u 0 100000 999
lxc.idmap: g 0 100000 106
lxc.idmap: g 108 108 1
lxc.idmap: g 109 100109 890
lxc.idmap: u 1000 1000 1
lxc.idmap: g 1000 1000 1
lxc.idmap: u 1001 101001 64530
lxc.idmap: g 1001 101001 64530
lxc.idmap: g 65534 165534 1

there are a few more steps to the mapping described here (subgid/subuid files etc.): https://pve.proxmox.com/wiki/Unprivileged_LXC_containers

I used ubuntu as a base for the installation and there the renderer gid was 109 so I had to change the gids to match the host (might be resolveable with different mapping)

I also installed the AMD drivers with some hacks on both the host and the guest and have still to investigate where they are actually needed)
hacks: Install the packages directly not via the amd script, add i386 architecture to the repos, disguise proxmox debian as ubuntu, use the drivers meant for 18.04, installation of two packages will fail and you might to remove the blacklist file for amd-gpu manually...

Quite a few hacks, would like to do a writeup but no Idea when I will find some time...
 

pottproll

New Member
Dec 3, 2020
8
0
1
30
I also installed the AMD drivers with some hacks on both the host and the guest and have still to investigate where they are actually needed)
I guess its the host where theyre needed. I tried with privileged lxc and changed the render group to match the host render group. Ill try with unpriveleged lxc and idmapping described in the wiki now. If thats not working ill go for the amd microcode on the host..

But its nice to hear, that its actually working. Did you try HEVC encoding?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE 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 your own in 60 seconds.

Buy now!