[Plugin] Linuxserver.io - Unraid Nvidia


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
Link to comment
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.

 

  • Like 5
Link to comment

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

  • Like 5
  • Upvote 2
Link to comment
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.

Link to comment
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

  • Like 3
  • Upvote 1
Link to comment

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.

Link to comment
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
  • Like 1
Link to comment
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
Link to comment

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!

 

Link to comment
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?

 

 

Link to comment
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.

Link to comment
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
  • Like 1
  • Thanks 1
Link to comment
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.

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