Server Version#: 1.22.3.4392
Player Version#: Plex for windows 1.31.1.2262-74fdc6b7
Running linuxservers.io docker image in ds920+. Previously had no issues using hardware transcoding, including 4k hdr with tone mapping. After updating to latest docker image I can’t get any hardware transcoding working, it always falls back to software. Logs aren’t really helpful, just a unknown error.
May 08, 2021 15:58:50.916 [0x7f69708b9700] DEBUG - [Transcode] Codecs: testing h264_nvenc (encoder)
May 08, 2021 15:58:50.916 [0x7f69708b9700] DEBUG - [Transcode] Codecs: hardware transcoding: testing API nvenc
May 08, 2021 15:58:50.917 [0x7f69708b9700] ERROR - [Transcode] [FFMPEG] - Cannot load libcuda.so.1
May 08, 2021 15:58:50.917 [0x7f69708b9700] ERROR - [Transcode] [FFMPEG] - Could not dynamically load CUDA
May 08, 2021 15:58:50.917 [0x7f69708b9700] DEBUG - [Transcode] Codecs: hardware transcoding: opening hw device failed - probably not supported by this system, error: Unknown error occurred
May 08, 2021 15:58:50.917 [0x7f69708b9700] DEBUG - [Transcode] Codecs: testing hevc (decoder) with hwdevice vaapi
May 08, 2021 15:58:50.917 [0x7f69708b9700] DEBUG - [Transcode] Codecs: hardware transcoding: testing API vaapi
May 08, 2021 15:58:50.917 [0x7f69708b9700] DEBUG - [Transcode] Codecs: hardware transcoding: opening hw device failed - probably not supported by this system, error: Generic error in an external library
May 08, 2021 15:58:50.917 [0x7f69708b9700] DEBUG - [Transcode] Codecs: testing hevc (decoder) with hwdevice nvdec
May 08, 2021 15:58:50.917 [0x7f69708b9700] DEBUG - [Transcode] Codecs: hardware transcoding: testing API nvdec
May 08, 2021 15:58:50.917 [0x7f69708b9700] ERROR - [Transcode] [FFMPEG] - Cannot load libcuda.so.1
May 08, 2021 15:58:50.917 [0x7f69708b9700] ERROR - [Transcode] [FFMPEG] - Could not dynamically load CUDA
May 08, 2021 15:58:50.917 [0x7f69708b9700] DEBUG - [Transcode] Codecs: hardware transcoding: opening hw device failed - probably not supported by this system, error: Unknown error occurred
I have used this setup with hardware decoding before succesfully, I have added the GPU as device to Docker and it worked with transcoding and HDR remapping until recently.
I have in fact already uploaded the logs. This is the XML for the file in question. But the transcoding fails on every single file I’ve tried regardless of the format.
<MediaContainer size="1" allowSync="1" identifier="com.plexapp.plugins.library" librarySectionID="2" librarySectionTitle="TV Shows" librarySectionUUID="542b0732-b4c7-4880-ac97-8cd404de3610" mediaTagPrefix="/system/bundle/media/flags/" mediaTagVersion="1618841647">
<Video ratingKey="1484" key="/library/metadata/1484" parentRatingKey="1483" grandparentRatingKey="1482" guid="com.plexapp.agents.thetvdb://280619/1/1?lang=en" parentGuid="com.plexapp.agents.thetvdb://280619/1?lang=en" grandparentGuid="com.plexapp.agents.thetvdb://280619?lang=en" type="episode" title="Dulcinea" grandparentKey="/library/metadata/1482" parentKey="/library/metadata/1483" librarySectionTitle="TV Shows" librarySectionID="2" librarySectionKey="/library/sections/2" grandparentTitle="The Expanse" parentTitle="Season 1" contentRating="TV-14" summary="In the outer solar system near Saturn, James Holden and the crew of the ice freighter Canterbury investigate a distress call from a mysterious derelict ship, the Scopuli. On Ceres Station, Detective Miller begins an off-the-books investigation of a missing heiress, Julie Mao." index="1" parentIndex="1" rating="7.8" viewOffset="2057471" viewCount="1" lastViewedAt="1620497216" year="2015" thumb="/library/metadata/1484/thumb/1617394924" art="/library/metadata/1482/art/1617467773" parentThumb="/library/metadata/1483/thumb/1617394186" grandparentThumb="/library/metadata/1482/thumb/1617467773" grandparentArt="/library/metadata/1482/art/1617467773" grandparentTheme="/library/metadata/1482/theme/1617467773" duration="2721803" originallyAvailableAt="2015-12-14" addedAt="1596775544" updatedAt="1617394924" chapterSource="media">
<Media id="2116" duration="2721803" bitrate="14904" width="3840" height="2160" aspectRatio="1.78" audioChannels="6" audioCodec="aac" videoCodec="hevc" videoResolution="4k" container="mp4" videoFrameRate="24p" optimizedForStreaming="1" audioProfile="lc" has64bitOffsets="1" videoProfile="main 10">
<Part accessible="1" exists="1" id="2116" key="/library/parts/2116/1596775544/file.mp4" duration="2721803" file="/data/tv/The Expanse/Season 1/The.Expanse.S01E01.Dulcinea.2160p.AMZN.WEB-DL.AAC.5.1.HDR.H.265-CHX.mp4" size="5070640198" audioProfile="lc" container="mp4" deepAnalysisVersion="4" has64bitOffsets="1" optimizedForStreaming="1" requiredBandwidths="15516,15471,15377,15300,15226,15181,15181,15181" videoProfile="main 10">
<Stream id="3982" streamType="1" default="1" codec="hevc" index="0" bitrate="14372" bitDepth="10" chromaSubsampling="4:2:0" codecID="hev1" codedHeight="2160" codedWidth="3840" colorPrimaries="bt2020" colorRange="tv" colorSpace="bt2020nc" colorTrc="smpte2084" frameRate="23.976" height="2160" level="150" profile="main 10" refFrames="1" requiredBandwidths="14978,14921,14844,14762,14687,14649,14649,14649" streamIdentifier="1" width="3840" displayTitle="4K (HEVC Main 10 HDR)" extendedDisplayTitle="4K (HEVC Main 10 HDR)"> </Stream>
<Stream id="3983" streamType="2" selected="1" default="1" codec="aac" index="1" channels="6" bitrate="532" language="English" languageCode="eng" audioChannelLayout="5.1" profile="lc" requiredBandwidths="564,564,564,564,564,564,564,564" samplingRate="48000" streamIdentifier="2" displayTitle="English (AAC 5.1)" extendedDisplayTitle="English (AAC 5.1)"> </Stream>
<Stream id="3984" streamType="3" default="1" codec="mov_text" index="2" bitrate="0" language="English" languageCode="eng" requiredBandwidths="1,1,1,1,1,1,1,1" streamIdentifier="3" displayTitle="English (MOV_TEXT)" extendedDisplayTitle="English (MOV_TEXT)"> </Stream>
</Part>
</Media>
<Writer id="2722" filter="writer=2722" tag="Hawk Ostby"/>
<Writer id="2723" filter="writer=2723" tag="Mark Fergus"/>
<Chapter id="3256" filter="thumb=3256" tag="1. Opening Credits" index="1" startTimeOffset="0" endTimeOffset="60060" thumb="/library/media/2116/chapterImages/1"/>
<Chapter id="3257" filter="thumb=3257" tag="2. Prologue" index="2" startTimeOffset="60060" endTimeOffset="96888" thumb="/library/media/2116/chapterImages/2"/>
<Chapter id="3258" filter="thumb=3258" tag="3. Making an escape" index="3" startTimeOffset="96888" endTimeOffset="264264" thumb="/library/media/2116/chapterImages/3"/>
<Chapter id="3259" filter="thumb=3259" tag="4. Things work differently around here" index="4" startTimeOffset="264264" endTimeOffset="568902" thumb="/library/media/2116/chapterImages/4"/>
<Chapter id="3260" filter="thumb=3260" tag="5. Miller gets a new assignment" index="5" startTimeOffset="568902" endTimeOffset="702035" thumb="/library/media/2116/chapterImages/5"/>
<Chapter id="3261" filter="thumb=3261" tag="6. Life aboard a space station has its perils" index="6" startTimeOffset="702035" endTimeOffset="929720" thumb="/library/media/2116/chapterImages/6"/>
<Chapter id="3262" filter="thumb=3262" tag="7. Thanks, but no thanks" index="7" startTimeOffset="929720" endTimeOffset="1234024" thumb="/library/media/2116/chapterImages/7"/>
<Chapter id="3263" filter="thumb=3263" tag="8. Nothing lasts forever" index="8" startTimeOffset="1234024" endTimeOffset="1415539" thumb="/library/media/2116/chapterImages/8"/>
<Chapter id="3264" filter="thumb=3264" tag="9. Telling a lie never ends well" index="9" startTimeOffset="1415539" endTimeOffset="1568942" thumb="/library/media/2116/chapterImages/9"/>
<Chapter id="3265" filter="thumb=3265" tag="10. Things are falling apart" index="10" startTimeOffset="1568942" endTimeOffset="1627960" thumb="/library/media/2116/chapterImages/10"/>
<Chapter id="3266" filter="thumb=3266" tag="11. Heads will roll for this" index="11" startTimeOffset="1627960" endTimeOffset="1785951" thumb="/library/media/2116/chapterImages/11"/>
<Chapter id="3267" filter="thumb=3267" tag="12. No heroes" index="12" startTimeOffset="1785951" endTimeOffset="1930137" thumb="/library/media/2116/chapterImages/12"/>
<Chapter id="3268" filter="thumb=3268" tag="13. A bitter taste of jealousy" index="13" startTimeOffset="1930137" endTimeOffset="2039704" thumb="/library/media/2116/chapterImages/13"/>
<Chapter id="3269" filter="thumb=3269" tag="14. Jim's team scans the freighter" index="14" startTimeOffset="2039704" endTimeOffset="2132130" thumb="/library/media/2116/chapterImages/14"/>
<Chapter id="3270" filter="thumb=3270" tag="15. The team explores the freighter" index="15" startTimeOffset="2132130" endTimeOffset="2390388" thumb="/library/media/2116/chapterImages/15"/>
<Chapter id="3271" filter="thumb=3271" tag="16. Not everything is as it seems" index="16" startTimeOffset="2390388" endTimeOffset="2660658" thumb="/library/media/2116/chapterImages/16"/>
<Chapter id="3272" filter="thumb=3272" tag="17. End Credits" index="17" startTimeOffset="2660658" endTimeOffset="2721803" thumb="/library/media/2116/chapterImages/17"/>
<Extras size="0"> </Extras>
<Related> </Related>
</Video>
</MediaContainer>
This same error shows when PMS does not have permission to access the device but can see it. May 09, 2021 15:50:10.000 [0x7f42ef7fe700] DEBUG - [Transcode] Codecs: hardware transcoding: opening hw device failed - probably not supported by this system, error: Generic error in an external library
Check the GID of the contents of /dev/dri
Now compare that with PLEX_GID=100
This is a permissions problem.
I handle permissions in the native package. Using Docker, this must be done manually.
I ended up rolling back to older docker image and got it working. At least on the host system the permissions are set correctly. It’s possible that permission inside the newer image were broken but I don’t have that image anymore. I’ll check that when I’ll end up updating the image next time.