Bundled driver depends on libgcompat shim even on glibc system

Server Version#: 1.43.0.10492
Server OS: NixOS 25.11

Hello, after a lot of trouble, I decided to buy Plex Pass for hardware transcoding, I then spent an entire day trying to troubleshoot it as it was not working.

Come to find out the reason it wasn’t working was that plex bundles its own iHD VA-API, this bundled driver has a libgcompat.so.0 dependency… which does not exist on a glibc system like NixOS.

I tried to force my own driver into it and it wouldn’t work. The reason I paid for Plex Pass over using Jellyfin is that Plex supposedly “just works,” alas it does not!

There is an additional issue, the driver requires a libc.so which on glibc systems is a linker script rather than an ELF binary, which causes another “invalid ELF header” error (it should require libc.so.6)

Error when trying to run driver like PMS would:

[nix-shell:/var/lib/plex]$ sudo -u plex LD_LIBRARY_PATH="/var/lib/plex/Plex Media Server/Drivers/icr-1355230ec27e669c3e46f537-linux-x86_64" LIBVA_DRIVERS_PATH="/var/lib/plex/Plex Media Server/Drivers/imd-9e4cd70adad80b4a3ed849b3-linux-x86_64/dri" LIBVA_DRIVER_NAME=iHD vainfo --display drm --device /dev/dri/renderD128
Trying display: drm
libva info: VA-API version 1.22.0
libva info: User environment variable requested driver 'iHD'
libva info: Trying to open /var/lib/plex/Plex Media Server/Drivers/imd-9e4cd70adad80b4a3ed849b3-linux-x86_64/dri/iHD_drv_video.so
libva error: dlopen of /var/lib/plex/Plex Media Server/Drivers/imd-9e4cd70adad80b4a3ed849b3-linux-x86_64/dri/iHD_drv_video.so failed: libgcompat.so.0: cannot open shared object file: No such file or directory
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit

See also:

[nix-shell:/var/lib/plex]$ ldd "/var/lib/plex/Plex Media Server/Drivers/imd-"*"/dri/iHD_drv_video.so"
/var/lib/plex/Plex Media Server/Drivers/imd-9e4cd70adad80b4a3ed849b3-linux-x86_64/dri/iHD_drv_video.so: error while loading shared libraries: /nix/store/xx7cm72qy2c0643cm1ipngd87aqwkcdp-glibc-2.40-66/lib/libc.so: invalid ELF header

[nix-shell:/var/lib/plex]$ readelf -d "/var/lib/plex/Plex Media Server/Drivers/imd-9e4cd70adad80b4a3ed849b3-linux-x86_64/dri/iHD_drv_video.so" | grep NEEDED
 0x0000000000000001 (NEEDED)             Shared library: [libgcompat.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libigdgmm.so.12]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so]

For reference, the system driver works just fine. PMS should fall back to the system driver when its own does not work, I think.

Please do note I spent a lot of time trying to figure out why it was not hardware transcoding and I did use AI to help in troubleshooting, I might have missed something along the way and I hope the issue is somehow from my side.

Did it come up in your troubleshooting that Plex Media Server is built using the musl C standard library? This is almost certainly why you’re seeing the results you are when trying to run in the manner you are.

PMS provides its own libgcompat and libc in its library path which, by default, is at:

/usr/lib/plexmediaserver/lib
(I’m not sure where a non-supported distribution such as Nix would shove them.)

As to transcoding not working, my initial suggestion would just be to go simple to start. Start with a Debian/Ubuntu/Fedora/RHEL (or clone) base and build a functioning Plex server which will hardware-transcode.

By the way, you didn’t mention which Intel CPU you’re using. iHD covers a lot of hardware at this point and some are known to be problematic, at least in certain cases. And the PMS version you’re using definitely lacks support for some recent CPUs.

I am using this for more than just Plex, I can’t drop my entire set up just for Plex.

The CPU is an i5-8250U, it’s quite dated. I know I can get it to work if I patch it with patchelf, but then I might as well have just cracked it in the first place and not paid for Plex Pass.

Well, to be fair to Plex, you are running on an unsupported OS!
Not a Linux dude, so sadly can not help you here, sorry

Fair enough. But I wouldn’t expect Plex to spend much time on this given that you’re running on an unsupported platform.

Hardware-accelerated transcoding does generally work reliably on the platforms which they support (supported means that they test it). Meaning, all else being equal, supported hardware with supported codecs should result in success.

Hopefully there are some other NixOS users on these forums who can provide more specific guidance.

But your initial problem statement suggested no knowledge of Plex’s build dependencies (musl), which are fairly well-known at this point. That’s why I pointed out the use of musl as opposed to glibc. Maybe you can get further with your AI-assisted expeditions with this knowledge. Good luck.

I want to apologise for my crass language in the initial post. I hadn’t realised there is a list of supported platforms. Knowing that it is an FHS issue, I just containerised it (running through podman with "--device=/dev/dri:/dev/dri") and it works.

Thanks for the patience :slight_smile: