Plex app not able to use gpu in EE RC

Description

The plex app can’t use the GPU of the host and therefore hardware accelerated transcoding is not possible inside the plex app. However, this was working when I still used the Kubernetes app in Scale 24.04. So this issue is not related to my hardware.

For my tests I used the docker container GPU-burn ( ). This container basically uses the GPU of the host for 100% for a certain amount of time. I just followed the 4 steps in their git repo and was able to run this container on my TrueNAS system via the cli. While running this container I saw that the GPU was used by the container via the nvidia-smi command and also in the cli output of the container itself.

After my testing and comparing the two containers, it looks like the environment variable “NVIDIA_VISIBLE_DEVICES” is set incorrectly for the plex app. You can see this in my attached screenshots. Screenshot 1 shows the output of the docker container inspect command for the plex container where the variable is defined, but no value is set for this variable. Screenshot 2 shows the docker container inspect command for the gpu-burn container, which sets the variable to all.
When I was still using the Kubernetes Plex app I also had to set the variable NVIDIA_VISIBLE_DEVICES=all for a working GPU transcoding. So it looks like, it is a similar problem here.

Problem/Justification

None

Impact

None

Attachments

2

Activity

Show:

Bug Clerk October 10, 2024 at 6:21 AM

This issue has now been closed. Comments made after this point may not be viewed by the TrueNAS Teams. Please open a new issue if you have found a problem or need to re-engage with the TrueNAS Engineering Teams.

Stavros Kois October 10, 2024 at 6:21 AM

Hello, yes existing apps that hit by this issue, (gpu ids being empty) will have to either reinstall or manually via a middlware command update the configuration.

Thanks for your confirmation!

Raphael Schrittwieser October 8, 2024 at 7:44 PM

I played around with this problem a little bit more and updated my system to the latest release TrueNAS ElectricEel-24.10-RC.2, but it’s still not working with my existing container.

So I created a new Plex App instance and now the GPU attaches without any issue and is used for transcoding. The environment variable is correctly populated with a value ("NVIDIA_VISIBLE_DEVICES=GPU-a786227c-9584-6be3-c3a4-0a8bcbea50d8") as you can see in the container config below.

I built my original container with TrueNAS ElectricEel-24.10-RC.1, because after the migration from TrueNAS Dragonfish from Kubernetes to Docker my transferred app wasn’t working at all. So it seems like there was something wrong with the way the app was deployed with version ElectricEel-24.10-RC.1.


I kept my old plex container for future reference if you would like to have more info about it.

Raphael Schrittwieser October 3, 2024 at 7:33 PM
Edited

 

 

 

It seems like the middleware selects the correct GPU.

Stavros Kois October 3, 2024 at 5:35 PM

Can you please share the outputs of the following commands?


Thanks

Complete
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Original estimate

Time remaining

0m

Components

Fix versions

Priority

Katalon Platform

Created October 3, 2024 at 5:30 PM
Updated October 10, 2024 at 6:24 AM
Resolved October 10, 2024 at 6:21 AM