Our forum migration to Discourse is underway and scheduled to last through June 21. During the migration, the forums will be read-only, except for a single temporary forum (contents of which will not be getting transferred). Read our announcement post for more information about the forum migration.
Hey folks, there is a new Podcast category for forums https://forums.plex.tv/categories/podcasts
If you have not already, we suggest setting your Plex username to something else rather than email which is displayed on your posts in forum. You can change the username at https://app.plex.tv/desktop#!/account
Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

Hardware transcoding does not work Ubuntu 16.04LTS fresh load

bobokiboboki Members, Plex Pass Posts: 240 Plex Pass
edited March 7 in Linux

I was on 17.10, went ahead and reloaded today to 16.04 LTS .
Plex Version 1.12.0.4829 with plex pass HW transcode enabled.
System is a i7-2600k with a Nvidia 570GTX latest drivers 390.25 loaded
Linux BobOkiPlex 4.13.0-36-generic #40~16.04.1-Ubuntu SMP Fri Feb 16 23:25:58 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
my vainfo shows:
vainfo<br /> error: XDG_RUNTIME_DIR not set in the environment.<br /> error: can't connect to X server!<br /> libva info: VA-API version 0.40.0<br /> libva info: va_getDriverName() returns -1<br /> libva error: va_getDriverName() failed with unknown libva error,driver_name=(null)<br /> vaInitialize failed with error code -1 (unknown libva error),exit

Plex logs show:

Mar 07, 2018 12:55:33.267 [0x7f58defff700] DEBUG - Streaming Resource: Determining preferred transcode encoders through transcode only decision.
Mar 07, 2018 12:55:33.267 [0x7f58defff700] DEBUG - Codecs: testing h264_nvenc (encoder)
Mar 07, 2018 12:55:33.267 [0x7f58defff700] ERROR - [FFMPEG] - No NVENC capable devices found
Mar 07, 2018 12:55:33.267 [0x7f58defff700] WARN - avcodec_open2 returned -542398533 for encoder 'h264_nvenc'
Mar 07, 2018 12:55:33.268 [0x7f58defff700] DEBUG - Codecs: hardware transcoding: testing API vaapi
Mar 07, 2018 12:55:33.268 [0x7f58defff700] ERROR - [FFMPEG] - Failed to initialise VAAPI connection: -1 (unknown libva error).
Mar 07, 2018 12:55:33.268 [0x7f58defff700] DEBUG - Codecs: hardware transcoding: opening hw device failed - probably not supported by this system, error: Input/output error
Mar 07, 2018 12:55:33.268 [0x7f58defff700] DEBUG - Scaled up video bitrate to 46863Kbps based on 4.500000x fudge factor.
Mar 07, 2018 12:55:33.268 [0x7f58defff700] DEBUG - Codecs: testing h264_nvenc (encoder)
Mar 07, 2018 12:55:33.268 [0x7f58defff700] ERROR - [FFMPEG] - No NVENC capable devices found
Mar 07, 2018 12:55:33.269 [0x7f58defff700] WARN - avcodec_open2 returned -542398533 for encoder 'h264_nvenc'
Mar 07, 2018 12:55:33.269 [0x7f58defff700] DEBUG - Codecs: hardware transcoding: testing API vaapi
Mar 07, 2018 12:55:33.269 [0x7f58defff700] ERROR - [FFMPEG] - Failed to initialise VAAPI connection: -1 (unknown libva error).
Mar 07, 2018 12:55:33.269 [0x7f58defff700] DEBUG - Codecs: hardware transcoding: opening hw device failed - probably not supported by this system, error: Input/output error
Mar 07, 2018 12:55:33.269 [0x7f58defff700] DEBUG - Scaled up video bitrate to 46863Kbps based on 4.500000x fudge factor.
Mar 07, 2018 12:55:33.269 [0x7f58defff700] DEBUG - Streaming Resource: Reducing playback quality for 19047kbps stream bitrate: video resolution to 3840x1604, audio channels to 6, quality to 0, disable video DS as 47911kbps is > the 18478kbps available
Mar 07, 2018 12:55:33.269 [0x7f58defff700] DEBUG - Codecs: testing h264_nvenc (encoder)
Mar 07, 2018 12:55:33.270 [0x7f58defff700] ERROR - [FFMPEG] - No NVENC capable devices found
Mar 07, 2018 12:55:33.270 [0x7f58defff700] WARN - avcodec_open2 returned -542398533 for encoder 'h264_nvenc'
Mar 07, 2018 12:55:33.270 [0x7f58defff700] DEBUG - Codecs: hardware transcoding: testing API vaapi
Mar 07, 2018 12:55:33.270 [0x7f58defff700] ERROR - [FFMPEG] - Failed to initialise VAAPI connection: -1 (unknown libva error).
Mar 07, 2018 12:55:33.270 [0x7f58defff700] DEBUG - Codecs: hardware transcoding: opening hw device failed - probably not supported by this system, error: Input/output error
and
Mar 07, 2018 12:55:33.579 [0x7f58dffff700] DEBUG - Found session GUID of 2282370adf9441c6-com-plexapp-android in session start.
Mar 07, 2018 12:55:33.579 [0x7f58dffff700] DEBUG - Starting a transcode session 2282370adf9441c6-com-plexapp-android at offset -1.0 (state=3)
Mar 07, 2018 12:55:33.581 [0x7f58dffff700] DEBUG - TPU: hardware transcoding: enabled, but no hardware decode accelerator found
Mar 07, 2018 12:55:33.582 [0x7f58dffff700] DEBUG - [Universal] Using local file path instead of URL: /media/boboki/Media/BobOki/4K/Guardians.of.the.Galaxy.Vol.2.2017.2160p.UHD.BluRay.x265-TERMiNAL/Guardians.of.the.Galaxy.Vol.2.2017.2160p.UHD.BluRay.x265-TERMiNAL.mp4
Mar 07, 2018 12:55:33.582 [0x7f58dffff700] DEBUG - TPU: hardware transcoding: zero-copy support not present
Mar 07, 2018 12:55:33.582 [0x7f58dffff700] DEBUG - TPU: hardware transcoding: final decoder: , final encoder:

Plex is a member of the video group and my dri is:

ls -ahl /dev/dri
total 0
drwxr-xr-x  2 root root        80 Mar  7 14:01 .
drwxr-xr-x 21 root root      4.2K Mar  7 14:09 ..
crw-rw----  1 root video 226,   0 Mar  7 14:01 card0
crw-rw----  1 root video 226, 128 Mar  7 14:01 renderD128

I have spent a good portion of the day hunting all over the webs to find a solution, thus far cannot find anything. System shows my nvidia installed

lspci | grep VGA
01:00.0 VGA compatible controller: NVIDIA Corporation GF110 [GeForce GTX 570] (rev a1)

Any ideas, this is killing me!

Moderator edit for readability. Forum does not support <code> correctly when on the same line as text to format as code

Servers: Sabertooth z97/i7-2600k, 16gig ram (PMS) Quadro P2000, 2x Xeon E5355, 32gig ram(services) 23TB Synology 1515+ port grouped
Clients: 2 chromecast Ultra 4k, Samsung 8550 65", 4 Laptops (mac and win), 2 Samsung Note4s, iphone 5s, 2 Nexus 6P, Google Pixel XL, Google Pixel 2 XL

Best Answers

Answers

  • ChuckPAChuckPA Members, Plex Pass, Plex Ninja, Plex Team Member Posts: 22,850 Plex Team Member
    Accepted Answer

    The difficulties you're experiencing can come from two sources:

    1. Libva which is provided with your system
    2. The card may not have the capability

    Plex only supports hardware transcoding on Intel CPUs with Quick Sync Video at this time because of known deficiencies with libva and external GPUs.
    There are those folks who have been able to make it work as well as those who can't because the critical features are disable by the motherboard itself in spite of what is reported

    Please DISABLE Verbose logging until requested

    Please search before posting

    Primary support: Linux, Synology, and QNAP

    Please remember to report back. This benefits others.

    Useful links

     Installation and Basic Setup |  Media Preparation (How to name your media files)  |  Linux Permissions 

     Handling TV Specials | Handling Movie extras  |  Nas Compatibility

     Reporting Plex Server issues | Plex Media Server FAQ | Linux Tips

     

    Other useful guides: Local Subtitles | The Plex "dance" | Synology FAQ | PMS Release Announcements

    Hosts: Fedora, QNAP, Synology, most Linux distros in VM

    No technical support via PM unless offered

    Please remember to mark the appropriate answer(s) which solved your issue.

     
  • bobokiboboki Members, Plex Pass Posts: 240 Plex Pass
    edited March 7

    I took the NVIDIA out, and Quick Sync started to work instantly.
    Of course, now I have minor other issues, like it will not actually start a 4k transcode, it just sits there for... ever. Never times out, never failsback, nothing. I had two 1080p both HEVC and x264 running at once, instant without issue however so I am hopeful.

    Can you give me a little more insight on how the system functions, and also if there is anything I can further do to perhaps fix the 4k issue? How many streams will it do over the QS before it fails back to CPU straight, etcetc.

    Also, what is the proper BB command to format my code all purty like you fixed it to be?

    Servers: Sabertooth z97/i7-2600k, 16gig ram (PMS) Quadro P2000, 2x Xeon E5355, 32gig ram(services) 23TB Synology 1515+ port grouped
    Clients: 2 chromecast Ultra 4k, Samsung 8550 65", 4 Laptops (mac and win), 2 Samsung Note4s, iphone 5s, 2 Nexus 6P, Google Pixel XL, Google Pixel 2 XL

  • ChuckPAChuckPA Members, Plex Pass, Plex Ninja, Plex Team Member Posts: 22,850 Plex Team Member
    Accepted Answer

    4K 8 bit (SDR) requires a Skylake or better class (-6700 series)
    4K 10 bit (HDR) requires a Kabylake or better class (-7700 series).

    Please DISABLE Verbose logging until requested

    Please search before posting

    Primary support: Linux, Synology, and QNAP

    Please remember to report back. This benefits others.

    Useful links

     Installation and Basic Setup |  Media Preparation (How to name your media files)  |  Linux Permissions 

     Handling TV Specials | Handling Movie extras  |  Nas Compatibility

     Reporting Plex Server issues | Plex Media Server FAQ | Linux Tips

     

    Other useful guides: Local Subtitles | The Plex "dance" | Synology FAQ | PMS Release Announcements

    Hosts: Fedora, QNAP, Synology, most Linux distros in VM

    No technical support via PM unless offered

    Please remember to mark the appropriate answer(s) which solved your issue.

     
  • bobokiboboki Members, Plex Pass Posts: 240 Plex Pass

    Thanks Chuck, you da man.
    Any info on NVidia/AMD GPUs on when they will be working in Linux and also any transcode information on them as well? Would be interesting to see if I could squeeze in a few more xcodes with a beefier GPU. As it stands a threadripper is starting to sound smexy.

    Servers: Sabertooth z97/i7-2600k, 16gig ram (PMS) Quadro P2000, 2x Xeon E5355, 32gig ram(services) 23TB Synology 1515+ port grouped
    Clients: 2 chromecast Ultra 4k, Samsung 8550 65", 4 Laptops (mac and win), 2 Samsung Note4s, iphone 5s, 2 Nexus 6P, Google Pixel XL, Google Pixel 2 XL

  • ChuckPAChuckPA Members, Plex Pass, Plex Ninja, Plex Team Member Posts: 22,850 Plex Team Member

    No idea. I've been following the work with the Transcoder team. The baseline fixes needed for libva (on Intel GPU) has been pushed upstream. Now we wait for FFMPEG to integrate and release so we can pull downstream and integrate.

    The whole 'off-CPU' transcoding is problematic unto itself as it would be the first time PMS is not in complete control of the end-to-end solution. It would be 100% dependent on you installing the right software for your video card. From where I sit, I have more than enough to do than handle "Why doesn't my graphics card work?" only to learn it's a $79 card and the user expects HEVC HDR out of the box. riiiiiiiiight :D lol

    Please DISABLE Verbose logging until requested

    Please search before posting

    Primary support: Linux, Synology, and QNAP

    Please remember to report back. This benefits others.

    Useful links

     Installation and Basic Setup |  Media Preparation (How to name your media files)  |  Linux Permissions 

     Handling TV Specials | Handling Movie extras  |  Nas Compatibility

     Reporting Plex Server issues | Plex Media Server FAQ | Linux Tips

     

    Other useful guides: Local Subtitles | The Plex "dance" | Synology FAQ | PMS Release Announcements

    Hosts: Fedora, QNAP, Synology, most Linux distros in VM

    No technical support via PM unless offered

    Please remember to mark the appropriate answer(s) which solved your issue.

     
  • bobokiboboki Members, Plex Pass Posts: 240 Plex Pass
    edited March 7

    Oh, I hear that... I am a Sr. VMware Consultant and I can't count on one hand how many times we are brought into a situation where there is performance issues just to find out they are trying to run a multi-host cluster off a NAS device.
    I imagine the "fix" for this would be to have a HCL, and only support what is on that list, any deviations is unsupported. That would certainly keep your responsibility to a minimum when it comes to stupid people. I think a large chunk of us would even be ok with you choosing the most popular fork, say Ubuntu 16.04 LTS and only rolling support for that. Would keep your cli install instructions streamlined, verbiage would always be the same, and it would be easy to troubleshoot any existing issues as long as the users were adhering to the standards. Hell, you could even have a template they would fill out on their posts with all relevant info upfront to further guarantee that no moron mistakes like what you listed occurred. In my initial post I attempted to fill in any spots that might be questions so you would have a full understanding on my base system upfront, which obviously lead to an instant answer from you and a fix a post right after (well fix.. more like work around but whatevs).

    Hell, for something like this, you could have the forums generate a pre-post system checklist with pulldowns, if you hardware is not on those pulldowns then they are not supported they cannot submit a question about it and "expect" support. I know the end goal here is "it just works" for everyone, but it is a nice starting place so we get the goods, and you guys don't pull your hair out with morons and false expectations. My 2 cents.

    Servers: Sabertooth z97/i7-2600k, 16gig ram (PMS) Quadro P2000, 2x Xeon E5355, 32gig ram(services) 23TB Synology 1515+ port grouped
    Clients: 2 chromecast Ultra 4k, Samsung 8550 65", 4 Laptops (mac and win), 2 Samsung Note4s, iphone 5s, 2 Nexus 6P, Google Pixel XL, Google Pixel 2 XL

  • ChuckPAChuckPA Members, Plex Pass, Plex Ninja, Plex Team Member Posts: 22,850 Plex Team Member

    @boboki
    There is a much easier solution at the native layer which has already been implemented. Only virtualization requires special handling.

    When PMS is run native on the host, as it is intended, systemd-udevd is leveraged. At installation time, the installer creates the udev rules and triggers the device scan. Upon finding device(s) matching this spec, udev changes permissions on the /dev entry to the assigned group and mode. PMS is also installed as a member of this group.

    This is used for Hardware Trancoding, LiveTv and DVR inclusive of USB tuners.

    When non-privileged user plex reaches to where it is expecting graphics acceleration devices, it has the required permissions as provided by the EXT file system.

    While I agree there is a use for ACLs in multi-user environments, in this use case, where PMS is on a single video-consuming username system, they are not necessary nor are they intrinsic to the EXT file system.

    With respect to credentials it's usually not well received to open a comment by waving them around. Should they be required, I have a few suffixes I can wave around as well.

    Please DISABLE Verbose logging until requested

    Please search before posting

    Primary support: Linux, Synology, and QNAP

    Please remember to report back. This benefits others.

    Useful links

     Installation and Basic Setup |  Media Preparation (How to name your media files)  |  Linux Permissions 

     Handling TV Specials | Handling Movie extras  |  Nas Compatibility

     Reporting Plex Server issues | Plex Media Server FAQ | Linux Tips

     

    Other useful guides: Local Subtitles | The Plex "dance" | Synology FAQ | PMS Release Announcements

    Hosts: Fedora, QNAP, Synology, most Linux distros in VM

    No technical support via PM unless offered

    Please remember to mark the appropriate answer(s) which solved your issue.

     
  • bobokiboboki Members, Plex Pass Posts: 240 Plex Pass
    edited March 8

    Not ACLs, HCL... Hardware Compatibility List.. my entire comment was not about permissions at all.

    As to credentials, that is a job title, not creds. I too have a bunch of certs I can waive, none of which was my intention.

    Servers: Sabertooth z97/i7-2600k, 16gig ram (PMS) Quadro P2000, 2x Xeon E5355, 32gig ram(services) 23TB Synology 1515+ port grouped
    Clients: 2 chromecast Ultra 4k, Samsung 8550 65", 4 Laptops (mac and win), 2 Samsung Note4s, iphone 5s, 2 Nexus 6P, Google Pixel XL, Google Pixel 2 XL

  • ChuckPAChuckPA Members, Plex Pass, Plex Ninja, Plex Team Member Posts: 22,850 Plex Team Member

    At present, the well published HCL is an Intel CPU with 2nd generation Quick Sync Video or better.

    I am currently authoring a new document to cover hardware transcoding as it relates to NAS devices.

    There are two threads open in the forum where I show a sample and invite feedback

    Please DISABLE Verbose logging until requested

    Please search before posting

    Primary support: Linux, Synology, and QNAP

    Please remember to report back. This benefits others.

    Useful links

     Installation and Basic Setup |  Media Preparation (How to name your media files)  |  Linux Permissions 

     Handling TV Specials | Handling Movie extras  |  Nas Compatibility

     Reporting Plex Server issues | Plex Media Server FAQ | Linux Tips

     

    Other useful guides: Local Subtitles | The Plex "dance" | Synology FAQ | PMS Release Announcements

    Hosts: Fedora, QNAP, Synology, most Linux distros in VM

    No technical support via PM unless offered

    Please remember to mark the appropriate answer(s) which solved your issue.

     
Sign In or Register to comment.