If Ubuntu sees the HDMI connector as disconnected when using a KVM, force-enable the HDMI output with a fixed resolution.
Check the available DRM connectors:
ls /sys/class/drm/Typical HDMI connectors are:
card0-HDMI-A-1
card0-HDMI-A-2
If possible, connect the monitor directly first to determine which HDMI connector corresponds to the physical port being used.
Check:
cat /sys/class/drm/card0-HDMI-A-1/status
cat /sys/class/drm/card0-HDMI-A-1/modesWith the problematic KVM, it may show:
disconnected
and no modes.
Edit:
sudo nano /etc/default/grubFind:
GRUB_CMDLINE_LINUX_DEFAULT=""
and change it to:
GRUB_CMDLINE_LINUX_DEFAULT="video=HDMI-A-1:1920x1080@60e"
Replace HDMI-A-1 with HDMI-A-2 if that is the connector actually in use.
The trailing e is important: it forces Linux to enable the connector even when the KVM causes it to be detected as disconnected.
sudo update-grubsudo rebootUbuntu should now output:
1920x1080 @ 60 Hz
through the KVM even if HDMI hot-plug detection is broken.
cat /sys/class/drm/card0-HDMI-A-1/status
cat /proc/cmdlineThe kernel command line should contain:
video=HDMI-A-1:1920x1080@60e
This workaround only takes effect once the Linux kernel starts.
If the MSI BIOS/UEFI still produces an unsupported video mode through the KVM, the Linux setting cannot fix that. For BIOS access, connect the monitor directly or use a KVM with working EDID/HPD emulation.