[SOLVED] GPU Passthrough

MadMonkey

New Member
Jan 20, 2022
22
0
1
37
Hello everyone

I ask for help here because i don't know what i can do and i hope that there are people here who could help me for sure.

My components:

CPU:
Intel(R) Core(TM) i5-7600K CPU @ 3.80GHz
GPU:
VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X/590]

RAM 32GB

Software:
Virtual Environment 7.1-7, without key

i did all that say here to make the PCI passthrough - https://pve.proxmox.com/wiki/Pci_passthrough

In a Virtual machine Linux, detect the pci when turn on with this config
1642703685092.png

i left the Primary GPU off to get access through console
1642703787899.png
Here the problem is that i have connected two monitor to this GPU and not show anything about the virtualmachine, the monitor is all black, not is of only not show anything.

In a windows virtual machine i can access throuhg rdp, install all drivers and follow a tutorial to select the driver installed for display, in AMD folder, but you can see as show me the device with warnings, and go too slow i don't know why.

1642705304103.png


I don't know can i make that the image for VM go through the monitor, please can anyone help me?

I want to make this works to buy a better pc, with a very good CPU, install proxmox to build a nice lab an a VM for gaiming too,

if you need somtehing more please don't hesitate to tell me

Thanks
 

Attachments

  • 1642704752778.png
    1642704752778.png
    17.6 KB · Views: 13
  • 1642705080016.png
    1642705080016.png
    16.1 KB · Views: 13
AMD GPU's for that generation have problems resetting properly for passthrough to a VM. You might need to use vendor-reset.
Alternatively, don't use this GPU for booting the Proxmox host (make sure to boot using the Intel integrated GPU built into the CPU) , blacklist amdgpu and/or early bind the GPU to vfio-pci.
 
AMD GPU's for that generation have problems resetting properly for passthrough to a VM. You might need to use vendor-reset.
Alternatively, don't use this GPU for booting the Proxmox host (make sure to boot using the Intel integrated GPU built into the CPU) , blacklist amdgpu and/or early bind the GPU to vfio-pci.
Thanks for your reply avw, i had not done the vendor-reset and the bind the GPU to vfio-pci, now i've done and i have similar problems.
The monitor show things until the /dev/mapper/pve-root: bla bla bla. when i turn on the pc, when i started a VM the monitor went black, now the words are there and appear and a underline flashing.
 
That error is usually because the GPU is in use before starting the VM. Can you start the system using another GPU?
If you have only one GPU and you are booting the Proxmox host with UEFI, try running this command as root on the Proxmox host console before starting the VM: echo "efi-framebuffer.0" >/sys/bus/platform/devices/efi-framebuffer.0/driver/unbind. Note that you cannot use the Proxmox host console after running that command!
 
Finally work, only in windows virtual machine, not in linux VM, y put this lien in the grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on iommu=pt video=vesafb:eek:ff video=efifb:eek:ff"
and works, bot not work on linux VM...

Abaout the other GPU, i have th CPU gpu but i don't know how obligate proxmox to use that...
I've tried to do that you said but /sys/bus/platform/devices/efi-framebuffer.0/driver/unbind not exist, should I create ti?

I don't know why linux VM not work an window VM works, i though is going to be easy that works in linux than windows...
 
Last edited:
cho "efi-framebuffer.0" >/sys/bus/platform/devices/efi-framebuffer.0/driver/unbind is not needed when you already have video=efifb:off.
The vendor-reset of the GPU looks good and very similar to other Polaris 10 GPUs.

If you want Proxmox to boot with the integratel GPU of your CPU, you need to select it in the BIOS of your motherboard. Maybe it is in the motherboard manual?

It is indeed strange that this GPU works in a Windows VM but not a Linux VM. Can you share both VM configuration files (from the /etc/pve/qemu-server/ directory)? What GNU/Linux distribution are you running inside the VM?
 
Sure, this is a Windows VM

Code:
bios: ovmf
boot: order=scsi0;net0
cores: 4
efidisk0: local-lvm:vm-100-disk-1,efitype=4m,pre-enrolled-keys=1,size=4M
hostpci0: 0000:01:00,pcie=1,x-vga=1
machine: q35
memory: 16386
meta: creation-qemu=6.1.0,ctime=1641632777
name: Windows10-1
net0: e1000=5A:27:81:DE:73:A9,bridge=vmbr0,firewall=1
numa: 0
ostype: win10
scsi0: local-lvm:vm-100-disk-2,size=320G
scsihw: virtio-scsi-pci
smbios1: uuid=555aa3e2-5127-4ce9-9868-e54cf682bd4b
sockets: 1
unused0: local-lvm:vm-100-disk-0
usb0: host=0bda:8771,usb3=1
usb1: host=1017:5002,usb3=1
usb2: host=258a:0017,usb3=1
usb3: host=0f0d:0104,usb3=1
usb4: host=1b1c:0a1a
vmgenid: 96f70699-ebd5-43ae-9b6d-475578a8d1a7

An this is a linux VM config

Code:
bios: ovmf
boot: order=scsi0;net0
cores: 4
efidisk0: local-lvm:vm-900-disk-0,efitype=4m,pre-enrolled-keys=1,size=4M
hostpci0: 0000:01:00,pcie=1
machine: q35
memory: 6048
meta: creation-qemu=6.1.0,ctime=1642840054
name: Test
net0: virtio=1A:A1:3C:99:88:E0,bridge=vmbr0,firewall=1
numa: 0
ostype: l26
scsi0: Cosas:900/vm-900-disk-0.qcow2,size=200G
scsihw: virtio-scsi-pci
smbios1: uuid=4bbcf169-0079-428b-bed9-8087c054fec2
sockets: 1
usb0: host=258a:0017,usb3=1
usb1: host=1017:5002,usb3=1
vmgenid: 9f8b3748-62f9-4f96-a906-45945b214abf

Thank for help

about "If you want Proxmox to boot with the integratel GPU of your CPU, you need to select it in the BIOS of your motherboard. Maybe it is in the motherboard manual?" - Then i prefer not do that because i have other disk with a windows OS, when i get proxmox works perfectly i'll can do the change
 
about "If you want Proxmox to boot with the integratel GPU of your CPU, you need to select it in the BIOS of your motherboard. Maybe it is in the motherboard manual?" - Then i prefer not do that because i have other disk with a windows OS, when i get proxmox works perfectly i'll can do the change
Maybe this change can make Proxmox work perfectly? Please just try it once and you can undo the change after.
 
Maybe this change can make Proxmox work perfectly? Please just try it once and you can undo the change after.
Thanks avw. i've tried but not works, turn the screen on and appear the proxmox boot sceen, but when have to appear the grub screen the screen went black
Thanks a lot for help, is close to work, i feel it
 
Last edited:
lol, finally works i was to change the option primary GPU on, i forgot :). Thanks for help avw.I owe you a beer or what ever you want

To abuse a little more, i have one question, if all works good i want to build a pc to make this i though in a AMD Ryzen9 5900x and a 3060 or 3070 nvida GPU is going to be easier or harder than my configuration? which devices you recommended me?
 
If you want to do passthrough on AMD Ryzen a X570 chipset is best because they have much better IOMMU groups than other chipsets.I think you need a Gigabyte one if you want to be able to choose the primary GPU in the BIOS.
I have better experience with AMD GPUs and the open source drivers on Linux, but other people have NVidia GPUs that work also. I recommend you search this and other forums for reports on good experiences with a particular GPU.
Maybe AMD 5000 series will become cheaper soon when the new AM5 platform becomes available. Currently all GPUs are much too expensive and too hard to get.
 
yes i want use proxmox to virtualized all, and try to have one VM to play videogames. maybe is better get all AMD GPU and CPU. that you say also it's importan the motherboard to make th GPU passthroug? i thing in other CPU because mine CPU is sort to get 3 or 4 VMs ups.

Thank you again for all your help,you were very kind
 
GPU passthrough is easiest when you have two GPUs. Make sure to get a motherboard that has enough connected PCIe lanes for the second GPU, because the first GPU is use to boot and for Proxmox host. Or get a motherboard where you can select which GPU is the first (most cannot do this).
The X570 motherboards are the best for AMD CPU's. You can share the CPU over many VMs but not memory (when using passthrough), so make sure you get enough RAM.
AMD CPUs work fine with NVidia also, but make sure to get a GPU (AMD or NVidia) that is know to work with passthrough. Not only the same kind but also brand and exact type because not all are the same.
 
Thanks far all avw, i take note and try to build a nice pc with this purpose. Thanks i'm going to close this threat if i can :)
 
GPU passthrough is easiest when you have two GPUs. Make sure to get a motherboard that has enough connected PCIe lanes for the second GPU, because the first GPU is use to boot and for Proxmox host. Or get a motherboard where you can select which GPU is the first (most cannot do this).
The X570 motherboards are the best for AMD CPU's. You can share the CPU over many VMs but not memory (when using passthrough), so make sure you get enough RAM.
AMD CPUs work fine with NVidia also, but make sure to get a GPU (AMD or NVidia) that is know to work with passthrough. Not only the same kind but also brand and exact type because not all are the same.
Is it also possible with only one GPU or does the Host OS has to have a GPU?
 
Is it also possible with only one GPU or does the Host OS has to have a GPU?
Proxmox VE can run headless, so it is not impossible. For some people it works fine and in some cases people cannot get it to work. It all depends on the hardware and kernel/driver versions as you can see in various threads on this forum.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!