Hardware Transcoding

Server Version#: Version 1.20.5.3600
Player Version#:

Hello

I am running an Ubuntu 18.04 Plex server on a i7-6700. This config has an onboard intel HD Graphics 530 gpu.

I have hardware transcoding turned on, however i get CUDA errors in the logs and no (hw) text in the details of a playing video being transcoded.

Im at a complete loss…any help would be great.

EDIT: Additionally running ls -la /dev/dri gived ls: cannot access ‘/dev/dri’: No such file or directory so i do think something is wrong.

EDIT 2: Sorry i should have been clearer…my goal is to have HW transcoding working and using the onboard Intel 530 GPU. I don’t believe this is working.

The CUDA errors can be ignored.
You’re seeing the transcoder probing for hardware capabilities.
It is very generous in what it reports – sometimes too generous.

Ok, but i assume the error with “cannot access ‘/dev/dri’: No such file or directory” is a problem?

Yes. that is a problem.

May I see your logs?

Sure, which logs you need?

Plex Media Server*.log (the set of 6) at minimum in a ZIP.

It’s usually easier to just download the set from PMS and attach it. I don’t mind.

(File removed)

Attached

Is this in a VM?

An i7 -6700 @ 3.4 Ghz should not be starved for CPU.

Nov 21, 2020 16:49:14.992 [0x7f07c77fe700] WARN - Held transaction for too long (../Library/MetadataItem.cpp:3680): 0.150000 seconds
Nov 21, 2020 16:49:19.760 [0x7f07e6ffd700] WARN - [Transcode] Got a transcode session ping without a session GUID (or with an invalid one).
Nov 21, 2020 16:49:19.774 [0x7f0849ffb700] WARN - Held transaction for too long (../Library/MetadataItem.cpp:3680): 0.190000 seconds
Nov 21, 2020 16:49:20.362 [0x7f08497fa700] WARN - Held transaction for too long (../Library/MetadataItem.cpp:1128): 0.130000 seconds
Nov 21, 2020 16:49:20.364 [0x7f08497fa700] WARN - Held transaction for too long (../Library/MetadataItem.cpp:9217): 0.140000 seconds
Nov 21, 2020 16:49:28.973 [0x7f082ffff700] WARN - Held transaction for too long (../Library/MetadataItem.cpp:3680): 0.180000 seconds
Nov 21, 2020 16:49:33.982 [0x7f08497fa700] WARN - Waited one whole second for a busy database.
Nov 21, 2020 16:49:34.194 [0x7f07c77fe700] WARN - Held transaction for too long (../Library/MetadataItem.cpp:3680

Also, when is the last time the database was optimized?
Did “Optimize database” in Scheduled Tasks get disabled ?

The output of the following commands may provide some insight as to why /dev/dri isn’t being populated:

sudo lshw -C display
vainfo
apt list --installed | grep mesa
apt list --installed | grep xorg

Hi There,

No, this is a dedicated server, so has plenty of grunt. The CPU and memory etc are hardly being touched, so i dont know why it has a busy database. Ive attached the output of those commands. Happy to give you access to ssh if you want to look yourself, just let me know.

Thanks. Since vainfo isn’t installed there isn’t any info about the VAAPI drivers reported. You can install it using:
sudo apt install vainfo

If it’s not already installed, it will pull in libva2 and some other dependencies. After it’s installed, try running it again:
vainfo

Also, what are the results of the following:
apt list --installed | grep i965
apt list --installed | grep intel
lsmod | grep drm

Ok, i just did a fresh install from scratch, and the video is still unclaimed. Installed viainfo, and screen below

If I may?

This will confirm if the i915 is found by the kernel.
If it is:

  1. /dev/dri will be created by the kernel
  2. PMS will also respond to both /dev/dri/renderD128 at that point.
[chuck@lizum debian.544]$ ls -la /sys/module/i915/drivers/pci:i915/
total 0
drwxr-xr-x  2 root root    0 Nov 21 01:49 ./
drwxr-xr-x 39 root root    0 Nov 21 01:49 ../
lrwxrwxrwx  1 root root    0 Nov 21 22:06 0000:00:02.0 -> ../../../../devices/pci0000:00/0000:00:02.0/
--w-------  1 root root 4096 Nov 21 22:06 bind
lrwxrwxrwx  1 root root    0 Nov 21 22:06 module -> ../../../../module/i915/
--w-------  1 root root 4096 Nov 21 22:06 new_id
--w-------  1 root root 4096 Nov 21 22:06 remove_id
--w-------  1 root root 4096 Nov 21 01:49 uevent
--w-------  1 root root 4096 Nov 21 22:06 unbind
[chuck@lizum debian.545]$ 

Observe the i915 has a PCI address.

I was actually going to suggest something similar. Since /dev/dri/ is populated by the drm module, try the following:
modprobe drm
And:
modprobe i915

By the way, is the a GUI-less server?

Note:

As of 1.21.0, I have updated the hardware detection in Debian packaging to use the technique I show above.

It’s a more reliable detection for Intel QSV than looking for /dev/dri/renderD128.

renderD128 simply tells us if there is a drm provider in the system. It doesn’t tell us what it is.

Ok, none of those commands return anything, see attached.
Yep, its console only.

EDIT: I guess untill i can get the gpu “claimed” then none of these will do anything. Is it s driver issue?

I should have been more specific; the two modprobe commands shouldn’t return anything. They are loading the kernel modules which provide direct rendering and provide the driver interface. Check /dev/dri/ now to see if exists and is populated. Also, run vainfo now to see if it reports anything.

For what it’s worth, everything will probably “just work” if you install the desktop version of Ubuntu. The desktop features pull in all the required drivers by default and load everything at boot. However, as far as I know, these are the packages you must have for this to work:

  • libva2
  • i965-va-driver -or- intel-media-va-driver
  • vainfo (optional)

And, of course, the kernel modules.

Is this a “Server” distro which is loaded?

If so, none of these drivers will be installed by default.
For Plex use, Workstation is always best. You can turn of the GUI after install.

Yes this is the server distro.

Still getting -bash: cd: /dev/dri: No such file or directory

Ive checked and all those packages are installed. vainfo gives:
error: can’t connect to X server!
error: failed to initialize display

Which kernel modules are needed.

That’s a huge list to write. It’s really outside the scope of the support I can provide given the OS distro does it automatically.