Ubuntu 24.04 & HW transcoding

I finally figured out why hardware transcoding wasn’t working within my Docker container after I upgraded from Ubuntu 22.04.4 to Ubuntu 24.04.1. Turns out I was missing a space in front of the device definition for /dev/dri in my docker-compose.yml file :man_facepalming:

It’s evident in the extract that I posted earlier

It should have been:

    devices:
      - /dev/dri:/dev/dri
    environment:
      - TZ=Australia/Brisbane

I hate configuration files that rely on indentation for correct syntax.

1 Like

Makes sense.

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

This is why I typically do all my YAML editing in an IDE like VS Code and just sync the changes through private git repos. The syntax highlighting is super useful for identifying annoying issues like spacing.

2 Likes

@ChuckPa i am trying to follow this thread to find out when i can upgrade pms as well as ubuntu but there has been so much back and forth about so many different set ups for the past couple weeks that I am not clear where things currently stand.

I’m on the beelink s12pro that you have. Ubuntu 22.04.4 lts. PMS 1.40.0.7998 native. I’m assuming current guidance for stability is to stay here until i see you post something in this thread saying it is all resolved and i can update ubuntu and PMS? or should i be looking elsewhere?
all i use the beelink for is pms so thats all i’m concerned about.

Yep, you’re good updating PMS.

This thread has indeed become a melting pot of everything.

If folks wish, I will archive (but link) this thread so we can get back on topic

I’m happy either way. Just trying to get the latest status on what is the most up to date stable set up for ubunutu and PMS for the s12, i.e. no gpu, no containers, no lxc, just plain vanilla set up lol. I’m not in a hurry. I just can’t seem to find any current status thats not 3 weeks old.

also i’m on Kernel 6.5.0-17 if that matters.

from what i can gather, 24.04.1 is still not good so i should hold on the ubuntu front. I saw some people got a kernel update to 22.04.4lts that may or may not have broke some stuff. unclear to me. and maybe the current release of PMS is working fine on 22.04 but thats also not clear to me based on all the various posts (primarily because most of them are with all sorts of various set ups that perhaps the set up is causing the issue not pms or ubuntu).

Yep. We must have a thread on Ubuntu versions and how well it works with Plex giving all the mess Ubuntu has been on and how popular it is.

Currently, it seems 24.04.01 it’s quite broken to the point Ubuntu is not prompting users on 22.04.04LTS to upgrade anymore.

Also, 22.04.05LTS should drop in 2 days.

I will:

  1. Make a new thread.

  2. First post will include a status/reference table all can use
    – This table will be updated as distribution(s) / version(s) change
    – This table will also be updated with specific notes where applicable.

  3. This current thread will be archived and attached to the new thread for reference purposes only.

  4. The new thread will be Ubuntu-only. All other posts, including Debian will be silently removed (unless requesting a Debian companion thread :wink: )

All good?

6 Likes

ha! good for me but i’m on ubuntu and you also so happen to have the machine i use! Love the idea of the table but didn’t want to suggest it because having to maintain yet another thing is always a pita.

As always, thanks so much for effort and help.

Our lovely Chuck has been warning us :wink:

ALL:

I have completed the initial thread with all the knowledge we have to date.

I am closing this thread in favor of the new thread.

If anything is omitted or incorrect, please notify us.

There is a great deal of info to review. Please be thorough in reviewing.

3 Likes