Plex-Server in Proxmox Ubuntu VM

I’m running Plex-Server in an Ubuntu VM in Proxmox with GPU passthrough for hardware transcoding. All works well until update plex-server, the GPU disappears and I have to re-install the nvidia driver to get it working again.

I’m a Linux noob so any help would be great

Thanks

The Nvidia driver is 100% independent of Plex.

  1. GPU passed through (dedicated and not shared by display)
  2. sudo apt install nvidia-driver installs the nvidia drivers into the kernel in the VM.
  3. After installation - reboot the host to make the kernel driver active
  4. PMS will now find and use that driver

Which CPU, Linux Kernel, and Nvidia driver are you using ?
There are serious problems with the new 6.2 Linux kernels and Nvidia

You don’t state which ProxMox. Might this apply somehow? (pertaining to the issues)

/etc/modprobe.d/nvidia.conf
blacklist nvidiafb
blacklist nouveau

This makes sure ProxMox itself doesn’t grab the card

Like I said, I have hardware transcoding working. Could it be the way I update Plex?

Sudo apt update

This statement :point_up: is what’s bothering me.

You can uprgade the nvidia driver or PMS independent of each other.

The ONLY thing I caution is because of the known issues with Nvidia drivers and 6.2 kernels.

The DPKG installer will tell you if it finds the Nvidia or Intel i915 card correctly.
These are to be used as a guide for knowing the likely outcome.

So I updated Plex again to latest version and the Nvidia drivers were removed again. Could Ubuntu be installing Nouveau drivers during the update process and overwriting the Nvidia drivers?

After the update I ran

nvidia-smi

Got a reply of “no nvidia drivers installed” So I ran this again

sudo ./NVIDIA-Linux-x86_64-530.41.03.run

All up and running again

Sorry if this is too basic. Did you reboot the VM freshly after the update, and still get the same bad response to nvidia-smi? I do see where ChuckPa is coming from, I wouldn’t expect the nvidia drivers to be touched by updating Plex.

I have the same type of setup. Proxmox host, gpu passthrough, running ubuntu 22.04 VM with Plex. I have not had the issues your are seeing.

PMS has nothing to do with Nvidia until you want to use it via /dev/dri.

If you take the DEB file and pull it apart (ar and then tar), you find

[chuck@lizum plex.2011]$ ls -la
total 74712
drwxr-xr-x  2 chuck chuck       84 Nov  9 17:50 ./
drwxrwxrwt 28 root  root      4096 Nov  9 17:49 ../
-rw-r--r--  1 chuck chuck    82417 Nov  9 17:50 control.tar.gz
-rw-r--r--  1 chuck chuck 76402984 Nov  9 17:50 data.tar.xz
-rw-r--r--  1 chuck chuck        4 Nov  9 17:50 debian-binary
-rw-r--r--  1 chuck chuck     1228 Nov  9 17:50 _gpgplex
[chuck@lizum plex.2012]$ tar tvf control.tar.gz 
drwxr-xr-x root/root         0 2023-10-19 17:43 ./
-rwxr-xr-x root/root     25745 2023-10-19 17:43 ./preinst
-rwxr-xr-x root/root       692 2023-10-19 17:43 ./prerm
-rwxr-xr-x root/root     19196 2023-10-19 17:43 ./postinst
-rwxr-xr-x root/root       556 2023-10-19 17:43 ./postrm
-rw-r--r-- root/root    339384 2023-10-19 17:43 ./md5sums
-rw-r--r-- root/root       292 2023-10-19 17:43 ./control
[chuck@lizum plex.2013]$ tar tvf data.tar.xz 
drwxr-xr-x root/root         0 2023-10-19 17:43 ./
drwxr-xr-x root/root         0 2023-10-19 17:43 ./usr/
drwxr-xr-x root/root         0 2023-10-19 17:43 ./usr/share/
drwxr-xr-x root/root         0 2023-10-19 17:43 ./usr/share/doc/
drwxr-xr-x root/root         0 2023-10-19 17:43 ./usr/share/doc/plexmediaserver/
-rw-r--r-- root/root        91 2023-10-19 17:43 ./usr/share/doc/plexmediaserver/copyright
-rw-r--r-- root/root       170 2023-10-19 17:43 ./usr/share/doc/plexmediaserver/changelog.Debian.gz
-rw-r--r-- root/root       201 2023-10-19 17:43 ./usr/share/doc/plexmediaserver/README.Debian
drwxr-xr-x root/root         0 2023-10-19 17:43 ./usr/share/pixmaps/
-rw-rw-r-- root/root    179954 2023-10-19 17:43 ./usr/share/pixmaps/plexmediaserver.png
drwxr-xr-x root/root         0 2023-10-19 17:43 ./usr/share/applications/
-rw-rw-r-- root/root       236 2023-10-19 17:43 ./usr/share/applications/plexmediaserver.desktop
drwxr-xr-x root/root         0 2023-10-19 17:43 ./usr/lib/
drwxr-xr-x root/root         0 2023-10-19 17:43 ./usr/lib/plexmediaserver/
-rwxr-xr-x root/root     10864 2023-10-19 16:24 ./usr/lib/plexmediaserver/Plex SQLite
-rwxr-xr-x root/root   4913120 2023-10-19 16:57 ./usr/lib/plexmediaserver/Plex Media Scanner
-rwxr-xr-x root/root    327720 2023-10-19 16:24 ./usr/lib/plexmediaserver/Plex Transcoder
-rwxr-xr-x root/root   1555176 2023-10-19 16:57 ./usr/lib/plexmediaserver/CrashUploader
^C

The service file gets put in /lib/systemd/system
Control files (preinst,postinst, etc) all run as part of the install
– You can find these files, after installation, here:

[chuck@lizum plex.2015]$ cd /var/lib/dpkg/info
[chuck@lizum info.2016]$ ls plexm*
plexmediaserver.list  plexmediaserver.md5sums  plexmediaserver.postinst*  plexmediaserver.postrm*  plexmediaserver.preinst*  plexmediaserver.prerm*
[chuck@lizum info.2017]

If you can’t see the card here -AND- it points to a pci bus location

[chuck@glockner drivers.2006]$ ls -la
total 0
drwxr-xr-x 2 root root 0 Nov  9 17:56 ./
drwxr-xr-x 6 root root 0 Nov  8 22:31 ../
lrwxrwxrwx 1 root root 0 Nov  9 17:56 pci:nvidia -> ../../../bus/pci/drivers/nvidia/
lrwxrwxrwx 1 root root 0 Nov  9 17:56 pci:nvidia-nvswitch -> ../../../bus/pci/drivers/nvidia-nvswitch/
[chuck@glockner drivers.2007]$ pwd
/sys/module/nvidia/drivers
[chuck@glockner drivers.2008]$  ls -la ../../../bus/pci/drivers/nvidia/
total 0
drwxr-xr-x  2 root root    0 Nov  8 22:31 ./
drwxr-xr-x 37 root root    0 Nov  8 22:31 ../
lrwxrwxrwx  1 root root    0 Nov  8 22:31 0000:07:00.0 -> ../../../../devices/pci0000:00/0000:00:03.0/0000:07:00.0/
--w-------  1 root root 4096 Nov  9 17:58 bind
lrwxrwxrwx  1 root root    0 Nov  8 22:31 module -> ../../../../module/nvidia/
--w-------  1 root root 4096 Nov  9 17:58 new_id
--w-------  1 root root 4096 Nov  9 17:58 remove_id
--w-------  1 root root 4096 Nov  9 12:57 uevent
--w-------  1 root root 4096 Nov  9 17:58 unbind
[chuck@glockner drivers.2009]$

then it’s not coming through.

I have tried a simple reboot of the VM and it hasn’t help.

when you update pms, what command do you use?

Im also learning Linux, not yet a guru :slight_smile:

To update plex, its just “sudo apt-get update”, then “sudo apt-get upgrade”

I installed plex using a method like this one, steps 1-5

For nvidia drivers, I did it as this page mentions.

  1. “ubuntu-drivers devices”
  2. “sudo apt install nvidia-driver-####”

I have found the nvidia driver sometimes autoupdates using this method, and jacks with my persistenced settings… but not a huge deal for me.

Hope this helps

You can set an override service in /etc/systemd/system and override it.

[chuck@glockner system.2003]$ ls /etc/systemd/system/nvidia-persistenced.service 
/etc/systemd/system/nvidia-persistenced.service
[chuck@glockner system.2004]$ cat /etc/systemd/system/nvidia-persistenced.service 
[Unit]
Description=NVIDIA Persistence Daemon
Wants=syslog.target
StopWhenUnneeded=true
Before=systemd-backlight@backlight:nvidia_0.service

[Service]
Type=forking
ExecStart=/usr/bin/nvidia-persistenced --user nvidia-persistenced --persistence-mode --verbose
ExecStopPost=/bin/rm -rf /var/run/nvidia-persistenced

[chuck@glockner system.2005]$

(copy it to /etc/systemd/system. edit it. and then restart it)

If things get wonky at some point in the future, check this first.

1 Like

Thanks @ChuckPa , That’s actually the method I use for setting persistenced. Seems to get overwritten back to default when the driver auto-updates.

Thanks for the suggestion, but that doesn’t seem to work for me. Thankfully, this is not a huge issue.

@DRied

I’ve not had a problem with it on Ubuntu server.

The alternative is to set /etc/systemd/system/nvidia-persistenced.service.d/override.conf`

[Service]
ExecStart=/usr/bin/nvidia-persistenced --user nvidia-persistenced --persistence-mode --verbose

Now, as a formal override, it will not be altered.
systemd now overrules what the driver installs.

@ChuckPa , I just noticed that my method was not the same as your previous post… attention to detail matters :slight_smile:

I was setting this in /lib/systemd/system/nvidia-persistenced.service

you’re suggesting /etc/systemd/system/nvidia-persistenced.service

I may give that a try in /etc. Thanks again for the tips!

Really appreciate your presence in these forums!!! Thank you!!

For those still learning (me included), this description helps explain why my /lib method would be overwritten during driver autoupdates.

debian - What's the difference between /usr/lib/systemd/system and /etc/systemd/system? - Unix & Linux Stack Exchange.

Basically, files that ships in packages downloaded from distribution repository go into /usr/lib/systemd/. Modifications done by system administrator (user) go into /etc/systemd/system/.
System-specific units override units supplied by vendors.

YES!

/lib/systemd/system is under the control of the package manager
/etc/systemd/system is where you put UNIT-level overrides (ignores /lib/systemd/system)

/etc/systemd/system/<servicename>.d/override.conf is how you change singular items in the /lib/systemd/system default distribution service file.

1 Like

So installing the NVIDIA drivers as documented in the link above fixed this for me, I can now update Plex Server and the NVIDIA GPU still shows up after the update.

Thanks for the help

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.