Hardware transcoding broken on Intel NUC with J5005 CPU on Ubuntu 18.04 LTS

each package is distributed with the i965 driver.

Default operation is to fall back to the i965.

This is because the iHD is only required for Intel -9xxx CPU family chips (The ASIC interface is different)

The i915 remains an integral part of either interface with the Linux kernel.

Well this is not my Plex Pass account - I cannot use it in forums because it is stuck in a login loop when I try and mailing to the support email address was not answered at all so


If you think this is trolling - fine. All I said was I updated PMS and transcoding did not work as before. When PMS gets updated and things are failing on multiple platforms because the issue is in the intel driver and it is released anyway without notice one could feel trolled too.
I know achieving smooth hw transcoding on multiple platforms is not an easy task, but also people rely on this specific feature beacuse it enables low power servers.

So far, so good.

Maybe is the newer VA Driver the reason.
If i saw it right there was an upgrade from Version 2.4 to 2.5 right ?!
The old Plexmediaserver 1.18.0.1944 uses autodetection for the driver while the newer Versions uses a fixed one.
So what about to let the user choose which one to use?!

Other question is if someone about to fix that soon?

Best regards

Also keen to know if a fix is coming, currently rolled back 1.18.0.1944 to get HW Transcoding working again but would like to know when I can upgrade to the latest version!

Thanks,
Conor

If anyone wishes to upgrade to current PlexPass beta, you’re free to do so.

Should you have a processor which is impacted by the iHD issue, which is also an issue for your playback, the workaround is to remove the iHD_drv_video.so file from /usr/lib/plexmediaserver/lib/dri and restart PMS. With the iHD removed, PMS will stay with the proven i965 driver.

Remember, this workaround is not valid for intel -9xxx processors. Thost processors require the iHD driver. Intel made the family cutover to iHD with the -9xxx family.

1 Like

Could a quick solution be, that you have the user select which driver to use in the settings page next to enabling hw transcoding? Maybe with a short explanaition which one to choose based on the platform plex is running on? That might be a somewhat “cleaner” solution instead of having people delete/rename files in the filesystem.

That setting could later be removed once everything got fixed and is working as intended.

1 Like

That “Quick solution” takes gui development time and then server development time.

It’s definitely cleaner if one is giving manual control.

  • Auto
  • i965
  • iHD

What I’m doing here now, while Engineering works out what they’re doing, is to give a workaround. It’s not pretty nor is it final solution.

Got upgraded and deleted the iHD_drv_video.so file, all working nicely! Thank you for Plex <3

Ps. Super excited for HDR to SDR tonemapping which I hear is coming in a future update!

I confim the solution.
This workaround works with
my Asrock J5005 ITX on Debian 10

PlexVersion now:

1.18.2.2041

from

1.18.0.1944

Thx to ChuckPA

1 Like

Nuking the iHD_drv_video.so worked for me, after a reboot of course. No more craptastic artifacts during hardware accelerated transcoding:

Intel NUC7CJYH (CPU = Celeron J4005)
Ubuntu 19.10
PMS 1.18.3.2129

Using docker on my Asrock J5005 ITX (openmediavault 4), I failed to find the iHD_drv_video.so file in the container.

I rolled back to https://github.com/linuxserver/docker-plex/releases/tag/1.18.0.1944-f2cae8d6b-ls60
All is good now.

@ciss1 use docker in my asrock. J5005
You can find the file with this step:
Go insaid docker terminal with
sudo docker exec -it plex /bin/bash
Go to the folder
cd /usr/lib/plexmediaserver/lib/dri
and delete the file
rm iHD_drv_video.so
now you can exit from the docker shell
exit
and restart docker container
sudo docker restart plex

But the problem, is not resolved in my PMS with 1.18.4.2171 version

My problem was, too, in the run command docker, I forgot --device /dev/dri:/dev/dri
Thx to https://www.reddit.com/r/PleX/comments/749hnc/hardware_transcoding_with_plex_docker/

2 Likes

Thanks. I solved it. I even put together some more lines in my script I use to update my containers that deletes the nasty driver.
Adapt to your needs.

#!/bin/sh
cd $(dirname $0)
COMPOSE_HTTP_TIMEOUT=120

# build/pull updated containers
docker pull linuxserver/.... #your images go here
docker pull linuxserver/....

# restart all the things
docker-compose -f docker-compose.yml down  --remove-orphans
docker-compose -f docker-compose.yml up -d
sleep 5s
echo "Restarting docker containers..."
docker exec -it plex /bin/bash -c "cd /usr/lib/plexmediaserver/lib/dri && rm -f iHD_drv_video.so"
docker restart plex

I added the last 3 lines, which basically waits a bit (5sec) then goes inside the newly spawned plex container and removes the faulty driver.

2 Likes

I’m not sure if this is the same issue, but I’m using Ubuntu 18.04 on an Intel NUC7CJYH (J4005) and have a problem with hardware transcoding and live TV.

When I start watching a channel from my HDHR, the quality is fine for the first 10 seconds or so, but then gets very poor. It then clears up in about 60 seconds.

I tried deleting the iHD_drv_video.so file, but it had no effect.

This is repeatable on iOS and FireTV clients. The Plex server version is 1.18.4.2171

I just wanted to follow up with an update. It looks like the problem was with Jellyfin, which was installed on the same server. The problem went away when I uninstalled it.

1 Like

@ChuckPa Any update on this? Having this issue as well on my J3455. It’s a bit annoying having to delete the iHD file every time. It would be much easier if Plex just used the VA driver that is configured on the system instead of rolling its own copies
 then AMD would also work.

There is no update from Engineering.
It’s very annoying.

Just about the time I change packaging to remove it forcibly (assuming proper CPU detection), they’ll fix it. Murphy’s Law always rules.

I use the ASRock J5005 Board running Plex Version 1.18.6.2368 in the official plexinc docker container.
When trying to transcode, I get extreme artefacts, stuttering and buffering.

Feb 12, 2020 11:44:41.476 [0x7f65f3fff700] DEBUG - TPU: hardware transcoding: using hardware decode accelerator vaapi
Feb 12, 2020 11:44:41.477 [0x7f65f3fff700] DEBUG - [Universal] Using local file path instead of URL: /media/Serien/Stranger Things/Staffel 3/Stranger.Things.S03E02.GERMAN.DL.2160p.WEB.h265-TSCC/Stranger.Things.S03E02.GERMAN.DL.2160p.WEB.h265-TSCC.mkv
Feb 12, 2020 11:44:41.477 [0x7f65f3fff700] DEBUG - TPU: hardware transcoding: zero-copy support present
Feb 12, 2020 11:44:41.477 [0x7f65f3fff700] DEBUG - TPU: hardware transcoding: using zero-copy transcoding
Feb 12, 2020 11:44:41.477 [0x7f65f3fff700] DEBUG - Codecs: hardware transcoding: testing API vaapi
Feb 12, 2020 11:44:41.479 [0x7f65f3fff700] DEBUG - [FFMPEG] - Format 0x41524742 -> bgra.
Feb 12, 2020 11:44:41.479 [0x7f65f3fff700] DEBUG - [FFMPEG] - Format 0x42475241 -> argb.
Feb 12, 2020 11:44:41.479 [0x7f65f3fff700] DEBUG - [FFMPEG] - Format 0x41424752 -> rgba.
Feb 12, 2020 11:44:41.479 [0x7f65f3fff700] DEBUG - [FFMPEG] - Format 0x52474241 -> abgr.
Feb 12, 2020 11:44:41.479 [0x7f65f3fff700] DEBUG - [FFMPEG] - Format 0x58524742 -> bgr0.
Feb 12, 2020 11:44:41.479 [0x7f65f3fff700] DEBUG - [FFMPEG] - Format 0x42475258 -> 0rgb.
Feb 12, 2020 11:44:41.479 [0x7f65f3fff700] DEBUG - [FFMPEG] - Format 0x58424752 -> rgb0.
Feb 12, 2020 11:44:41.479 [0x7f65f3fff700] DEBUG - [FFMPEG] - Format 0x52474258 -> 0bgr.
Feb 12, 2020 11:44:41.479 [0x7f65f3fff700] DEBUG - [FFMPEG] - Format 0x50424752 -> unknown.
Feb 12, 2020 11:44:41.479 [0x7f65f3fff700] DEBUG - [FFMPEG] - Format 0x50524742 -> unknown.
Feb 12, 2020 11:44:41.479 [0x7f65f3fff700] DEBUG - [FFMPEG] - Format 0x36314752 -> unknown.
Feb 12, 2020 11:44:41.479 [0x7f65f3fff700] DEBUG - [FFMPEG] - Format 0x3231564e -> nv12.
Feb 12, 2020 11:44:41.479 [0x7f65f3fff700] DEBUG - [FFMPEG] - Format 0x3132564e -> unknown.
Feb 12, 2020 11:44:41.479 [0x7f65f3fff700] DEBUG - [FFMPEG] - Format 0x32595559 -> yuyv422.
Feb 12, 2020 11:44:41.479 [0x7f65f3fff700] DEBUG - [FFMPEG] - Format 0x59565955 -> uyvy422.
Feb 12, 2020 11:44:41.479 [0x7f65f3fff700] DEBUG - [FFMPEG] - Format 0x32315659 -> yuv420p.
Feb 12, 2020 11:44:41.479 [0x7f65f3fff700] DEBUG - [FFMPEG] - Format 0x30323449 -> yuv420p.
Feb 12, 2020 11:44:41.479 [0x7f65f3fff700] DEBUG - [FFMPEG] - Format 0x48323234 -> yuv422p.
Feb 12, 2020 11:44:41.479 [0x7f65f3fff700] DEBUG - [FFMPEG] - Format 0x56323234 -> yuv440p.
Feb 12, 2020 11:44:41.479 [0x7f65f3fff700] DEBUG - [FFMPEG] - Format 0x50343434 -> yuv444p.
Feb 12, 2020 11:44:41.479 [0x7f65f3fff700] DEBUG - [FFMPEG] - Format 0x33434d49 -> unknown.
Feb 12, 2020 11:44:41.479 [0x7f65f3fff700] DEBUG - [FFMPEG] - Format 0x30313050 -> p010le.
Feb 12, 2020 11:44:41.479 [0x7f65f3fff700] DEBUG - [FFMPEG] - Created surface 0.
Feb 12, 2020 11:44:41.479 [0x7f65f3fff700] DEBUG - [FFMPEG] - Direct mapping possible.
Feb 12, 2020 11:44:41.480 [0x7f65f3fff700] DEBUG - TPU: hardware transcoding: final decoder: vaapi, final encoder: vaapi
Feb 12, 2020 11:44:41.480 [0x7f65f3fff700] DEBUG - Job running: EAE_ROOT='/tmp/pms-1262a90b-341b-4f90-906b-15ec41f6d9d0/EasyAudioEncoder' FFMPEG_EXTERNAL_LIBS='/config/Library/Application\ Support/Plex\ Media\ Server/Codecs/8bf330d-2937-linux-x86_64/' XDG_CACHE_HOME='/config/Library/Application Support/Plex Media Server/Cache' XDG_DATA_HOME='/usr/lib/plexmediaserver/Resources' X_PLEX_TOKEN='xxxxxxxxxxxxxxxxxxxx' '/usr/lib/plexmediaserver/Plex Transcoder' '-codec:0' 'hevc' '-hwaccel:0' 'vaapi' '-hwaccel_fallback_threshold:0' '10' '-hwaccel_output_format:0' 'vaapi' '-codec:2' 'eac3_eae' '-eae_prefix:2' 'e0ip538f2oceh2a37wotwml3_' '-ss' '554' '-analyzeduration' '20000000' '-probesize' '20000000' '-i' '/media/Serien/Stranger Things/Staffel 3/Stranger.Things.S03E02.GERMAN.DL.2160p.WEB.h265-TSCC/Stranger.Things.S03E02.GERMAN.DL.2160p.WEB.h265-TSCC.mkv' '-filter_complex' '[0:0]hwupload[0];[0]scale_vaapi=w=2276:h=1280:format=nv12[1];[1]hwupload[2]' '-filter_complex' '[0:2] aresample=async=1:ocl='\''stereo'\'':osr=48000[3]' '-map' '[2]' '-metadata:s:0' 'language=eng' '-codec:0' 'h264_vaapi' '-b:0' '17975k' '-maxrate:0' '23967k' '-bufsize:0' '47934k' '-r:0' '23.975999999999999' '-force_key_frames:0' 'expr:gte(t,554+n_forced*1)' '-map' '[3]' '-metadata:s:1' 'language=eng' '-codec:1' 'aac' '-b:1' '256k' '-f' 'dash' '-seg_duration' '1' '-init_seg_name' 'init-stream$RepresentationID$.m4s' '-media_seg_name' 'chunk-stream$RepresentationID$-$Number%05d$.m4s' '-window_size' '5' '-delete_removed' 'false' '-skip_to_segment' '555' '-time_delta' '0.0625' '-manifest_name' 'http://127.0.0.1:32400/video/:/transcode/session/e0ip538f2oceh2a37wotwml3/e9c61129-36df-4d7f-8671-192e70e6ed01/manifest' '-avoid_negative_ts' 'disabled' '-map_metadata' '-1' '-map_chapters' '-1' 'dash' '-start_at_zero' '-copyts' '-y' '-init_hw_device' 'vaapi=vaapi:,driver=iHD,kernel_driver=i915' '-hwaccel_device' 'vaapi' '-filter_hw_device' 'vaapi' '-nostats' '-loglevel' 'quiet' '-loglevel_plex' 'error' '-progressurl' 'http://127.0.0.1:32400/video/:/transcode/session/e0ip538f2oceh2a37wotwml3/e9c61129-36df-4d7f-8671-192e70e6ed01/progress'

Plex Media Server.log (733.8 KB)

I then removed the iHD driver within the container. Now playback never even starts and I get an error popup saying the transcoder was stopped due to an error (translated from German).

I guess I will just fall back to one of last year’s builds.

EDIT: I just restarted the container (after deleting the iHD driver) which seemed to fix it.

I was patiently waiting for the latest update, in which they claimed the issue had been fixed.
I updated today (latest beta 1.18.7.2415).

Not surprisingly, no changes whatsoever, same behaviour. We still have to manually delete the iHD driver ourselves it seems, or we get the same good ol artefacts, stuttering and buffering.

This issue is getting more and more hilarious


Version 1.18.7.2434 and no changes
 hardware transcode fails, have to delete iHD driver