Deep Color Depth Support
Introduction
Ubuntu introduces 10-bit deep colour from 20.04, which is mentioned in 20.04 release note. Sometimes it can't work correctly because of the poor bandwidth support of the pipeline from source to sink. The poor bandwidth support pipeline can be caused by any component in between. ex: faulty HDMI/DP cable, bad HDMI/DP port, or any dongle or converter which can't deliver such good signal quality. The page intends to provide an approch to workaround or diagnose when the external display is not working porperly.
Issue
Here is the issue has been reported No signal on 4K 60Hz DisplayPort monitor by default Some users complaint it and would like to request to fallback to lower colour depth by default Add module option to disable 12bpc at boot-time
Diagnose
When you encounter the problem connect to the external display
1. Retrieve the mode info and display info of X
$ xrandr --verbose
2. Retrieve the info and display info of drm driver, takes i915 for example
- output:
$ sudo cat /sys/kernel/debug/dri/<card number>/i915_display_info
CRTC:152:pipe B]:
- uapi: enable=yes, active=yes, mode="": 0 533250 3840 3888 3920 4000 2160 2163 2168 2222 0x0 0x9 hw: active=yes, adjusted_mode="": 0 533250 3840 3888 3920 4000 2160 2163 2168 2222 0x0 0x9
pipe src size=3840x2160, dither=no, bpp=24 num_scalers=2, scaler_users=0 scaler_id=-1, scalers[0]: use=no, mode=0, scalers[1]: use=no, mode=0 [ENCODER:282:DDI B]: connectors:
[CONNECTOR:283:HDMI-A-1]
3. Check the bpp(bits per pixel) to identify the currently used color depth, the bpp can be divided by 3 to get bpc(bits per color)
e.g. bpp=24 => bpc=8
4. You can also roughly calculate the bandwidth requirement for the pipeline, and check if the cable or any component between the connection can handle it.
- The mapping of the Modeline expression: The bandwidth requirement can roughly calculated by htotal * vtotal * bpp * Vfresh.
Modeline syntax: "mode name" Vfresh pclk(kHz) hdisp hsyncstart hsyncend htotal vdisp vsyncstart vsyncend vtotal type flags
5. You can self-diagnose the system setup to see if it is similar to the problem, it can be easily achieved by xrandr command
6. You can try to lower the bpc by xrandr
$ xrandr --output {your screen} --set "max bpc" 8 |
Plan/Discussion
In order to offer a better user experience on compatibility, we have several plans on-going.
- adding kernel quirk to set max bpc to 8 for faulty typec-to-hdmi dongles:
- set default max bpc = 8 by default in Xsession script and offer user the capability of adjusting the bpc in g-c-c.
https://gitlab.freedesktop.org/xorg/xserver/-/issues/1066
- This is a nice to have plan. Setting default max bpc = 8 to provide the best capability. Think of one scenario, a speaker get his Ubuntu machine onto stage, plug the HDMI or DP projector which works well on latest speaker who is using Windows machine. Then, he get dark screen or audio function lost... If we set default mac bpc = 8, we can avoid this case.
https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1108
- This is a friendly design to provide a way that user can adjust max bpc based the quality on their display pipline.