What are you looking for?

Showing results for 
Search instead for 
Did you mean: 

Original topic:

RGB output instead of YCbCr from S8/DeX station to TV?

(Topic created on: 19-07-2019 11:51 AM)
First Poster

I have connected my Galaxy S8 + DeX Station to my TV and the picture quality isn't very good. 


My TV can display 1080p fine, and there are no problems with any other devices any more: the symptoms are the same as what I had with my old MacBook Pro.  The solution was a straightforward fix, forcing it to send RGB output over HDMI instead of YCbCr ( , and doing this made the picture quality perfect. 


Is this something that could be added, or maybe just prioritise RGB if it's available? 

Alan Powel
First Poster

There are some monitors, in my case S8/DeX , that report having YCbCr support when plugged in over HDMI. My AMD Radeon RX 570 Series video card sees this YCbCr pixel format and then prefers that over the RGB pixel format. The result is that fonts, graphics and other visuals are pixelated and not smooth in Ubuntu.

This actually is not just a Linux problem. A similar problem exists on macOS with the same monitor hooked up over HDMI. Basically I have faced this while developing an app, then I have needed another screen for output check. In fact an article by John Ruble on the Atomic Object blog called Fixing the External Monitor Color Problem with My 2018 MacBook Pro attempts to fix the exact same thing.


All of the articles I could find exploring this topic advocate patching the EDID for the monitor. Unfortunately the macOS solution would not work here. Luckily I found a Reddit post that covered how to get it working.

Install Patched EDID

Install the patched EDID (this example uses the pre-patched EDID attached here) and modify GRUB to use the new EDID.

$ sudo mkdir -p /lib/firmware/edid
$ cd /lib/firmware/edid
$ wget

Create initramfs hook to copy the new EDID

$ sudo tee "/etc/initramfs-tools/hooks/edid" > /dev/null <<'EOF'
    echo "$PREREQ"

case $1 in
    exit 0

. /usr/share/initramfs-tools/hook-functions
# Begin real processing below this line
mkdir -p "${DESTDIR}/lib/firmware/edid"
cp -a /lib/firmware/edid/edid.bin "${DESTDIR}/lib/firmware/edid/edid.bin"
exit 0
$ chmod +x /etc/initramfs-tools/hooks/edid
$ sudo update-initramfs -u

Modify the GRUB configuration to use the new EDID

Edit /etc/default/grub and add drm_kms_helper.edid_firmware=edid/edid.bin to the end of GRUB_CMDLINE_LINUX_DEFAULT.

For example:

--- /etc/default/grub	2020-03-19 15:27:24.350222700 -0400
+++ /etc/default/grub	2020-03-19 14:22:58.052179120 -0400
@@ -7,7 +7,7 @@
 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
+GRUB_CMDLINE_LINUX_DEFAULT="quiet splash drm_kms_helper.edid_firmware=edid/edid.bin"
 # Uncomment to enable BadRAM filtering, modify to suit your needs

After saving the changes to /etc/default/grub run sudo grub-mkconfig -o /boot/grub/grub.cfg and reboot.

Creating a Patched EDID

Get Unpatched EDID

Find your current EDID and copy it to the current working directory.

$ sudo find /sys/devices/pci*/*/*/*/*/*HDMI* -name "*edid*" | head -1 | xargs -I{} cp {} edid.bin

Compile wxEDID Utility

$ sudo apt install -y libwxgtk3.0-dev
$ wget
$ tar xvf wxedid-0.0.19.tar.gz
$ cd wxedid-0.0.19
$ ./configure --prefix=$HOME
$ make
$ make install

Run the wxEDID Utility


Edit/Patch EDID with wxEDID Utility

  1. Open the edid.bin file with wxEDID
  2. Find SPF: Supported features -> vsig_format -> replace 0b01 wih 0b00
  3. Find CHD: CEA-861 header -> change the value of YCbCr420 and YCbCr444 to 0
  4. Find VSD: Vendor Specific Data Block -> Change the value of DC_Y444 to 0
  5. Click Option on the panel-> Recalc Checksum
  6. Save patched EDID and exit

Hope this will help everyone.