10-bit Color on Ubuntu AMDGPU Driver


I was having trouble getting my Radeon E9173 to output 10-bit color to my Denon AVR-X4100W receiver and Sony KDL-65W850A TV. This guide will show you how to output 10-bit color using the AMDGPU driver on Ubuntu 22.04 Jammy.

Set DefaultDepth 30

Newer AMD cards support 10bpc color, but the default is 24-bit color and 30-bit color must be explicitly enabled. Enabling it can reduce visible banding/artifacts in gradients.

First, create the file /etc/X11/xorg.conf.d/20-amdgpu.conf:

nano /usr/share/X11/xorg.conf.d/20-amdgpu.conf

Set the DefaultDepth to 30 by inserting the following in your file. You can use anything for the identifier:

Section "Screen"
        Identifier "SonyTV"
        DefaultDepth 30

Section "OutputClass"
     Identifier "AMD"
     MatchDriver "amdgpu"
     Driver "amdgpu"
     Option "EnablePageFlip" "on"
     Option "TearFree" "true"

Under the OutputClass section, I’ve also enabled the options for hardware page flipping and tear-free rendering. These two options are not required for 10-bit color, but you can go ahead and enable them in the file if you want those feautres.

After you’ve saved your file, reboot the computer and then check if 10-bit color is enabled:

cat /var/log/Xorg.0.log | grep -i 'depth\|bits'

Output should look something like this:

[    28.117] (**) AMDGPU(0): Depth 30, (--) framebuffer bpp 32
[    28.117] (II) AMDGPU(0): Pixel depth = 30 bits stored in 4 bytes (32 bpp pixmaps)
[    28.117] (II) AMDGPU(0): Using 10 bits per RGB (8 bit DAC)

Set xrandr max bpc to 10

Find the name of the display port connected to your TV or monitor:

xrandr -q | grep connected

I’m using the DisplayPort to connect to my TV, so I got the following output and my port name is DisplayPort-0:

DisplayPort-0 connected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 1600mm x 900mm
DisplayPort-1 disconnected (normal left inverted right x axis y axis)
HDMI-A-0 disconnected (normal left inverted right x axis y axis)

Use the following command to change the max bpc to 10:

xrandr --output DisplayPort-0 --set "max bpc" 10

To make the command persistent, you’ll need to create or edit the file /etc/X11/Xsession.d/45x11-custom_xrandr-settings:

nano /etc/X11/Xsession.d/45x11-custom_xrandr-settings

Add the command to the file, save, and then exit:

xrandr --output DisplayPort-0 --set "max bpc" 10

That’s it! You’re all done now and your AMD graphics card should be outputting 10-bit color to your TV or monitor!


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.