GPU Passthrough to Linux Plex server

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

Expansion

New Member
Jan 20, 2020
6
0
1
Hello

so i got a ESXI 6.5 Server where i try to passthrough a Quadro P400 to a linux VM for a PLEX media server but i cant find a way to get it to work.

if i use the normal windows trick of hypervisor.cpuid.fv0 = false it wont boot.

i tried ubuntu and centos but no luck.
i don't know if my Google Magic is bad but cant find anyone else that has the same problem.

 

besterino

New Member
Apr 22, 2017
27
7
3
47
Have you tried in advanced settings "pciPassthru0.msiEnabled = FALSE"? In case you have more than one passthrough'ed device, be sure that the number ("0" behind "pciPassthru") matches the ID of your GPU.

Also, that expression above "hypervisor.cpuid.fv0" is incorrect. It must read "hypervisor.cpuid.v0" (i.e. no "f").
 

Expansion

New Member
Jan 20, 2020
6
0
1
i tried that but when running nvidia-smi i get Unable to determine the device handle for GPU 0000:0B:00.0: Unknown Error
and what i read that means the same as error 43 on windows

and yea sorry i did a typo
 

besterino

New Member
Apr 22, 2017
27
7
3
47
Hmm. I have only experience with Windows VMs regarding GPU passthrough.

You could try editing passthru.map and for the NVIDIA entry (10de ffff...) change „bridge“ to „link“ or „d3d0“. For Windows as guest OS that’s not required on my 6.5 host for a P400 - but from my experience everything highly depends on actual ESXi version as well as specific hardware (Mainboard / BIOS / GPU) used. For example, I had trouble to get passthrough working with 6.5U3 with settings that worked flawlessly with 6.5 and 6.5U2...

Also try other VM BIOS settings - if you used legacy BIOS so far, try setting up a VM with EFI BIOS (and vice versa).

As you can see, I am also only guessing here - since it works with Windows it should also work with Linux though ...somehow...

EDIT:

According to some information, further advanced settings may be required, i.e. "pciPassthru.64bitMMIOSizeGB=64" and "pciPassthru.use64bitMMIO=TRUE" (personal note however, for me these never made a difference).

Other people were tinkering with pciHole.start = "2048" for VMs with more than 2GB allocated RAM. Again, this didn't make a difference in my own experiments.
 
Last edited:

superempie

Member
Sep 25, 2015
82
10
8
The Netherlands
List your hardware specs. Might be helpfull.
Determine if your system supports ACS.
Check your vmkernel.log for ACS messages or anything else concerning the device. Post them here.
Did you check if the PCI-E lanes connect directly to the CPU or chipset? Check motherboard manual. Chipsets might not work.
Did you try the vmkernel.boot.disableACScheck parameter?
For me, 6.7.0u1 build has worked on old SuperMicro X9 platforms(only checked Linux with GPU enabled BOINC, ACS parameter not neeeded) and on my new X570 system (Gigabyte Aorus Master, F10 BIOS, ACS parameter needed). I could passthrough an ASUS GTX1080Ti Turbo to a Win10 VM and an EVGA GTX1070 to a Win10 VM, just had issues with USB (lack of passthrough possibilities for the controllers). Didn't test any further, because I'm going to try the Linux route now, but wanted to share some experience of my own after reading this. Only used the hypervisor parameter. Did also do some with the svga parameter if I recall correctly.
Still have the installation active, so could check if I have time.

Edits: typo's and some extra info
 
Last edited:

Expansion

New Member
Jan 20, 2020
6
0
1
So my specs are

Mobo: Supermicro X9SRL-F
CPU: Intel(R) Xeon(R) CPU E5-2648L v2 @ 1.90GHz
Memory: 128 GB DDR3
GPU1: Quadro P400
GPU2: GTX 1060 TI 6GB

so i tried stuff but cant get linux to work
on ubuntu it gets stuck at: 'x86: Booting SMP configuration:' after i set 'hypervisor.cpuid.v0 = false'

With the parameters above i cant get it to boot and when set 'hypervisor.cpuid.v0 = true' its gives the error 'Unable to determine the device handle for GPU 0000:0B:00.0: Unknown Error' when i run 'nvidia-smi'
 

IamSpartacus

Well-Known Member
Mar 14, 2016
2,516
650
113
Man this makes me more thankful I migrated off ESXi and a Linux VM for Plex. This whole process would be super simple if running Plex in a docker on something like Unraid as you don't even need to pass the GPU through.

I assume you are running ESXi for other homelab purposes?
 

Expansion

New Member
Jan 20, 2020
6
0
1
well im thinking of switching to something like proxmox but i kinda want to use ESXI for a study that im going to folllow
but like i want to run every thing off one box and hoped i could do hardware transcoding on plex but damm those driver issues
 

Shane

New Member
Aug 4, 2018
10
1
3
I run a very similar system with no issues passing through that exact card. I don't believe I had to do anything odd on the hypervisor. Once into linux I had to install the hacked driver that unlocks more than 2 transcodes and the nvidia package.

ESXI 6.7U2 on Supermicro X9DRi-LN4F+ running dual E5-2650L V2 passing though a Quadro P400 to a ubuntu linux VM

upload_2020-1-22_10-2-45.png

upload_2020-1-22_10-4-37.png

upload_2020-1-22_10-3-28.png
 

superempie

Member
Sep 25, 2015
82
10
8
The Netherlands
If it might help you (or others), here is a quick summary of the steps I took on 6.7.0u1 on a SuperMicro X9-DAi or X9-DRG-QF (don't remember anymore which one I used)/2x Xeon E5-2670 (SR0KX)/GTX960 and later GTX1060 (both ASUS). I also don't recall the exact Ubuntu version I used. Probably 18.x.
I quickly put this together from one log and added some more from another. Also had to translate some from Dutch, so forgive me any mistakes you might see and no formatting. Might be that the P400 behaves differently because if you have the right Quadro, you should be able to pass it through more easily. Unfortunately no experience with those.

Put GPU and audio device in passthrough and reboot
Check vmkernel.log for something like this:
2020-01-01T14:48:42.190Z cpu23:2097684)PCIPassthru: PCIPassthruAttachDev:222: Attached to device 0000:0e:00.4
2020-01-01T14:48:42.190Z cpu23:2097684)Device: 327: Found driver PCIPassthru for device 0x5ded43054de1cbc2

Build Ubuntu VM.
Start VM without assigning GPU + audio device
Update:
# apt-get update
# apt-get upgrade
# apt-get dist-upgrade

Adjust grub (/etc/default/grub) :
GRUB_CMDLINE_LINUX_DEFAULT="nomodeset"
Update grub:
# update-grub

Set fixed IP or reserve DHCP address
Install SSH server

Blacklist nouveau and snd_hda_intel:
# vi /etc/modprobe.d/blacklist.conf
Add at the end:
blacklist nouveau
blacklist snd_hda_intel

Shutdown VM:
# shutdown -h 0

Adjust VM config:
Software Questions / Info:
- Host Platform
- Host (click on host name)
- Configure
- Hardware
- PCI Devices
- DirectPath I/O PCI Devices Available to VMs
- Should show both the graphics card and audio devices with status as "Available"
- Graphics
- Graphics Devices
- Shows the GPU with Active Type "Direct" and Configured Type "Shared Direct"
- VMs associated with the graphics device
- Shows the VM names with the GPU added to the Guest config.
- Host Graphics
- Edit Host Graphics Settings
- Default Graphics Type - Shared Direct
- Shared passthrough GPU assignment policy - Spread VMs across GPUs (best performance)

- VM Guest Settings (select VM to add the passthrough device with the VM powered off)
- Click Actions - Edit Settings
- Click "Add New Device"
- Select PCI Device and it should automatically add the GPU to the list
- Click on Edit Settings
- Select Advanced
- Click "Edit Configuration"
- Add two entries
svga.present FALSE
hypervisor.cpuid.v0 FALSE

Add GPU + corresponding audio device to VM
Remove VMware VGA
Start VM
Log in with SSH
Check with lspci if the device is added:
# lspci | grep NVIDIA
<GPU and audio device should be listed>

# apt install software-properties-common
# add-apt-repository ppa:graphics-drivers/ppa
# apt update

Find latest version of NVidia driver. In my case it was 410 at the time I documented it.
# apt search nvidia
# apt search nvidia | grep 410

# apt-get install nvidia-driver-410

# reboot

Check logs:
# less /var/log/syslog

Check if driver works:
# nvidia-smi
Sun Dec 16 17:09:17 2018
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 410.78 Driver Version: 410.78 CUDA Version: 10.0 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX 106... Off | 00000000:0B:00.0 Off | N/A |
| 0% 29C P5 9W / 132W | 0MiB / 6078MiB | 0% Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+
 

Expansion

New Member
Jan 20, 2020
6
0
1
i tried your steps but still wont boot linux.
but i still run 6.5 and think i need to update to 6.7 and ill try that next