[Solved] Trouble with Hades Canyon NUC and Hardware Decoding

server-linux

#1

I recently received one of the new Hades Canyon NUCs (NUC8i7HVK) with hopes of it becoming my next powerhouse Plex server.

My hope was to use linux, and take advantage of hardware transcoding, but unfortunately I have run into some trouble. I installed Ubuntu 16.04 LTS server and plex,, but the plex server setup UI does not show the Hardware Transcode option, and transcoding is happening on the CPU. Looking in the logs I see:

TPU: hardware transcoding: zero-copy support not present

however, if I run vainfo on the nuc, this is what I get:

error: can't connect to X server!

libva info: VA-API version 0.39.0

libva info: va_getDriverName() returns 0

libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so

libva info: Found init function __vaDriverInit_0_39

libva info: va_openDriver() returns 0

vainfo: VA-API version: 0.39 (libva 1.7.0)

vainfo: Driver version: Intel i965 driver for Intel(R) Kabylake - 1.7.0

vainfo: Supported profile and entrypoints

VAProfileMPEG2Simple : VAEntrypointVLD

VAProfileMPEG2Simple : VAEntrypointEncSlice

VAProfileMPEG2Main : VAEntrypointVLD

VAProfileMPEG2Main : VAEntrypointEncSlice

VAProfileH264ConstrainedBaseline: VAEntrypointVLD

VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice

VAProfileH264Main : VAEntrypointVLD

VAProfileH264Main : VAEntrypointEncSlice

VAProfileH264High : VAEntrypointVLD

VAProfileH264High : VAEntrypointEncSlice

VAProfileH264MultiviewHigh : VAEntrypointVLD

VAProfileH264MultiviewHigh : VAEntrypointEncSlice

VAProfileH264StereoHigh : VAEntrypointVLD

VAProfileH264StereoHigh : VAEntrypointEncSlice

VAProfileVC1Simple : VAEntrypointVLD

VAProfileVC1Main : VAEntrypointVLD

VAProfileVC1Advanced : VAEntrypointVLD

VAProfileNone : VAEntrypointVideoProc

VAProfileJPEGBaseline : VAEntrypointVLD

VAProfileJPEGBaseline : VAEntrypointEncPicture

VAProfileVP8Version0_3 : VAEntrypointVLD

VAProfileVP8Version0_3 : VAEntrypointEncSlice

VAProfileHEVCMain : VAEntrypointVLD

VAProfileHEVCMain : VAEntrypointEncSlice

VAProfileHEVCMain10 : VAEntrypointVLD

VAProfileVP9Profile0 : VAEntrypointVLD

VAProfileVP9Profile2 : VAEntrypointVLD

Any other suggestions before I switch over to Windows?

Thanks!


#2

If you look at /dev/dri and don’t find /dev/dri/renderD128, you have your answer.
It means the motherboard is not making the iGPU available at the known device node (which is the standardized name above).

Some machines disable it and provide secondary hardware acceleration. Is that happening here?

One other thing to look… Make certain the udev package is installed . If you didn’t do a standard desktop installation, it might have been missed. Without that, user plex won’t have permission to read /dev/dri/renderD128 even if it does exist


#3

Thank you for the help.

/dev/dri contains /dev/dri/card0, /dev/dri/controlD64, and /dev/dri/renderD128.

I did a server install, but sudo apt-get install udev reports: udev is already the newest version (229-4ubuntu21.2).

Strange.


#4

Let me see the logs please after you attempt to use it again. Something isn’t right.
I also need to see the XML of what you’re trying to play


#5

Fresh logs attached. I haven’t tried many different types of media yet (this was one minute of play of a UHD rip).


#6

what are the permissions on that?

they better be root:video and plex better be a member of group video. That’s what udev relies on.
If not, force perms to 666 for /dev/dri/*. If that works, you have a udev problem (uninstall and reinstall the package is your only hope)
If that doesn’t work, you’re screwed. Hades Canyon is brand spanking new and is known for several issues (Anandtech)


#7

Afterthought.

That box has it’s own display/secondary GPU on board?

IF SO

I am willing to bet you will find renderD128 and renderd129 in /dev/dri (one for each).

Turn off the motherboard GPU and you’re golden (which I think is the root problem)


#8

I’ll check permissions next, thanks. The Hades Canyon CPU has a AMD GPU block as part of the SOC – not quite discrete graphics, but different than previous intel chips.

FWIW, totally recognize this is a brand new platform and may not work. I just want to make sure my limited knowledge around linux and hardware transcoding isn’t the problem, rather than an actual limitation of the hardware. Plus I enjoy the process of learning/experimenting here. :slight_smile: In all other ways, this is a pretty amazing little chuck of computing power.

Thanks again for the help. I’ll update if I make any progress.


#9

Mine is on pre-order.

All Kaby Lake-Gs support dual-channel DDR4-2400 (no ECC) memory. You'll notice that they also sport HD Graphics 630 and AMD's discrete GPU, too. Intel doesn't use its integrated engine for either NUC's display outputs. Instead, that hardware remains available for OpenCL-based compute workloads and QuickSync-accelerated software.

do a ls -l /dev/dri so we can see if the developers need to account for the AMD Radeon VEGA being the primary and not the Intel HD Graphics 630

If nothing shows there, either Ubuntu 16.04.4 LTS is not exposing QSV or Plex does not know how to use it in this design.


#10

Did you click on Show Advanced under Settings | Transcoder?


#11

@Achilles - yes, unfortunately after pressing “Show Advanced”, the “Use hardware…” option is not present.

I added user plex to the group video and confirmed that the nodes in /dev/dri are root:video with 660 permissions (renderD128 is the only render-based node in that directory - see below), but even after a reboot no change – hardware decode option still not present, logs still report zero-copy support not present.

I checked the bios, there is no option to disable the AMD GPU block. The only option related to graphics at all is an option to disable the Intel iGD, and while I haven’t tried that - disabling that seems counter to what we are trying to achieve…

I’ll probably experiment with Windows next to see how it interacts with the device.

plex@redeye:/dev/dri$ ls -l
total 0
crw-rw----+ 1 root video 226, 0 May 13 11:17 card0
crw-rw---- 1 root video 226, 64 May 13 11:17 controlD64
crw-rw----+ 1 root video 226, 128 May 13 11:17 renderD128
plex@redeye:/dev/dri$


#12

Thanks for that info.

The AMD does not communicate using Intel Quick Sync video (QSV) protocol.

There’s no support for it at this time through the iGPU.

If you disable what’s onboard the CPU, loop it around and get all the libva drivers installed yourself (an arduous task in some cases), you’ll have it BUT in most cases that’ll mean you need to have the graphics running. The whole purpose of using QSV in the initial version of HW transcoding is to allow the server to be headless. (easiest problem to tackle)


#13

@millercentral Did you claim the server with your plex.tv account yet? HW transcoding is a Plex Pass feature and requires you to sign it in.


#14

Aha, I had not claimed the server yet – since I’m just testing, I didn’t want to expose other users to it. That could be it! I did not realize that could have an impact on hardware transcoding.

However, I’m currently testing on Windows now. After I gather my results on Windows, I’ll switch back to linux again and try that out. Great catch @Achilles!


#15

Windows requires an active login with a display connected. Linux is better for a headless setup.


#16

So hardware transcoding works on Windows. Interestingly, it uses the AMD GPU core for the process (there was an option in the AMD settings to use the GPU for Graphics or OpenCL workloads, so I chose OpenCL - don’t know if that played a role here). I think the pegged CPU thread is the audio portion of the transcode (in this case it was transcoding 4K UHD HEVC to 4K h264 “Maximum” playback in a Firefox browser - playback was smooth):

I’m going to experiment/stress test a bit more on Windows tomorrow, then switch back to linux and see if I can get it working there as well. I will say this is a very impressive little device…


#17

Last update on the Windows install before switching back to Linux. Running PMS on this NUC on Windows with hardware transcoding enabled allowed me to transcode three unique streams of 4K UHD rips simultaneously to remote clients without breaking a sweat. Really impressive, and a massive improvement over my current server.
Now back to linux to see if I can replicate the results there. :slight_smile:


#18

Hi @millercentral - This brand new CPU and Ubuntu 16.04 LTS may just be having trouble getting to know each other. The kernel support for i915 Coffee Lake CPUs and the i915 support in this new Hades Canyon CPU are not enabled by default and are considered alpha support. After some lengthy troubleshooting, ChuckPA helped me discover the problem and I found a fix here with a kernel boot parameter. My QSV hardware transcode works great now, except of course for PGS subtitles, as I have learned, which is a known issue. I’d be curious if this fix works for you, too.


#19

Success! @Achilles was spot on that without claiming the server, Hardware Transcoding was not available. When I re-setup linux on the device and this time claimed the server as part of Plex setup, the option appeared in Settings > Server > Transcoding, and works as expected. While I can’t see the status of the GPU block from linux, here is what glances reports while streaming and transcoding two 4K UHD rips simultaneously:

@havoc7701 Thank you very much for the tip, but it turns out that boot parameter was not needed in my case. I’m running a standard ubuntu 16.04.04 server install with kernel 4.4.0-116-generic.

I’ll likely stay in test mode for another few days and try some additional media types, then move it over to become my production server. I can’t wait until others get their hands on this nuc as well and share their own findings.

THANK YOU all for the advice and help getting me going, I very much appreciate it.


#20

@millercentral
sudo apt install intel-gpu-tools
sudo intel_gpu_top to see the GPU usage stats.