Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
Tips on getting HDR passthrough working on Linux.
#1
Apologies if I have missed an obvious post or guide somewhere, but I had a really difficult time getting the conclusive information and details needed HDR passthrough working on my Gentoo-based Linux HTPC. I had to piece it all together through various random comments and guides around the nets, and given the volume of other people trying to figure this out and hearing it isn't possible or getting misinformation or being told, "just use LibreElec!", I'm not the only one. Given that I just figured it out, I thought it would be good to make a post here to more conclusively guide others embarking on the same quest. Hopefully it becomes common knowledge.  
 
In short, the requirements for Kodi HDR to work on linux at this time (at least, as I found it) are as follows:  
 
1. Video driver that supports DRM and VA-API, and Kodi compiled with VA-API support. In my case, that's the AMDGPU / RadeonSI driver, using the integrated graphics on a Ryzen 5700G. I have read that Intel GPU drivers also have this support, but have not tested this myself so can't speak to it personally.  nVidia drivers don't have proper VA-API support and Kodi HDR doesn't work with VDPAU, that I could find. Sorry, nvidia users. I did try to make it work with my gtx1660, but no go (though for those of you using Plex as the backend and integrating with Kodi via PlexKodiConnect, nvidia cards still work wonderfully with plex for hardware transcoding. I actually use both an AMD and nVidia GPU in my setup this way). Kodi compilation flags: -DENABLE_VAAPI=ON -DENABLE_VDPAU=OFF  
2. Kodi compiled with GBM windowing support. Xorg or Wayland or any other desktop environment are out at this time of writing. Compilation flag: -DCORE_PLATFORM_NAME=gbm  
3. Kodi compiled with GLES support. This was the detail that eluded me for a long time. For whatever reason, HDR passthrough doesn't work with full OpenGL, but does with the pared down OpenGL ES. Compilation flag: -DAPP_RENDER_SYSTEM=gles  
 
tl;dr -- Compile Kodi with the VA-API, GBM, and GLES flags, setup a system with proper working video hardware/drivers but without a desktop environment, and run either 'kodi-standalone' or 'kodi-gbm' (depending on your distro / code source) from commandline. For the Gentoo users out there, I accomplished this in my Gentoo build by configuring Kodi's package.use with these use flags: gbm gles vaapi -X -wayland -vdpau  
 
On a related note: for those of you building an HTPC and want Kodi to launch at boot without need for login, check out [kodi-standalone-service](https://github.com/graysky2/kodi-standal...master/x86). This way you can set your system up similar to a media appliance but without the limitations that come with LibreElec in that you can put whatever else you want on the system if it's got the power to handle it.  
 
Hopefully this helps somebody out there somewhere. And, if anybody can confirm this works with Intel graphics, I think that would also be helpful to many. Best of luck to everybody out there trying to get this to work!
Reply
#2
I simply disabled pulseaudio, and now HDR passthrough works (Debian 12 - Kernel 6.9.x), Kodi 20). The lone exception is that passthough does not work with live TV (or recorded TV) captured OTA with a Hauppauge USB tuner. In this scenario, I get no sound unless I toggle the passthrough switch to 'off'.
I use the outstanding Tidal2 KODI Add-On to stream music, along with rips of my CD collection.
Check out my CD library if you want:
Growing CD Collection
Reply

Logout Mark Read Team Forum Stats Members Help
Tips on getting HDR passthrough working on Linux.0