Skip to content

Instantly share code, notes, and snippets.

@null-dev
Created January 7, 2021 06:50
Show Gist options
  • Save null-dev/46f6855479f8e83a1baee89e33c1a316 to your computer and use it in GitHub Desktop.
Save null-dev/46f6855479f8e83a1baee89e33c1a316 to your computer and use it in GitHub Desktop.
Disable efifb at runtime
#!/usr/bin/env bash
# 1. Download and install the QEMU hook helper from here: https://github.com/PassthroughPOST/VFIO-Tools
# 2. Place this file in /etc/libvirt/hooks/qemu.d/NAME OF YOUR VM/prepare/begin/disable-fb.sh
# 3. Make disable-fb.sh executable.
VM_NAME="$1"
echo "libvirt-qemu disable-fb: Disabling efi-framebuffer to prepare to pass GPU to VM $VM_NAME" > /dev/kmsg 2>&1
echo "efi-framebuffer.0" > /sys/bus/platform/devices/efi-framebuffer.0/driver/unbind
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment