Vgpu unlock - Unlock vGPU functionality for consumer grade GPUs.

Overview

vgpu_unlock

Unlock vGPU functionality for consumer-grade Nvidia GPUs.

Important!

This tool is not guarenteed to work out of the box in some cases, so use it at your own risk.

Description

This tool enables the use of Geforce and Quadro GPUs with the NVIDIA vGPU graphics virtualization technology. NVIDIA vGPU normally only supports a few datacenter Teslas and professional Quadro GPUs by design, but not consumer graphics cards through a software limitation. This vgpu_unlock tool aims to remove this limitation on Linux based systems, thus enabling most Maxwell, Pascal, Volta (untested), and Turing based GPUs to use the vGPU technology. Ampere support is currently a work in progress.

A community maintained Wiki written by Krutav Shah with a lot more information is available here.

Dependencies:

  • This tool requires Python3 and Python3-pip; the latest version is recommended.
  • The python package "frida" is required. pip3 install frida.
  • The tool requires the NVIDIA GRID vGPU driver.
  • "dkms" is required as it simplifies the process of rebuilding the driver alot. Install DKMS with the package manager in your OS.

Installation:

In the following instructions <path_to_vgpu_unlock> need to be replaced with the path to this repository on the target system and <version> need to be replaced with the version of the NVIDIA GRID vGPU driver.

Install the NVIDIA GRID vGPU driver, make sure to install it as a dkms module.

./nvidia-installer --dkms

Modify the line begining with ExecStart= in /lib/systemd/system/nvidia-vgpud.service and /lib/systemd/system/nvidia-vgpu-mgr.service to use vgpu_unlock as the executable and pass the original executable as the first argument. Example:

ExecStart=<path_to_vgpu_unlock>/vgpu_unlock /usr/bin/nvidia-vgpud

Reload the systemd daemons:

systemctl daemon-reload

Modify the file /usr/src/nvidia-<version>/nvidia/os-interface.c and add the following line after the lines begining with #include at the beginning of the file.

#include "<path_to_vgpu_unlock>/vgpu_unlock_hooks.c"

Modify the file /usr/src/nvidia-<version>/nvidia/nvidia.Kbuild and add the following line at the bottom of the file.

ldflags-y += -T <path_to_vgpu_unlock>/kern.ld

Remove the nvidia kernel module using dkms:

dkms remove -m nvidia -v <version> --all

Rebuild and reinstall the nvidia kernel module using dkms:

dkms install -m nvidia -v <version>

Reboot.


NOTE

This script only works with graphics cards in the same generation as their professional Tesla counterparts. As a result, only Maxwell and newer generation Nvidia GPUs are supported. It is not designed to be used with low end graphics card models, so not all cards are guarenteed to work smoothly with vGPU. For the best experience, it is recommended to use graphics cards with the same chip model as the Tesla cards. The same applies to the operating system as well, as certain bleeding-edge Linux distributions may not work well with vGPU software.


How it works

vGPU supported?

In order to determine if a certain GPU supports the vGPU functionality the driver looks at the PCI device ID. This identifier together with the PCI vendor ID is unique for each type of PCI device. In order to enable vGPU support we need to tell the driver that the PCI device ID of the installed GPU is one of the device IDs used by a vGPU capable GPU.

Userspace script: vgpu_unlock

The userspace services nvidia-vgpud and nvidia-vgpu-mgr uses the ioctl syscall to communicate with the kernel module. Specifically they read the PCI device ID and determines if the installed GPU is vGPU capable.

The python script vgpu_unlock intercepts all ioctl syscalls between the executable specified as the first argument and the kernel. The script then modifies the kernel responses to indicate a PCI device ID with vGPU support and a vGPU capable GPU.

Kernel module hooks: vgpu_unlock_hooks.c

In order to exchange data with the GPU the kernel module maps the physical address space of the PCI bus into its own virtual address space. This is done using the ioremap* kernel functions. The kernel module then reads and writes data into that mapped address space. This is done using the memcpy kernel function.

By including the vgpu_unlock_hooks.c file into the os-interface.c file we can use C preprocessor macros to replace and intercept calls to the iormeap and memcpy functions. Doing this allows us to maintain a view of what is mapped where and what data that is being accessed.

Kernel module linker script: kern.ld

This is a modified version of the default linker script provided by gcc. The script is modified to place the .rodata section of nv-kernel.o into .data section instead of .rodata, making it writable. The script also provide the symbols vgpu_unlock_nv_kern_rodata_beg and vgpu_unlock_nv_kern_rodata_end to let us know where that section begins and ends.

How it all comes together

After boot the nvidia-vgpud service queries the kernel for all installed GPUs and checks for vGPU capability. This call is intercepted by the vgpu_unlock python script and the GPU is made vGPU capable. If a vGPU capable GPU is found then nvidia-vgpu creates an MDEV device and the /sys/class/mdev_bus directory is created by the system.

vGPU devices can now be created by echoing UUIDs into the create files in the mdev bus representation. This will create additional structures representing the new vGPU device on the MDEV bus. These devices can then be assigned to VMs, and when the VM starts it will open the MDEV device. This causes nvidia-vgpu-mgr to start communicating with the kernel using ioctl. Again these calls are intercepted by the vgpu_unlock python script and when nvidia-vgpu-mgr asks if the GPU is vGPU capable the answer is changed to yes. After that check it attempts to initialize the vGPU device instance.

Initialization of the vGPU device is handled by the kernel module and it performs its own check for vGPU capability, this one is a bit more complicated.

The kernel module maps the physical PCI address range 0xf0000000-0xf1000000 into its virtual address space, it then performs some magical operations which we don't really know what they do. What we do know is that after these operations it accesses a 128 bit value at physical address 0xf0029624, which we call the magic value. The kernel module also accessses a 128 bit value at physical address 0xf0029634, which we call the key value.

The kernel module then has a couple of lookup tables for the magic value, one for vGPU capable GPUs and one for the others. So the kernel module looks for the magic value in both of these lookup tables, and if it is found that table entry also contains a set of AES-128 encrypted data blocks and a HMAC-SHA256 signature.

The signature is then validated by using the key value mentioned earlier to calculate the HMAC-SHA256 signature over the encrypted data blocks. If the signature is correct, then the blocks are decrypted using AES-128 and the same key.

Inside of the decrypted data is once again the PCI device ID.

So in order for the kernel module to accept the GPU as vGPU capable the magic value will have to be in the table of vGPU capable magic values, the key has to generate a valid HMAC-SHA256 signature and the AES-128 decrypted data blocks has to contain a vGPU capable PCI device ID. If any of these checks fail, then the error code 0x56 "Call not supported" is returned.

In order to make these checks pass the hooks in vgpu_unlock_hooks.c will look for a ioremap call that maps the physical address range that contain the magic and key values, recalculate the addresses of those values into the virtual address space of the kernel module, monitor memcpy operations reading at those addresses, and if such an operation occurs, keep a copy of the value until both are known, locate the lookup tables in the .rodata section of nv-kernel.o, find the signature and data bocks, validate the signature, decrypt the blocks, edit the PCI device ID in the decrypted data, reencrypt the blocks, regenerate the signature and insert the magic, blocks and signature into the table of vGPU capable magic values. And that's what they do.

Comments
  • Hardcoded PCI address range

    Hardcoded PCI address range

    In the readme you wrote "Physical PCI address range 0xf0000000-0xf1000000" in my case the range turned out to be 0x4810000000-0x4811ffffff

    The Address Range can be found in dmesg in lines like this: pci 0000:0a:00.0: reg 0x1c: [mem 0x4810000000-0x4811ffffff 64bit pref]

    This is Probably due to above 4g decoding (not 100% sure, but my best guess)

    opened by arki05 23
  • Not work for NVIDIA 460.32.03 driver

    Not work for NVIDIA 460.32.03 driver

    On Ubuntu 20.04 with 5.8.0.48 kernel.

    Try to install 460.32.03 driver downloaded in the portal (NVIDIA-Linux-x86_64-460.32.03-grid.run)

    Minor issue, have to fix nvidia/nv-vgpu-vmbus.c to rename PAGE_KERNEL_RX to PAGE_KERNEL_ROX to make dkms happy.

    1. Cannot find fore-mentioned vgpud.service and vgpu-mgr.service, only gridd.service available.
    2. Upon switching to vgpu_unlock to launch gridd.service, still get license issue:
    # systemctl status nvidia-gridd.service
    
    Apr 10 00:41:28 sz77 systemd[1]: Starting NVIDIA Grid Daemon...
    Apr 10 00:41:28 sz77 systemd[1]: Started NVIDIA Grid Daemon.
    Apr 10 00:41:29 sz77 nvidia-gridd[1685]: Started (1685)
    Apr 10 00:41:32 sz77 nvidia-gridd[1685]: Licensing not supported for GPUs in the system
    Apr 10 00:41:32 sz77 nvidia-gridd[1685]: Failed to handle license change events
    Apr 10 00:41:32 sz77 nvidia-gridd[1685]: Licensing not supported for GPUs in the system
    Apr 10 00:41:32 sz77 nvidia-gridd[1685]: Failed to unlock PID file: Bad file descriptor
    Apr 10 00:41:32 sz77 nvidia-gridd[1685]: Failed to close PID file: Bad file descriptor
    Apr 10 00:41:32 sz77 nvidia-gridd[1685]: Shutdown (1685)
    Apr 10 00:41:32 sz77 systemd[1]: nvidia-gridd.service: Succeeded.
    
    opened by liuliu 20
  • Document more explicitly that you have to add a custom PCI ID for GPUs that are supported but are not in the default list

    Document more explicitly that you have to add a custom PCI ID for GPUs that are supported but are not in the default list

    Hi everyone,

    Thanks very much for this work. I've been wanting to try out vGPUs for a very, very long time, and this might make my dreams come true, so it's very exciting.

    I attempted to follow the instructions and nvidia-vgpud said I had an unsupported vGPU (I have a GTX 1060 6GB, which should be supported, right?).

    I added this to the vgpu_unlock script, which made nvidia-vgpud "work" (as in, it exits with an error code of zero.

                    // GP104
                    if(actual_devid == 0x1b80 || // GTX 1080
                       actual_devid == 0x1b81 || // GTX 1070
                       actual_devid == 0x1b82 || // GTX 1070 Ti
                       actual_devid == 0x1c03 || // GTX 1060 6GB, **mine**
                       actual_devid == 0x1b83 || // GTX 1060 6GB
                       actual_devid == 0x1b84 || // GTX 1060 3GB
                       actual_devid == 0x1bb0) { // Quadro P5000
                        spoofed_devid = 0x1bb3; // Tesla P4
                    }
    
    

    Here are the systemd logs for what I mean by nvidia-vgpud exiting:

    Apr 09 22:37:29 localhost nvidia-vgpud[5660]: Number of Displays: 1
    Apr 09 22:37:29 localhost nvidia-vgpud[5660]: Max pixels: 8847360
    Apr 09 22:37:29 localhost nvidia-vgpud[5660]: Display: width 4096, height 2160
    Apr 09 22:37:29 localhost nvidia-vgpud[5660]: License: NVIDIA-vComputeServer,9.0;Quadro-Virtual-DWS,5.0
    Apr 09 22:37:29 localhost nvidia-vgpud[5660]: PID file unlocked.
    Apr 09 22:37:29 localhost nvidia-vgpud[5660]: PID file closed.
    Apr 09 22:37:29 localhost nvidia-vgpud[5660]: Shutdown (5660)
    

    I'm not certain this is what's supposed to happen (shouldn't it keep running?)

    I went and created an mdev, following the instructions here.

    When I added the mdev to libvirt, I used the following XML

    <hostdev mode='subsystem' type='mdev' managed='no' model='vfio-pci'>
      <source>
        <address uuid='84c0de53-9363-478d-876c-b298956a4af1 '/>
      </source>
    </hostdev>
    

    I get the following error when starting the VM, though:

    qemu-system-x86_64: -device vfio-pci,id=hostdev0,sysfsdev=/sys/bus/mdev/devices/84c0de53-9363-478d-876c-b298956a4af1,display=off,bus=pci.5,addr=0x0: vfio 84c0de53-9363-478d-876c-b298956a4af1: error getting device from group 8: Input/output error
    
    Verify all devices in group 8 are bound to vfio-<bus> or pci-stub and not already in use
    

    Dmesg says:

    [nvidia-vgpu-vfio] 84c0de53-9363-478d-876c-b298956a4af1: start failed. status: 0x1
    

    Did I do something wrong? Should I be using CentOS/RHEL instead of openSUSE?

    I then found out that the systemd service nvidia-gpu-mgr is a thing. These were the logs:

    Apr 09 22:37:29 localhost notice: vmiop_env_log: vmiop-env: guest_max_gpfn:0x0
    Apr 09 22:37:29 localhost nvidia-vgpu-mgr[5614]: notice: vmiop_env_log: (0x0): Received start call from nvidia-vgpu-vfio module: mdev uuid 84c0de53-9363-478d-876c-b29>
    Apr 09 22:37:29 localhost nvidia-vgpu-mgr[5614]: notice: vmiop_env_log: (0x0): pluginconfig: vgpu_type_id=63
    Apr 09 22:37:29 localhost nvidia-vgpu-mgr[5614]: notice: vmiop_env_log: Successfully updated env symbols!
    Apr 09 22:37:29 localhost nvidia-vgpu-mgr[5614]: error: vmiop_log: (0x0): vGPU is supported only on VGX capable boards
    Apr 09 22:37:29 localhost nvidia-vgpu-mgr[5614]: error: vmiop_log: (0x0): init_device_instance failed for inst 0 with error 1 (vGPU validation of the GPU failed)
    Apr 09 22:37:29 localhost nvidia-vgpu-mgr[5614]: error: vmiop_log: (0x0): Initialization: init_device_instance failed error 1
    Apr 09 22:37:29 localhost nvidia-vgpu-mgr[5614]: error: vmiop_log: display_init failed for inst: 0
    Apr 09 22:37:29 localhost nvidia-vgpu-mgr[5614]: error: vmiop_env_log: (0x0): vmiope_process_configuration: plugin registration error
    

    I set ExecStart to /opt/vgpu_unlock/vgpu_unlock /usr/bin/nvidia-vgpu-mgr (in hopes that wouldn't help), and now I have:

     nvidia-vgpu-mgr[2314]: notice: vmiop_env_log: Successfully updated env symbols!
    Apr 09 22:49:09 localhost nvidia-vgpu-mgr[2314]: error: vmiop_log: NVOS status 0x56
    Apr 09 22:49:09 localhost nvidia-vgpu-mgr[2314]: error: vmiop_log: Assertion Failed at 0x8429e183:293
    Apr 09 22:49:09 localhost nvidia-vgpu-mgr[2314]: error: vmiop_log: 10 frames returned by backtrace
    Apr 09 22:49:09 localhost nvidia-vgpu-mgr[2314]: error: vmiop_log: /usr/lib64/libnvidia-vgpu.so(_nv004938vgpu+0x26) [0x7f49842ee6a6]
    Apr 09 22:49:09 localhost nvidia-vgpu-mgr[2314]: error: vmiop_log: /usr/lib64/libnvidia-vgpu.so(+0x88a7a) [0x7f498429ca7a]
    Apr 09 22:49:09 localhost nvidia-vgpu-mgr[2314]: error: vmiop_log: /usr/lib64/libnvidia-vgpu.so(+0x8a183) [0x7f498429e183]
    Apr 09 22:49:09 localhost nvidia-vgpu-mgr[2314]: error: vmiop_log: vgpu() [0x4119f1]
    Apr 09 22:49:09 localhost nvidia-vgpu-mgr[2314]: error: vmiop_log: vgpu() [0x412955]
    Apr 09 22:49:09 localhost nvidia-vgpu-mgr[2314]: error: vmiop_log: vgpu() [0x40d1fc]
    

    Is there something I'm missing, or is my setup just wrong/not supported, or did I mess up something, or… is this a bug that my GPU doesn't work?

    opened by cdknight 17
  • DKMS will not build for the latest vGPU drivers (460.32.04)

    DKMS will not build for the latest vGPU drivers (460.32.04)

    While DKMS will build for driver 450, it will not with the newer versions. Here is the error:

    `[root@rhel-test vgpu]# dkms install -m nvidia -v 460.32.04

    Creating symlink /var/lib/dkms/nvidia/460.32.04/source -> /usr/src/nvidia-460.32.04

    DKMS: add completed.

    Kernel preparation unnecessary for this kernel. Skipping...

    Building module: cleaning build area... 'make' -j4 NV_EXCLUDE_BUILD_MODULES='' KERNEL_UNAME=4.18.0-240.10.1.el8_3.x86_64 IGNORE_CC_MISMATCH='' modules...........(bad exit status: 2) Error! Bad return status for module build on kernel: 4.18.0-240.10.1.el8_3.x86_64 (x86_64) Consult /var/lib/dkms/nvidia/460.32.04/build/make.log for more information.`

    opened by KrutavShah 11
  • NVIDIA GRID vGPU driver

    NVIDIA GRID vGPU driver

    Thanks for the work you did on this! I'm personally a bit confused as to which driver I need to be using here. Is this publicly available for download?

    opened by SebastiaanDirks 10
  • No dmesg output of vgpu_unlock patch applied.

    No dmesg output of vgpu_unlock patch applied.

    Running Rocky linux 8.4 with a GTX1070 I have vgpu host drivers 11.4 (nvidia 450.124) vgpu_unlock located in /opt/vgpu_unlock

    Patched the dkms files to point to vgpu_unlock_hooks.c and kern.ld updated all systemd files for nvidia-vgpud and nvidia-vgpu-mgr to prefix with /opt/vgpu_unlock/vgpu_unlock

    marked files as executable.

    rebuilt the dkms modules. and rebooted

    dmesg did not output anything about vgpu unlock patch applied. nvidia-vgpu-mgr service is running

    Was able to use mdevctl to find the types and make a vgpu. (p40-3q)

    Made a libvirt vm boot with device id's making the vm think it is a p5000 and windows sees it. Was able to install quadro drivers but was greeted with an old friend, Code 43 even after reboot

    The paid grid drivers work in windows as a heads up.

    I have downloaded and ran the scripts by git clone wget master zip files Download zip file to windows > scp over to linux > unzip on linux Download zip file to windows > unzip on windows > scp to linux

    Can not get it to show a dmesg output for vgpu_unlock

    Libvirt config for vgpu pass-through below.

      <name>win10-2</name>
      <uuid>VMUUID</uuid>
      <metadata>
        <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
          <libosinfo:os id="http://microsoft.com/win/10"/>
        </libosinfo:libosinfo>
      </metadata>
      <memory unit='KiB'>4194304</memory>
      <currentMemory unit='KiB'>4194304</currentMemory>
      <vcpu placement='static'>4</vcpu>
      <resource>
        <partition>/machine</partition>
      </resource>
      <os>
        <type arch='x86_64' machine='pc-q35-rhel8.2.0'>hvm</type>
        <loader readonly='yes' secure='yes' type='pflash'>/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd</loader>
        <nvram>/var/lib/libvirt/qemu/nvram/win10-2_VARS.fd</nvram>
        <boot dev='hd'/>
      </os>
      <features>
        <acpi/>
        <apic/>
        <hyperv>
          <relaxed state='on'/>
          <vapic state='on'/>
          <spinlocks state='on' retries='8191'/>
          <vendor_id state='on' value='dickbutt'/>
        </hyperv>
        <kvm>
          <hidden state='on'/>
        </kvm>
        <vmport state='off'/>
        <smm state='on'/>
        <ioapic driver='kvm'/>
      </features>
      <cpu mode='custom' match='exact' check='full'>
        <model fallback='forbid'>Icelake-Server</model>
        <vendor>Intel</vendor>
        <feature policy='require' name='ss'/>
        <feature policy='require' name='pdcm'/>
        <feature policy='require' name='hypervisor'/>
        <feature policy='require' name='tsc_adjust'/>
        <feature policy='require' name='avx512ifma'/>
        <feature policy='require' name='sha-ni'/>
        <feature policy='require' name='rdpid'/>
        <feature policy='require' name='fsrm'/>
        <feature policy='require' name='md-clear'/>
        <feature policy='require' name='stibp'/>
        <feature policy='require' name='arch-capabilities'/>
        <feature policy='require' name='xsaves'/>
        <feature policy='require' name='ibpb'/>
        <feature policy='require' name='ibrs'/>
        <feature policy='require' name='amd-stibp'/>
        <feature policy='require' name='amd-ssbd'/>
        <feature policy='require' name='rdctl-no'/>
        <feature policy='require' name='ibrs-all'/>
        <feature policy='require' name='skip-l1dfl-vmentry'/>
        <feature policy='require' name='mds-no'/>
        <feature policy='require' name='pschange-mc-no'/>
        <feature policy='disable' name='hle'/>
        <feature policy='disable' name='rtm'/>
        <feature policy='disable' name='clwb'/>
        <feature policy='disable' name='intel-pt'/>
        <feature policy='disable' name='la57'/>
        <feature policy='disable' name='wbnoinvd'/>
        <feature policy='disable' name='mpx'/>
      </cpu>
      <clock offset='localtime'>
        <timer name='rtc' tickpolicy='catchup'/>
        <timer name='pit' tickpolicy='delay'/>
        <timer name='hpet' present='no'/>
        <timer name='hypervclock' present='yes'/>
      </clock>
      <on_poweroff>destroy</on_poweroff>
      <on_reboot>restart</on_reboot>
      <on_crash>destroy</on_crash>
      <pm>
        <suspend-to-mem enabled='no'/>
        <suspend-to-disk enabled='no'/>
      </pm>
      <devices>
        <emulator>/usr/libexec/qemu-kvm</emulator>
        <disk type='file' device='disk'>
          <driver name='qemu' type='qcow2'/>
          <source file='/var/lib/libvirt/images/win10.qcow2' index='1'/>
          <backingStore/>
          <target dev='vda' bus='virtio'/>
          <alias name='virtio-disk0'/>
          <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
        </disk>
        <controller type='usb' index='0' model='qemu-xhci' ports='15'>
          <alias name='usb'/>
          <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
        </controller>
        <controller type='sata' index='0'>
          <alias name='ide'/>
          <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
        </controller>
        <controller type='pci' index='0' model='pcie-root'>
          <alias name='pcie.0'/>
        </controller>
        <controller type='pci' index='1' model='pcie-root-port'>
          <model name='pcie-root-port'/>
          <target chassis='1' port='0x8'/>
          <alias name='pci.1'/>
          <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/>
        </controller>
        <controller type='pci' index='2' model='pcie-root-port'>
          <model name='pcie-root-port'/>
          <target chassis='2' port='0x9'/>
          <alias name='pci.2'/>
          <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
        </controller>
        <controller type='pci' index='3' model='pcie-root-port'>
          <model name='pcie-root-port'/>
          <target chassis='3' port='0xa'/>
          <alias name='pci.3'/>
          <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
        </controller>
        <controller type='pci' index='4' model='pcie-root-port'>
          <model name='pcie-root-port'/>
          <target chassis='4' port='0xb'/>
          <alias name='pci.4'/>
          <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x3'/>
        </controller>
        <controller type='pci' index='5' model='pcie-root-port'>
          <model name='pcie-root-port'/>
          <target chassis='5' port='0xc'/>
          <alias name='pci.5'/>
          <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x4'/>
        </controller>
        <controller type='pci' index='6' model='pcie-root-port'>
          <model name='pcie-root-port'/>
          <target chassis='6' port='0xd'/>
          <alias name='pci.6'/>
          <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x5'/>
        </controller>
        <controller type='pci' index='7' model='pcie-root-port'>
          <model name='pcie-root-port'/>
          <target chassis='7' port='0xe'/>
          <alias name='pci.7'/>
          <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x6'/>
        </controller>
        <controller type='pci' index='8' model='pcie-to-pci-bridge'>
          <model name='pcie-pci-bridge'/>
          <alias name='pci.8'/>
          <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
        </controller>
        <controller type='virtio-serial' index='0'>
          <alias name='virtio-serial0'/>
          <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
        </controller>
        <interface type='direct'>
          <mac address='MACADDRESS'/>
          <source dev='enp3s0' mode='bridge'/>
          <target dev='macvtap3'/>
          <model type='virtio'/>
          <alias name='net0'/>
          <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
        </interface>
        <serial type='pty'>
          <source path='/dev/pts/2'/>
          <target type='isa-serial' port='0'>
            <model name='isa-serial'/>
          </target>
          <alias name='serial0'/>
        </serial>
        <console type='pty' tty='/dev/pts/2'>
          <source path='/dev/pts/2'/>
          <target type='serial' port='0'/>
          <alias name='serial0'/>
        </console>
        <channel type='spicevmc'>
          <target type='virtio' name='com.redhat.spice.0' state='disconnected'/>
          <alias name='channel0'/>
          <address type='virtio-serial' controller='0' bus='0' port='1'/>
        </channel>
        <input type='tablet' bus='usb'>
          <alias name='input0'/>
          <address type='usb' bus='0' port='1'/>
        </input>
        <input type='mouse' bus='ps2'>
          <alias name='input1'/>
        </input>
        <input type='keyboard' bus='ps2'>
          <alias name='input2'/>
        </input>
        <graphics type='spice' port='5900' autoport='yes' listen='127.0.0.1'>
          <listen type='address' address='127.0.0.1'/>
          <gl enable='no'/>
        </graphics>
        <sound model='ich9'>
          <alias name='sound0'/>
          <address type='pci' domain='0x0000' bus='0x00' slot='0x1b' function='0x0'/>
        </sound>
        <video>
          <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>
          <alias name='video0'/>
          <address type='pci' domain='0x0000' bus='0x08' slot='0x01' function='0x0'/>
        </video>
        <hostdev mode='subsystem' type='mdev' managed='no' model='vfio-pci' display='off'>
          <source>
            <address uuid='VGPU-UUID'/>
          </source>
          <alias name='hostdev0'/>
          <address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
        </hostdev>
        <memballoon model='virtio'>
          <stats period='5'/>
          <alias name='balloon0'/>
          <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
        </memballoon>
      </devices>
      <seclabel type='dynamic' model='selinux' relabel='yes'>
        <label>system_u:system_r:svirt_t:s0:c320,c936</label>
        <imagelabel>system_u:object_r:svirt_image_t:s0:c320,c936</imagelabel>
      </seclabel>
      <seclabel type='dynamic' model='dac' relabel='yes'>
        <label>+107:+107</label>
        <imagelabel>+107:+107</imagelabel>
      </seclabel>
      <qemu:commandline>
        <qemu:arg value='-set'/>
        <qemu:arg value='device.hostdev0.x-pci-vendor-id=0x10de'/>
        <qemu:arg value='-set'/>
        <qemu:arg value='device.hostdev0.x-pci-device-id=0x1bb0'/>
        <qemu:arg value='-set'/>
        <qemu:arg value='device.hostdev0.x-pci-sub-vendor-id=0x10de'/>
        <qemu:arg value='-set'/>
        <qemu:arg value='device.hostdev0.x-pci-sub-device-id=0x1bb0'/>
        <qemu:arg value='-uuid'/>
        <qemu:arg value='VGPU-UUID'/>
      </qemu:commandline>
    </domain>
    
    
    opened by noideaman 9
  • Verify all devices in group 25 are bound to vfio-<bus> or pci-stub and not already in use - mdev question

    Verify all devices in group 25 are bound to vfio- or pci-stub and not already in use - mdev question

    Hi,

    i guess this is a question about how to use mdevctl properly. I folowed two tutorials on how to set up a vGPU in Proxmox. One from Craft Computing and the other found on this github page. The first one starts and defines the mdev devices prior to creating a VM, the latter uses the uuid of a previously created mdev device but uses the Proxmox web gui to assign a mdev device

    My setup is:

    • GTX 1060 (first pci device)
    • GTX 1050 Ti (second pci device passed through to a Windows 10 machine, and not used by mdev)
    • Proxmox 7
    • Nvidia 470.63 patched driver

    Output of nvidia-smi

    +-----------------------------------------------------------------------------+
    | NVIDIA-SMI 470.63       Driver Version: 470.63       CUDA Version: N/A      |
    |-------------------------------+----------------------+----------------------+
    | GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
    | Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
    |                               |                      |               MIG M. |
    |===============================+======================+======================|
    |   0  NVIDIA GeForce ...  On   | 00000000:2B:00.0 Off |                  N/A |
    |  0%   40C    P8     8W / 120W |     23MiB /  6143MiB |      0%      Default |
    |                               |                      |                  N/A |
    +-------------------------------+----------------------+----------------------+
    |   1  NVIDIA GeForce ...  On   | 00000000:2C:00.0 Off |                  N/A |
    | 30%   30C    P8    N/A /  75W |     15MiB /  4095MiB |      0%      Default |
    |                               |                      |                  N/A |
    +-------------------------------+----------------------+----------------------+
                                                                                   
    +-----------------------------------------------------------------------------+
    | Processes:                                                                  |
    |  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
    |        ID   ID                                                   Usage      |
    |=============================================================================|
    |  No running processes found                                                 |
    +-----------------------------------------------------------------------------+
    
    

    output of dmesg|grep -i vpgu

    [   24.792596] vGPU unlock patch applied.
    

    So when i follow the first approach i create the mdev device using

    mdevctl start -u 0b5fd3fb-2389-4a22-ba70-52969a26b9d5 -p 0000:2b:00.0 --type nvidia-47
    

    and define it

    mdevctl define --auto --uuid 0b5fd3fb-2389-4a22-ba70-52969a26b9d5
    

    then in Proxmox conf i added the line

    args: -device 'vfio-pci,sysfsdev=/sys/bus/mdev/devices/0b5fd3fb-2389-4a22-ba70-52969a26b9d5,display=off,id=hostpci0.0,bus=ich9-pcie-port-1,addr=0x0,x-pci-vendor-id=0x10de,x-pci-device-id=0x1b38,x-pci-sub-vendor-id=0x10de,x-pci-sub-device-id=0x11A0' -uuid 0b5fd3fb-2389-4a22-ba70-52969a26b9d5
    

    after starting up the machine (qm start 205) i've got this error

    kvm: -device vfio-pci,sysfsdev=/sys/bus/mdev/devices/0b5fd3fb-2389-4a22-ba70-52969a26b9d5,display=off,id=hostpci0.0,bus=ich9-pcie-port-1,addr=0x0,x-pci-vendor-id=0x10de,x-pci-device-id=0x1b38,x-pci-sub-vendor-id=0x10de,x-pci-sub-device-id=0x11A0: vfio 0b5fd3fb-2389-4a22-ba70-52969a26b9d5: error getting device from group 25: Input/output error
    Verify all devices in group 25 are bound to vfio-<bus> or pci-stub and not already in use
    start failed: QEMU exited with code 1
    

    output of dmesg

    [67364.199643] [nvidia-vgpu-vfio] 0b5fd3fb-2389-4a22-ba70-52969a26b9d5: start failed. status: 0x1 
    

    output of journalctl -u nvidia-vgpu-mgr

    aug 23 08:58:08 pve nvidia-vgpu-mgr[1853774]: vgpu_unlock loaded.
    aug 23 08:58:08 pve nvidia-vgpu-mgr[1853774]: notice: vmiop_env_log: vmiop-env: guest_max_gpfn:0x0
    aug 23 08:58:08 pve nvidia-vgpu-mgr[1853774]: notice: vmiop_env_log: (0x0): Received start call from nvidia-vgpu-vfio module: mdev uuid 0b5fd3fb-2389-4a22-ba70-52969a26b9d5 GPU PCI id >
    aug 23 08:58:08 pve nvidia-vgpu-mgr[1853774]: notice: vmiop_env_log: (0x0): pluginconfig: vgpu_type_id=47
    aug 23 08:58:08 pve nvidia-vgpu-mgr[1853774]: notice: vmiop_env_log: Successfully updated env symbols!
    aug 23 08:58:08 pve nvidia-vgpu-mgr[1853774]: op_type: 0x20801322 failed.
    aug 23 08:58:08 pve nvidia-vgpu-mgr[1853774]: op_type: 0x2080014b failed.
    aug 23 08:58:08 pve nvidia-vgpu-mgr[1853774]: op_type: 0xa0810115 failed.
    aug 23 08:58:08 pve nvidia-vgpu-mgr[1853774]: notice: vmiop_log: (0x0): gpu-pci-id : 0x2b00
    aug 23 08:58:08 pve nvidia-vgpu-mgr[1853774]: notice: vmiop_log: (0x0): vgpu_type : Quadro
    aug 23 08:58:08 pve nvidia-vgpu-mgr[1853774]: notice: vmiop_log: (0x0): Framebuffer: 0x74000000
    aug 23 08:58:08 pve nvidia-vgpu-mgr[1853774]: notice: vmiop_log: (0x0): Virtual Device Id: 0x1b38:0x11e9
    aug 23 08:58:08 pve nvidia-vgpu-mgr[1853774]: notice: vmiop_log: (0x0): FRL Value: 60 FPS
    aug 23 08:58:08 pve nvidia-vgpu-mgr[1853774]: notice: vmiop_log: ######## vGPU Manager Information: ########
    aug 23 08:58:08 pve nvidia-vgpu-mgr[1853774]: notice: vmiop_log: Driver Version: 470.63
    aug 23 08:58:08 pve nvidia-vgpu-mgr[1853774]: op_type: 0x2080012f failed.
    aug 23 08:58:08 pve nvidia-vgpu-mgr[1853774]: notice: vmiop_log: (0x0): Cannot query ECC status. vGPU ECC support will be disabled.
    aug 23 08:58:08 pve nvidia-vgpu-mgr[1853774]: notice: vmiop_log: (0x0): Init frame copy engine: syncing...
    aug 23 08:58:14 pve nvidia-vgpu-mgr[1853774]: error: vmiop_log: (0x0): Timed out (6001 ms) trying to sync
    aug 23 08:58:14 pve nvidia-vgpu-mgr[1853774]: error: vmiop_log: (0x0): failed to sync engine
    aug 23 08:58:16 pve nvidia-vgpu-mgr[1853774]: error: vmiop_log: (0x0): init_device_instance failed for inst 0 with error 7 (init frame copy engine)
    aug 23 08:58:16 pve nvidia-vgpu-mgr[1853774]: error: vmiop_log: (0x0): Initialization: init_device_instance failed error 7
    aug 23 08:58:16 pve nvidia-vgpu-mgr[1853774]: error: vmiop_log: display_init failed for inst: 0
    aug 23 08:58:16 pve nvidia-vgpu-mgr[1853774]: error: vmiop_env_log: (0x0): vmiope_process_configuration: plugin registration error
    aug 23 08:58:16 pve nvidia-vgpu-mgr[1853774]: error: vmiop_env_log: (0x0): vmiope_process_configuration failed with 0x65
    

    When i try the second approach

    i create and define the mdev device like i did above and use that uuid in the Proxmox conf.

    args: -uuid 0b5fd3fb-2389-4a22-ba70-52969a26b9d5
    

    then i i've assigned an mdev device to the VM using the web interface which adds the following line to the VM's conf

    hostpci0: 0000:2b:00.0,mdev=nvidia-47,pcie=1,x-vga=1
    

    Then i start up the machine (qm start 205) which results in this output

    kvm: -device vfio-pci,sysfsdev=/sys/bus/pci/devices/0000:2b:00.0/00000000-0000-0000-0000-000000000205,id=hostpci0,bus=pci.0,addr=0x10: warning: vfio 00000000-0000-0000-0000-000000000205: Could not enable error recovery for the device
    

    It works and sees the vGPU as a Tesla P40, which is correct.

    But when powering down and starting it back up again gives the(more or less) same error as the first approach

    mdev instance '00000000-0000-0000-0000-000000000205' already existed, using it.
    kvm: -device vfio-pci,sysfsdev=/sys/bus/pci/devices/0000:2b:00.0/00000000-0000-0000-0000-000000000205,id=hostpci0,bus=ich9-pcie-port-1,addr=0x0,x-vga=on: vfio 00000000-0000-0000-0000-000000000205: error getting device from group 24: Input/output error
    Verify all devices in group 24 are bound to vfio-<bus> or pci-stub and not already in use
    start failed: QEMU exited with code 1
    

    I'm clearly missing something here. So my question is, which one is the correct approach and how do i get rid of this error

    Thanks

    opened by wvthoog 7
  • Question: Turn all GeForce cards into TCC capable devices?

    Question: Turn all GeForce cards into TCC capable devices?

    Hello!

    Using Linux hypervisor, could your tricks be used to turn all GeForce (from Pascal and up) cards to be TCC capable for Windows Guest? This is the feature we would need. If the answer is yes, but needs modification of your code, we are prepared to pay for this project to modify our ArchLinux virtualization project we are working on.

    Let me know! Thanks for your time!

    opened by nicehashdev 7
  • Maxwell 2.0 support? + where is driver?

    Maxwell 2.0 support? + where is driver?

    Basically Tesla M60 have GM204 (as GTX970), so virtually you can just add both product IDs and it should work. (I would test myself but I cant find a driver)

    By the way, I feel like an idiot, but I can't find a GRID vGPU driver, on Nvidia download page, when I select GRID > vGPU, there is no Linux in operating system, there is xenServer and vSphere, inside windows drivers + NVIDIA-vGPU-kepler-xenserver-version.rpm So, should I use Tesla driver or where can I find a proper driver?

    opened by Casul51 7
  • can't unlock GP104 gtx1080

    can't unlock GP104 gtx1080

    followed all the steps

    blacklisted nvidiafb, nouveau loaded KVM driver NVIDIA UNIX x86_64 Kernel Module 450.80

    dmesg | grep -i nvidia

    [ 4.004210] nvidia-nvlink: Nvlink Core is being initialized, major device number 234 [ 4.004476] nvidia 0000:0b:00.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=io+mem [ 4.103956] NVRM: loading NVIDIA UNIX x86_64 Kernel Module 450.80 Sun Sep 13 14:46:14 UTC 2020 [ 5.608883] audit: type=1400 audit(1629577526.992:3): apparmor="STATUS" operation="profile_load" profile="unconfined" name="nvidia_modprobe" pid=944 comm="apparmor_parser" [ 5.608884] audit: type=1400 audit(1629577526.992:4): apparmor="STATUS" operation="profile_load" profile="unconfined" name="nvidia_modprobe//kmod" pid=944 comm="apparmor_parser" [ 5.626525] input: HDA NVidia HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:03.1/0000:0b:00.1/sound/card1/input28 [ 5.626549] input: HDA NVidia HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:03.1/0000:0b:00.1/sound/card1/input29 [ 5.626567] input: HDA NVidia HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:03.1/0000:0b:00.1/sound/card1/input30 [ 5.626590] input: HDA NVidia HDMI/DP,pcm=9 as /devices/pci0000:00/0000:00:03.1/0000:0b:00.1/sound/card1/input31 [ 5.626697] input: HDA NVidia HDMI/DP,pcm=10 as /devices/pci0000:00/0000:00:03.1/0000:0b:00.1/sound/card1/input32 [ 5.626888] input: HDA NVidia HDMI/DP,pcm=11 as /devices/pci0000:00/0000:00:03.1/0000:0b:00.1/sound/card1/input33 [ 5.626995] input: HDA NVidia HDMI/DP,pcm=12 as /devices/pci0000:00/0000:00:03.1/0000:0b:00.1/sound/card1/input34 [ 6.852630] nvidia 0000:0b:00.0: MDEV: Registered [ 481.449598] nvidia 0000:0b:00.0: MDEV: Unregistering

    dmesg | grep -i nvrm [ 4.103956] NVRM: loading NVIDIA UNIX x86_64 Kernel Module 450.80 Sun Sep 13 14:46:14 UTC 2020 [ 6.533701] NVRM: GPU at 0000:0b:00.0 has software scheduler DISABLED with policy NONE.

    opened by RRPRIME 6
  • GP107GL

    GP107GL

    I don't see any explicit support for the Quadro P400 GPU (based on the GP107GL chip)...should we assume these "lesser" variants are supported or not?

    opened by zack4485 6
  • Mouse in vm

    Mouse in vm

    hello, please help me, i need to add a mouse so that it is in the vm client when i leave the parsec session from the host and so that my program can use it, how to do it?

    opened by rozv11e 0
  • Single instance on 2080ti framebuffer 11GB

    Single instance on 2080ti framebuffer 11GB

    What would be the value for a modified profile for a 2080ti which makes it use all of the available VRAM (11GB) for one instance ?

    When 1GB is 0x3B000000 should 11GB be 0x289000000, correct?

    opened by efschu 2
  • Ampere support

    Ampere support

    @DualCoder In nearest future is it possible to get support Ampere architecture (for example for 3090) or next generation?

    PS. Really I am waiting for new repository upgrade or any news about upgrade.

    opened by JanKonarski 1
  • The VM dies and never comes back to life.

    The VM dies and never comes back to life.

    The VM died suddenly during operation. Log at the time of death:

    [111183.875832] [nvidia-vgpu-vfio] 3b5b5055-de1f-4535-8af3-b443eb10c6bb: ERESTARTSYS received during open, waiting for 25000 milliseconds for operation to complete
    [111183.891179] [nvidia-vgpu-vfio] 3b5b5055-de1f-4535-8af3-b443eb10c6bb: vGPU migration disabled
    [111304.691470] [nvidia-vgpu-vfio] 3b5b5055-de1f-4535-8af3-b443eb10c6bb: vGPU migration disabled
    

    And I can't start that VM anymore. It works again only after a complete reboot of the host. Restart tried:

    [173695.627192] [nvidia-vgpu-vfio] 3b5b5055-de1f-4535-8af3-b443eb10c6bb: ERESTARTSYS received during open, waiting for 25000 milliseconds for operation to complete
    [173695.659145] [nvidia-vgpu-vfio] 3b5b5055-de1f-4535-8af3-b443eb10c6bb: start failed. status: 0x0 
    

    nvidia-vgpu-mgr Log:

    11월 15 16:00:51 nvidia-vgpu-mgr[1740]: VgpuStart {
                                                               uuid: {3b5b5055-de1f-4535-8af3-b443eb10c6bb},
                                                               config_params: "vgpu_type_id=46",
                                                               qemu_pid: 3472883,
                                                               unknown_414: [0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0],
                                                           }
    11월 15 16:00:51 nvidia-vgpu-mgr[3472905]: notice: vmiop_env_log: vmiop-env: guest_max_gpfn:0x0
    11월 15 16:00:51 nvidia-vgpu-mgr[3472905]: notice: vmiop_env_log: (0x0): Received start call from nvidia-vgpu-vfio module: mdev uuid 3b5b5055-de1f-4535-8af3-b443eb10c6bb GPU PCI id 00:01:00.0 config params vgpu_type_id=46
    11월 15 16:00:51 nvidia-vgpu-mgr[3472905]: notice: vmiop_env_log: (0x0): pluginconfig: vgpu_type_id=46
    11월 15 16:00:51 nvidia-vgpu-mgr[3472905]: notice: vmiop_env_log: Successfully updated env symbols!
    11월 15 16:00:51 nvidia-vgpu-mgr[3472905]: cmd: 0x20801322 failed.
    11월 15 16:00:51 nvidia-vgpu-mgr[3472905]: cmd: 0x2080014b failed.
    11월 15 16:00:51 nvidia-vgpu-mgr[3472905]: VgpuConfig {
                                                                  vgpu_type: 46,
                                                                  vgpu_name: "GRID P40-1Q",
                                                                  vgpu_class: "Quadro",
                                                                  vgpu_signature: [],
                                                                  features: "Quadro-Virtual-DWS,5.0;GRID-Virtual-WS,2.0;GRID-Virtual-WS-Ext,2.0",
                                                                  max_instances: 24,
                                                                  num_heads: 4,
                                                                  max_resolution_x: 5120,
                                                                  max_resolution_y: 2880,
                                                                  max_pixels: 17694720,
                                                                  frl_config: 60,
                                                                  cuda_enabled: 1,
                                                                  ecc_supported: 1,
                                                                  mig_instance_size: 0,
                                                                  multi_vgpu_supported: 0,
                                                                  vdev_id: 0x1b3811e8,
                                                                  pdev_id: 0x1b38,
                                                                  fb_length: 0x38000000,
                                                                  mappable_video_size: 0x400000,
                                                                  fb_reservation: 0x8000000,
                                                                  encoder_capacity: 0x64,
                                                                  bar1_length: 0x100,
                                                                  frl_enable: 1,
                                                                  adapter_name: "GRID P40-1Q",
                                                                  adapter_name_unicode: "GRID P40-1Q",
                                                                  short_gpu_name_string: "GP107-A",
                                                                  licensed_product_name: "NVIDIA RTX Virtual Workstation",
                                                                  vgpu_extra_params: [],
                                                              }
    11월 15 16:00:51 nvidia-vgpu-mgr[3472905]: Applying profile nvidia-46 overrides
    11월 15 16:00:51 nvidia-vgpu-mgr[3472905]: Patching nvidia-46/num_heads: 4 -> 1
    11월 15 16:00:51 nvidia-vgpu-mgr[3472905]: Patching nvidia-46/max_resolution_x: 5120 -> 1920
    11월 15 16:00:51 nvidia-vgpu-mgr[3472905]: Patching nvidia-46/max_resolution_y: 2880 -> 1080
    11월 15 16:00:51 nvidia-vgpu-mgr[3472905]: Patching nvidia-46/max_pixels: 17694720 -> 2073600
    11월 15 16:00:51 nvidia-vgpu-mgr[3472905]: Patching nvidia-46/cuda_enabled: 1 -> 1
    11월 15 16:00:51 nvidia-vgpu-mgr[3472905]: Patching nvidia-46/frl_enable: 1 -> 0
    11월 15 16:00:51 nvidia-vgpu-mgr[3472905]: cmd: 0xa0810115 failed.
    11월 15 16:00:51 nvidia-vgpu-mgr[3472905]: notice: vmiop_log: (0x0): Setting mappable_cpu_host_aperture to 10M
    11월 15 16:00:51 nvidia-vgpu-mgr[3472905]: notice: vmiop_log: (0x0): gpu-pci-id : 0x100
    11월 15 16:00:51 nvidia-vgpu-mgr[3472905]: notice: vmiop_log: (0x0): vgpu_type : Quadro
    11월 15 16:00:51 nvidia-vgpu-mgr[3472905]: notice: vmiop_log: (0x0): Framebuffer: 0x38000000
    11월 15 16:00:51 nvidia-vgpu-mgr[3472905]: notice: vmiop_log: (0x0): Virtual Device Id: 0x1b38:0x11e8
    11월 15 16:00:51 nvidia-vgpu-mgr[3472905]: notice: vmiop_log: ######## vGPU Manager Information: ########
    11월 15 16:00:51 nvidia-vgpu-mgr[3472905]: notice: vmiop_log: Driver Version: 510.85.03
    11월 15 16:00:51 nvidia-vgpu-mgr[3472905]: notice: vmiop_log: (0x0): vGPU supported range: (0x70001, 0xd0001)
    11월 15 16:00:51 nvidia-vgpu-mgr[3472905]: cmd: 0x2080012f failed.
    11월 15 16:00:51 nvidia-vgpu-mgr[3472905]: notice: vmiop_log: (0x0): Cannot query ECC status. vGPU ECC support will be disabled.
    11월 15 16:00:51 nvidia-vgpu-mgr[3472905]: notice: vmiop_log: (0x0): Init frame copy engine: syncing...
    11월 15 16:00:51 nvidia-vgpu-mgr[3472905]: notice: vmiop_log: (0x0): vGPU migration enabled
    11월 15 16:00:51 nvidia-vgpu-mgr[3472905]: notice: vmiop_log: display_init inst: 0 successful
    11월 15 16:01:08 nvidia-vgpu-mgr[3472905]: notice: vmiop_log: ######## Guest NVIDIA Driver Information: ########
    11월 15 16:01:08 nvidia-vgpu-mgr[3472905]: notice: vmiop_log: Driver Version: 496.49
    11월 15 16:01:08 nvidia-vgpu-mgr[3472905]: notice: vmiop_log: vGPU version: 0xc0001
    11월 15 16:01:08 nvidia-vgpu-mgr[3472905]: notice: vmiop_log: (0x0): Current max guest pfn = 0x46fe6e!
    11월 15 16:01:12 nvidia-vgpu-mgr[3472905]: notice: vmiop_log: (0x0): Current max guest pfn = 0x47c113!
    11월 15 16:05:38 nvidia-vgpu-mgr[3472905]: notice: vmiop_log: (0x0): Current max guest pfn = 0x47ffea!
    11월 16 09:20:39 nvidia-vgpu-mgr[1740]: VgpuStart {
                                                               uuid: {3b5b5055-de1f-4535-8af3-b443eb10c6bb},
                                                               config_params: "vgpu_type_id=46",
                                                               qemu_pid: 1199000,
                                                               unknown_414: [0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0],
                                                           }
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: notice: vmiop_env_log: vmiop-env: guest_max_gpfn:0x0
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: notice: vmiop_env_log: (0x0): Received start call from nvidia-vgpu-vfio module: mdev uuid 3b5b5055-de1f-4535-8af3-b443eb10c6bb GPU PCI id 00:01:00.0 config params vgpu_type_id=46
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: notice: vmiop_env_log: (0x0): pluginconfig: vgpu_type_id=46
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: notice: vmiop_env_log: Successfully updated env symbols!
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: cmd: 0x20801322 failed.
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: cmd: 0x2080014b failed.
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: VgpuConfig {
                                                                  vgpu_type: 46,
                                                                  vgpu_name: "GRID P40-1Q",
                                                                  vgpu_class: "Quadro",
                                                                  vgpu_signature: [],
                                                                  features: "Quadro-Virtual-DWS,5.0;GRID-Virtual-WS,2.0;GRID-Virtual-WS-Ext,2.0",
                                                                  max_instances: 24,
                                                                  num_heads: 4,
                                                                  max_resolution_x: 5120,
                                                                  max_resolution_y: 2880,
                                                                  max_pixels: 17694720,
                                                                  frl_config: 60,
                                                                  cuda_enabled: 1,
                                                                  ecc_supported: 1,
                                                                  mig_instance_size: 0,
                                                                  multi_vgpu_supported: 0,
                                                                  vdev_id: 0x1b3811e8,
                                                                  pdev_id: 0x1b38,
                                                                  fb_length: 0x38000000,
                                                                  mappable_video_size: 0x400000,
                                                                  fb_reservation: 0x8000000,
                                                                  encoder_capacity: 0x64,
                                                                  bar1_length: 0x100,
                                                                  frl_enable: 1,
                                                                  adapter_name: "GRID P40-1Q",
                                                                  adapter_name_unicode: "GRID P40-1Q",
                                                                  short_gpu_name_string: "GP107-A",
                                                                  licensed_product_name: "NVIDIA RTX Virtual Workstation",
                                                                  vgpu_extra_params: [],
                                                              }
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: Applying profile nvidia-46 overrides
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: Patching nvidia-46/num_heads: 4 -> 1
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: Patching nvidia-46/max_resolution_x: 5120 -> 1920
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: Patching nvidia-46/max_resolution_y: 2880 -> 1080
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: Patching nvidia-46/max_pixels: 17694720 -> 2073600
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: Patching nvidia-46/cuda_enabled: 1 -> 1
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: Patching nvidia-46/frl_enable: 1 -> 0
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: cmd: 0xa0810115 failed.
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: notice: vmiop_log: (0x0): Setting mappable_cpu_host_aperture to 10M
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: notice: vmiop_log: (0x0): gpu-pci-id : 0x100
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: notice: vmiop_log: (0x0): vgpu_type : Quadro
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: notice: vmiop_log: (0x0): Framebuffer: 0x38000000
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: notice: vmiop_log: (0x0): Virtual Device Id: 0x1b38:0x11e8
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: notice: vmiop_log: ######## vGPU Manager Information: ########
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: notice: vmiop_log: Driver Version: 510.85.03
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: notice: vmiop_log: (0x0): vGPU supported range: (0x70001, 0xd0001)
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: cmd: 0x2080012f failed.
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: notice: vmiop_log: (0x0): Cannot query ECC status. vGPU ECC support will be disabled.
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: error: vmiop_log: NVOS status 0x51
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: error: vmiop_log: Assertion Failed at 0xf92b27a8:112
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: error: vmiop_log: 13 frames returned by backtrace
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: error: vmiop_log: /lib/x86_64-linux-gnu/libnvidia-vgpu.so(_nv007217vgpu+0x35) [0x7f99f92e5805]
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: error: vmiop_log: /lib/x86_64-linux-gnu/libnvidia-vgpu.so(_nv007253vgpu+0x16c) [0x7f99f929ee3c]
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: error: vmiop_log: /lib/x86_64-linux-gnu/libnvidia-vgpu.so(_nv007328vgpu+0xf8) [0x7f99f92b27a8]
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: error: vmiop_log: /lib/x86_64-linux-gnu/libnvidia-vgpu.so(+0xb47b6) [0x7f99f92b47b6]
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: error: vmiop_log: /lib/x86_64-linux-gnu/libnvidia-vgpu.so(+0xb62c8) [0x7f99f92b62c8]
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: error: vmiop_log: vgpu(+0x13b7e) [0x563dddc13b7e]
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: error: vmiop_log: vgpu(+0x14c79) [0x563dddc14c79]
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: error: vmiop_log: vgpu(+0xeb43) [0x563dddc0eb43]
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: error: vmiop_log: vgpu(+0xc3b6) [0x563dddc0c3b6]
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: error: vmiop_log: vgpu(+0x3bda) [0x563dddc03bda]
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: error: vmiop_log: /lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x7f99f9a1dd90]
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: error: vmiop_log: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80) [0x7f99f9a1de40]
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: error: vmiop_log: vgpu(+0x3c1d) [0x563dddc03c1d]
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: error: vmiop_log: (0x0): Failed to alloc guest FB memory
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: error: vmiop_log: (0x0): init_device_instance failed for inst 0 with error 2 (vmiop-display: error allocating framebuffer)
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: error: vmiop_log: (0x0): Initialization: init_device_instance failed error 2
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: error: vmiop_log: (0x0): Thread for engine 0x0 could not join with error 0x5
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: error: vmiop_log: (0x0): Failed to free thread event for engine 0x0. Error: 0x5
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: error: vmiop_log: (0x0): Thread for engine 0x4 could not join with error 0x5
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: error: vmiop_log: (0x0): Failed to free thread event for engine 0x4. Error: 0x5
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: error: vmiop_log: (0x0): Thread for engine 0x5 could not join with error 0x5
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: error: vmiop_log: (0x0): Failed to free thread event for engine 0x5. Error: 0x5
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: error: vmiop_log: (0x0): Thread for engine 0x6 could not join with error 0x5
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: error: vmiop_log: (0x0): Failed to free thread event for engine 0x6. Error: 0x5
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: error: vmiop_log: display_init failed for inst: 0
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: error: vmiop_env_log: (0x0): vmiope_process_configuration: plugin registration error
    11월 16 09:20:39 nvidia-vgpu-mgr[1199023]: error: vmiop_env_log: (0x0): vmiope_process_configuration failed with 0x1a
    

    Host GPU : NVidia GTX 1050 Ti

    nvidia-smi:

    $ sudo nvidia-smi
    Wed Nov 16 11:22:19 2022       
    +-----------------------------------------------------------------------------+
    | NVIDIA-SMI 510.85.02    Driver Version: 510.85.03    CUDA Version: 11.6     |
    |-------------------------------+----------------------+----------------------+
    | GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
    | Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
    |                               |                      |               MIG M. |
    |===============================+======================+======================|
    |   0  NVIDIA GeForce ...  On   | 00000000:01:00.0  On |                  N/A |
    | 35%   40C    P0    N/A /  75W |   1743MiB /  4096MiB |      1%      Default |
    |                               |                      |                  N/A |
    +-------------------------------+----------------------+----------------------+
                                                                                   
    +-----------------------------------------------------------------------------+
    | Processes:                                                                  |
    |  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
    |        ID   ID                                                   Usage      |
    |=============================================================================|
    |  No running processes found                                                 |
    +-----------------------------------------------------------------------------+
    
    $ sudo nvidia-smi vgpu
    Wed Nov 16 11:22:22 2022       
    +-----------------------------------------------------------------------------+
    | NVIDIA-SMI 510.85.02              Driver Version: 510.85.03                 |
    |---------------------------------+------------------------------+------------+
    | GPU  Name                       | Bus-Id                       | GPU-Util   |
    |      vGPU ID     Name           | VM ID     VM Name            | vGPU-Util  |
    |=================================+==============================+============|
    |   0  NVIDIA GeForce GTX 105...  | 00000000:01:00.0             |   1%       |
    +---------------------------------+------------------------------+------------+
    
    opened by jclab-joseph 0
  • Graphics are broken when using the merged driver.

    Graphics are broken when using the merged driver.

    Does anyone have the same symptoms? It is not dependent on a specific program and sometimes screen cracks occur on all screens.

    https://user-images.githubusercontent.com/88625531/201567781-64601a9d-9f0d-4059-9de0-49cfd531e9e3.mp4

    Environment

    • XWayland
    • nvidia driver 510.85.03
    • GTX 1050 Ti
    opened by jclab-joseph 0
Owner
Jonathan Johansson
Jonathan Johansson
A fast single-producer, single-consumer lock-free queue for C++

A single-producer, single-consumer lock-free queue for C++ This mini-repository has my very own implementation of a lock-free queue (that I designed f

Cameron 2.9k Jan 5, 2023
A bounded multi-producer multi-consumer concurrent queue written in C++11

MPMCQueue.h A bounded multi-producer multi-consumer concurrent queue written in C++11. It's battle hardened and used daily in production: In the Frost

Erik Rigtorp 836 Dec 25, 2022
A bounded single-producer single-consumer wait-free and lock-free queue written in C++11

SPSCQueue.h A single producer single consumer wait-free and lock-free fixed size queue written in C++11. Example SPSCQueue<int> q(2); auto t = std::th

Erik Rigtorp 576 Dec 27, 2022
C++11 thread safe, multi-producer, multi-consumer blocking queue, stack & priority queue class

BlockingCollection BlockingCollection is a C++11 thread safe collection class that provides the following features: Modeled after .NET BlockingCollect

Code Ex Machina LLC 50 Nov 23, 2022
Bolt is a C++ template library optimized for GPUs. Bolt provides high-performance library implementations for common algorithms such as scan, reduce, transform, and sort.

Bolt is a C++ template library optimized for heterogeneous computing. Bolt is designed to provide high-performance library implementations for common

null 360 Dec 27, 2022
Multi-backend implementation of SYCL for CPUs and GPUs

hipSYCL - a SYCL implementation for CPUs and GPUs hipSYCL is a modern SYCL implementation targeting CPUs and GPUs, with a focus on leveraging existing

Aksel Alpay 609 Dec 26, 2022
CQC (Charmed Quark Controller) a commercial grade, full featured, software based automation system. CQC is built on our CIDLib C++ development system, which is also available here on GitHub.

The CQC Automation System What It Is CQC is a commercial quality, software based automation system, suitable for residential or commercial application

Dean Roddey 61 Dec 13, 2022
Implement a program that computes the approximate grade level needed to comprehend some text.

Readability - CS50 Implement a program that computes the approximate grade level needed to comprehend some text. Reading Levels According to Scholasti

Vanessa Bauer 1 Oct 4, 2021
Industrial-grade RPC framework used throughout Baidu, with 1,000,000+ instances and thousands kinds of services. "brpc" means "better RPC".

中文版 An industrial-grade RPC framework used throughout Baidu, with 1,000,000+ instances(not counting clients) and thousands kinds of services. "brpc" m

The Apache Software Foundation 14.2k Dec 27, 2022
The OpenEXR project provides the specification and reference implementation of the EXR file format, the professional-grade image storage format of the motion picture industry.

OpenEXR OpenEXR provides the specification and reference implementation of the EXR file format, the professional-grade image storage format of the mot

Academy Software Foundation 1.3k Jan 6, 2023
unlock the advanced menu of Lenovo Yoga Slim 7 BIOS

yoga-bios-unlock Based on FlyGoat's work to unlock the BIOS advanced menu documented here, I wrote that tool to unlock my yoga laptop without using a

crito 78 Dec 25, 2022
ASUSTeK AsIO3 I/O driver unlock

AsIo3Unlock ASUSTeK AsIO3 I/O driver unlock Purpose This is proof-of-concept bypass of pseudo-security caller check implemented in AsIO3, "unlocking"

null 20 Nov 8, 2022
A tool to unlock apps sideloading on Windows Phone having unlocked bootloader.

Xapload Unlocker A tool for unlocking app sideloading in Windows Phone having unlocked bootloader. Description Using this tool you can revive your Wi

Fadil Fadz 6 Nov 28, 2022
A fast multi-producer, multi-consumer lock-free concurrent queue for C++11

moodycamel::ConcurrentQueue An industrial-strength lock-free queue for C++. Note: If all you need is a single-producer, single-consumer queue, I have

Cameron 7.4k Jan 3, 2023
A fast single-producer, single-consumer lock-free queue for C++

A single-producer, single-consumer lock-free queue for C++ This mini-repository has my very own implementation of a lock-free queue (that I designed f

Cameron 2.9k Jan 5, 2023
I have created a lower cost approximation of the Toyota PASTA:Portable Automotive Testbed with Adaptability using consumer hardware and Arduino based software

value-pasta-auto I have created a lower cost approximation of the Toyota PASTA:Portable Automotive Testbed with Adaptability using consumer hardware a

Ian Tabor 19 Dec 27, 2022
A bounded multi-producer multi-consumer concurrent queue written in C++11

MPMCQueue.h A bounded multi-producer multi-consumer concurrent queue written in C++11. It's battle hardened and used daily in production: In the Frost

Erik Rigtorp 836 Dec 25, 2022
A bounded single-producer single-consumer wait-free and lock-free queue written in C++11

SPSCQueue.h A single producer single consumer wait-free and lock-free fixed size queue written in C++11. Example SPSCQueue<int> q(2); auto t = std::th

Erik Rigtorp 576 Dec 27, 2022
Inter-process communication library to enable allocation between processes/threads and send/receive of allocated regions between producers/consumer processes or threads using this ipc buffer.

This is a relatively simple IPC buffer that allows multiple processes and threads to share a dynamic heap allocator, designate "channels" between processes, and share that memory between producer/consumer pairs on those channels.

RaftLib 8 Aug 20, 2022
A fast multi-producer, multi-consumer lock-free concurrent queue for C++11

moodycamel::ConcurrentQueue An industrial-strength lock-free queue for C++. Note: If all you need is a single-producer, single-consumer queue, I have

Cameron 7.4k Jan 2, 2023