Jump to content

PCIE Passthrough to use GPU in virtual machine

Xa3phod

Hey folks. I have Ubuntu on an X58 system. I would like to run Windows in a virtual machine and be able to access my GTX 1060 instead of using the virtualized graphics system which you cannot game on. I know a lot of games work in Linux, mine does not, unfortunately.

For the uninitiated, how do you set it up so you can pass through the GPU to the virtual machine? I would like the virtual machine to have native access to the GPU.

Thanks for the help.

Link to comment
Share on other sites

Link to post
Share on other sites

X58 does not fully support PCIe passthrough AFAIK.

 

It can be done on pretty much all AM3+ AMD systems and newer Intel LGA 1151 and newer Xeons and Non-K i7's.  Intel tends to lock features like this down to make you spend more money.

Link to comment
Share on other sites

Link to post
Share on other sites

I can't speak 100% to how this situation would work, but for my ESXi hypervisor I have VT-d enabled and then am able to pass PCI-e devices through via a GUI. I am not sure if X58 supports VT-d tho...... Its sorta a newer technology. I think x58 server boards do have it, but I am not sure about consumer boards, and I think this would be required.

 

I do have a X58 P6T Deluxe V2 I could look for it on, but honestly a google search would be faster than me turning my testbench on ahah. And if its a diff mobo, it may not be that useful anyways.

 

I would check this first, then go from there down the Linux rabbit hole to get it working virtualized there.

Rig: i7 13700k - - Asus Z790-P Wifi - - RTX 4080 - - 4x16GB 6000MHz - - Samsung 990 Pro 2TB NVMe Boot + Main Programs - - Assorted SATA SSD's for Photo Work - - Corsair RM850x - - Sound BlasterX EA-5 - - Corsair XC8 JTC Edition - - Corsair GPU Full Cover GPU Block - - XT45 X-Flow 420 + UT60 280 rads - - EK XRES RGB PWM - - Fractal Define S2 - - Acer Predator X34 -- Logitech G502 - - Logitech G710+ - - Logitech Z5500 - - LTT Deskpad

 

Headphones/amp/dac: Schiit Lyr 3 - - Fostex TR-X00 - - Sennheiser HD 6xx

 

Homelab/ Media Server: Proxmox VE host - - 512 NVMe Samsung 980 RAID Z1 for VM's/Proxmox boot - - Xeon e5 2660 V4- - Supermicro X10SRF-i - - 128 GB ECC 2133 - - 10x4 TB WD Red RAID Z2 - - Corsair 750D - - Corsair RM650i - - Dell H310 6Gbps SAS HBA - - Intel RES2SC240 SAS Expander - - TreuNAS + many other VM’s

 

iPhone 14 Pro - 2018 MacBook Air

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Xa3phod said:

My Mobo has VT-d as an option and it is enabled. Asus Rampage III Formula with a Xeon X5690.

 

If the hardware/firmware support is there you will need to find a guide for the software solution you are using.  Also hope that the IOMMU groups make some kind of sense.

Link to comment
Share on other sites

Link to post
Share on other sites

Bear in mind, unless you lock out CPU cores to the VM exclusively you WILL have latency issues, which will likely result in sound issues and stuttering in games.

As such, I still dual-boot and just use the VM for occasional gaming or when I want to test something on Windows without rebooting.

Router:  Intel N100 (pfSense) WiFi6: Zyxel NWA210AX (1.7Gbit peak at 160Mhz)
WiFi5: Ubiquiti NanoHD OpenWRT (~500Mbit at 80Mhz) Switches: Netgear MS510TXUP, MS510TXPP, GS110EMX
ISPs: Zen Full Fibre 900 (~930Mbit down, 115Mbit up) + Three 5G (~800Mbit down, 115Mbit up)
Upgrading Laptop/Desktop CNVIo WiFi 5 cards to PCIe WiFi6e/7

Link to comment
Share on other sites

Link to post
Share on other sites

My cpu is a 6 core 12 thread, I put 4 threads and 8GB of ram to the VM. I will check the guide, thanks!

Link to comment
Share on other sites

Link to post
Share on other sites

I have not messed with gaming on Linux as of yet. However I have messed around with pasthrough on NVIDIA GPUs (admittedly with ESXI). What hypervisor are you using? PCI passthough on NVIDIA hardware AFAIK isn't the issue as much as setting up the driver. In my experience, if you are using a 10 series NVIDIA consumer card you have to hide the fact you're using it in a VM to make the driver work at all.

There's no place like ~

Spoiler

Problems and solutions:

 

FreeNAS

Spoiler

Dell Server 11th gen

Spoiler

 

 

 

 

ESXI

Spoiler

 

 

 

 

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×