Some monitors don’t properly report their capabilities (EDID - Extended Display Identification Data) to Linux systems during early boot, causing incorrect resolutions or no video output. You can fix this by incorporating custom EDID data into the initrd image.

First, extract the EDID from a working system. Install the required tools:

1
sudo apt install read-edid edid-decode

Extract and verify the EDID:

1
2
sudo get-edid > desktop_edid.bin
edid-decode desktop_edid.bin

Transfer the file to your target system and copy it to the firmware directory:

1
sudo cp desktop_edid.bin /usr/lib/firmware/desktop_edid.bin

Create a hook script to add the EDID firmware to the initrd:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
cat <<EOF | sudo tee /etc/initramfs-tools/hooks/desktop_edid.sh
#!/bin/sh
# Copy local EDID monitor description data

PREREQ=""
prereqs()
{
    echo "\$PREREQ"
}

case \$1 in
prereqs)
    prereqs
    exit 0
    ;;
esac

. /usr/share/initramfs-tools/hook-functions

EDID_DATA="/usr/lib/firmware/desktop_edid.bin"

if [ ! -f "\$EDID_DATA" ]; then
    exit 0
fi

add_firmware "\$(basename \$EDID_DATA)"

exit 0
EOF

Make it executable and regenerate initramfs:

1
2
sudo chmod +x /etc/initramfs-tools/hooks/desktop_edid.sh
sudo update-initramfs -u -v

Configure the kernel to use the custom EDID. For GRUB, edit /etc/default/grub and add to GRUB_CMDLINE_LINUX:

1
drm.edid_firmware=edid/desktop_edid.bin

Or for specific connectors:

1
video=HDMI-A-1:D drm.edid_firmware=HDMI-A-1:edid/desktop_edid.bin

Update GRUB and reboot:

1
sudo update-grub

Your display will now use the correct EDID from early boot, ensuring proper resolution and video output.


Resources: