Raspberry Pi Force Boot HDMI Mode and Resolution

This command to store current EDID data to file:

sudo /opt/vc/bin/tvservice -d /boot/edid.dat

And add this line below to /boot/config.txt to load the EDID data above on boot, ignore EDID data from monitor

hdmi_edid_file=1

so RPi will boot with mode and resolution correctly even when monitor is off (or slowly starting on), this is useful when power blackout, the monitor starting slowly and is not detected by RPi correctly and fallback to VGA resolution automatically

Source:
– https://www.raspberrypi.org/forums/viewtopic.php?p=173430#p173430