Error on start - plexmediaserver (1.29.1.6260-420892357) - drmGetDevices2

I am also running into this issue. This is a shared library issue with libdrm.so.2 included in the NVIDIA driver QNAP package which seems to be outdated.

I am running the linuxserver/plex docker image on a QNAP NAS with the 5.0.4.1 NVIDIA driver QNAP package (460.39). Since Plex 1.23 which changed the toolchain & loader to musl, I have set my LD_LIBRARY_PATH to /usr/local/nvidia/lib (equivalent to /opt/NVIDIA_GPU_DRV/lib on the host machine) in order to load the CUDA library necessary for the hardware transcoder. Up until the 1.29.1 release, I had no issue.

Based on my troubleshooting, it looks like that the Plex Media Server binary started, since the 1.29.1 release, calling the drmGetDevices2 function included in more recent libdrm.so.2 versions (>= 2.4.75). Unfortunately, this function isn’t supported by the library version included in the 5.0.4.1 NVIDIA driver QNAP package.

inside container (any version)

# readelf -a -W /usr/local/nvidia/lib/libdrm.so.2 | grep drmGetDevices
   150: 0000000000008140   696 FUNC    GLOBAL DEFAULT   12 drmGetDevices
# readelf -a -W /usr/lib/plexmediaserver/lib/libdrm.so.2 | grep drmGetDevices
0000000000013288  0000005b00000007 R_X86_64_JUMP_SLOT     000000000000ba84 drmGetDevices2 + 0
    91: 000000000000ba84   353 FUNC    GLOBAL DEFAULT   12 drmGetDevices2
   238: 000000000000bbe5    20 FUNC    GLOBAL DEFAULT   12 drmGetDevices
   144: 000000000000ba84   353 FUNC    GLOBAL DEFAULT   12 drmGetDevices2
   145: 000000000000bbe5    20 FUNC    GLOBAL DEFAULT   12 drmGetDevices

I was able to find a workaround changing my LD_LIBRARY_PATH to /usr/local/nvidia/nvidia.u18.04 which includes libcuda.so.1 but not libdrm.so.2 allowing the included shared library /usr/lib/plexmediaserver/lib/libdrm.so.2 to be loaded instead. Another way would have been to rename the library to avoid being loaded but may affect other GPU functionalities at the NAS host level.

inside container (1.29.0)

# ldd /usr/lib/plexmediaserver/Plex\ Media\ Server | grep libdrm.so.2
        libdrm.so.2 => /usr/local/nvidia/lib/libdrm.so.2 (0x00007f8c09e00000)

inside container without workaround (1.29.1)

# ldd /usr/lib/plexmediaserver/Plex\ Media\ Server | grep libdrm.so.2
        libdrm.so.2 => /usr/local/nvidia/lib/libdrm.so.2 (0x00007f4be9a00000)

inside container with workaround (1.29.1)

# ldd /usr/lib/plexmediaserver/Plex\ Media\ Server | grep libdrm.so.2
        libdrm.so.2 => /usr/lib/plexmediaserver/lib/libdrm.so.2 (0x00007fe3e3ebd000)
1 Like