Proxmox Plex LXC Setup (debian)

Proxmox Plex LXC Setup (debian)

Plex was running in an LXC using the helper setup script from https://tteck.github.io/Proxmox/ but it was not using GPU. As GPU is specific for transcoding to the drivers and available hardware of the LXC container it was not working by default.

I run proxmox on i5 5600/5700's and these have a built in GPU (Intel Corporation HD Graphics 630).

I needed to run this code inside the LXC for GPU to be accessable for transcoding.

First edit the LXC configuration file in /etc/pve/lxc/
My LXC is 104.conf but your might be different.

Edit the file, I use nano, and then add the code below to the file.

nano 104.conf

# add this code below

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/dri dev/dri none bind,optional,create=dir
lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file
lxc.mount.entry: /dev/dri/renderD128 dev/renderD128 none bind,optional,create=file

Restart the container and check if you can see /dev/dri for example.

It's also very important to reinstall plexmediaserver so plex can find the gpu. You will see the hardware visible in the plex install output if it worked correctly. If you already have your server up and running then reinstalling won't affect anything already setup but will add the GPU support.

2023-01-08-10_22_13-pve1---Proxmox-Virtual-Environment

apt --reinstall install plexmediaserver 

To verify everything is working you can install intel-gpu-tools to have access to intel_gpu_top. This shows how much gpu is in use by plex. MAke sure when testing plex you are actually playing a file using transcoding and not original quality.

When GPU is not in use it looks like this (original quality):
2023-01-08-10_09_58-pve1---Proxmox-Virtual-Environment

When GPU is being accessed it shows:
2023-01-08-10_10_53-pve1---Proxmox-Virtual-Environment

To install the tools use this command:

apt install intel-gpu-tools

Then run the command:

intel_gpu_top

I had orignally found this information from Proxmox LXC Intel Quick Sync Transcode for Plex