Force Framebuffer Video Mode at Boot
In a modern KMS system the video output may be forced so that there is an output when a monitor is NOT connected. This can be useful for cheap output devices that are often connected to Raspberry Pi.
Kernel Command Line Option:
In Ubuntu (the file to edit is /etc/default/grub
):
vi /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="video=HDMI-A-1:1920x1080@60:D"
update-grub
Weston
To discover the modeline one must use an edid decoder tool:
Find the edid file for the connected monitor:
find /sys/devices/ |grep edid
/sys/devices/pci.../drm/card1/card1-HDMI-A-1/edid
In this case I know my monitor is connected to HDMI-A-1, there may be other connectors but if nothing is connected the edid file will be empty.
cat /sys/devices/pci.../drm/card1/card1-HDMI-A-1/edid |edid-decode -X
...
Detailed Timing Descriptors:
DTD 1: 3840x2160 30.000000 Hz 16:9 66.330 kHz 265.320000 MHz (477 mm x 268 mm)
Modeline "3840x2160_30.00" 265.320 3840 3888 3920 4000 2160 2163 2168 2211 +HSync +VSync
...
The -X
instructs edid-decode
to output Xorg modelines, the modeline for 4K
in the above output is:
265.320 3840 3888 3920 4000 2160 2163 2168 2211 +HSync +VSync
Thus the ~/.config/weston.ini
is:
[core]
idle-time=0
[shell]
locking=false
[output]
name=HDMI-A-1
# "3840x2160_30.00"
mode=265.320 3840 3888 3920 4000 2160 2163 2168 2211 +HSync +VSync
force-on=true