Hardware transcoding not working i9-9900 CPU

Server Version#: Version 1.15.4.993

Hello guys,

I have a a server from hetzner with an i9-9900K processor. My OS is CentOS 7.

I am running Plex Media Server directly on it.
The Plex server is run by the user root. (just for now, once everything is sorted out I will use another user).
I also added the root user to the video group. (Because of the note on the bottom of this post: Customizing your Plex configuration)

Then I followed this tutorial to enable the iGPU on my server:
Enabling the iGPU on Intel Processors

root@server ~]# ls -la /dev/dri
total 0
drwxr-xr-x 2 root root 80 Apr 25 20:23 .
drwxr-xr-x 20 root root 3320 Apr 25 20:23 ..
crw-rw---- 1 root video 226, 0 Apr 25 20:23 card0
crw-rw---- 1 root video 226, 128 Apr 25 20:23 renderD128
[root@server ~]#

and

[root@server ~]# sudo lspci -v -s $(lspci | grep VGA | cut -d" " -f 1)
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 630 (Desktop 9 Series) (prog-if 00 [VGA controller])
        Subsystem: Gigabyte Technology Co., Ltd Device d000
        Flags: bus master, fast devsel, latency 0, IRQ 489
        Memory at 50000000 (64-bit, non-prefetchable) [size=16M]
        Memory at 40000000 (64-bit, prefetchable) [size=256M]
        I/O ports at 3000 [size=64]
        Expansion ROM at <unassigned> [disabled]
        Capabilities: [40] Vendor Specific Information: Len=0c <?>
        Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00
        Capabilities: [ac] MSI: Enable+ Count=1/1 Maskable- 64bit-
        Capabilities: [d0] Power Management version 2
        Capabilities: [100] Process Address Space ID (PASID)
        Capabilities: [200] Address Translation Service (ATS)
        Capabilities: [300] Page Request Interface (PRI)
        Kernel driver in use: i915
        Kernel modules: i915

As far as I see everything should work now. I restarted the server already and tried to transcode some video to lower quality.
But according to what I see in the PlexDashboard and in Tautulli the hardware transcoding is not used. (It is enabled in the settings. I have the Plex Pass)

What did I miss ? What could be the issue ?

EDIT:
This is what I found in the Plex Media Server.log file:

Apr 26, 2019 02:42:12.941 [0x7efecb7fe700] DEBUG - Scaled up video bitrate to 13104Kbps based on 1.500000x fudge factor.
Apr 26, 2019 02:42:12.941 [0x7efecb7fe700] DEBUG - Scaled maximum bitrate for resolution reduction to 1842Kbps.
Apr 26, 2019 02:42:12.941 [0x7efecb7fe700] DEBUG - MDE: Selected protocol dash; container: mp4
Apr 26, 2019 02:42:12.941 [0x7efecb7fe700] DEBUG - MDE: analyzing media item 103
Apr 26, 2019 02:42:12.941 [0x7efecb7fe700] DEBUG - MDE: Sample Movie (2017): Direct Play is disabled
Apr 26, 2019 02:42:12.941 [0x7efecb7fe700] DEBUG - MDE: Sample Movie (2017): media must be transcoded in order to use the dash protocol
Apr 26, 2019 02:42:12.941 [0x7efecb7fe700] DEBUG - MDE: Sample Movie (2017): selected subtitle cannot be converted to a compatible format, burning into video stream
Apr 26, 2019 02:42:12.941 [0x7efecb7fe700] DEBUG - MDE: Sample Movie (2017): avoiding video remux due to burned subtitle stream
Apr 26, 2019 02:42:12.941 [0x7efecb7fe700] DEBUG - MDE: Sample Movie (2017): no remuxable profile found, so video stream will be transcoded
Apr 26, 2019 02:42:12.941 [0x7efecb7fe700] DEBUG - Codecs: testing h264_nvenc (encoder)
Apr 26, 2019 02:42:12.941 [0x7efecb7fe700] ERROR - [FFMPEG] - Cannot load libcuda.so.1
Apr 26, 2019 02:42:12.941 [0x7efecb7fe700] WARN - avcodec_open2 returned -1313558101 for encoder 'h264_nvenc'
Apr 26, 2019 02:42:12.941 [0x7efecb7fe700] DEBUG - MDE: Cannot direct stream video stream due to profile or setting limitations
Apr 26, 2019 02:42:12.941 [0x7efecb7fe700] DEBUG - Codecs: hardware transcoding: testing API vaapi
Apr 26, 2019 02:42:12.941 [0x7efecb7fe700] ERROR - [FFMPEG] - libva: /usr/lib/plexmediaserver/lib/dri/i965_drv_video.so init failed
Apr 26, 2019 02:42:12.941 [0x7efecb7fe700] ERROR - [FFMPEG] - Failed to initialise VAAPI connection: -1 (unknown libva error).
Apr 26, 2019 02:42:12.941 [0x7efecb7fe700] DEBUG - Codecs: hardware transcoding: opening hw device failed - probably not supported by this system, error: Input/output error
Apr 26, 2019 02:42:12.941 [0x7efecb7fe700] DEBUG - Scaled up video bitrate to 13104Kbps based on 1.500000x fudge factor.
Apr 26, 2019 02:42:12.941 [0x7efecb7fe700] DEBUG - Scaled maximum bitrate for resolution reduction to 1842Kbps.
Apr 26, 2019 02:42:12.941 [0x7efecb7fe700] DEBUG - Sample Movie - audio.channels limitation applies: 6 > 2
Apr 26, 2019 02:42:12.941 [0x7efecb7fe700] DEBUG - MDE: Cannot direct stream audio stream due to profile or setting limitations
Apr 26, 2019 02:42:12.941 [0x7efecb7fe700] DEBUG - MDE: Sample Movie (2017): selected media 0 / 103
Apr 26, 2019 02:42:12.941 [0x7efecb7fe700] DEBUG - Streaming Resource: Adding session 0x7efec414c500:nrixuurqqpcuyujbut0z6n6y which is using 1987kbps of WAN bandwidth.  Used is now 1987kbps
Apr 26, 2019 02:42:12.941 [0x7efecb7fe700] DEBUG - Streaming Resource: Adding session 0x7efec414c500:nrixuurqqpcuyujbut0z6n6y which is using transcoder slot.  Used slots is now 1
Apr 26, 2019 02:42:12.941 [0x7efecb7fe700] DEBUG - Streaming Resource: Added session 0x7efec414c500:nrixuurqqpcuyujbut0z6n6y
Apr 26, 2019 02:42:12.941 [0x7efecb7fe700] DEBUG - Streaming Resource: Reached Decision id=102 codes=(General=1001,Direct play not available; Conversion OK. Direct Play=3000,App cannot direct play this item. Direct play is disabled. Transcode=1001,Direct play not available; Conversion OK.) media=(id=103 part=(id=103 decision=transcode container=mp4 protocol=dash streams=(Video=(id=3782 decision=transcode bitrate=1720 encoder=libx264 width=720 height=378) Audio=(id=3783 decision=transcode bitrate=172 encoder=aac channels=2 rate=48000) Subtitle=(id=3785 decision=burn languageCode=ger location=embedded))))
Apr 26, 2019 02:42:12.942 [0x7effb930b700] DEBUG - Completed: [::ffff:91.188.81.242:61565] 200 GET /video/:/transcode/universal/decision?hasMDE=1&path=%2Flibrary%2Fmetadata%2F102&mediaIndex=0&partIndex=0&protocol=dash&fastSeek=1&directPlay=0&directStream=1&subtitleSize=100&audioBoost=100&location=wan&maxVideoBitrate=2000&addDebugOverlay=0&autoAdjustQuality=0&directStreamAudio=1&mediaBufferSize=102400&session=7od67slhcvv3u2w0pbzem517&subtitles=burn&Accept-Language=de (24 live) TLS GZIP 34ms 7250 bytes (pipelined: 9)
Apr 26, 2019 02:42:13.051 [0x7effb8b0a700] DEBUG - Auth: authenticated user 1 as salexes
Apr 26, 2019 02:42:13.052 [0x7eff2cff9700] DEBUG - Request: [::ffff:91.188.81.242:61565 (WAN)] GET /video/:/transcode/universal/start.mpd?hasMDE=1&path=%2Flibrary%2Fmetadata%2F102&mediaIndex=0&partIndex=0&protocol=dash&fastSeek=1&directPlay=0&directStream=1&subtitleSize=100&audioBoost=100&location=wan&maxVideoBitrate=2000&addDebugOverlay=0&autoAdjustQuality=0&directStreamAudio=1&mediaBufferSize=102400&session=7od67slhcvv3u2w0pbzem517&subtitles=burn&Accept-Language=de (23 live) TLS GZIP Signed-in Token (salexes)
Apr 26, 2019 02:42:13.052 [0x7eff2cff9700] DEBUG - Found session GUID of 7od67slhcvv3u2w0pbzem517 in session start.
Apr 26, 2019 02:42:13.052 [0x7eff2cff9700] DEBUG - TranscodeUniversalRequest: using augmented profile Web
Apr 26, 2019 02:42:13.052 [0x7eff2cff9700] DEBUG - Downloading document http://127.0.0.1:32400/library/metadata/102?checkFiles=1&includeBandwidths=1&offset=-1&X-Plex-Incomplete-Segments=1&X-Plex-Session-Identifier=nrixuurqqpcuyujbut0z6n6y
Apr 26, 2019 02:42:13.052 [0x7eff2cff9700] DEBUG - Auth: authenticated user 1 as salexes
Apr 26, 2019 02:42:13.056 [0x7eff2cff9700] DEBUG - It took 10.000000 ms to retrieve 190 items.
Apr 26, 2019 02:42:13.057 [0x7eff2cff9700] DEBUG - We're going to try to auto-select an audio stream for account 1.
Apr 26, 2019 02:42:13.057 [0x7eff2cff9700] DEBUG - Selecting best audio stream for part ID 103 (autoselect: 1 language: de)
Apr 26, 2019 02:42:13.057 [0x7eff2cff9700] DEBUG - We're going to try to auto-select a subtitle.
Apr 26, 2019 02:42:13.057 [0x7eff2cff9700] DEBUG - Subtitles: Found a candidate subtitle language [ger] for a foreign film
Apr 26, 2019 02:42:13.057 [0x7eff2cff9700] DEBUG - Audio Stream: 3783, Subtitle Stream: 3785
Apr 26, 2019 02:42:13.058 [0x7eff2cff9700] DEBUG - Found session GUID of 7od67slhcvv3u2w0pbzem517 in session start.
Apr 26, 2019 02:42:13.059 [0x7eff2cff9700] DEBUG - Cleaning directory for session 7od67slhcvv3u2w0pbzem517 ()
Apr 26, 2019 02:42:13.059 [0x7eff2cff9700] DEBUG - Starting a transcode session 7od67slhcvv3u2w0pbzem517 at offset -1.0 (state=3)
Apr 26, 2019 02:42:13.066 [0x7effb8b0a700] DEBUG - Completed: [::ffff:91.188.81.242:61391] 200 GET /statistics/bandwidth?timespan=6 (23 live) TLS GZIP 133ms 150410 bytes (pipelined: 149)
Apr 26, 2019 02:42:13.072 [0x7eff2cff9700] DEBUG - TPU: hardware transcoding: enabled, but no hardware decode accelerator found
Apr 26, 2019 02:42:13.072 [0x7eff2cff9700] DEBUG - [Universal] Using local file path instead of URL: /home/GDrive/Filme/Sample Movie (2017).mkv
Apr 26, 2019 02:42:13.072 [0x7eff2cff9700] DEBUG - TPU: hardware transcoding: zero-copy support not present
Apr 26, 2019 02:42:13.072 [0x7eff2cff9700] DEBUG - TPU: hardware transcoding: final decoder: , final encoder: 

EDIT 2: Not sure if this helps my kernel is:

[root@server ~]# uname -s -r
Linux 3.10.0-957.10.1.el7.x86_64

The kernel won’t see it correctly.
The current transcoder doesn’t see it because of the i965 driver is no longer applicable.
Engineering is working on releasing the new iHD driver.

Thank you for your response. So it wouldn’t help if I update my kernel?
Should I update my kernel ?
Do I need to install a different driver to my dedicated server as well then ?
Is there a timeframe when the iHD driver will be ready?

You will need a 4.15+ kernel or above; best being a 5.0 kernel.

I believe Centos 7 still uses a 3.x kernel? If so, its age is now hurting it – badly.

I have no visibility into Engineering regarding their activities. I won’t know when it’s ready for testing until they tell us.

2 Likes

Thanks for the information. I just updated the kernel and I now have a 5.0.9 kernel.

Would it be possible to get notified somehow once it is ready to test/use?

Normal Plex release notes will speak to the new transcoder updates.
What you need should be in those.

1 Like

So, if I read this correctly, the i9-9000K will not transcode Plex? If so, I do hope there is a fix out soon. Got one coming today.

This is temporary.

The VA-API (libva) used to access the QSV in the CPU needed to be updated in PMS.
We’re doing that now. (testing actually).

1 Like

Great news that it is already in testing! How long is such a testing phase normally?
Or in other words, when do you think it could be available in the stable PMS ?

No date on it yet. It is a major update. We’re running full regression testing now and resolving the issues as they come up. Each time we make a change, we must run the full suite again.

2 Likes

Hello @ChuckPa,

just wanted to ask if maybe now there is a timeframe/date for it.

1 Like

Any update on this?

No. Nothing.
I am following the ongoing activities but there is nothing I can share publicly at this time.

As I previously stated, I will report when there is news

I’m eager to grab a new processor for my build, any ETA when this might be coming? Within the month?

It is in testing; currently cycling from development/bug fix <-> regression testing.
It will continue this way, unknown how long, until all issues resolved and full regression testing suite passes.

Sorry, best I can offer.

Thank you for keeping us in the know. :slight_smile:

On a side-note, I haven’t been able to get the /dev/dri to show up on any kernel other than 5.0, so besides waiting for support in PMS, you also need to have a recent distro / upgrade your Kernel to 5.0. As an example; kernel on Debian Buster doesn’t support the iGPU on the 9900k.
Currently running Debian 10 with 5.0 kernel from experimental and iGPU shows up and is ready for when Plex comes out with the new transcoder.

I had a similar issue with an i5-9600K. I thought it was related to my xpenology OS, but now I wonder if the same bug that stops a 9900k from working would also impact a 9600k?

Almost sure it’s the same issue. Think there is another thread here which talked about that cpu.

XPEnology uses the Synology kernel. There is no word yet on DSM 7.

This as foundation, until such time as Synology offers a product using a CPU with the same ASIC support requirements as the -9xxx family and adds support for the for ASIC in DSM core, the -9xxx CPUs are very likely to not support HW transcoding in XPEnology.

From a quality and performance perspective, I have yet to find a reason which squarely justifies stepping up to the -9xxx CPU family. It still is the same 600-family ASIC/GPU. It’s not like the SkyLake -> KabyLake jump which gave us HDR. At this point, the -8000 is the refinement to the -7000 (HDR capability). We have no 8K content to input.