Have anyone susscesfully passthroughed the iGPU AMD Radeon 680M to VM?

xi4oyu

New Member
Dec 8, 2022
12
6
3
I made the following attempts:

First of all,
host machine: miniforum um690
CPU: amd R9 6900HX with iGPU AMD Radeon 680M
PVE version: 7.3


guest machine(vm):
1670488752117.png


1. add "amd_iommu=on" to kenrel cmdline, and then run update-grub
2. edit /etc/modules as follow:
Code:
vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd
3. edit /etc/modprobe.d/pve-blacklist.conf as follow:
Code:
blacklist amdgpu
blacklist snd_hda_intel
4. edit /etc/modprobe.d/vfio.conf as follow:
Code:
options vfio-pci ids=1002:1681,1002:1640
5. run update-initramfs -k all -u,and reboot
Code:
root@pve:~# lspci -nnk -s 35:00.0
35:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Device [1002:1681] (rev c7)
        Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Device [1002:1681]
        Kernel driver in use: vfio-pci
        Kernel modules: amdgpu


start my vm, and it seems ok
(the complete dmesg output is attached)
1670490429692.png


1670490540315.png

but, It seems that the GPU does not work
1670490634916.png
 

Attachments

Last edited:
Hello,
do you already got any further?
As I currently waiting for my um690 for exact this case, I´m very interessted in your findings. If this would not work reliable I would try to cancel my order.
Have you checked if there are some settings within the BIOS as like rBAR/SAM? Maybe disable them for the first test. And is an option for SVM and iommu enabled in the BIOS?
Maybe you find some more infos regarding kernel parameters and BIOS here:
https://github.com/mike11207/single-gpu-passthrough-amd-gpu/blob/main/README.md

On the second view it looks like the card was passed to the VM, but the driver was not loaded correctly. Maybe you can also have a look here:
https://www.reddit.com/r/linux_gaming/comments/lybj8s/pop_os_2004_uses_llvmpipe_instead_of_amdgpu/

What is dmesg showing regarding the driver?
modprobe amd_gpu
and maybe try to swich between the open source and closed source driver

I would realy apreciate if you update your findings here.

Best regards
Chris
 
Last edited:
Hello,
do you already got any further?
As I currently waiting for my um690 for exact this case, I´m very interessted in your findings. If this would not work reliable I would try to cancel my order.
Have you checked if there are some settings within the BIOS as like rBAR/SAM? Maybe disable them for the first test. And is an option for SVM and iommu enabled in the BIOS?
Maybe you find some more infos regarding kernel parameters and BIOS here:
https://github.com/mike11207/single-gpu-passthrough-amd-gpu/blob/main/README.md

On the second view it looks like the card was passed to the VM, but the driver was not loaded correctly. Maybe you can also have a look here:
https://www.reddit.com/r/linux_gaming/comments/lybj8s/pop_os_2004_uses_llvmpipe_instead_of_amdgpu/

What is dmesg showing regarding the driver?
modprobe amd_gpu
and maybe try to swich between the open source and closed source driver

I would realy apreciate if you update your findings here.

Best regards
Chris
Thanks for reply, the BIOS is very simple,without any above options, and official seller told me that the SVM and iommu are always enabled.
I tried to passthrough the GPU to Windows 10, but got "code 43". For convenience, I passed the GPU to linux for testing and it looks well, but it didn't render with GPU.
Next, I will try the second url your mentioned and other methods to test if GPU can work in VM linux.
 
Last edited:
I have the same device and tried on ESXi 8 and the result was bad. I can add the IGPU to the VM but once I run the VM, ESXi becomes unreachable
 
Thank you both for the updates! As passthrough is sometimes a bit rough to get started I hope you find a stable solution. But if ESXi also have problems it doesn´t look so promising . For now I´ve canceld my order :(
 
I have the same device and tried on ESXi 8 and the result was bad. I can add the IGPU to the VM but once I run the VM, ESXi becomes unreachable
Is ESXI based on Linux? Linux-based passthrough tutorial may help you. If host freezes when starting VM, it may be a problem with io memory. Try the following command to see if the video io memory is occupied.
Code:
cat /proc/iomem | grep 0000:35:00.0
# 0000:35:00.0 is video card pci bus
 
Here is the method to dump vbios which may help somebody. Compile the following code, and run as root:

C:
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>

typedef uint32_t ULONG;
typedef uint8_t UCHAR;
typedef uint16_t USHORT;

typedef struct {
    ULONG Signature;
    ULONG TableLength; // Length
    UCHAR Revision;
    UCHAR Checksum;
    UCHAR OemId[6];
    UCHAR OemTableId[8]; // UINT64  OemTableId;
    ULONG OemRevision;
    ULONG CreatorId;
    ULONG CreatorRevision;
} AMD_ACPI_DESCRIPTION_HEADER;

typedef struct {
    AMD_ACPI_DESCRIPTION_HEADER SHeader;
    UCHAR TableUUID[16]; // 0x24
    ULONG VBIOSImageOffset; // 0x34. Offset to the first GOP_VBIOS_CONTENT block from the beginning of the stucture.
    ULONG Lib1ImageOffset; // 0x38. Offset to the first GOP_LIB1_CONTENT block from the beginning of the stucture.
    ULONG Reserved[4]; // 0x3C
} UEFI_ACPI_VFCT;

typedef struct {
    ULONG PCIBus; // 0x4C
    ULONG PCIDevice; // 0x50
    ULONG PCIFunction; // 0x54
    USHORT VendorID; // 0x58
    USHORT DeviceID; // 0x5A
    USHORT SSVID; // 0x5C
    USHORT SSID; // 0x5E
    ULONG Revision; // 0x60
    ULONG ImageLength; // 0x64
} VFCT_IMAGE_HEADER;

typedef struct {
    VFCT_IMAGE_HEADER VbiosHeader;
    UCHAR VbiosContent[1];
} GOP_VBIOS_CONTENT;

int main(int argc, char** argv)
{
    FILE* fp_vfct;
    FILE* fp_vbios;
    UEFI_ACPI_VFCT* pvfct;
    char vbios_name[0x400];

    if (!(fp_vfct = fopen("/sys/firmware/acpi/tables/VFCT", "r"))) {
        perror(argv[0]);
        return -1;
    }

    if (!(pvfct = malloc(sizeof(UEFI_ACPI_VFCT)))) {
        perror(argv[0]);
        return -1;
    }

    if (sizeof(UEFI_ACPI_VFCT) != fread(pvfct, 1, sizeof(UEFI_ACPI_VFCT), fp_vfct)) {
        fprintf(stderr, "%s: failed to read VFCT header!\n", argv[0]);
        return -1;
    }

    ULONG offset = pvfct->VBIOSImageOffset;
    ULONG tbl_size = pvfct->SHeader.TableLength;

    if (!(pvfct = realloc(pvfct, tbl_size))) {
        perror(argv[0]);
        return -1;
    }

    if (tbl_size - sizeof(UEFI_ACPI_VFCT) != fread(pvfct + 1, 1, tbl_size - sizeof(UEFI_ACPI_VFCT), fp_vfct)) {
        fprintf(stderr, "%s: failed to read VFCT body!\n", argv[0]);
        return -1;
    }

    fclose(fp_vfct);

    while (offset < tbl_size) {
        GOP_VBIOS_CONTENT* vbios = (GOP_VBIOS_CONTENT*)((char*)pvfct + offset);
        VFCT_IMAGE_HEADER* vhdr = &vbios->VbiosHeader;

        if (!vhdr->ImageLength)
            break;

        snprintf(vbios_name, sizeof(vbios_name), "vbios_%x_%x.bin", vhdr->VendorID, vhdr->DeviceID);

        if (!(fp_vbios = fopen(vbios_name, "wb"))) {
            perror(argv[0]);
            return -1;
        }

        if (vhdr->ImageLength != fwrite(&vbios->VbiosContent, 1, vhdr->ImageLength, fp_vbios)) {
            fprintf(stderr, "%s: failed to dump vbios %x:%x\n", argv[0], vhdr->VendorID, vhdr->DeviceID);
            return -1;
        }

        fclose(fp_vbios);

        printf("dump vbios %x:%x to %s\n", vhdr->VendorID, vhdr->DeviceID, vbios_name);

        offset += sizeof(VFCT_IMAGE_HEADER);
        offset += vhdr->ImageLength;
    }

    return 0;
}
 
  • Like
Reactions: tew and shiift
By the way I also tested with intel i7 1185g with Iris XE graphics. And it worked like a charm.

On the other hand gpu partitioning and assign prefered amount on hyper-v is working. But on the windows10 host and vm. Server 2019 can not install drivers. Even intels own drivers are not working you have use modified ones for the network.
 
Hyper-V update. Server 2022 works with the GPU if you integrate the drivers into the iso. On the other hand, it has a network driver issue because Intel is not signing the consumer-grade network adapter drivers for the server operating system. You need to modify the inf file and disable the driver signature check. With the Server 2022 core host and windows 10 and 11 VM, I could partition the GPU and assign the GPU partitions From %25 to %100 to various VMs. this means the VM you assign %100 can utilise %100 of GPU and the VM you assigned %50 can only utilise up to %50. Server 2022 is licensed software, but Hyper-v Server 2016 is free to use.
 
Followed by this - https://bbs.minisforum.com/threads/um690-windows-and-linux.2557/ xi4oyu May I know how you get Proxmox 7 installed on the Miniforum um690? In my case, it does NOT work. The installer fails and it may be related to driver issue with the Radeon 680 iGPU

I also found another thread that discusses a similar issue. https://forum.proxmox.com/threads/cannot-start-x-server-with-amdgpu.118528/
First install Debian, then follow https://pve.proxmox.com/wiki/Install_Proxmox_VE_on_Debian_11_Bullseye
 
Followed by this - https://bbs.minisforum.com/threads/um690-windows-and-linux.2557/ xi4oyu May I know how you get Proxmox 7 installed on the Miniforum um690? In my case, it does NOT work. The installer fails and it may be related to driver issue with the Radeon 680 iGPU

I also found another thread that discusses a similar issue. https://forum.proxmox.com/threads/cannot-start-x-server-with-amdgpu.118528/
I tried with this article https://pvecli.xuan2host.com/proxmox-install-fail-xorg-gui-start-fix/


Code:
Xorg -configure

cp /xorg.conf.new /etc/X11/xorg.conf

nano /etc/X11/xorg.conf # replace all "amdgpu" with "fbdev"

startx
 
  • Like
Reactions: kevinyu211

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!