I5 9600k / Intel UHD 630 / Ubuntu 18.10 / Hardware Acceleration Not Working

Hardware:

*Intel Core i5-9600K Coffee Lake 3.7 GHz

*Intel UHD Graphics 630

*MSI B360M PRO-VH LGA 1151 mATX Intel Motherboard

Software:

*Ubuntu 18.10 - Desktop Minimal Install

*Plex 1.15.3.858 - Direct Install

I installed PMS on a brand spanking new Ubuntu build. I imported my old PMS database and library per Plex instructions and it’s working great!

HOWEVER… When PMs transcodes, for example when playing on my mobile phone over ATT LTE network, it does not use Hardware Acceleration.

I cannot for the life of me figure this out. I’ve looked on Reddit, these forums and cannot find a solution. Anyone have any ideas?

I’ve tried reinstalling the i965-va-driver and still doesn’t work. Please help! I know it’s something simple I am missing.

sudo vainfo

error: XDG_RUNTIME_DIR not set in the environment.

libva info: VA-API version 1.2.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_1_2

libva error: /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so init failed

libva info: va_openDriver() returns -1

vaInitialize failed with error code -1 (unknown libva error),exit

ls -la /dev/dri

total 0

drwxr-xr-x 3 root root 100 Mar 31 22:35 .

drwxr-xr-x 20 root root 4340 Mar 31 23:07 …

drwxr-xr-x 2 root root 80 Mar 31 22:35 by-path

crw-rw----+ 1 root video 226, 0 Apr 1 15:30 card0

crw-rw----+ 1 root video 226, 128 Apr 1 15:30 renderD128

PLEX Log

Apr 01, 2019 20:03:31.124 [0x7ffb6effd700] ERROR - ClientProfileExtra: video transcode target already exists for streaming hls

Apr 01, 2019 20:03:31.131 [0x7ffb6effd700] ERROR - [FFMPEG] - Cannot load libcuda.so.1

Apr 01, 2019 20:03:31.131 [0x7ffb6effd700] WARN - avcodec_open2 returned -1313558101 for encoder ‘h264_nvenc’

Apr 01, 2019 20:03:31.131 [0x7ffb6effd700] ERROR - [FFMPEG] - libva: /usr/lib/plexmediaserver/lib/dri/i965_drv_video.so init failed

Apr 01, 2019 20:03:31.131 [0x7ffb6effd700] ERROR - [FFMPEG] - Failed to initialise VAAPI connection: -1 (unknown libva error).

Apr 01, 2019 20:03:31.132 [0x7ffb6effd700] ERROR - [FFMPEG] - Cannot load libcuda.so.1

Apr 01, 2019 20:03:31.132 [0x7ffb6effd700] WARN - avcodec_open2 returned -1313558101 for encoder ‘h264_nvenc’

Apr 01, 2019 20:03:31.132 [0x7ffb6effd700] ERROR - [FFMPEG] - libva: /usr/lib/plexmediaserver/lib/dri/i965_drv_video.so init failed

Apr 01, 2019 20:03:31.132 [0x7ffb6effd700] ERROR - [FFMPEG] - Failed to initialise VAAPI connection: -1 (unknown libva error).

Apr 01, 2019 20:03:31.132 [0x7ffb6effd700] ERROR - [FFMPEG] - Cannot load libcuda.so.1

Apr 01, 2019 20:03:31.132 [0x7ffb6effd700] WARN - avcodec_open2 returned -1313558101 for encoder ‘h264_nvenc’

Apr 01, 2019 20:03:31.132 [0x7ffb6effd700] ERROR - [FFMPEG] - libva: /usr/lib/plexmediaserver/lib/dri/i965_drv_video.so init failed

Apr 01, 2019 20:03:31.132 [0x7ffb6effd700] ERROR - [FFMPEG] - Failed to initialise VAAPI connection: -1 (unknown libva error).

Apr 01, 2019 20:03:31.133 [0x7ffb6effd700] WARN - Failed to find encoder ‘hevc_qsv’

Apr 01, 2019 20:03:31.133 [0x7ffb6effd700] ERROR - [FFMPEG] - libva: /usr/lib/plexmediaserver/lib/dri/i965_drv_video.so init failed

Apr 01, 2019 20:03:31.133 [0x7ffb6effd700] ERROR - [FFMPEG] - Failed to initialise VAAPI connection: -1 (unknown libva error).

Apr 01, 2019 20:03:31.133 [0x7ffb6effd700] ERROR - [FFMPEG] - libva: /usr/lib/plexmediaserver/lib/dri/i965_drv_video.so init failed

Apr 01, 2019 20:03:31.133 [0x7ffb6effd700] ERROR - [FFMPEG] - Failed to initialise VAAPI connection: -1 (unknown libva error).

Apr 01, 2019 20:03:31.133 [0x7ffb6effd700] ERROR - [FFMPEG] - libva: /usr/lib/plexmediaserver/lib/dri/i965_drv_video.so init failed

Apr 01, 2019 20:03:31.133 [0x7ffb6effd700] ERROR - [FFMPEG] - Failed to initialise VAAPI connection: -1 (unknown libva error).

Apr 01, 2019 20:03:31.133 [0x7ffb6effd700] ERROR - [FFMPEG] - Cannot load libcuda.so.1

Your vainfo is saying the driver isn’t initialized.

What happens when you install xserver-xorg-video-intel.

Ubuntu 18, “minimal” desktop install is more than enough.

  1. Please verify “DEBUG” logging on, “VERBOSE” off.
  2. Settings - Server - Transcoder - Show Advanced - verify “Use Hardware Acceleration when available” is checked. - Save changes
  3. Start playback
  4. Play 30 seconds
  5. Stop Playback
  6. Settings - Server - Troubleshooting - Download Logs
  7. Attach the ZIP file it gives you

Attached is the zip file! Any help would be apperciated!

*Turned Debug on and made sure verbose off
*“Use Hardware Acceleration” is turned on

54%20AM

Thank you for the logs.

The logs show the kernel does not yet recognize the -9600k. They also show Plex attempting to find nVidia and not finding it either.

Apr 02, 2019 08:17:00.676 [0x7ffb6effd700] DEBUG - Streaming Resource: Determining preferred transcode encoders through transcode only decision.
Apr 02, 2019 08:17:00.677 [0x7ffb6effd700] DEBUG - Codecs: testing h264_nvenc (encoder)
Apr 02, 2019 08:17:00.677 [0x7ffb6effd700] ERROR - [FFMPEG] - Cannot load libcuda.so.1
Apr 02, 2019 08:17:00.677 [0x7ffb6effd700] WARN - avcodec_open2 returned -1313558101 for encoder 'h264_nvenc'
Apr 02, 2019 08:17:00.677 [0x7ffb6effd700] DEBUG - Codecs: hardware transcoding: testing API vaapi
Apr 02, 2019 08:17:00.677 [0x7ffb6effd700] ERROR - [FFMPEG] - libva: /usr/lib/plexmediaserver/lib/dri/i965_drv_video.so init failed
Apr 02, 2019 08:17:00.677 [0x7ffb6effd700] ERROR - [FFMPEG] - Failed to initialise VAAPI connection: -1 (unknown libva error).
Apr 02, 2019 08:17:00.677 [0x7ffb6effd700] DEBUG - Codecs: hardware transcoding: opening hw device failed - probably not supported by this system, error: Input/output error
Apr 02, 2019 08:17:00.677 [0x7ffb6effd700] DEBUG - Scaled up video bitrate to 223029Kbps based on 4.500000x fudge factor.
Apr 02, 2019 08:17:00.677 [0x7ffb6effd700] DEBUG - Scaled maximum bitrate for resolution reduction to 55757Kbps.
Apr 02, 2019 08:17:00.677 [0x7ffb6effd700] DEBUG - Codecs: hardware transcoding: testing API vaapi
Apr 02, 2019 08:17:00.677 [0x7ffb6effd700] ERROR - [FFMPEG] - libva: /usr/lib/plexmediaserver/lib/dri/i965_drv_video.so init failed
Apr 02, 2019 08:17:00.677 [0x7ffb6effd700] ERROR - [FFMPEG] - Failed to initialise VAAPI connection: -1 (unknown libva error).
Apr 02, 2019 08:17:00.677 [0x7ffb6effd700] DEBUG - Codecs: hardware transcoding: opening hw device failed - probably not supported by this system, error: Input/output error
Apr 02, 2019 08:17:00.677 [0x7ffb6effd700] DEBUG - Scaled up video bitrate to 223029Kbps based on 4.500000x fudge factor.
Apr 02, 2019 08:17:00.678 [0x7ffb6effd700] DEBUG - Codecs: testing h264_nvenc (encoder)
Apr 02, 2019 08:17:00.678 [0x7ffb6effd700] ERROR - [FFMPEG] - Cannot load libcuda.so.1

That makes sense. So in summary I need a kernel update ( when one is available ) to recognize the 9600k?

That’s correct. The kernel itself must first recognize the internal i915. The i965 driver talks to the i965 which in turn returns i915 information. We see the i965 getting unrecognized replies from the i915.

Even with a working driver Plex will not be able to use HW transcoding till you lads fix this:

Knapsu does a fine job of building a version of PMP. Relevance here? I’m not sure with of the multiple points being referenced applies.

The relevance is that you are trying to use a driver that is deprecated, no?

The driver is maintained and provided by Intel.

They are using https://github.com/intel/media-driver now for the newer CPUs.

Thank you. I missed that. I will forward to the transcoding team but they probably already know

My friend suggested that I mention that the file naming changed. As seen on the github the new file is called iHD_drv_video.so

Simple question. Would PMS on Windows 10 have the same issue? I assume not as the OS is more current.

I cannot speak to Windows. I’m a Linux guy.

I do know Windows uses DVXA / DXVA2 as its API which is comparable to VAAPI
Microsoft also handles all those issues internal to Windows.

Since they are better funded and have a broader customer base, I would not expect any issues whatsoever on Windows. :wink:

I appreciate all your time! :slight_smile:

Other options, you could use ukuu to upgrade your kernel or wait till April 19 when Ubuntu 19.04 is released with 5.0 Kernel and updated drivers.

1 Like

This. I used ukuu back last spring to get earlier support for my 8100. nbd.

A point to also await is the next Plex transcoder update to see if there is support for the iHD driver or if still based on the i965