Skip to content

Instantly share code, notes, and snippets.

@isc30
Last active April 7, 2024 19:25
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save isc30/74ff0f3544c35ef81a9cedf81cb3fca8 to your computer and use it in GitHub Desktop.
Save isc30/74ff0f3544c35ef81a9cedf81cb3fca8 to your computer and use it in GitHub Desktop.
Proxmox v7.4/v8 - Ryzen 7 7735HS - AMD Radeon 680M GPU passthrough
@isc30
Copy link
Author

isc30 commented Sep 30, 2023

Here are the results:
image
image
image

@isc30
Copy link
Author

isc30 commented Oct 1, 2023

IMPORTANT! about vendor-reset

It seems like the vendor-reset isn't working properly, so restarting the VM ends up erroring and killing the host :( this is a well known AMD issue but I don't know how to fix it for the 680M

@TSEVER
Copy link

TSEVER commented Oct 1, 2023

Nice guidence. Did you try to install win 11 or linux vms too. Are they also working.

@isc30
Copy link
Author

isc30 commented Oct 1, 2023

Hey @TSEVER thanks a lot, I also tried Ubuntu and it works well. Windows 11 had problems with setting SeaBios so I went with Win10 instead.

@Matssa56
Copy link

Matssa56 commented Oct 4, 2023

Hey @isc30 thanks for your guide, I'm also stuck on the vendor-reset :

× vreset.service - AMD GPU reset method to 'device_specific'
     Loaded: loaded (/etc/systemd/system/vreset.service; enabled; preset: enabled)
     Active: failed (Result: exit-code) since Wed 2023-10-04 22:41:19 CEST; 7s ago
   Duration: 2ms
    Process: 1520 ExecStart=/usr/bin/bash -c echo device_specific > /sys/bus/pci/devices/0000:34:00.0/reset_method (code=exited, status=1/FAILURE)
   Main PID: 1520 (code=exited, status=1/FAILURE)
        CPU: 2ms

pve systemd[1]: Started vreset.service - AMD GPU reset method to 'device_specific'.
pve bash[1520]: /usr/bin/bash: line 1: echo: write error: Invalid argument
pve systemd[1]: vreset.service: Main process exited, code=exited, status=1/FAILURE
pve systemd[1]: vreset.service: Failed with result 'exit-code'.

When checking on the internet, I can't seem to find anything.

@isc30
Copy link
Author

isc30 commented Oct 5, 2023

@Matssa56 yeah that's also what I get. There is very little information about the ryzen 7 7735hs even tho a lot of recent hardware is using it.

Maybe (?) with Proxmox v8 and kernel v6 the reset issue gets better but I couldn't manage to get passthrough working there 😢

@isc30
Copy link
Author

isc30 commented Oct 5, 2023

I think the reset issue (and not being able to passthrough the "full device") could be related to having many other devices in that IOMMU group:

lspci -nn

34:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Device [1002:1681] (rev 0a)
34:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Device [1002:1640]
34:00.2 Encryption controller [1080]: Advanced Micro Devices, Inc. [AMD] VanGogh PSP/CCP [1022:1649]
34:00.3 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Device [1022:161d]
34:00.4 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Device [1022:161e]
34:00.5 Multimedia controller [0480]: Advanced Micro Devices, Inc. [AMD] Raven/Raven2/FireFlight/Renoir Audio Processor [1022:15e2] (rev 60)
34:00.6 Audio device [0403]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) HD Audio Controller [1022:15e3]

I'll try doing a blacklist + passthrough of all these devices and see what happens.

Edit: no luck, even passing all the devices doesn´t work. PCI passthrough for 34:00.6 directly crashes the host.

@Matssa56
Copy link

Matssa56 commented Oct 6, 2023

@Matssa56 yeah that's also what I get. There is very little information about the ryzen 7 7735hs even tho a lot of recent hardware is using it.

Maybe (?) with Proxmox v8 and kernel v6 the reset issue gets better but I couldn't manage to get passthrough working there 😢

I managed to make it work I think under proxmox 8 and kernel 6 with a Linux VM. I tried to make a microcode update using the proxmox helper scripts but not sure it was installed though.

I didn't have time to tinker a bit more to see if the passthrough was really working though with ffmpeg but using vainfo i saw the driver info and all so looks pretty good imo.

@isc30
Copy link
Author

isc30 commented Oct 6, 2023

@Matssa56 very interesting... I just tried my method again for Ubuntu and passthrough crashes the VM. Did you do any different than the guide to get it working in Linux? If I do "lspci" from the Linux VM it appears to have everything correctly but booting the machine with the GPU as primary display crashes it

@Matssa56
Copy link

Matssa56 commented Oct 7, 2023

@Matssa56 very interesting... I just tried my method again for Ubuntu and passthrough crashes the VM. Did you do any different than the guide to get it working in Linux? If I do "lspci" from the Linux VM it appears to have everything correctly but booting the machine with the GPU as primary display crashes it

Well nothing in particular except the microcode update using the proxmox helper scripts. Plus I didn't put "use as primary gpu" in my memory, I'll have to take a look to be sure.

Do you have the latest bios?

@Matssa56
Copy link

Matssa56 commented Oct 7, 2023

So just cheked and the only thing that I didn't do was set the PCI passthrough to primary GPU, use of the proxmox helper scripts for the after install stuff and microcontrol processor update.

After installing ffmpeg and Radeontop, I can say that hardware accel using VAAPI works.

@isc30
Copy link
Author

isc30 commented Oct 8, 2023

Managed to get it working on Proxmox VE8 simply following this tutorial there. I don't know why it didn't work before. I only managed to get a remote desktop using the GPU on Windows 10. Ubuntu still crashes, not sure why.

In win10, it seems like the reset issue is gone, I can stop and start the machine as many times I want and the GPU works properly every time without crashing the host. All I can say is: use the latest versions for proxmox and the kernel etc

@Matssa56
Copy link

Matssa56 commented Oct 8, 2023

Managed to get it working on Proxmox VE8 simply following this tutorial there. I don't know why it didn't work before. I only managed to get a remote desktop using the GPU on Windows 10. Ubuntu still crashes, not sure why.

In win10, it seems like the reset issue is gone, I can stop and start the machine as many times I want and the GPU works properly every time without crashing the host. All I can say is: use the latest versions for proxmox and the kernel etc

Nice!

Just a quick question, why add the fllowing ?

echo "softdep radeon pre: vfio-pci" >> /etc/modprobe.d/vfio.conf
echo "softdep amdgpu pre: vfio-pci" >> /etc/modprobe.d/vfio.conf
echo "softdep snd_hda_intel pre: vfio-pci" >> /etc/modprobe.d/vfio.conf

@Matssa56
Copy link

Matssa56 commented Oct 8, 2023

Btw the vendor reset stuff isn't necessary right? Since it doesn't work in the first place

@isc30
Copy link
Author

isc30 commented Oct 9, 2023 via email

@isc30
Copy link
Author

isc30 commented Oct 10, 2023

@Matssa56 Need your help :) I think I managed to isolate the specific problem that prevents Win11 from working!!!

Hey @Matssa56 what device do you have? do you mind sharing your vbios with me pls? ivansanzcarasa@gmail.com

I discovered that the problem seems to be when using OVMF (UEFI) for the BIOS type.
I created 2 identical VMs with Win10, 1 with SeaBIOS and the other with OVMF (UEFI). The UEFI one throws Error code 43 when trying to initialize the GPU and the seabios works properly. I'm wondering if the specific vbios I extracted from my system doesnt have UEFI support and maybe the vbios from someone else with a different motherboard works.

Please I'm out of ideas :)

FAILS: OVMF (UEFI)

image
image

WORKS: SEABIOS

image
image

@Matssa56
Copy link

@Matssa56 Need your help :) I think I managed to isolate the specific problem that prevents Win11 from working!!!

Hey @Matssa56 what device do you have? do you mind sharing your vbios with me pls? ivansanzcarasa@gmail.com

I discovered that the problem seems to be when using OVMF (UEFI) for the BIOS type. I created 2 identical VMs with Win10, 1 with SeaBIOS and the other with OVMF (UEFI). The UEFI one throws Error code 43 when trying to initialize the GPU and the seabios works properly. I'm wondering if the specific vbios I extracted from my system doesnt have UEFI support and maybe the vbios from someone else with a different motherboard works.

Please I'm out of ideas :)

FAILS: OVMF (UEFI)

image image

WORKS: SEABIOS

image image

I think I have the same device as you : minisforum UM773 lite so not really sure my vbios will be different. My Linux machine is using seabios, not the other one. Why not stick with seabios?

@isc30
Copy link
Author

isc30 commented Oct 10, 2023 via email

@Matssa56
Copy link

oh damn, did you install the latest BIOS when you got the UM773 Lite? IDK it might be nice to try if we get a different file, it's possible depending on the BIOS version and settings.
Sadly, UEFI is critical for windows 11 and other modern OS like Ubuntu if you want advanced features. If we could find someone with a different machine but same processor (maybe a SER6 PRO for example) and compare the vbios we can find exactly why UEFI isn't working on the MinisForum BIOS.

Yep updated the bios but it was already up to date when I received it.
Did you try the minisforum discord? I hope someone can help there :-S
You can maybe try ESXi from VMware, maybe you'll have better results?
What CPU did you use in the VM? Host?

@isc30
Copy link
Author

isc30 commented Oct 10, 2023 via email

@isc30
Copy link
Author

isc30 commented Oct 12, 2023

Hey @Matssa56 @TSEVER I managed to get Win11 and UEFI working. I updated and migrated the guide to a proper repository so I could upload the ROM files there.

We can discuss in the "Discussions" or "Issues" section of the repo 👍

https://github.com/isc30/UM773-Lite-Proxmox/tree/main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment