Skip to content
Johith Iype
Go back

Passthrough /dev/dri/renderD128 node to a containerized Jellyfin instance with docker usernd-remap enabled

Want to passthrough /dev/dri/renderD128 node to your containerized Jellyfin server for hardware acceleration while docker user namespace remapping is enabled (userns-remap) ? This is the blog post on how to do it.

The Challenge

Before enabling usernd-remap in docker, your Jellyfin container process may have had ran with UID 0 on the host side which made it easy to access most of the underlying host resources including renderD128.

But after enabling usernd-remap in docker, your Jellyfin container process on the host is most likely running with UID 100000 which has no permission to access /dev/dri/renderD128 .

Tweak Access Permissions of renderD128?

So you could do something like sudo chown root:100000 /dev/dri/renderD128 or set an equivalent ACL entry for it.

But after a host reboot, /dev/dri/renderD128 goes back to it’s original root:render permissions (because it’s a temporary virtual file system) - so I might have to find a way to apply permissions on system boot.

The Solution

You can write a script to apply ACL on /dev/dri/renderD128 on system boot. Or write a udev rule that gets triggered whenever renderD128 node is mounted. I chose the latter because it’s more robust.

So I used udev to trigger a setfacl command to set an ACL with group 100000 + rw access to /dev/dri/renderD128 . To do this:

You can also write a task in your ansible playbook to automate the above steps for new server installs.


Share this post:

Previous Post
How to easily deploy Static Sites using Astro Web Framework and Cloudflare Workers
Next Post
Debian printing 'Failed to query local AF_VSOCK CID: Cannot assign requested address' on Console