win amd GPU passtrough

This commit is contained in:
Dobromir Popov
2025-11-20 10:58:56 +02:00
parent 8c46e95800
commit 23b4e1a8ee
7 changed files with 512 additions and 2 deletions

View File

@@ -0,0 +1,43 @@
#!/bin/bash
# Fix GRUB IOMMU conflict - remove amd_iommu=off that's blocking the passthrough
set -e
if [ "$EUID" -ne 0 ]; then
echo "Please run as root: sudo $0"
exit 1
fi
echo "=== Fixing GRUB IOMMU Configuration ==="
echo ""
GRUB_FILE="/etc/default/grub"
# Backup
cp "$GRUB_FILE" "$GRUB_FILE.backup.$(date +%Y%m%d-%H%M%S)"
echo "✓ Backup created"
# Remove the conflicting amd_iommu=off
sed -i 's/ amd_iommu=off//' "$GRUB_FILE"
echo "✓ Removed amd_iommu=off from GRUB config"
echo ""
echo "New GRUB_CMDLINE_LINUX_DEFAULT:"
grep "GRUB_CMDLINE_LINUX_DEFAULT" "$GRUB_FILE"
echo ""
# Update GRUB
echo "Updating GRUB..."
update-grub
echo ""
echo "=== Fix Complete ==="
echo ""
echo "⚠️ REBOOT NOW to apply changes: sudo reboot"
echo ""
echo "After reboot, verify with:"
echo " ./verify-gpu-passthrough.sh"