Proxmox (Ryzen) GPU (ATI) passthrough to a existing VM with Debian

xvegax

Member
Aug 12, 2019
38
0
11
41
Alright, this is the rom file size:

Code:
~$ ls -lah /usr/share/kvm/
total 16M
drwxr-xr-x   5 root root   62 Nov 28 01:28 .
drwxr-xr-x 113 root root  113 Sep 28 18:12 ..
-rw-r--r--   1 root root  64K Nov 28 01:18 vgabios-asus-r5-230.rom

I changed back the hostpci0 to hostpci0: 0000:09:00,romfile=vgabios-asus-r5-230.rom into /etc/pve/qemu-server/103.conf and ticked the box "all functions" in the Proxmox webgui.

I now have the installer of the DVD image in the _console of the Proxmox webgui.

1638094027703.png

Shall I try to change the boot order again to the SCSI and hope, it boots up? Edit: I tried that and it shows the DVD installer again or the other screen from before ("starting terminal ...") randomly.
 
Last edited:

leesteken

Famous Member
May 31, 2020
1,423
269
83
Which means the VM starts correctly with PCI passthrough when using the current configuration (with OVMF). That's very good! And the ROM file size looks plausible as well.

Can you maybe boot the VM from another ISO that starts a graphical desktop? Try Ubuntu 20.04.3 LTS, as it starts a graphical interface (with a disc check) without any user input. Once you know that that works, change it back to vga: none and restart to see if the same screen is shown on the physical monitor.
Make sure to reboot the Proxmox host each time after you shutdown the VM. Just to make sure we are not running into multiple issue at a time, as some GPUs only work once.

Eventually, you'll may want to pass a USB keyboard and mouse to the VM as well for input. Or maybe you want to do that first and see if you can get the Debian Graphical install (with vga: none) to start. Problem is that your GPU will probably not display this screen, which makes it tricky to select.
 
  • Like
Reactions: xvegax

xvegax

Member
Aug 12, 2019
38
0
11
41
Which means the VM starts correctly with PCI passthrough when using the current configuration (with OVMF). That's very good! And the ROM file size looks plausible as well.

Can you maybe boot the VM from another ISO that starts a graphical desktop? Try Ubuntu 20.04.3 LTS, as it starts a graphical interface (with a disc check) without any user input. Once you know that that works, change it back to vga: none and restart to see if the same screen is shown on the physical monitor.
Make sure to reboot the Proxmox host each time after you shutdown the VM. Just to make sure we are not running into multiple issue at a time, as some GPUs only work once.

Eventually, you'll may want to pass a USB keyboard and mouse to the VM as well for input. Or maybe you want to do that first and see if you can get the Debian Graphical install (with vga: none) to start. Problem is that your GPU will probably not display this screen, which makes it tricky to select.
I can try to use a different image, but I cannot verify anything with a physical monitor. My host/server is around 50 km away in a data centre. :)

So, I guess, I have to do a fresh installation of the Debian image without graphical (as it was before)?
 

leesteken

Famous Member
May 31, 2020
1,423
269
83
I thought you wanted the R7 230 to be the main GPU of the VM; my mistake, sorry. Just reinstall Debian or create a new VM with the same configuration as you have working now and install Debian in that (and don't forget to remove the passthrough from the old VM). After successful installation you can check if the R7 230 is working inside the VM.
 
  • Like
Reactions: xvegax

xvegax

Member
Aug 12, 2019
38
0
11
41
Yeah, as mentioned in the beginning, I just need the R5 230 passthrough, so other progammes can see/use the GPU (driver), but it is not used to really give output to a monitor.

One question though, does the GPU passthrough always work only for one instance/VM?
 

leesteken

Famous Member
May 31, 2020
1,423
269
83
Yeah, as mentioned in the beginning, I just need the R5 230 passthrough, so other progammes can see/use the GPU (driver), but it is not used to really give output to a monitor.

One question though, does the GPU passthrough always work only for one instance/VM?
If it still works after stopping and starting the VM (different from a reboot inside the VM), then it can also be used by another VM. But only every by one running VM at a time.
 

xvegax

Member
Aug 12, 2019
38
0
11
41
Thank you for the information.

Unfortunately, something is still wrong there. When I chose "install" (not graphical install) in the Proxmox VNC, this happened:

1638100553240.png

I changed the Display to default and removed the serial0: socket and then I got this:

1638100909531.png
1638100932030.png

Is this the right way or do we need the serial0 output and display set to none?
 
Last edited:

leesteken

Famous Member
May 31, 2020
1,423
269
83
Whatever works for you is fine. As you are not interested in a physical display, a virtual graphical display is fine.
I hope the installer cannot find a video mode because there is no physical monitor attached to the passthrough GPU, but it could be that the GPU just doesn't work with passthrough (after being used for booting the system) or something else could be wrong.
Please just install Debian and then we can troubleshoot further.
 

xvegax

Member
Aug 12, 2019
38
0
11
41
It seems to have worked. I can see the device in the guest now:

Code:
sudo lspci -v
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Caicos PRO [Radeon HD 7450] (prog-if 00 [VGA controller])
        Subsystem: ASUSTeK Computer Inc. Caicos PRO [Radeon HD 7450]
        Physical Slot: 0
        Flags: bus master, fast devsel, latency 0, IRQ 10
        Memory at 800000000 (64-bit, prefetchable) [size=256M]
        Memory at c2000000 (64-bit, non-prefetchable) [size=128K]
        I/O ports at d000 [size=256]
        Expansion ROM at c2030000 [disabled] [size=64K]
        Capabilities: [50] Power Management version 3
        Capabilities: [58] Express Legacy Endpoint, MSI 00
        Capabilities: [a0] MSI: Enable- Count=1/1 Maskable- 64bit+
        Capabilities: [100] Vendor Specific Information: ID=0001 Rev=1 Len=010 <?>
        Capabilities: [150] Advanced Error Reporting
        Kernel modules: radeon

01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Caicos HDMI Audio [Radeon HD 6450 / 7450/8450/8490 OEM / R5 230/235/235X OEM]
        Subsystem: ASUSTeK Computer Inc. Caicos HDMI Audio [Radeon HD 6450 / 7450/8450/8490 OEM / R5 230/235/235X OEM]
        Physical Slot: 0
        Flags: bus master, fast devsel, latency 0, IRQ 48
        Memory at c2020000 (64-bit, non-prefetchable) [size=16K]
        Capabilities: [50] Power Management version 3
        Capabilities: [58] Express Legacy Endpoint, MSI 00
        Capabilities: [a0] MSI: Enable+ Count=1/1 Maskable- 64bit+
        Capabilities: [100] Vendor Specific Information: ID=0001 Rev=1 Len=010 <?>
        Capabilities: [150] Advanced Error Reporting
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd_hda_intel

This is great and your patient help was awesome. If you send me your e-mail address for PayPal, I will drop you a couple of coffees/beer. :)

There is one thing left, which might not have anything to do with the passthrough, but with the old card: When I start a programme, which uses OpenCL, I get the error code: No OpenCL platforms found.

So, I reckon I need a certain (generic) driver for that old R5 230, if it even works.
 
Last edited:

leesteken

Famous Member
May 31, 2020
1,423
269
83
Debian should just select radeon as the kernel driver in use. Unfortunately, I don't see that. The audio device of the GPU did trigger loading of the snd_hda_intel. I'm not sure why radeon is not loaded. Does sudo modprobe radeon (inside the VM) not fix it?

Maybe you also need to install some OpenCL libraries or Debian packages? I don't know about Linux OpenCL support for an old rebranded HD 7450, sorry. You now have both a real GPU and a virtual GPU insdie the VM, which might need additional OpenCL configuration. You could try replacing the virtual GPU with the virtual serial console (as explained before), which might make the OpenCL and/or graphics configuration easier.

Accepting gifts could get me in trouble with my employer, so thanks but no thanks. Maybe donate something towards some GNU, FSF or Linux-related project? Donating to Promox is near impossible and licenses are fixed price.
 
  • Like
Reactions: xvegax

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 your own in 60 seconds.

Buy now!