Jump to content
linuxserver.io

[Plugin] Linuxserver.io - Unraid Nvidia

1101 posts in this topic Last Reply

Recommended Posts

5 hours ago, brainbudt said:

does your cpu need to have VT-D in order to get this to work ?

No, my server has VT-D disabled (incompatible with my sata card) and I can still do hardware transcoding just fine.

Share this post


Link to post
Eh nothing too major to worry about IMO. The only one relevant is CVE‑2018‑6260 and you need physical access to the machine. Rest of the CVE's are windows.
I agree, nothing there which is particularly concerning.

Sent from my Mi A1 using Tapatalk

Share this post


Link to post
5 hours ago, Dazog said:

Hopefully slackbuilds releases 418.43 soon to patch the CVE:

 

https://nvidia.custhelp.com/app/answers/detail/a_id/4772

Seeing that this is all windows CVE except one that affects linux and also need local user access, it's not a high risk of being attacked. Unless you have shady friends visiting :P

 

Edit: Didn't flip the page to see the other guys already answering... Too little beers!

Edited by saarg

Share this post


Link to post
1 minute ago, docfunbags said:

How long after an Unraid RC would an update normally appear?  6.7.0-rc5 dropped recently.

 

Recently, like an hour or two ago ? 🤣 I think someone from LinuxServer.io said that it take hours to compile when releasing a new build.  

Share this post


Link to post
1 minute ago, Pducharme said:

 

Recently, like an hour or two ago ? 🤣 I think someone from LinuxServer.io said that it take hours to compile when releasing a new build.  

Great, thanks!

Share this post


Link to post
2 minutes ago, docfunbags said:

Great, thanks!

You welcome.  But, i'm not in their team, so I don't know if they plan to release it today or later.  I suppose they will also update the driver to latest available (?).

Share this post


Link to post
2 hours ago, docfunbags said:

How long after an Unraid RC would an update normally appear?  6.7.0-rc5 dropped recently.

 

It will be available when it's available. 

Asking when it's released won't make it appear any faster. We have a life also and it's not all of us that does the compiling. 

Share this post


Link to post

Put this together earlier.  If it's correct, it's a User Script that applies the Plex hardware decoding patch...

#!/bin/bash

con="plex"

echo ""
echo "<font color='red'><b>Applying hardware decode patch...</b></font>"
echo "<hr>"

docker exec -i $con mv "/usr/lib/plexmediaserver/Plex Transcoder" "/usr/lib/plexmediaserver/Plex Transcoder2"
docker exec -i $con /bin/sh -c 'printf "#!/bin/sh\nexec /usr/lib/plexmediaserver/Plex\ Transcoder2 -hwaccel nvdec "\""\$@"\""" > "/usr/lib/plexmediaserver/Plex Transcoder";'
docker exec -i $con chmod +x "/usr/lib/plexmediaserver/Plex Transcoder"
docker exec -i $con chmod +x "/usr/lib/plexmediaserver/Plex Transcoder2"
docker restart $con

echo ""
echo "<font color='red'><b>Done!</b></font>"

Disclaimer: I know very little about bash, docker commands or what the above patch actually does.  It's just pieced together from working out how I think it's done manually and converting that into a script.

 

If it can be improved (or if it's dangerously wrong), please let me know.  If it's fine, I'll put it in the User Scripts area.

 

Notes:

  • Should be run when Plex is installed/updated
  • From the command line, run "docker ps" to see what your plex container is called.  Set that as the "con" variable in your script (mine is "plex")
  • This script is only required until Plex officially supports hardware decoding
  • It preforms the same as recommended earlier in this thread, namely...
    • Renames the file "Plex Transcoder" to "Plex Transcoder2"
    • Creates a new "Plex Transcoder" file with the suggested contents
    • Changes permissions on both "Plex Transcoder" and "Plex Transcoder2" files (not sure it's required on Transcoder2 - seemed to work for me without)
    • Restarts the Plex container (not sure if required, but doing it anyhow)
  • Probably best nothing is playing whilst the script is run
  • You'll need to have Plex running for the script to work.  Would require different code if stopped (would probably be safer to stop the container first, make the changes then start again, but here we are)
  • Run "nvidia-smi dmon -s u" from the terminal (not within Plex container) to check whether the decoding is working.  Set a video to play in a transcoded state, and the 3rd and 4th columns from the end should be non-zero

Good luck!

Edited by Cessquill
updated script to add "exec" into transcoder file

Share this post


Link to post
2 hours ago, Pducharme said:

 

Recently, like an hour or two ago ? 🤣 I think someone from LinuxServer.io said that it take hours to compile when releasing a new build.  

While it is true that it takes hours to compile, that clock only starts "after" the team member 1) has the time to dedicate to it, 2) has access to his/her server, 3) feels like s/he can troubleshoot if something goes wrong. 😉

 

We are all volunteers who have jobs, lives and other needs that come before keeping up with external releases.

 

It will be released when it's ready

Share this post


Link to post
While it is true that it takes hours to compile, that clock only starts "after" the team member 1) has the time to dedicate to it, 2) has access to his/her server, 3) feels like s/he can troubleshoot if something goes wrong. 
 
We are all volunteers who have jobs, lives and other needs that come before keeping up with external releases.
 
It will be released when it's ready


Yes I understand that really well. I was replying to the other person that ask when it will be ready because rc5 was out. I totally agree with "it will be released when it will be ready"!

Share this post


Link to post
Put this together earlier.  If it's correct, it's a User Script that applies the Plex hardware decoding patch...
#!/bin/bashcon="plex"echo ""echo "Applying hardware decode patch..."echo ""docker exec -i $con mv "/usr/lib/plexmediaserver/Plex Transcoder" "/usr/lib/plexmediaserver/Plex Transcoder2"docker exec -i $con /bin/sh -c 'printf "#!/bin/sh\n/usr/lib/plexmediaserver/Plex\ Transcoder2 -hwaccel nvdec "\""\$@"\""" > "/usr/lib/plexmediaserver/Plex Transcoder";'docker exec -i $con chmod +x "/usr/lib/plexmediaserver/Plex Transcoder"docker exec -i $con chmod +x "/usr/lib/plexmediaserver/Plex Transcoder2"docker restart $conecho ""echo "Done!"

Disclaimer: I know very little about bash, docker commands or what the above patch actually does.  It's just pieced together from working out how I think it's done manually and converting that into a script.
 
If it can be improved (or if it's dangerously wrong), please let me know.  If it's fine, I'll put it in the User Scripts area.
 
Notes:

  • Should be run when Plex is installed/updated
  • From the command line, run "docker ps" to see what your plex container is called.  Set that as the "con" variable in your script (mine is "plex")
  • This script is only required until Plex officially supports hardware decoding
  • It preforms the same as recommended earlier in this thread, namely...
    • Renames the file "Plex Transcoder" to "Plex Transcoder2"
    • Creates a new "Plex Transcoder" file with the suggested contents
    • Changes permissions on both "Plex Transcoder" and "Plex Transcoder2" files (not sure it's required on Transcoder2 - seemed to work for me without)
    • Restarts the Plex container (not sure if required, but doing it anyhow)
  • Probably best nothing is playing whilst the script is run
  • You'll need to have Plex running for the script to work.  Would require different code if stopped (would probably be safer to stop the container first, make the changes then start again, but here we are)
  • Run "nvidia-smi dmon -s u" from the terminal (not within Plex container) to check whether the decoding is working.  Set a video to play in a transcoded state, and the 3rd and 4th columns from the end should be non-zero
Good luck!


Was this already tested? Seems fine from what I read in here.

Share this post


Link to post
19 minutes ago, Pducharme said:

Was this already tested? Seems fine from what I read in here.

 

I tested it on my system and it seems fine to me.

Share this post


Link to post
22 hours ago, Cessquill said:

Put this together earlier.  If it's correct, it's a User Script that applies the Plex hardware decoding patch...


#!/bin/bash

con="plex"

echo ""
echo "<font color='red'><b>Applying hardware decode patch...</b></font>"
echo "<hr>"

docker exec -i $con mv "/usr/lib/plexmediaserver/Plex Transcoder" "/usr/lib/plexmediaserver/Plex Transcoder2"
docker exec -i $con /bin/sh -c 'printf "#!/bin/sh\n/usr/lib/plexmediaserver/Plex\ Transcoder2 -hwaccel nvdec "\""\$@"\""" > "/usr/lib/plexmediaserver/Plex Transcoder";'
docker exec -i $con chmod +x "/usr/lib/plexmediaserver/Plex Transcoder"
docker exec -i $con chmod +x "/usr/lib/plexmediaserver/Plex Transcoder2"
docker restart $con

echo ""
echo "<font color='red'><b>Done!</b></font>"

Disclaimer: I know very little about bash, docker commands or what the above patch actually does.  It's just pieced together from working out how I think it's done manually and converting that into a script.

 

If it can be improved (or if it's dangerously wrong), please let me know.  If it's fine, I'll put it in the User Scripts area.

 

Notes:

  • Should be run when Plex is installed/updated
  • From the command line, run "docker ps" to see what your plex container is called.  Set that as the "con" variable in your script (mine is "plex")
  • This script is only required until Plex officially supports hardware decoding
  • It preforms the same as recommended earlier in this thread, namely...
    • Renames the file "Plex Transcoder" to "Plex Transcoder2"
    • Creates a new "Plex Transcoder" file with the suggested contents
    • Changes permissions on both "Plex Transcoder" and "Plex Transcoder2" files (not sure it's required on Transcoder2 - seemed to work for me without)
    • Restarts the Plex container (not sure if required, but doing it anyhow)
  • Probably best nothing is playing whilst the script is run
  • You'll need to have Plex running for the script to work.  Would require different code if stopped (would probably be safer to stop the container first, make the changes then start again, but here we are)
  • Run "nvidia-smi dmon -s u" from the terminal (not within Plex container) to check whether the decoding is working.  Set a video to play in a transcoded state, and the 3rd and 4th columns from the end should be non-zero

Good luck!

Worked for me! Thanks! 

 

Only problem i see now is that the GPU vram keeps filling up because its not purging itself of old transcodes. I have tried to stop, kill and close out of playing sessions, but the processes remain. 

 

Any thoughts on how to periodically flush the VRAM?

Edited by pimogo

Share this post


Link to post
29 minutes ago, timekiller said:

Any eta on when this plugin will get 6.6.7 and 6.7.0-rc5 support?

This was already discussed on this very page.

Share this post


Link to post
5 minutes ago, trurl said:

This was already discussed on this very page.

Apologies, I searched the topic for '6.6.7', but not '6.7.0-rc5' before posting.

Share this post


Link to post

Hi, i am installed the Patches Nvidia Unraid Build. All is fine in watch nvidia-smi it shows a process. But my CPU usage is very high. I am using a GTX 1050ti. Someone knows my problem? I am need to use the Patch?

 

Thanks for the help.

Share this post


Link to post

image.png.a5478de4cbbb09ff36d39e53437f313e.png

 

Anyone else noticed that if the "DEcoding Patch" is enabled - after a successfull DEcoding - the Process of this DEcoding will be stuck?

And no - there is nothing paused in Plex - no stream is going on or is paused (also checked with Tautuli) 

 

If I leave the Plex Container unpatched - the streams dissapear - as they should - but with the patch - the DECODING processes, and ONLY the decoding processes will stay there until a Docker reboot. So after the second or third stream what happens is that the DECODING is done via CPU (checked)

 

Another poster a few sites before had the same situation - but the postet solutions where to get a killscript for tautili - but this doesn't work because there are no paused streams or transcoded streams in plex anywhere left - it's only here outside.

 

If I can help with investigation - i would do it!

 

best regards

Stefan

Edited by sturmstar
spelling

Share this post


Link to post
4 hours ago, DrAg0n141 said:

Hi, i am installed the Patches Nvidia Unraid Build. All is fine in watch nvidia-smi it shows a process. But my CPU usage is very high. I am using a GTX 1050ti. Someone knows my problem? I am need to use the Patch?

 

Thanks for the help.

GPU is only ENCODING by default - yes, you would need the patch until official support of Plex. 

But as i postet right now - it seems to have a drawback in some constellations ... but generally the patch works, yes!

Share this post


Link to post
image.png.a5478de4cbbb09ff36d39e53437f313e.png
 
Everyone else noticed that if the "DEcoding Patch" is enabled - after a successfull DEcoding - the Process of this DEcoding will be stuck?
And no - there is nothing paused in Plex - no stream is going on or is paused (also checked with Tautuli) 
 
If I leave the Plex Container unpatched - the streams dissapear - as the should - but with the patch - the DECODING processes, and ONLY the decoding processes will stay there until a Docker reboot. So after the second or third stream what happens is that the DECODING is done via CPU (checked)
 
Another poster a few sites before had the same situation - but the postet solutions where to get a killscript for tautili - but this doesn't work because there are no paused streams or transcoded streams in plex anywhere left - it's only here outside.
 
If I can help with investigation - i would do it!
 
best regards
Stefan


Someone on the plex forum said to add a "exec" command in front of the /usr/lib..., this way it will correctly call the Transcoder2 and kill it after.

I didnt try yet, might be a solution.

Share this post


Link to post
3 minutes ago, Pducharme said:

 


Someone on the plex forum said to add a "exec" command in front of the /usr/lib..., this way it will correctly call the Transcoder2 and kill it after.

I didnt try yet, might be a solution.

 

I’m going to give it a shot to today/tonight.  I’ll report back if it works. 

Edited by depreciated_

Share this post


Link to post
3 minutes ago, Pducharme said:

 


Someone on the plex forum said to add a "exec" command in front of the /usr/lib..., this way it will correctly call the Transcoder2 and kill it after.

I didnt try yet, might be a solution.

 

How or where would I do that? In the script? I could test it right now...

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.