Rockchip, Incus and device passthrough

I am taking Incus for a spin on an Orange Pi 5 Plus (RK3588).

My latest endeavour: Jellyfin in an LXC, and making sure I can do all the transcodes. I have been leaning on the Jellyfin guide for the Rockchip as they do cover LXC configuration. Rockchip VPU | Jellyfin

However, Incus doesn’t like me editing the lxc.conf directly, so I’ve been approaching the suggested config obliquely. I can get all the device mounts by using disk type mounts in Incus, though the config doesn’t look exactly the same of course. Having approximated all the device mounts, the setting I am not sure how to reproduce is the line lxc.cgroup2.devices.allow: a - or the suggested alternative.

At this point, clinfo segfaults, as does ffmpeg when I try to -init_hw_device opencl=ocl@rk, as they both try and are not permitted to use /dev/mali0. Playback errors when I force a transcode.

Has anyone else been down this path?

Thanks

You can use raw.lxc to pass additional LXC configuration directly.
Though if all devices have been passed through unix-char devices, then they automatically get the required lxc.cgroup2.devices.allow entry.

Thanks Stéphane! unix-char device option was indeed what I needed. After some tinkering, no need to allow all, no need for privileged container, playback is good and lots of transcode headroom. And now I understand a bit more of the documentation :sweat_smile: