Skip to content
konoDiodaa edited this page Sep 21, 2023 · 3 revisions

Welcome to the Laptop-GPUPassthrough wiki!

Introdution

All thanks to the many communities and the people out there that take their time and care to test and document about stuff like, it was long therefore i could finally achieve(mostly) what i wanted to wished to achieve for a long time.

Some of the most relevant references out there as of today:

In this guide i will not go too much with details and whatnot, i will however still tell where to go to in case no aditional steps are needed from my end and then tell to continue, for now this will be a bit more barebones. Bear in mind if in case there really difficulties with configuring or just issues somewhere, as a last resort at least only reach to devs if necessary, my guide is just something made by some hobbyist guy that wanted to share his knowledge a little and help people out too.

Getting Started:

1. Setting up the machine and linux for Virtualization

To get started we need to configure the machine and the linux distro to have virtualization enabled and IOMMU enable, for virtualization go to the Bios/UEFI firmaware settings and whenever it says intel virtualization technology or otherwise VT-x and VT-D, on intel cpu systems and for AMD cpu systems, SVM,or i supose IOMMU and AMD-V, tick all those to enabled, in case these don't exist, options can still be enabled don't worry, but at least make sure there is cpu support for the virtualization options.

Now for the linux system, we are gonna need to set the procedures that are show in the RisingPrim's guide until step 5 or we set our virtual machine.

2. Installing and configuring modules for the dGPU [Supergfxd].

Here in this tutorial its going to be used a tool from the asusctl repo, supergfxctl, its an amazing tool that was build originally to work on asus machines, but due to gladly most laptops working similarly in manners when it comes to nvidia gpu, how drivers are set and a more or less standardized concept, supergfxctl like other available modules works for most/if not all nvidia laptops. It also supports VFIO mode OOTB, so no need for complicated configurations, just a little getting used to and done.

Please check the repo here Supergfxctl, to follow instructions how to install and get it running. If when installing you see [error 101 ](make: *** [Makefile:77: build] Errore 101), then try to install libudev0 libudev1 libudev-dev then you should have success installing. After getting installed and setup from the repo then just go to /etc/supergfxd.conf and set vfio_enable to true, like this. { "mode": "Hybrid", "vfio_enable": true, "vfio_save": false, "always_reboot": false, "no_logind": false, "logout_timeout_s": 180, "hotplug_type": "None" } then restart the service with sudo systemctl restart supergfxd.service. Now supergxctl -m should output all the available mode, that said its better to use lspci -v to check if the dGPU is bound to vfio. But first from Hybrid change to Integrated supergxctl --mode Integrated or supergxctl --m Integrated, it will probably ask you to log out, log out, but then reboot otherwise it wont function properly at least from my experience(reboot less is possible, as of today i did not test it tho, just yet!). After rebooting log in, and supergxctl --mode Vfio or supergxctl --m Vfio, it normally just says it switched, i still reboot or at least log out one more time here, to make sure there wont be issues. From there check if its bound with lspci -v if the address from the GPU says something like "kernel driver in use : vfio" then you are good to go. Assuming you have the VM already with all the current configs, and backend stuff like libvirt and qemu set up we now should just need to add the GPU ids.