Server Version#: 1.30.2.6563
Player Version#: Android 9.14.0.37895 / Samsung 5.53.5 Platform v4 / Web player (Firefox) on machine hosting PMS
My PMS runs on a Linux machine with an Intel i7-6700HQ CPU and an NVIDIA GTX 1060 GPU. I had been using HW Acceleration for a few months with (apparently) no issues. I started noticing issues about 1.5 months ago, where some videos would just not play on some of my devices, displaying an error message on the player. Eventually I realized this was only happening with videos that had to be transcoded. Further investigation showed what appeared to be PMS attempting to use the NVIDIA GPU, but with VA-API (see plex-logs-without-forced-device.log attached), failing to do so and then not falling back on other transcoding methods.
After reading through other forum posts, I set HardwareDevicePath="/dev/dri/renderD129" in my Preferences.xml. This still had PMS attempting to use VA-API, but now it fell back to software transcoding after failing to use VA-API (see plex-logs-with-forced-device.log attached).
Finally, I removed the HardwareDevicePath setting, disabled the nvidia kernel module and restarted PMS. This time, PMS used the Intel iGPU for HW transcoding with no issues.
Unfortunately, when I originally enabled HW acceleration and it was working, I set it and forgot about it, so I canāt really say if it was using the iGPU, the NVIDIA GPU or always falling back to SW transcoding. Iām also not sure which version of PMS I was using when I first noticed the issue, nor what the last working version was.
One last piece of information: Iāve seen a few posts recommending disabling the iGPU from the BIOS, but my BIOS doesnāt appear to have that option, so thatās a no-go. I hope this is enough information, but if itās not, Iāll be glad to provide whatever else you may need.
Iāve attached the requested logs. Iāve tagged them accordingly, whether they had HardwareDevicePath set or not. Like my previous test cases, the first set of logs is for the preference unset and PMS basically refuses to play the media file or fall back on SW transcoding. The second set is with the device preference set, and PMS falls back to SW transcoding.
Iāve added a third set of logs where, after restarting the server a few times, it appeared to actually use the NVIDIA GPU to transcode, as evidenced by the output of nvidia-smi, so Iām very confused now:
Fri Jan 27 08:01:01 2023
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.85.05 Driver Version: 525.85.05 CUDA Version: 12.0 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA GeForce ... Off | 00000000:01:00.0 Off | N/A |
| N/A 63C P2 42W / 78W | 184MiB / 6144MiB | 6% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 7719 G /usr/lib/xorg/Xorg 4MiB |
| 0 N/A N/A 61228 C ...diaserver/Plex Transcoder 175MiB |
+-----------------------------------------------------------------------------+
I donāt believe any of my content is HDR. I for sure have HEVC content, but no HDR. Iāll double-check later today, regardless.
When the transcoder starts, it only knows ā/dev/dri/renderD129ā
It doesnāt know if Intel or Nvidia
It tries Intel first (why you see the messages)
It then goes to the Nvidia.
This is how it works. Donāt let yourself get caught thinking there are problems when there arenāt. Youāre just seeing the nitty-gritty in the logs.
I want to clarify, since I donāt think Iām explaining myself properly.
99% of my stuff is 1080p H.264 (AVC). What little HEVC content I have is not HDR (preference left over from before I paid Plex Pass)
You said
a. With no changes to my Preferences.xml, this is not the case for me. PMS chooses D129, attempts VAAPI, then just errors out and the player shows an error about being unable to play the media.
b. If I force D129 in Preferences, it tries VAAPI, then NVENC/NVDEC. I tested multiple times with the same file. Sometimes it works, sometimes it falls back to SW transcoding.
If I disable my NVIDIA GPU altogether (rmmod nvidia...), D129 disappears as expected, PMS chooses D128, and successfully uses the Intel GPU for transcoding.
However you look at it, situation 2a is not properly doing fallback to other encoding methods. Playback stops entirely. Situation 2b works intermittently, at best. There is a problem somewhere. As I mentioned in (1) most of my content is AVC, and thatās the way itās been for the past year or so. HW acceleration had been working fine, as far as I could tell, until about a month and a half ago. I canāt be 100% certain if HW acceleration was being used, but it was enabled and I never had any issues playing any media on any device, so either HW acceleration was working or at least the fallback logic was. Now, something isnāt working right.
What youāll get back is a lot of XML. What weāre interested in is this line:
<Setting id="HardwareDevicePath" label="Hardware transcoding device" summary="The GPU or other hardware device that will be used for transcoding" type="text" default="" value="" hidden="1" advanced="0" group="transcoder" enumValues=":Auto|nvidia@/dev/dri/renderD128:GP106GL [Quadro P2200]"/>
<Setting id="HardwareDevicePath" label="Hardware transcoding device" summary="The GPU or other hardware device that will be used for transcoding" type="text" default="" value="" hidden="1" advanced="0" group="transcoder" enumValues=":Auto|nvidia@/dev/dri/renderD129:GP106M [GeForce GTX 1060 Mobile]|intel@/dev/dri/renderD128:HD Graphics 530"/>
PMS is not running on a VM. Itās an old gaming laptop, and PMS is running directly on the OS as a systemd service (no Docker or any other container runtime)
Is there any way to remove VAAPI and use only NVIDIA ?
I noticed there is always some delay when starting transcodes on NVIDIA, which does not happen with Intel GPU. And during the delay I see in the logs Codecs: hardware transcoding: testing API vaapi multiple times. Seems itās trying VAAPI a few times on every transcode before settling on NVIDIA.
Weāve had the discussion a few times about providing this capability.
We decided against it because of how people like to ātinkerā with their settings and sooner or later (likely sooner) someone will start complaining their transcoding is BROKEN ⦠all because they donāt know what theyāre doing and selected the wrong one.
Iām willing to bring it up again but, before I do, I think we need a clear āhow it worksā definition of the logic flow.
There must be a fully automatic setting ā where it probes and finds out whatās there.
If the desired device fails qualification ( āCan it transcode this video?ā) what should the fallback behavior be?
@ChuckPa I think how it works in JellyFin is really awesome.
They give you the option to select the default type of device, NVIDIA, INTEL, and some others. But when the selected option fails, it starts probing for all devices, and updates the default to whatever worked. So next time, it uses that device. So you have the option to select, but donāt ever really have to change it manually, unless you have multiple GPU.
JF starts transcoding fast on both, while NVIDIA is noticably faster on JF than Plex. Intel is exactly the same speed on Plex & JF.
When I set it to D128, it immediately probes that device for VAAPI compatibility and begins HW transcoding seamlessly. When set to D129, it checks that device for VAAPI, then NVDEC/NVENC, and then it can either begin HW transcoding then and there or fall back to SW transcoding. (The logs here, from one of my previous posts, show the behavior when Device is set to D129, on different attempts at transcoding the same file).
EDIT:
I just reread this part
It seems my PMS defaults to D129 when HardwareDevicePath is unset
If it is PEBKAC, Iāll gladly accept the blame, wear the cone of shame and all that, but Iād like to know what Iām actually doing wrong first .
I mean, it was just lying around, and Iāve never been a snob for streaming quality (at one point I even considered hosting PMS on a Raspberry Pi with external storage). I really only needed to be able to watch my stuff on the TV and on the go. Even HW Acceleration was just a bonus (I got the Plex Pass because I like to support products that I actively use, not for any particular feature). I just figured, Iāve got that GPU doing nothing, might as well make it work, ya know? If we end up chalking this entire thing up to ĀÆ\_(ć)_/ĀÆ, so be it. I had to try, at least
While i work (part time; retired) for Plex, the engineer in me always wins.
110TB , full quality (image) UHD BluRay rips, enough said? LOL
I think we can figure out whatās happening there but I never trust a laptop.
The bios/firmware can be wonky ā usually is highly customized
The maker pulled crazy tricks on the PCI bus to get it all to fit in the box.
I have 3 NUCs, QNAP i7-7700, my Xeon with P2200 and they all work exactly the same even though the QNAP has a different OS. Our Lab has Synology boxes and they are the same too. ā ALL QSV-capable machines come up with the GPU/QSV ASIC at renderD128
That occurs because of the kernelās probe and init routines.
(I also used to do kernel work. You canāt probe the PCI bus until you know where it is⦠so you probe the entire CPU first)