
How to enable HDR monitor support in Linux
May 28, 2023
Short answer: no way. Currently, HDR is not supported on Linux.
What is HDR
HDR is a technology that makes the display on a monitor or TV screen more vivid, contrasting and realistic. This is achieved by transferring metadata (in addition to the video stream), based on which some scenes (for proprietary HDR variants) or video in general (for HDR10, which has become a de facto standard) are processed.
So yes, there are several versions of HDR, the most common of which is HDR10. In the case of HDR10, all videos are treated the same way because the metadata is static.
In practice, this means that for HDR to work, the monitor or TV must support this technology, the software (both OS and playback programs), and the content itself (movie or computer game) must support HDR of the same version.
Movies with HDR when viewed on devices without HDR support may look too dark – this is noticed by some users.
Also, in practice, not all users see the difference when turning HDR on and off. For HDR to be fully realized, your monitor or TV screen must support a high level of contrast and a large number of colors.
HDR video support on Linux
HDR video support on Linux is not yet implemented on display servers, although it is being worked on:
- X.org (and Xorg clients): no support for passing HDR metadata to the display, see https://gitlab.freedesktop.org/xorg/xserver/-/issues/1037#note_521100
- Wayland (and Wayland clients): no support for passing HDR metadata to the display, see https://gitlab.freedesktop.org/wayland/weston/-/issues/467 and https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/14
- DRM clients can directly pass HDR metadata, but this is not available from regular userspace clients, only specialized software can use it: https://gitlab.freedesktop.org/mesa/drm/-/blob/main/include/drm/drm_mode.h#L809
HDR game support
Since neither Wayland nor X11 currently offer an API that fully supports HDR, your games will also not be able to display proper HDR content on them. Valve's Steam Compositor Gamescope offers experimental HDR support. An AMD GPU must be used to try out the Valve Steam client through an HDR-enabled gaming scope. Currently, HDR is only supported on AMDGPUs, and follow some other software installation steps described here (among other things, you need to use the patched linux kernel): https://wiki.archlinux.org/title/HDR_monitor_support
Linux HDR Programs
When choosing programs to work with HDR, you need to understand the difference between HDR in video and HDR in photos.
The abbreviation HDR for video and photos mean the same thing, but in the case of photography, the main task of HDR is the normal visibility of both too light and too dark areas. It is easiest to explain with examples.
An example of a photo with HDR disabled:
An example photo with HDR enabled:
To work with HDR on Linux, there is, for example, the hdr10plus_tool utility (https://github.com/quietvoid/hdr10plus_tool). Also on GitHub there are several more tools for working with HDR in video: https://github.com/search?q=HDR10
As for playing videos with HDR, such videos are supported by VLC media player. But due to the lack of HDR support at the operating system level, Linux will not be able to see the effect of HDR technology (although video files can still be watched).
Related articles:
- How to enable 10-bit color depth on Linux (and whether to enable 30-bit color) (100%)
- How to determine the number of colors (bits per pixel) in X11 (87.9%)
- Why Google Chrome web browser is gray when 10-bit color is enabled and how to fix it (83.3%)
- How to watch HDR videos on YouTube on Linux (83.3%)
- How to identify content with 10-bit color depth. How to check what color depth is used in a photo and video (83.3%)
- How to fix LibreOffice stopped starting. Resetting LibreOffice without launching (SOLVED) (RANDOM - 50%)