Jump to content
linuxserver.io

[Plugin] Linuxserver.io - Unraid Nvidia

1185 posts in this topic Last Reply

Recommended Posts


What client are you using to watch this on?

I am using two nvidia shields internally in the network and sometimes an iPad, the iPad is usually fine as the server transcodes for that but both shields are connected to the network via Ethernet speed tested at 997mpbs down 1008mbps up to the server witha ping of less than 1ms and a jitter of 0.4 or less. I have tested the network performance to iron out issues there but I lifted floors etc to run cat6 all around the house instead of wifi. It’s not a network issue and I’m fairly sure it’s not a server performance issue either. It’s just a plex issue the problem also happens from time to time on the LG plex app (for LG TVs) seems strange I only get issues with performance on direct play and not converting. Some times I also get audio sync issues with direct play especially with TV recordings yet throw convert automatically on and I don’t have those issues.


Sent from my iPhone using Tapatalk

Share this post


Link to post
48 minutes ago, rix said:

As much as I support this notion having little spare time to manage myself: it's been a week.

 

Can we help you guys build and troubleshoot an RC5 build with the latest drivers?

 

I would gladly spin up an unraid VM and try this out if you gave me directions on the steps required.

I'm on holiday with my family, I have tried to compile it several times but there are some issues that need working on.

 

It will be ready when it's ready, a week for something that is free is no time at all, we're not releasing the source scripts for reasons I outlined in the original script, but if someone isn't happy with the timescales that we work on, then they are more than welcome to compile and create this solution themselves and debug any issues.  The source code is all out there.

 

I've made my feelings about this sort of thing well known before, I will outline it again.  We're volunteers with families, jobs, wives and lives to leads.  Until the day comes where working on this stuff pays our mortgages, feeds our kids and allows us to resign our full time jobs arrives then things happen at our place and our pace only.

 

We have a discord channel that people can join and if they want to get involved then just ask, but strangely whenever I offer, the standard reply is that people don't have enough free time.  If that is the case, fine, but don't assume any of us have any more free time than you, we don't, we just choose to dedicate what little free time we have to this project.

 

Share this post


Link to post

If someone does want to help, then in essence the problem is the runc version included in Unraid v6.6.7 and v6.7.0rc5 doesn't currently have a Nvidia patch available for it, so one approach we've thought of is replacing the runc available in Unraid completely with a separate version that does have the patch available although we're not sure if this will cause problems at all.

Bassrock and me have been working on it, but he's very busy at the moment and I'm on a family holiday with my wife and daughter so have been limited to working on this after everyone else has gone to bed. I'm not willing to spend any time in the day working on it as I see little of my daughter/wife when we're working and at home, so I'm cherishing every minute of the time I am spending with them on holiday, and for me that is way more important than anything Unraid or Nvidia related.



Sent from my Mi A1 using Tapatalk

Share this post


Link to post
1 hour ago, CHBMB said:

If someone does want to help, then in essence the problem is the runc version included in Unraid v6.6.7 and v6.7.0rc5 doesn't currently have a Nvidia patch available for it, so one approach we've thought of is replacing the runc available in Unraid completely with a separate version that does have the patch available although we're not sure if this will cause problems at all.

Bassrock and me have been working on it, but he's very busy at the moment and I'm on a family holiday with my wife and daughter so have been limited to working on this after everyone else has gone to bed. I'm not willing to spend any time in the day working on it as I see little of my daughter/wife when we're working and at home, so I'm cherishing every minute of the time I am spending with them on holiday, and for me that is way more important than anything Unraid or Nvidia related.



Sent from my Mi A1 using Tapatalk
 

I 100% support that its literally the same with my open source projects - that's why I offered time and resources to help.

Share this post


Link to post

Please enjoy your holidays!

Share this post


Link to post

Holiday with family first! ++++1

 

I wonder if limetech could help? That is a great addition to Unraid and benefits them for sure. @jonp any comments on the issue that LinuxServer.io team is facing on the latest version of Unraid with runc?

Share this post


Link to post
Holiday with family first! ++++1
 
I wonder if limetech could help? That is a great addition to Unraid and benefits them for sure. [mention=62528]jonp[/mention] any comments on the issue that LinuxServer.io team is facing on the latest version of Unraid with runc?
It's not an issue with stock Unraid, the issue is there isn't a patch available for the runc version. Due to the recent docker update for security reasons, Nvidia haven't caught up yet.

Sent from my Mi A1 using Tapatalk

Share this post


Link to post

Oh I see.  So, in short, we need to wait for Nvidia to release an update, meaning there isn't really anything you can do until then (except what you already tried, using an older version).  Then, I think you should just watch the release of that new version of that patch and stop wondering with this for now :)  You should add a message to first post about that situation.

Share this post


Link to post

Point 7 pretty much covers the scenario...

Sent from my Mi A1 using Tapatalk

Share this post


Link to post
Posted (edited)
13 hours ago, Randall8686 said:


I am using two nvidia shields internally in the network 


Sent from my iPhone using Tapatalk

There's your issue, the shields are having issues right now with this exactly. Plex/Nvidia are aware of it and is trying to fix it.

 

Edit: @CHBMB: Go get off these forums and enjoy your time doing what YOU want with your family, nothing is more important than them.

Edited by MowMdown

Share this post


Link to post
There's your issue, the shields are having issues right now with this exactly. Plex/Nvidia are aware of it and is trying to fix it.
 
Edit: [mention=6219]CHBMB[/mention]: Go get off these forums and enjoy your time doing what YOU want with your family, nothing is more important than them.


Ah ok well hopefully I will get an update to the I’m guessing plex client on the shield. It’s been going on a while now. Very annoying given I purchased the shields simply for using plex on my TV’s as I was told they are one of the best bits of hardware to use plex on.... typical lol.

+1 on the holiday go enjoy time with family we don’t have enough time with the ones we love as it is and life is too short! Enjoy chap!


Sent from my iPhone using Tapatalk

Share this post


Link to post

Yeah, I just read about it a couple of days ago. It has something to do with how it's streaming the data and the packets aren't arriving in sequential order thus giving the server error message.

Share this post


Link to post
11 hours ago, MrxFantatsicx said:

I can't get the Video card to show up in Emby, here is the log

Emby Log.txt

if you're using binhex's copy of emby, use the official one.. solved it for me.

Share this post


Link to post

I have been trying out Jellyfin... I've set up transcoding and can see it working. However when seeking in any media the transcoding crashes. Anyone gotten it to work properly?

ffmpeg log:

ffmpeg version n4.1 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 8.2.1 (GCC) 20180831
  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-nvdec --enable-nvenc --enable-omx --enable-shared --enable-version3
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100
Input #0, matroska,webm, from 'file:/media/Movies/Last Action Hero (1993)/Last.Action.Hero.1993.1080p.HEVC.x265.6ch.AAC-mRR.mkv':
  Metadata:
    ENCODER         : Lavf58.10.100
  Duration: 02:10:55.01, start: 0.000000, bitrate: 3644 kb/s
    Chapter #0:0: start 0.000000, end 533.866000
    Chapter #0:1: start 533.866000, end 893.767000
    Chapter #0:2: start 893.767000, end 1350.015000
    Chapter #0:3: start 1350.015000, end 1832.121000
    Chapter #0:4: start 1832.121000, end 2524.647000
    Chapter #0:5: start 2524.647000, end 2894.975000
    Chapter #0:6: start 2894.975000, end 3178.633000
    Chapter #0:7: start 3178.633000, end 3397.602000
    Chapter #0:8: start 3397.602000, end 4024.895000
    Chapter #0:9: start 4024.895000, end 4416.537000
    Chapter #0:10: start 4416.537000, end 4820.941000
    Chapter #0:11: start 4820.941000, end 5054.591000
    Chapter #0:12: start 5054.591000, end 6047.666000
    Chapter #0:13: start 6047.666000, end 6435.095000
    Chapter #0:14: start 6435.095000, end 6963.831000
    Chapter #0:15: start 6963.831000, end 7854.911667
    Stream #0:0: Video: hevc (Main), yuv420p(tv), 1920x800 [SAR 1:1 DAR 12:5], 23.98 fps, 23.98 tbr, 1k tbn, 23.98 tbc (default)
    Metadata:
      ENCODER         : Lavc58.14.100 libx265
      DURATION        : 02:10:55.014000000
    Stream #0:1(eng): Audio: aac (LC), 48000 Hz, 5.1, fltp (default)
    Metadata:
      DURATION        : 02:10:54.912000000
Stream mapping:
  Stream #0:0 -> #0:0 (hevc (hevc_cuvid) -> h264 (h264_nvenc))
  Stream #0:1 -> #0:1 (aac (native) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
[segment muxer @ 0x555d85cc7380] Value -264.000000 for parameter 'segment_time_delta' out of range [0 - 9.22337e+12]
[segment muxer @ 0x555d85cc7380] Error setting option segment_time_delta to value -264.
Could not write header for output file #0 (incorrect codec parameters ?): Numerical result out of range
Error initializing output stream 0:0 -- 
Conversion failed!

 

Share this post


Link to post
7 hours ago, pimogo said:

if you're using binhex's copy of emby, use the official one.. solved it for me.

Appreciate brother that solved the problem for me!

Share this post


Link to post

Adding some sort of mechanism for notifications via Pushover/email of new kernel releases would be nice.

 

Other than that, great plugin. Enjoy your well deserved vacay CHBMB.

Share this post


Link to post

We're still battling with this a bit.  Might be a while.

 

@Dazog Unfortunately that commit doesn't help us as it's prepackaged binaries for Ubuntu/RHEL rather than a source code patch we can use to apply on Slackware.

Share this post


Link to post
3 minutes ago, CHBMB said:

We're still battling with this a bit.  Might be a while.

 

@Dazog Unfortunately that commit doesn't help us as it's prepackaged binaries for Ubuntu/RHEL rather than a source code patch we can use to apply on Slackware.

Hey u guys - thanks for the update.

 

I have purchased an RTX card last week and am having extremely high power draw. Would be very helpful to try if a current driver resolves this, before my return period runs out (still have a week to go).

 

I tried running build.sh according to your git repo myself, but that file is not found. Could you perchance rebuild RC4 with the latest drivers?

 

 

Share this post


Link to post

Sorry @rix point 6 in the original post, I'm afraid you'll need to wait a while.

Share this post


Link to post
1 hour ago, CHBMB said:

We're still battling with this a bit.  Might be a while.

 

@Dazog Unfortunately that commit doesn't help us as it's prepackaged binaries for Ubuntu/RHEL rather than a source code patch we can use to apply on Slackware.

Ok. just thought I would report what I found.

 

If there is anything we can do to help and what to look for please let us know.

Share this post


Link to post
On 2/24/2019 at 2:08 AM, 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\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!

Thank you for this script and a massive thank you to everybody involved with this project!👏

Worked flawlessly on 6.7.0-rc4 with an NVIDIA Quadro P600.

In case a non-programmer like me will run into the same question I have, here is the exact procedure which worked for me:

  • Copy the script into an editor
  • Modify the "con" value (e.g. "binhex-plexpass")
  • Save as an .sh file
  • Copy to desired folder on Unraid server (if not working on server already)
  • Open terminal from Unraid webgui and enter "bash /path/to/script.sh

Share this post


Link to post
2 minutes ago, phasetwo said:

Thank you for this script and a massive thank you to everybody involved with this project!👏

Worked flawlessly on 6.7.0-rc4 with an NVIDIA Quadro P600.

In case a non-programmer like me will run into the same question I have, here is the exact procedure which worked for me:

  • Copy the script into an editor
  • Modify the "con" value (e.g. "binhex-plexpass")
  • Save as an .sh file
  • Copy to desired folder on Unraid server (if not working on server already)
  • Open terminal from Unraid webgui and enter "bash /path/to/script.sh

One can also install the CA User Scripts plugin and do this from the web UI, and even set a scheduled run to keep it patched in the event of Plex container updates.

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.