HOWTO enable 10-bit color on Linux

From LinuxReviews
Jump to navigationJump to search

The combinations of modern monitors and Intel integrated graphics, or AMD graphics cards, support 10-bit color on Linux. It is not enabled by default on GNU/Linux distributions. Enabling 10-bit color is just a matter of having one line with "DefaultDepth 30" in a configuration file in /etc/X11/xorg.conf.d/. You may not want to do that because there are many well-known pitfalls you really should be aware of before you enable 10-bit color on GNU/Linux machines.

The biggest pitfalls are: Steam doesn't work, the KDE Plasma desktop environment doesn't work, Vulkan graphics does not work, Chrome/Chromium prior to version 85 display incorrectly and hardware acceleration is disabled on newer versions of Chrome/Chromium.

Example configuration file

Creating a /etc/X11/xorg.conf.d/30-screensetup.conf with the following content will give you 10-bit color:

Section "Screen"
  Identifier    "Default Screen"
  Monitor        "Configured Monitor"
  Device         "Configured Video Device"
  #               24 for 8-bit or 30 for 10-bit
  DefaultDepth    30
EndSection

And that's it. DefaultDepth 30 is the crucial line. The reason 30 enables 10-bit color is that R, G, B = 3 colors * 10 bits = 30.

Can You Into 10-bit?

The log file /var/log/Xorg.0.log will have all kinds of incriminating information about your computer. The first clue look for when you are trying to get into 10-bit is the EDID section created per monitor. It will look something like this when a monitor is connected to a AMD card capable of 10-bit (that would be all but really ancient AMD GPUs):

[    23.998] (II) AMDGPU(0): EDID for output DisplayPort-2
[    23.998] (II) AMDGPU(0): Manufacturer: AUS  Model: 28b1  Serial#: 108105
[    23.998] (II) AMDGPU(0): Year: 2017  Week: 29
[    23.998] (II) AMDGPU(0): EDID Version: 1.4
[    23.998] (II) AMDGPU(0): Digital Display Input
[    23.998] (II) AMDGPU(0): 10 bits per channel
[    23.998] (II) AMDGPU(0): Digital interface is DisplayPort
[    23.998] (II) AMDGPU(0): Max Image Size [cm]: horiz.: 62  vert.: 34
[    23.998] (II) AMDGPU(0): Gamma: 2.20

The 10 bits per channel shows that the monitor can accept a 10-bit signal. This indicates that the monitor supports 10-bit color input. Do be aware that there are TN panels with support for 10-bit input even though they are limited to 6-bit actual display output. You can send them 10-bit color and the display will look fine (for TN panels, anyway) but the color won't actually be 10-bit or HDR. You can usually tell if a monitor has true 10-bit support or not by it's price-tag (and spec-sheet).

The second line you want to look for is one which says Pixel depth =. It will either say

(II) AMDGPU(0): Pixel depth = 24 bits stored in 4 bytes (32 bpp pixmaps)

if you are using 8-bit OR, if you are into 10-bit:

(II) AMDGPU(0): Pixel depth = 30 bits stored in 4 bytes (32 bpp pixmaps)

Major Problems To Be Aware Of

Most software works just fine in a 10-bit color X environment but there are some issues with several programs.

Steam Doesn't Work

Steam-with-10bit-color-enabled.jpg
Steam when 10-bit color enabled on Linux. It doesn't work as of March 2021, it just dies with a "Segmentation fault".

The Steam game store and launcher says "failed to create drawable" before it dies with a Segmentation fault when 10-bit color is enabled on Linux.

KDE Plasma 5.x.x And The Deepin Desktop Envionment Won't Start

The KDE Plasma desktop environment will simply refuse to show a desktop when 10-bit color is enabled. To fix that, run the following command from a console:

echo "export KWIN_OPENGL_INTERFACE=egl" >~/.config/plasma-workspace/env/use_egl.sh

That is explained here: https://bugs.kde.org/show_bug.cgi?id=423014

The Deepin Desktop environment uses a fork of the kwin window manager KDE Plasma uses. It exhibits the exact same behavior as KDE: The desktop environment does not load and the system gets stuck on a screen with nothing but a mouse-pointer on it. Probably the previous bugfix will work on it, but it needs to be tested.

Chrome and Chromium <=84 Are All Messed Up With 10-bit Color Enabled

Chrome and Chromium prior to version 85 would produce a really messed up window with 10-bit color enabled. It would simply fail to understand that it was in a 10-bit environment and act as if it was in a 8-bit color environment. Here is a screenshot with Firefox on the left and a Chromium on the right, both showing www.gnu.org:

Chromium-can-not-do-10bit-color-on-linux.png
Firefox, on the left, shows the GNU website as it is meant to be seen. Chromoium, on the right, looks a bit.. off.

You may or may not notice that there was a minor problem with using Chrome and Chromium prior to version 85 in X using 10-bit color-depth. Chromium had this problem since forever until it was in no way solved in Chrome/Chromium 85.

Chrome and Chromium >=85 Lack Hardware Acceleration With 10-bit Color Enabled

Chromium-85-with-10-bit-color.jpg
Chromium 85 on a Linux machine with 10-bit color enabled.

Chromium 85 and later versions have entirely different problems with 10-bit color on Linux:

  • Menus and other GUI elements "blink" a dark yellow square half a second before menus and other GUI elements appear. This is noticeable and annoying but it is not the end of the world.
  • All GPU hardware acceleration is disabled. This is a pretty big deal since it's just utterly slow without it.

Vulkan

All Vulkan applications on systems with AMD graphics cards using the Mesa RADV Vulkan driver fail to start with a error message if 10-bit color is enabled.

vulkaninfo will say Vulkan is enabled, existing and that all is well but actual programs trying to use it for anything will fail to start. Running vkmark, or anything else using Vulkan, gives this error:

Error: No suitable Vulkan physical devices found

We have filed a complaint with the Mesa customer service listed as issue #3537.

It is, apparently, possible to make Vulkan run using "hacks". The result of doing that is "psychedelic colors". Sounds kind of nice.

Other Programs

There may be programs beyond Vulkan programs and Chromium/Chrome that have issues when you are using a 10-bit display. Please let us know in the comment section below if you run into any. We haven't. It's just Chromium and Vulkan that are problematic as far as we know.


avatar

Esox

7 months ago
Score 0++
I did it (UbuntuStudio 20.10 2x AMD RX580 GPU and Eizo CH243W display) and then system crashes right after login (black screen with only the mouse pointer).
avatar

Chaekyung

7 months ago
Score 0++

I think the article should reflect that / warn about it.

I do wonder if it's UbuntuStudio OR the desktop environment you are using OR the fact that it is a dual-GPU setup.

What desktop environment are you using? It should be easy enough to check that part. 10-bit works on my box except that Chromium has issues and Vulkan applications don't work, like at all. I'm not aware of any window-manager that uses Vulkan, so I don't think that's it.
avatar

Esox

7 months ago
Score 0++
UbuntuStudio 20.10 uses KDE plasma 5
avatar

Chaekyung

7 months ago
Score 0++
I've confirmed that KDE Plasma shows nothing but the mouse-pointer on other distributions too, it's not just Ubuntu.
avatar

Anonymous (5a2413ec)

5 months ago
Score 0
Suffering same thing with Archlinux and Mesa 21.1. Did the mesa update solve the problem for someone?
avatar

Anonymous (252fcfcb)

4 months ago
Score 0

Kubuntu 21.04

Mesa Gallium driver 21.1.1 - kisak-mesa PPA for AMD Radeon RX 6900 XT (SIENNA_CICHLID, DRM 3.40.0, 5.12.4-051204-generic, LLVM 12.0.0)

KDE PLasma 5.21.4

KDE hangs with mouse pointer showing.
avatar

Anonymous (05e1d73ce2)

4 months ago
Score 0

I think Linux mint cinamon ist best for CMS. Itried now ubuntu 20.04.2 its a lot problem with.

I thing go back to mint.
avatar

Anonymous (fb60b43d56)

2 months ago
Score 0

You can make KDE work with a 30 bit monitor changing the compositor from GLX to EGL, running this: echo "export KWIN_OPENGL_INTERFACE=egl" >~/.config/plasma-workspace/env/use_egl.sh

That is explained here:

https://bugs...gi?id=423014
avatar

Anonymous (a6847f2a90)

one month ago
Score 0
Krita will keep flickering with 10bit enabled.
Add your comment
LinuxReviews welcomes all comments. If you do not want to be anonymous, register or log in. It is free.