Jellyfin Forum
SOLVED: RKMPP setup correct but missing a step to have full transcode? - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: SOLVED: RKMPP setup correct but missing a step to have full transcode? (/t-solved-rkmpp-setup-correct-but-missing-a-step-to-have-full-transcode)



RKMPP setup correct but missing a step to have full transcode? - azngunit81 - 2025-01-05

The version of Jellyfin you are running: 10.10.3
Your installation method and platform: Proxmox + LXC Jellyfin

I have followed the guide
https://jellyfin.org/docs/general/administration/hardware-acceleration/rockchip

to get the hardware/drivers installed properly
I've managed to reach the end with validation from the Jellyfin console that OpenCL and all the drivers are bootstrap
When I launch the chrome browser OR the jellyfin client and try to transcode it fails
Fail transcode log here:
https://pastebin.com/8Bu0Rtzj

However if i take the same FFMpeg CLI into the console - there is no error:
https://pastebin.com/rQi3snAJ

I'm lost as to what to do next to get the transcoding happen.
All transcoding type is enabled as i read that it should be. I dont know what is my next step to get it working or to debug.


RE: RKMPP setup correct but missing a step to have full transcode? - nyanmisaka - 2025-01-06

Quote:[hevc_rkmpp @ 0x556fe36470] Failed to init MPP context: -1

   

-1 means permission issue (-EPERM).


RE: RKMPP setup correct but missing a step to have full transcode? - azngunit81 - 2025-01-06

(2025-01-06, 10:36 AM)nyanmisaka Wrote:
Quote:[hevc_rkmpp @ 0x556fe36470] Failed to init MPP context: -1



-1 means permission issue (-EPERM).

I've granted privileges to the LXC Jellyfin container
and
Code:
lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file
lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir
lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file
lxc.mount.entry: /dev/dma_heap dev/dma_heap none bind,optional,create=dir
lxc.mount.entry: /dev/mpp_service dev/mpp_service none bind,optional,create=file
lxc.mount.entry: /dev/rga dev/rga none bind,optional,create=file
lxc.mount.entry: /dev/mali0 dev/mali0 none bind,optional,create=file
lxc.cgroup2.devices.allow: a

is there another missing permission that I missed in the documentation?


RE: RKMPP setup correct but missing a step to have full transcode? - azngunit81 - 2025-01-06

ive added 

usermod -aG video jellyfin
usermod -aG input jellyfin
usermod -aG render jellyfin


inside the LXC of jellyfish - I thought it would help resolve the issue but it didnt


RE: RKMPP setup correct but missing a step to have full transcode? - gnattu - 2025-01-06

I don't think the LXC container properly executes the udev rules so that only root user is allowed to access the transcoding hardware.


RE: RKMPP setup correct but missing a step to have full transcode? - azngunit81 - 2025-01-06

So how do I fix this? like I've added Jellyfin to the user group
the LXC is privileged

maybe there is a mix up in the LXC config?
here it is

arch: arm64
cores: 2
features: nesting=1
hostname: jellyfin
memory: 2048
mp0: data:100/vm-100-disk-0.raw,mp=/mnt/samba,size=1000G
net0: name=eth0,bridge=wan,hwaddr=AA:21:21:13:16:12,ip=dhcp,type=veth
onboot: 1
ostype: debian
rootfs: local:201/vm-201-disk-0.raw,size=10G
swap: 512
tags: proxmox-helper-scripts
lxc.cgroup2.devices.allow: a
lxc.cap.drop:
lxc.cgroup2.devices.allow: c 188:* rwm
lxc.cgroup2.devices.allow: c 189:* rwm
lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir
lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file
lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file
lxc.mount.entry: /dev/ttyACM0 dev/ttyACM0 none bind,optional,create=file
lxc.mount.entry: /dev/ttyACM1 dev/ttyACM1 none bind,optional,create=file
lxc.cgroup2.devices.allow: c 226:0 rwm
lxc.cgroup2.devices.allow: c 226:128 rwm
lxc.cgroup2.devices.allow: c 29:0 rwm
lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file
lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir
lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file
lxc.mount.entry: /dev/dri/renderD129 dev/dri/renderD129 none bind,optional,create=file
lxc.mount.entry: /dev/dma_heap dev/dma_heap none bind,optional,create=dir
lxc.mount.entry: /dev/mpp_service dev/mpp_service none bind,optional,create=file
lxc.mount.entry: /dev/rga dev/rga none bind,optional,create=file
lxc.mount.entry: /dev/mali0 dev/mali0 none bind,optional,create=file
lxc.cgroup2.devices.allow: a



RE: RKMPP setup correct but missing a step to have full transcode? - gnattu - 2025-01-06

Have you tried to chown those file to root:video and chmod them 0660 manually on the host? I *think* they are still root:root with 0660 permissions.

Or, did you even properly set the udev rules as described in this section https://jellyfin.org/docs/general/administration/hardware-acceleration/rockchip#configure-on-linux-host at all? That step is required.


RE: RKMPP setup correct but missing a step to have full transcode? - azngunit81 - 2025-01-06

thanks @gnattu

so two things I tried

chmod -R 777 /dev/dma_heap/* && \
chmod -R 777 /dev/mpp_service && \
chmod -R 777 /dev/rga && \
chmod -R 777 /dev/mali0


this works but allowing 777 while root is a bit sketch

so , I returned them to 660 but as you have mentioned ive put them into the video group instead

chown -R root:video /dev/dma_heap && \
chown root:video /dev/mpp_service && \
chown root:video /dev/rga && \
chown root:video /dev/mali0


and that also worked!
as an extra check on the host promos console I've
watch -n 1 cat /sys/kernel/debug/rkrga/load

and saw the process transcoded.

the udev portion is not needed with this.

thanks for the help!