-
Posts
413 -
Joined
-
Last visited
-
Days Won
3
Content Type
Profiles
Forums
Downloads
Store
Gallery
Bug Reports
Documentation
Landing
Posts posted by Xaero
-
-
19 hours ago, Chad Kunsman said:
That's pretty disappointing. I'd like to pursue another angle, then. Is it possible the card is not clocking down due to something on the system side keeping it busy/locked? Is there any way to search for things from that angle? Instead of assuming it doesn't know how to idle, let me assume something is keeping it from being idle. But I don't know how to search for that. SMI command maybe?
Additionally does this card have some sort of NVRAM on it that would permanently save settings applied to it even across power cycles or being removed from the computer? I'm trying to find out/understand if there is some sort of permanent setting that might have been applied to the card that I could undo if I moved it to a different OS for example.
If you purchased this second hand, it's possible that someone flashed a second hand BIOS designed for overclocking or cryptocurrency mining. As far as un-doing that, you'd want to find the OEM firmware for that card and flash it. Know that flashing a card ALWAYS poses the risk of bricking the card. It's also possible that the fan motor is using a decent amount of power as it seems to be idling at 40%, where it could turn the fan completely off with a lower temperature. It's also a higher wattage GPU, and I'm not certain what the idle power consumption claims from the manufacturer are, or how accurate those claims are.
-
16 hours ago, gfjardim said:
The power state should be between P8 and P15. The P0 state is for maximum 3D performance.
https://docs.nvidia.com/gameworks/content/gameworkslibrary/coresdk/nvapi/group__gpupstate.html
Enviado de meu SM-G973F usando o Tapatalk
6 hours ago, j0nnymoe said:The Nvidia Linux blobs only support manipulating the power states through the use of powermizer and coolbits flags for X11. Since the driver isn't being used to initialize a display, the card does it's own default power management and software has little control.
You MAY be able to force lower power states by echoing values to sysfs nodes for the card, which can be found in some DRM subfolder of the /sys directory. This probably won't persist, and could lead to instability.
-
13 hours ago, JasonM said:
Same here with multiple formats on the P4000. Since it only affects remote users, I've told them to "deal with it" until I can sort it out. My proc supports QuickSync. I haven't had time to determine if I can configure things such that Plex will use that for decode and the GPU for encode.
If anyone has done this, I'd be curious as to how. I just haven't had time to mess with it.
Use the older wrapper script.
Without the marap filter, just
`exec Plex Transcoder2 -hwaccel qsv "$@"`
Hwaccel should only affect the decoder.
Encoder is set with the encoder parameter later in the string, so this should work to enable quicksync for decode, and nvenc for encode.
Ymmv.
-
8 hours ago, saarg said:
I don't think ffmpeg have what it takes to do a good hdr to sdr conversion. As far as I know, it's only madvr and a bit of tweaking that is good enough.
Ffmpeg might do an OK job, though.
https://stevens.li/guides/video/converting-hdr-to-sdr-with-ffmpeg/
Some good evidence of the issues with HDR Tone Mapping and FFMPEG, and some really promising results using some command line switches. -
23 hours ago, sittingmongoose said:
Edit: So i figured it out. In case anyone else wants to know how to get this to work in Unraid, its super easy! First, make sure the Plex docker is running. Then grab the CA User Scripts Plugin for Unraid.
https://forums.unraid.net/topic/48286-plugin-ca-user-scripts/
Then add a new script and copy and paste this script text in it.
https://gist.github.com/Xaero252/9f81593e4a5e6825c045686d685e2428
Run the script and set a scheduale if you want. I set mine to once a day. It still works if you restart the Plex container but I think you need ot restart it after your array shuts down.
Should work perfectly, you can check decode usage by going to the terminal and typing "nvidia-smi dmon -s u"
I'll have to add a check to see if the container exists, and is running, and start it if not...
Also, the script only needs to be run if the container has been updated, or it's configuration has been edited and saved (which causes a force update)
-
7 hours ago, sittingmongoose said:
Ok, well first thing. You know you lose a ton of color when you transcode 4K right? Like the image will look washed out.
The first thing you should try is to enable decoding. If that doesn’t help, look at quicksync which is built into your cpu.
It's not 4k that causes issues with color, it's HDR. Lots of 1080p HDR content and 4k non-HDR content exists. If I'm not mistaken, Emby has HDR profiles, though I'm not sure how well they work. I may, once I have finished moving, investigate hacking some color profile stuff into the decode wrapper to attempt correcting the washed out colors (it's just adding some additional parameters to ffmpeg, kinda like we do with nvdec)
-
On 5/2/2019 at 11:53 PM, pimogo said:
Hi thanks for this! Just a clarification. I'm using a previous version of your script that specifically calls out to NOT transcode mpeg4. In the new script, for a similar effect, would i remove all but mpeg4 or leave all but mpeg4.
CODECS=("mpeg4" ) or
CODECS=("h264" "hevc" "mpeg2video" "vc1" "vp8" "vp9")
Thanks!
Available codec options are:
h264 (default) H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
hevc (default) H.265 / HEVC (High Efficiency Video Coding)
mpeg2video MPEG-2 video
mpeg4 MPEG-4 part 2
vc1 SMPTE VC-1
vp8 (default) On2 VP8
vp9 (default) Google VP9"
[/Code]You need not change anything for mpeg4 to be excluded. Everything with default next to it is ALLOWED to be transcoded by the GPU and *should* have good support on most Nvidia cards. Everything without default can be specified and most of them *should* work, but can have problems. (Notably, mpeg4 and VC1)
Suffice it to say that leaving the "#" before the CODECS line should be sufficient for most users.
- 1
-
3 hours ago, Dazog said:
No. Depends on Slackbuilds doing a release of an nvidia driver.
Also this MAY be updated when unraid releases new versions only.
Slackbuilds *has* released the new driver.
No buildscripts available publicly though, so I can't just set up a buildbot with the copious number of CPU cores available to me to churn out builds with new nvidia driver releases sadly. -
6 hours ago, Jamshm said:
Thanks for the reply. I do appreciate it. I will try Emby tonight. From everything i read my set up should be able to handle more than one transcode. I actually found that with quick sync, i get less CPU usage. I really do like unraid, i just might not be savvy enough to figure this out.
That's pretty much to be expected.
When using QuickSync, Plex will both Decode and Encode using the Quicksync pipelines exposed by your CPU. When using nvidia's nvenc, by default, Plex will use your CPU for decoding, and nvenc for encoding.
You could create a wrapper that uses -hwaccel qsv to use QuickSync for decoding, and nvenc for encoding, which would result in similar CPU usage to using QuickSync.
At the end of the day, the nvenc/nvdec support is really only useful if you have a CPU that DOES NOT have QuickSync video. -
I have a large number of gzip archives that I would like to bind mount into a directory. The contents can be read-only, but the archives have to remain gz. In the past I've used archivemount and a script for this, but archivemount doesn't seem to be available for unraid, are there any solutions for this?
-
5 hours ago, cmdthor said:
any way to add install additional or change to a different Nvidia driver version, like 340.93 ?
the most current do not support the older or rather most Quadro cards.... would make sense to pass one of my Quadro 4000 cards to plex to use for Transcoding
Each driver and kernel version requires manual work on the part of the Linuxserver.io team, so while possible, it doesn't seem feasible.
If they do decide to support it, I would suggest they auto detect the last driver version for each card - which can be facilitated with code found in the MHWD tool for Manjaro, and Jockey for Ubuntu. -
8 hours ago, MowMdown said:
There is a bug in your new code specifically:
command="/usr/lib/plexmediaserver/plex-nvdec-patch.sh" if [ "$codec_arguments" ]; then #This line is recursive, it duplicates the codecs in the Plex Transcoder file (we don't need it) #command+="${codec_arguments}" docker exec -i "$con" /bin/sh -c "${command}${codec_arguments}" else docker exec -i "$con" /bin/sh -c "${command}" fi
What ends up happening is that in the "Plex Transcoder" file, you end up with
ALLOWED_CODECS=("h264" "hevc" "h264" "hevc")
Removing that line of code fixes the issue. You don't need to concatenate the "command+="${codec_arguments}" because it's already being taken care of at the next line where the docker exec code is taking place.
HAHAHA I can't believe I left that in there. Originally, I was using /bin/bash -c which resulted in a bashism making the concatenation cause the script in the container to error out with "invalid codec: vp9" even though it was totally valid. Switching for sh -c fixed it but I left my concat workaround in there.
Thanks for the fix
EDIT:
I have moved wget to the HOST side in the latest revision of the script. neither curl or wget is guaranteed to be present inside the docker, since this script was written for unraid, and unraid ships with wget stock - we're using that. I could add a pure bash download function - but that seems unnecessarily complicated.- 1
-
Updated the nvdec wrapper script on gist:
https://gist.github.com/Xaero252/9f81593e4a5e6825c045686d685e2428
Now pulls a much more robust wrapper script from https://github.com/revr3nd/plex-nvdec/
Also supports a more robust codec filter using that script.
Will only patch if the transcoder isn't currently running.
Can still be run on a schedule via user scripts.- 1
-
3 hours ago, MowMdown said:
*SNIP*
Had been meaning to implement this myself. I just updated my script on gist. The new script pulls the latest version of revr3nds script and applies it. It also supports a list of codecs in a variable near the top of the script if you need to change them for any reason.
-
@Djoss
Any chance of adding SSLH support for this docker? It enables SSH access on the SSL port so that you can SSH into the server using the SSL port on locked down networks. I realize a VPN works around this as well, but would be a neat addition. -
RIP.
I see you have PCIe ACS overrides enabled, a Windows 10 VM and then unraid is also reporting that there is no nvidia device available for the runtime. To my knowledge, if you are passing through your GPU to a VM and then also intending to use it with the docker, you are going to have a bad time.
When the GPU is handed over to the VM it's like it was physically unplugged from unraid, and then physically plugged into the VM. When the VM shuts down, the GPU gets plugged back into unraid, but the nvidia docker runtime doesn't know this until it's been restarted. Hence it working when you restart the docker.
Also, you usually shouldn't need to enable PCIe ACS overrides for passthrough unless some weird shenanigans are going on.
EDIT:
I'm not exactly an expert on unraid/qemu/docker - just a general Linux junkie, I could be very wrong, but from glancing over your diagnostic logs that's what I'd assume is happening. -
17 minutes ago, rsampayo said:
Now to find out why we cant transcode 4k HEVC...
Yeahhhhhhhhhhhhh, the blight of my existence, currently lol.
-
Just now, rsampayo said:
Whats the latest version of the script?
The one I use is
#!/bin/sh
/usr/lib/plexmediaserver/Plex\ Transcoder2 -hwaccel nvdec "$@"
I wrote a script that can be used to automatically re-apply the wrapper on a schedule so that when Plex is updated you don't have to manually re-apply the wrapper script.
That wrapper script is missing "exec"
See my gist post here:
https://gist.github.com/Xaero252/9f81593e4a5e6825c045686d685e2428
Lines 19-27 contain the wrapper script that executes the default "Plex Transcoder" which we move to "Plex Transcoder2"
You'll see there that I start each transcoder line with "exec"
To fix your wrapper (which would break with mpeg4 avi files):#!/bin/sh exec /usr/lib/plexmediaserver/Plex\ Transcoder2 -hwaccel nvdec "$@"
-
50 minutes ago, rsampayo said:
I have a similar problem with High CPU usage. Ive enabled NDEC via the script. I can play a movie on plex and can see the processes on nvidia-smi. I can also confirm decoding via "nvidia-smi dmon -s u2. Once its throttled I see very low CPU (3-4%). Everything is perfect as long as I dont FF or RW the movie on plex. For every time I scroll on the time-bar of the movie on the plex app. CPU usage goes up as if it was a new software transcode.. after 4 or 5 times my CPU is at 100%. Im using a Quadro P4000.
Also the Processes on nvidia-smi dont die after I stop the movie.
Using linuxserver plex docker
Are you sure you are using the latest version of the script?
The inclusion of `exec` should let the processes die normally (and works as intended, from extensive testing) - indicating you may not have the correct wrapper script in use.
Second, when watching nvidia-smi dmon -s u; It is important to note that there are separate columns for different usage metrics. For example, there is a column for the gpu core itself, the "streaming multiprocessor" (sm), memory, the nvenc and nvdec pipes. The nvenc column only refers to encoding, while the nvdec column only refers to decoding.
From there, keep in mind that with the latest version of the script and mpeg4 avi media, the card will only be used for encoding, as the decoder vomits on that particular type of media.
I am using a Quadro P2000, for reference which is very closely related to your P4000. I will note that currently I have abysmal 4k transcoding performance for some unknown reason.
For example, here's my server currently:
You can see my CPU usage is quite loaded - but the Plex Media Server and the transcoder are using barely any CPU.
This is because I'm currently converting ~1.8TB of *.7z archives to *.gz archives. You an also see there is a small amount of usage on the enc and dec side of the graphics card. It's a 1080p video being transcoded to 1080p; so the usage is low.
Once I close the browser tab with the video, the encode process drops off the GPU, but not until the tab is closed, or I stop that stream within the tab.
Edit2:
Yes, I know of tmux and screen - was just pulling up windows for demonstration, I don't normally monitor my server actively unless I'm trying to diagnose an issue lol -
8 hours ago, IrishBiker said:
By default, Plex only encodes with this unraid build and the GPU passed through. There's a way to enable decoding as well; but it is not officially supported by the Linuxserver.io, Plex, or unraid teams.
Here's a script I've modified that can be used via the user scripts plugin on a schedule to enable the decoding support:
https://gist.github.com/Xaero252/9f81593e4a5e6825c045686d685e2428
I will update that script as needed, until Plex adds official nvdec support.
Also note that nvenc and nvdec DO NOT offload audio transcoding. This generally is of no concern, unless you are dealing with lossless Atmos audio, which can be quite substantial to downmix and transcode.
- 2
-
2 hours ago, IrishBiker said:
I got the new card installed however I am getting the same error as with the GT710 the driver will not initialise. when I boot directly into UnRaid it works, something in ESXi is blocking even tho I have passed through the hardware.
Did you see my post a couple pages back:
Go to Settings > VM Options > Advanced > Edit Configuration > Add Parameter menu of the guest after powering it down and add the following parameter:hypervisor.cpuid.v0 = "FALSE"
Seems to be somehow required for VMWare ESXI nvidia passthrough for CUDA and other advanced features to work.- 1
-
9 hours ago, dmacias said:On 4/10/2019 at 4:26 PM, Xaero said:[mention=11874]dmacias[/mention]
tmux seems to be missing the terminfo for tmux, resulting in backspace being broken again.
Just fyi.I'm not sure but I think it's unraid that's missing the terminal info. I believe it was ncurses that is stripped down. I thought someone earlier in the thread fixed it but changing their terminal emulation. What unraid version and terminal are you using and what emulation?
Slackware package for tmux come with tmux and tmux-256color terminfo:
https://slackware.pkgs.org/14.2/slackware-testing-x86_64/tmux-2.2-x86_64-2.txz.html
EDIT:
To answer your questions though:
Unraid-nvidia 6.7.0-rc7
I've tried using export and `TERM=xterm tmux` but still results in the error as tmux still tries to use it's own terminfo (which obviously doesn't exist)
I've since copied over a working terminfo from my ArchLinux server for the interim, and the issue is resolved. Seeing as the official slackware packages for tmux have terminfo for it included, it makes sense to package it that way. -
@dmacias
tmux seems to be missing the terminfo for tmux, resulting in backspace being broken again.
Just fyi. -
4 hours ago, IrishBiker said:
Yes, well it was recognized in Device Manager. I'm getting hold of a HP NVIDIA QUADRO P620. Will try that when it arrives.
You may have to manually supply the BIOS for the consumer cards. The Quadro P620 should play well in a VM, however.
Edit:
I see you are running esxi, my bad;
try doing this:
right click your VM > Edit Settings > VM Options > Advanced > Edit Configuration > Add Parameter:
hypervisor.cpuid.v0 = "FALSE"
Someone on Reddit reported that to work getting the drivers installed on Windows, hopefully it does for Linux as well. Should only apply to *consumer* cards. The Quadro, again, should play well in a VM.
[Plugin] Linuxserver.io - Unraid Nvidia
in Plugin Support
Posted
Where are you looking to see the utilization?
the default nvidia-smi screen shows fan speed, GPU core and GPU error correcting percentages, which aren't applicable to the nvenc/nvdec pipelines.
You'll want to use nvidia-smi dmon to get the columns of percentages, and pay attention in particular to the last two columns. If you watch them for the duration of a short video, you should see how it works. It fills a buffer rapidly with video, and then idles. With multiple streams it will simply use the idle durations from the other streams to buffer a new stream. You'd have to have about a dozen or more streams for them to need to double up the duty cycle, and that's where you MIGHT start seeing decreased performance. Of course, this also means you would need to be able to DECODE fast enough for 12+ streams simultaneously encoding. Which is probably more of a problem.