The goal of this project is to make GPU passthrough on x64 notebooks/tablets as easy and accessible as possible.
To achieve that goal I have written a collection of scripts accessible via mbpt.sh
./mbpt.sh live build
to build it yourself.) ./mbpt.sh auto
set everything up on your exisitng Linux installation. Either way it is 100% automated, no user interaction required:
And there is also a lot of advanced stuff that I managed to fully automate, like:
scripts/utils/manager-specific/
. (For example the project currently supports the package managers dnf
and apt
, if your distro uses pacman
, you have to add a pacman script that can be called the same way as the apt script.)Intel VT-x
/ AMD-V
as well as Intel VT-d
/ AMD's IOMMU
in the BIOS / UEFI.sudo dnf install git -y # Install git
git clone https://github.com/T-vK/MobilePassThrough.git # Clone the project
cd MobilePassThrough # Enter the project directory
./mbpt.sh configure # Create a custom config file interactively (optional)
./mbpt.sh auto # Dependency installation; kernel param config; bumblebee / nvidia driver installation; windows ISO download; reboot to load new kernel params; create a helper iso with drivers and autounattended config for Windows; create and start VM; install Windows in the VM fully unattended; install drivers and looking glass in the VM automatically; check for error 43 automatically and show a warning if it occurs
rdp://192.168.99.2
cd MobilePassThrough # Enter the project directory
cd ./thirdparty/LookingGlass/client/build/ # Enter the directoy containing the looking glass client executable
./looking-glass-client # Run the looking glass client
./mbpt.sh start
$ ./mbpt.sh help
mbpt.sh COMMAND [ARG...]
mbpt.sh [ -h | --help ]
mbpt.sh is a wrapper script for a collection of tools that help with GPU passthrough on mobile devices like notebooks and convertibles.
Options:
-h, --help Print usage
Commands:
auto Automatically run check, setup and install
configure Interactively guides you through the creation of your config file
check Check if and to what degree your notebook is capable of running a GPU passthrough setup
setup Install required dependencies and set required kernel parameters
install Create and install the VM
start Start the VM
live Create / Flash a Live ISO image of this project
vbios Dump the vBIOS ROM from the running system or extract it from a BIOS update
Examples:
# Install required dependencies and set required kernel parameters
mbpt.sh setup
# Check if and to what degree your notebook is capable of running a GPU passthrough setup
mbpt.sh check
# Interactively guides you through the creation of your config file
mbpt.sh configure
# Generate a helper iso file that contains required drivers and a helper-script for your Windows VM
mbpt.sh iso
# Create the VM and install Windows in it (Will overwrite an older instance if one exists!)
mbpt.sh install
# Start the VM
mbpt.sh start
# Create a Live ISO
mbpt.sh live buid
# Flash a Live ISO to the USB drive /dev/sdx
mbpt.sh live flash /dev/sdx
# Print the qemu command that would have been used to start the VM
mbpt.sh start dry-run
# Print the qemu command that would have been used to install the VM
mbpt.sh install dry-run
# Print the libvirt XML that would have been used to start the VM
mbpt.sh start get-xml
# Print the libvirt XML that would have been used to install the VM
mbpt.sh install get-xml
# Dump the vBIOS ROM of the GPU with the PCI address 01:00.0 to ./my-vbios.rom (This will most likely fail)
mbpt.sh vbios dump 01:00.0 ./my-vbios.rom
# Extract all the vBIOS ROMs of a given BIOS update to the directory ./my-roms
mbpt.sh vbios extract /path/to/my-bios-update.exe ./my-roms
Device needs to be (mostly) compatible with Linux.
Note: most Laptops should be these days
At least two GPUs (typically Intel's iGPU and an Nvidia GPU)
Note: If you have Thunderbolt 3, you might be able to use an eGPU. See: https://egpu.io
Note2: Theoretically it's possible to get this to work with only one GPU, but then you wouldn't be able to use your host system directly while running the VM, not to mention the like 50 other issues you'll run into.
CPU needs to support Intel VT-x
/ AMD-V
Note: Unless your notebook is like 10 years old, the CPU should support this.
Note2: If it supports Intel VT-d
/ AMD's IOMMU
it should automatically also support Intel VT-x
/ AMD-V
.
Chipset to support Intel VT-x
/ AMD-V
Note: Unless your notebook is like 10 years old, it should support this.
Note2: If it supports Intel VT-d
/ AMD's IOMMU
it should automatically also support Intel VT-x
/ AMD-V
.
BIOS/UEFI option to enable Intel VT-x
/ AMD-V
must exist or it has to be enabled
Note: Unless your notebook is like 10 years old, it should support this.
Note2: If it supports Intel VT-d
/ AMD's IOMMU
it should automatically also support Intel VT-x
/ AMD-V
.
Possible workaround: Modding your BIOS/UEFI using tools like UEFITool, AMIBCP etc. (See "UEFI / BIOS modding" below)
CPU needs to support Intel VT-d
/ AMD's IOMMU
Note: If you have an Intel CPU, you can check if it's in this list.
Chipset to support Intel VT-d
/ AMD's IOMMU
Note: If your CPU/chipset is from Intel, you search it in this list to check if it supports VT-d.
BIOS/UEFI needs to support Intel VT-d
/ AMD's IOMMU
Possible workaround: Modding your BIOS/UEFI using tools like UEFITool, AMIBCP etc. (See "UEFI / BIOS modding" below)
When using an iGPU + dGPU setup, the iGPU needs to be enabled or the BIOS/UEFI needs to have an option to do so.
Possible workaround: Modding your BIOS/UEFI using tools like UEFITool, AMIBCP etc. (See "UEFI / BIOS modding" below)
The GPU you want to pass through, has to be in an IOMMU group that doesn't have other devices in it that the host system needs.
Possible workaround: You might be able to tear the groups further apart using the ACS override patch, but it's no magic cure, there are drawbacks.
USB Programmer for BIOS/UEFI flashing or unbricking EDID Dummy Plugs for HDMI and Mini DisplayPort can be used to make your dGPU write to the framebuffer so that you can use Looking Glass. (Your dGPU needs to be connected to your external HDMI or Display Port for that to work though... This may be possible with some UEFI/BIOS modding.)
Check out: https://gpu-passthrough.com/
By modding your BIOS/UEFI, you can make features available and change settings that are hidden or non-existent by default. For example: show VT-d settings, show secure boot settings, show muxing related settings and much more. There is a good collection of modding tools on this site here in the BIOS / UEFI tools section.
There are many BIOS modding forums out there with lots of people who are more than willing to help even if you're a complete beginner.
I have been a fan of level one techs for years. Wendell is a huge influance to us all.
Credits to https://github.com/T-vK/MobilePassThrough aka T-vK for starting this off.
Credits to Wendell from Level1Techs for his GPU passthrough guides/videos and Misairu-G for his Optimus laptop dGPU passthrough guide. Without them I would have never even thought about creating this project. Thank you so much!!
Credits to korewaChino for adding support for Ubuntu!
Credits to Cole Robinson for giving me a lot of incredibly valuable hard to find information on virt-install
!
--no-check-certificate
workaround for the win iso downloadRadeon RX Vega M GL