Ubuntu 24.04 & HW transcoding

You know I’m going to say this, so apologize in advance.

There are times for Docker and times for native apps.

This is not a case for Docker

  1. The native app exists
  2. The native app installer handles all the configuration for you.
  3. /etc/systemd/system/plexmediaserver.service.d/override.conf allows you to move / configure to your site needs.

There’s even documentation how to do it :wink: lol

Then, to pass the GPU to the native app in the LXC container, I run a little script.

#
# Argument #1 is LXC container to add

[ -z "$1" ] && "Error: missing container name" && exit 1

if [ "$(lxc list | grep "$1")" == "" ]; then
  echo "Error: Unknown container name '$1'"
  exit 2
fi

# Make certain /dev/dri/renderD128 exists
if [ ! -e /dev/dri/renderD128 ]; then
  echo Error:  This host does not have hardware transcoding ability /dev/dri/renderD128
  exit 3
fi

Gid="$(stat -c %g /dev/dri/renderD128)"

# Add it
 lxc config device add "$1" gpu gpu gid=$Gid
1 Like