Skip to content

Instantly share code, notes, and snippets.

@2600box
Forked from null-dev/disable-fb.sh
Created November 15, 2021 08:45
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 2600box/e852a2df9d0a97dc02c0f6d70bcb2e7a to your computer and use it in GitHub Desktop.
Save 2600box/e852a2df9d0a97dc02c0f6d70bcb2e7a 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