[Plugin] Linuxserver.io - Unraid Nvidia


Recommended Posts

57 minutes ago, Randall8686 said:

OK i have it working (big thanks to PDUCharme for helping me out and putting up with my stupidity) and endiz above. However i have one slight issue. when i watch a stream it uses the gpu now. however once i finish it does not close the transcoder down so now my plex is playing nothing yet this is what i get in nidvia-smi. its uses all the Vram and i cannot play anything. if i restart the container it works but i end up here again. image.png.43b65320098aae1f84adaa1d317fde73.png

Eventually the streams get cleaned up:

 

image.png.5aee880c9a8d98bc8d86636d05534295.png

Link to comment
14 minutes ago, endiz said:

Not sure, just check back 10 minutes later i guess. Make sure you are stopping the player and not simply closing a tab which sometimes pauses the stream.

i think that is what is happening, if i close the stream in plex it goes. if the app is just shut on ios or windows it stays there. getting people to close the stream correctly is not an option. so far they have stayed for half hour. im curious as to if they will go or not. one of the ones stuck is some ones TV app crashed so they started watching again and that on is stuck there. i hope that they dont stay stuck until i restart the docker as once the Vram is used up no more streams can start :( 

 

Link to comment
Well you will have the same issue with people pausing.. i recommend using the tautulli killstream script to kill any streams that are paused for 30 minutes:
 
https://github.com/blacktwin/JBOPS/tree/master/killstream

This is exactly what I need :) I will have a look at that when I’m home as I have shot out now. Anything paused for more than 30 can be killed happy with that


Sent from my iPhone using Tapatalk
  • Like 1
Link to comment
37 minutes ago, primeval_god said:

Alternatively why not do this outside the container so that you dont have to patch every time it updates? Just create the "Plex Transcoder" file in a folder in appdata. Change the chmod with +x. Then add a new mapping to the docker container /mnt/user/appdata/somefolder/PlexTranscoder -> "/usr/lib/plexmediaserver/Plex Transcoder" with the read only setting. I havent tried it with plex, but this is how i map individual files into the Netdata container.

Well that wouldn't work since you still need the original Plex Transcoder binary... But this gave me a good idea. Outside of the container, I put the new transcoder binary in "/mnt/cache/appdata/plex/Library/Application Support/Plex Media Server" (/config/ in the container) and created another script to automate the move.

 

 

root@endiZRaid:/mnt/cache/appdata/plex/Library/Application Support/Plex Media Server# cat Plex\ Transcoder
#!/bin/sh
/usr/lib/plexmediaserver/Plex\ Transcoder2 -hwaccel nvdec "$@"

root@endiZRaid:/mnt/cache/appdata/plex/Library/Application Support/Plex Media Server# cat nvidia_dec.sh
#!/bin/sh
mv /usr/lib/plexmediaserver/Plex\ Transcoder /usr/lib/plexmediaserver/Plex\ Transcoder2
cp /config/Library/Application\ Support/Plex\ Media\ Server/Plex\ Transcoder /usr/lib/plexmediaserver/

 

 

Now I just have to execute it each time the docker updates..

Edited by endiz
Link to comment
17 minutes ago, endiz said:

Well that wouldn't work since you still need the original Plex Transcoder binary... But this gave me a good idea. Outside of the container, I put the new transcoder binary in /config/ and created another script to automate the move:

 


#!/bin/sh
mv /usr/lib/plexmediaserver/Plex\ Transcoder /usr/lib/plexmediaserver/Plex\ Transcoder2
cp /config/Library/Application\ Support/Plex\ Media\ Server/Plex\ Transcoder /usr/lib/plexmediaserver/

Now I just have to execute it each time the docker updates..

Do you even need to move it, wouldnt a symlink work?

Link to comment
4 hours ago, endiz said:

Well you will have the same issue with people pausing.. i recommend using the tautulli killstream script to kill any streams that are paused for 30 minutes:

 

https://github.com/blacktwin/JBOPS/tree/master/killstream

can anyone point me towards a place to learn about running scripts? i would like to run the "disconnect transcodes paused for 20mins" but i need to learn what i am doing. others have been so helpfull in here getting my server to run the nvidia decoding script but would love to actually learn  how to do these things for myself. My background is electronic engineering and hardware so repairing a motherboard and even replacing soldered chips/cpu's/gpu's are well within my capability but when it comes to coding,programming im a 90 year old lol. 

Link to comment
9 hours ago, endiz said:

Turn that frown upside down! If you want to force the decode through NVDEC, do the following:

 

1. Launch into the plex container shell.

2. Rename "/usr/lib/plexmediaserver/Plex Transcoder" >  "/usr/lib/plexmediaserver/Plex Transcoder2"

3. Create a new file called "/usr/lib/plexmediaserver/Plex Transcoder" and put this in the contents:

 


#!/bin/sh
/usr/lib/plexmediaserver/Plex\ Transcoder2 -hwaccel nvdec "$@"

4. chmod +x "/usr/lib/plexmediaserver/Plex Transcoder"

 

Done! Your transcodes should be encoded and decoded by nvidia. Plex doesn't reflect it because its a workaround, but check out your CPU utilization, should be negligible.

 

Unfortunately, you will have to run this everytime the plex docker gets updated until plex adds support for NVDEC officially.

I did all these steps but in my PMS logs I get the error below:

 

/usr/lib/plexmediaserver/Plex Transcoder: 2: /usr/lib/plexmediaserver/Plex Transcoder: /usr/lib/plexmediaserver/Plex Transcoder2: not found

 

I rechcked with 'ls' and do see both Plex Transcoder and Plex Transcoder2 file so why it shows error above?

 

I am using official pms-docker

Link to comment
2 hours ago, Randall8686 said:

can anyone point me towards a place to learn about running scripts? i would like to run the "disconnect transcodes paused for 20mins" but i need to learn what i am doing. others have been so helpfull in here getting my server to run the nvidia decoding script but would love to actually learn  how to do these things for myself. My background is electronic engineering and hardware so repairing a motherboard and even replacing soldered chips/cpu's/gpu's are well within my capability but when it comes to coding,programming im a 90 year old lol. 

I can help you, i'll PM you directly

Link to comment
18 hours ago, j0nnymoe said:

Can confirm, it doesn't remove the ability to pass through the iGPU. I have both my Nvidia card and iGPU passed to my Emby container. (There is a screenshot I posted further back in this thread)

there are no error though, my Plex server can see the NVIDIA GPU just fine but i doesn't like it when i tried to pass the iGPU (8700k CPU)through with the NVIDIA drive install using the plugin. I also tried to pass the iGPU to HandBrake and same thing. it doesn't see the iGPU. after i removed the NVIDIA driver using the plugin. Handbrake and Plex can now see the iGPU. it might be an error on my end but there are no error that actually come up  

Link to comment
32 minutes ago, hus2020 said:

I did all these steps but in my PMS logs I get the error below:

 

/usr/lib/plexmediaserver/Plex Transcoder: 2: /usr/lib/plexmediaserver/Plex Transcoder: /usr/lib/plexmediaserver/Plex Transcoder2: not found

 

I rechcked with 'ls' and do see both Plex Transcoder and Plex Transcoder2 file so why it shows error above?

 

I am using official pms-docker

 Can you post the output of cat for both Plex Transcoder & Plex Transcoder2?

Link to comment
1 hour ago, endiz said:

 Can you post the output of cat for both Plex Transcoder & Plex Transcoder2?

Hi I managed to get it working using your nvidia_dec.sh

Just that it didnt work initially so I had to manually do chmod +x on both Plex Transcode & Plex Transcode2. Maybe you should add this chmod+x command too in your script.

 

Also, I noticed, that my cpu is still being utilized, but now significantly less than before. Does plex still use CPU even when we force NVDEC. I suppose maybe the audio is transcoded using CPU?

 

And nvidia-smi still show the process even after stream is closed. Anyone have solution for this yet?

 

 

Edited by hus2020
Link to comment
On 2/13/2019 at 10:23 AM, Kiyometa said:

@Pducharme

 

Now that definitely confuses me, I have the Lifetime Plex Pass. So, what is the "latest" plex pass version?

 

Edit: And realizing this got a little off topic now, sorry mods.

Sorry, got busy and never saw this.  When you use PlexMediaServer docker container.  You can change the Repository to:

 

plexinc/pms-docker:beta

 

And then the env variable VERSION to "beta".

Link to comment
20 minutes ago, mestep said:

Trying to do the nvdec thing. I followed the instructions and I try to play a video in my browser. It keeps spinning and never loading.

 

Then I get "conversion failed. The transcoder exited due to an error."

 

I am using a GTX1050

I faced the same issue. The problem was the bash script was not marked executable. Try to chmod +x for both Plex Transcoder and Plex Transcoder 2

Link to comment
58 minutes ago, hus2020 said:

I faced the same issue. The problem was the bash script was not marked executable. Try to chmod +x for both Plex Transcoder and Plex Transcoder 2

I honestly am not too good at linux. I did everything typing in from the command line through the docker. I am not sure how to get the bash script setup.

 

I do have the userscripts plugin, but I just don't know how to get it to interface within a docker container.

 

 

Edited by mestep
Link to comment

I installed the plugin, everything seems to be working fine, I configured the Emby container with the GPU settings.

 

 

Everything seems to be running ok, except the transcode streams don't show up in the nvidia-smi utility.

 

I ran that from the main server console, is it supposed to be launched from somewhere else?

 

Included are some screenshots.

Screenshot from 2019-02-19 18-35-25.png

Screenshot from 2019-02-19 18-27-28.png

Screenshot from 2019-02-19 18-27-08.png

Link to comment
18 hours ago, Duckbuster said:

I installed the plugin, everything seems to be working fine, I configured the Emby container with the GPU settings.

 

 

Everything seems to be running ok, except the transcode streams don't show up in the nvidia-smi utility.

 

I ran that from the main server console, is it supposed to be launched from somewhere else?

 

Included are some screenshots.

Screenshot from 2019-02-19 18-35-25.png

Screenshot from 2019-02-19 18-27-28.png

Screenshot from 2019-02-19 18-27-08.png

 

It's mentioned in the start of this thread that not all cards are supported by nvidia-smi, which is also stated in your screenshot. None of my 700-series card are supported. 

Emby says it's using nvenc/nvdec, so it's working. 

Edited by saarg
Link to comment

I just installed Emby to see if I could get the "watch nvidia-smi" working but I cant even get the monitor up?

(Is it only for the beta emby server version?)

 image.png.1e68e9f477514414ed5f6a2ac70238ac.png

 

As posted before I had it working on the P2000 card for a glorious hour or two and then never worked since.

So I thought that maybee Emby with support for both encoding and decoding would have better look :-)

 

"watch nvidia-smi dmon -s u??" this doesn't work either.....

 

 

Link to comment
Just now, casperse said:

I just installed Emby to see if I could get the "watch nvidia-smi" working but I cant even get the monitor up?

(Is it only for the beta emby server version?)

 image.png.1e68e9f477514414ed5f6a2ac70238ac.png

 

As posted before I had it working on the P2000 card for a glorious hour or two and then never worked since.

So I thought that maybee Emby with support for both encoding and decoding would have better look 🙂

 

"watch nvidia-smi dmon -s u??" this doesn't work either.....

 

 

You run it on unraid, not the container. 

  • Like 1
Link to comment
  • trurl locked this topic
Guest
This topic is now closed to further replies.