Skip to content

Instantly share code, notes, and snippets.

@denji
Forked from null-dev/disable-fb.sh
Created May 14, 2023 16:08
Show Gist options
  • Save denji/150c12243da52a9838a3a2d994df99bd to your computer and use it in GitHub Desktop.
Save denji/150c12243da52a9838a3a2d994df99bd 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