Ubuntu 18 Errata
Overcoming error: no video mode activated
A bug certainly. There are at least 2 reasons. It's connected to the use of GRUB_TIMEOUT_STYLE
part of the fix is to unset this as described here
#GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT_STYLE=menu
GRUB_TIMEOUT=10
Additionally, there is a scan of menu fonts that happen during boot, but if the boot partition is different than the /usr partition, then those fonts will not be found causing an error. A workaround is to copy those fonts to /boot
as described in comment #24 of the bug thread
for dir in "${pkgdatadir}" "`echo '/boot/grub' | sed "s,//*,/,g"`" /usr/share/grub ; do
for basename in unicode unifont ascii; do
path="${dir}/${basename}.pf2"
if is_path_readable_by_grub "${path}" > /dev/null ; then
font_path="${path}"
else
continue
fi
break 2
done
done
After performing these updates, run update-grub
VFIO setup
Setting up a VM using VFIO allows for near full rate use of the GPU and a responsive desktop; desireable. The important aspects include
- hardware that support IOMMU
- a GPU that can be dedicated to the guest
- a configuration that assigs resources, especially by restricting access to the prospective GPU from the host video driver.
Links
- Ubuntu setup discussed but unfortunatly is system wide rather than via boot option in Ubuntu 18.04 – VFIO PCIe Passthrough
- Arch-linux analog setup and docs in PCI passthrough via OVMF and Can I load the vfio-pci module using a kernel parameter? reddit question
Example /etc/grub.d/40_custom entry
Assign and reserve a GPU via boot option. Assumes a specific partitioning setup; LVM and a root LV in a vg0 VG, AMD hardware; those specifics are not required, the important part is turning on iommu, and assigning vfio ids as kernel arguments.
menuentry "VFIO" {
root="hd0,gpt2"
linux /vmlinuz-4.15.0-96-generic root=/dev/mapper/vg0-root ro amd_iommu=on iommu=pt kvm_amd.npt=1 kvm_amd.avic=1 vfio-pci.ids=10de:1b80,10de:10f0
initrd /initrd.img-4.15.0-96-generic
}