Giter Club home page Giter Club logo

nvidia-kvm-patcher's Introduction

Warning: This is completely unsupported and probably unmaintained. Use at your own risk! If you don't understand and accept the risks of test mode, running modified drivers, or trusting hacky patches from people on the internet, then this probably isn't the repo for you!

nvidia-kvm-patcher

Generic fix to NVIDIA Code 43 on Virtual Machines

Quick Instructions

1. Start NVIDIA Driver Setup, Exit Before Installing (Unpacks to C:/NVIDIA, you might have to dupe the folder before exit on recent drivers as they seem to insta-nuke it)
2. Install the appropriate WDK/DDK, See OS Support
3. If on Windows 7, See Windows 7 Workaround
4. Enable Test Mode (bcdedit /set testsigning on) and Reboot
5. Open powershell and run patcher.ps1 C:/NVIDIA/DisplayDriver/Version/Win10_64/International/Display.Driver
6. Install Driver Through Extracted Installer (In C:/NVIDIA/DisplayDriver/Version)

Details

So, the story so far: You have a VM that uses a passed-through NVIDIA graphics card

However, the driver errored out with code 43, or outright blue-screened your VM

This is because NVIDIA "Introduced a Bug" making their driver "Fail" on "Unsupported configurations", such as having a geforce, by "accidentally" detecting the prescence of a hypervisor

Preferred Alternative for recent libvirt + qemu

<domain>
    ...
        <features>
            ...
            <kvm>
                <hidden state='on'/>
            </kvm>
            ...
            <hyperv>
                ...
                <vendor_id state='on' value='whatever'/>
            </hyperv>
            ...
        </features>
    ...
</domain>

Troubleshooting

  1. If testsigning fails, make sure you are running Windows 10 x64, and have the WDK Installed
  2. Windows will attempt to overwrite the driver using versions from windows update, you will want to blacklists these updates using Microsoft's tool: https://support.microsoft.com/en-us/kb/3073930
  3. Having another problem? File an Issue. I would love some feedback on my crappy script.
  4. Still getting error 43? Ensure the graphics card is using Message Signaled Interrupts before rebooting: http://forums.guru3d.com/showthread.php?t=378044
  5. Still getting error 43 even with MSIs? Some system configurations (hypervisor/hardware) may not be capable of supporting a passed through nvidia card. I have listed some systems that I have personally tested below.

OS Support

Windows 7 Workaround

For some reason, at least on the test system, signtool in the Windows 7 WDK Post-Dates The Timestamp (possible reverse timezone compensation???). To get around this, remove all instances of the SKSoftware Certificate using mmc (if you have ran the script before), pre-date your clock by 2 days, and execute gencert.ps1 using powershell.

Tested Working Host Platforms

Tested with a Asus Z170-WS, i7-6700k, and kernel 4.7

  • libvirtd 2.3.0 running qemu 2.6.50 using OVMF UEFI, with PCIe ACS Override patch
  • xen 4.7 using bios
  • retested system 03/29/2019 [Kernel 4.20, libvirtd 5.1.0, virt-manager 2.1.0, qemu 3.0.50, driver 419.67, Windows 10 1804]

Also tested with:

  • Hardware: MSI Z370 Gaming Pro Carbon, i7-8700k, GTX 1080 Ti (Windows driver 391.35), Host system: Ubuntu 18.04, Kernel 4.15, libvirtd 4.0.0, qemu 2.11.1 (OVMF UEFI)
  • ASRock Z170 Extreme7+, i7-6700k, GTX 980 Ti, and Windows Server 2016 Standard (v1607 build 14393.0), Stock Hyper-V role (Host) running Windows Server 2016 Standard (Guest, same version), Gen2 VM config v8, using Discrete Device Assignment

Tested Non-Working Host Platforms

  • libvirtd 2.3.0 running qemu 2.6.50 using bios

nvidia-kvm-patcher's People

Contributors

nazar-pc avatar robertzford avatar sk1080 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nvidia-kvm-patcher's Issues

Windows 10 Enterprise 1903 + nvidia 441.66 on xen works!

Hi

Hardware:
CPU i9-9900K (all 16 cores useable for Windows DomU (VM))
RAM 64GB (Windows DomU 32GB)
Graphics: Nvidia RTX 2070 (Gigabyte) + 441.66 driver
OS: Windows 10 Enterprise 1903
Hypervisor: Xen 4.12 with Centos7

One thing: It was neccessery to add a new signtool path to your script.

One question:
Can I deactivate the testmode after the nvidia driver is installed? Or do I need to leave it on if I want to use the "selfsigned" driver?

BTW: BIG THX FOR THIS PATCH!
TiA

Bsod on win7 (with and without using this repo's script)

I keep noticing the same exact bsod on win7, with/without using this repo's script on the windows7 guest.
Here my spec:

  • Windows 7 ultimate (with sp1) x64
  • Intel cpu (core i3 2.0 GHz)
  • Nvidia 920M
  • Acer Aspire E5-573G-3825
    I currently have popos! 19.04 (ubuntu basically with some minor changes), uefi is enabled in the bios.
    Here is most of my configuration.
    And here is the aforementioned bsod.

windows 10, driver 376.33, error 43

hi,

thanks for you work but unfortunately i didn't succeed to make it work yet
i apply the patch, i got an error :
image
but it seems to said that is ok so i continue
i did the install, at this point everything seem to work but when i restart :

  • in test mode i got error 43
  • without test mode i got error 52 :-(

i try to manually install the certificate that i found next to the patch file but it didn't change anything (except that i didn't get the warning message asking to confirm to install a unsigned driver)

what can i do ?
please help me

my config :
esxi vmware 6.0
pci passthrough gtx 1080 (bought for that and crying because doesn't work :-( )
windows 10

i will be glad to do any kind of test even on win 7

best regards
thank you

How about Xenserver and Windows 7

Hi,
I have test the patch on Windows 7 64 bit running on Xen, still got error 43.
Does the Windows version or KVM/Xen make the different?
How can i debug and trace to fix it on Windows 7 on Xen?

what about a fix for ubuntu on Hyper-V?

Hi, this works great for my Win10 VM on Hyper-V, Thank you.

But If I want a Ubuntu 16.04 VM on Hyper-V, I will still get a error when install the nvidia driver. Is there a fix for Ubuntu then?

TIA.

Windows 10 - Driver 465 & 419.67

Environment

  • OS version: Windows 10 x64
  • VGA: Nvidia 960M
  • VM: Virtualbox 6
  • Host: Ubuntu 18.04

Steps to Reproduce

  1. Download the driver from nvidia
  2. Unpack them
  3. Run the powershell script in order to patch the driver
  4. Run the setup.exe

Expected behavior: What you expected to happen

Solve error 43.

Actual behavior: What actually happened

I am not able to install the driver, the requirements check is not bypassed.
Also by forcing the installation through the "device manager" by selecting the .inf file, I am still getting the error 43.

Getting the same error 43 on 442.59

I've installed vs 2019 and wdk on w2k10 pro, and ran the ps in a powershell session, got some errors:

PS C:\Users\david\Desktop>  .\patcher.ps1 F:\NVIDIA\DisplayDriver\442.59\Win10-DCH_64\International\Display.Driver
[+] Unpacking nvlddmkm.sys
[+] Patching CPUID Check
[+] Modifying Installer Config to Use Extracted Driver
[+] Attempting to Test Sign Driver
Test-Path : Cannot bind argument to parameter 'Path' because it is an empty string.
At C:\Users\david\Desktop\patcher.ps1:111 char:19
+ if(-Not(Test-Path $inf2cat))
+                   ~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Test-Path], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAllowed,Microsoft.PowerShell.Commands.Test
   PathCommand

Test-Path : Cannot bind argument to parameter 'Path' because it is an empty string.
At C:\Users\david\Desktop\patcher.ps1:116 char:19
+ if(-Not(Test-Path $signtool))
+                   ~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Test-Path], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAllowed,Microsoft.PowerShell.Commands.Test
   PathCommand

    [+] Detected OS Type: 10_X64
    [+] Generating Catalog File (this may take a while, and sometimes you may have to press enter to get results)
The expression after '&' in a pipeline element produced an object that was not valid. It must result in a command
name, a script block, or a CommandInfo object.
At C:\Users\david\Desktop\patcher.ps1:147 char:3
+ & $inf2cat /driver:`"$directory`" /os:$ostype | Out-Null
+   ~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:String) [], RuntimeException
    + FullyQualifiedErrorId : BadExpression

    [+] Generating and Installing Certificate
    [+] Signing Catalog File
The expression after '&' in a pipeline element produced an object that was not valid. It must result in a command
name, a script block, or a CommandInfo object.
At C:\Users\david\Desktop\patcher.ps1:156 char:3
+ & $signtool sign /v /n SKSoftware /t http://timestamp.verisign.com/sc ...
+   ~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:String) [], RuntimeException
    + FullyQualifiedErrorId : BadExpression

The expression after '&' in a pipeline element produced an object that was not valid. It must result in a command
name, a script block, or a CommandInfo object.
At C:\Users\david\Desktop\patcher.ps1:157 char:3
+ & $signtool sign /v /n SKSOftware /t http://timestamp.verisign.com/sc ...
+   ~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:String) [], RuntimeException
    + FullyQualifiedErrorId : BadExpression

Can someone please shed some light on it? Thanks :)

Windows 10 - 1903 - WDK - 1903 - Not possible to patch the driver

I have created a Windows VM with 1903 and the latest WDK.
I have tried the Guide from this Website:
https://forums.unraid.net/topic/69670-guide-fix-nvidia-code-43-issue-on-nvidia-gpu/
The first Problem was in Powershell after this command:
Set Execution Policy to Remote Sign with "set-executionpolicy remotesigned"
Then i started ./patcher.ps1 C:\NVIDIA\Display.Driver
I got an error that i cannot execute the Script cause it´s not remotesignd.
I Set : set-executionpolicy unrestricted
After this, your script start working until to the Part you create the cert.
Cert will be created, and then i get 2 error-messages, with the cert. (i can post screenshots if needed)
I copyed the "maybe" patched Driver to my VM on a Windows Server 2016 Host.
I started Setup, it start working, to the Box....installing drivers.
Then i got a message - installing aborted with an red X.
I also tried to install by .inf file...also not working.
In my opinion, there could be a Problem with Windows 1903.
Can you please give me a hint, wich Version i sould use, and wich WDK, or have you a Hint, how i can get this work with Windows 1903.
By the way, thank you for making all these possible, i hope, i can use my Nvidia P1000 in a VM soon. :-)

Automatic Repair

Hey man, love what you're trying to do.

I don't understand the nuances of this fix, but I'm curious if it should work for any hypervisor/host, assuming you're applying to to a Windows 10 x64 Guest? I've tried this numerous times and always end up coming back to Automatic Startup Repair.

My setup:
i7-5820k
64GB DDR4
GTX 970
MSI X99A SLI PLUS

Host - Windows Server 2016 Datacenter - TP5
Guest - Windows 10 Pro
Driver - 368.39-desktop-win10-64bit-international-whql

My resource for discrete device assignment: https://blogs.technet.microsoft.com/virtualization/2015/11/19/discrete-device-assignment-description-and-background/

Unsure if I've missed any pertinent details but if I have, let me know. I'll probably have this page up until I get this damn thing working....

Thanks,

Owen

What exactly do the bytes do?

@sk1080 Can you explain what exactly the bytes you are patching do? The old ones and the new ones.
Are the bytes executable code or are they some sort of config values? I'm trying to understand what you have done here in the hopes that I can adjust things to work for my driver.
The only hint you seem to give is Write-Host '[+] Patching CPUID Check'
I'm not a pro, but I have done some basic reverse engineering and code injection to bypass unnecessary checks in proprietary software before.

Driver Signing Windows 10 Not Test Mode

Awesome work so far.

It patches fine and works great but one of the games I play (PUBG) won't let me launch in test mode. When I manually disable driver signing in safe mode menu It works but as far as I know there isn't a permanent way to disable it. The cert's install fine btw.

Any ideas?

Unable to get patcher to finish

Trying to get a PNY 980 card to work with ProxMox on an MSI BIG BANG-XPOWER II motherboard.

Making decent progress, but I can't seem to figure out what the scripts want.
This is the output of the patch command:
image

Please advise.

Code 52

Anyone worked out how to get Windows to verify the SKSoftware digital certificate?

It installs correctly but will show up with Code 52 unless you disable Driver Signature Enforcement.

Got this to work - can I turn off test mode?

Hi!

I got the patch to work! KVM Ubuntu 16.04 LTS server using Gmasse github guide for GTX 1080 -- I'm using a 740 GT SC (old stuff I had laying around).

I have Windows 10 LTSB in test mode and the passthrough is working finally (no more error 43!) but I am wondering - can I turn off test mode now that the driver is installed?

Thanks a lot for doing this for us! You're great!

Inf2Cat.exe path incorrect

Inf2Cat.exe was located in C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299\x86 for me.

That looks like it would change between versions, so I didn't want to submit a PR with that path added. Seems to me it would make sense to add the bin/ directory to the path and check the path for Inf2Cat, but I don't know enough about powershell to do that myself.

I worked around it by hardcoding the path in my local script.

cert errors ?

Hi. Thanks for all the work you have put into this!!
I tried your scripts, and it seems like they work, but windows refuses to use, has anything changed ?

Since this is the 2nd time around, I also did the -2 days before running the gencert, but it still fails.
Also, oddly enough even though I'm definitely on a win10pro system, the drivers from Nvidia ONLY get installed here:
C:\NVIDIA\DisplayDriver\342.01\Win8_Win7_64\International\Display.Driver

Attaching some screen shots.
On the 'install' capture I did of course tap on 'Trust' (even though button says 'don't install')
Thanks again!

code52
sign-err
trust

Patcher.ps1 causing error while cert.

image

I get this error after checking CPUID (that takes long time).
My VM is running on Proxmox (Qemu) with Windows 10 and I have WDK and SDK that was linked on the repository.
I also enabled remotesigning and test mode, what would be the problem?

Syntax Error?

When running the script from master, like:
.\patcher.ps1 "C:\NVIDIA\DisplayDriver\430.64\Win10_64\International\Display.Driver\"
I get the following error:

Certificate Path:  C:\Users\zebou\nvidia-kvm-patcher\TestSign.cer
Certificate Found In Root Store                                                                                  
    [+] Signing Catalog File                                                                                 
The expression after '&' in a pipeline element produced an object that was not valid. It must result in a    command name, a script block, or a CommandInfo object.                                                       
At C:\Users\zebou\nvidia-kvm-patcher\patcher.ps1:156 char:3                                                  
+ & $signtool sign /v /n SKSoftware /t http://timestamp.verisign.com/sc ...                                  
+   ~~~~~~~~~                                                                                                    
    + CategoryInfo          : InvalidOperation: (:String) [], RuntimeException                                   
    + FullyQualifiedErrorId : BadExpression                                                                                                                                                                               
The expression after '&' in a pipeline element produced an object that was not valid. It must result in a    command name, a script block, or a CommandInfo object.                                                       
At C:\Users\zebou\nvidia-kvm-patcher\patcher.ps1:157 char:3                                                  
+ & $signtool sign /v /n SKSOftware /t http://timestamp.verisign.com/sc ...                                  
+   ~~~~~~~~~                                                                                                    
    + CategoryInfo          : InvalidOperation: (:String) [], RuntimeException                                   
    + FullyQualifiedErrorId : BadExpression                                                                                                                                                                               
PS C:\Users\zebou\nvidia-kvm-patcher>

I'm getting this when running on files from the latest "430.64-desktop-win10-64bit-international-whql.exe" and also the older version I saw you tested on "419.67-desktop-win10-64bit-international-whql.exe"

Test Mode down at the bottom right says
Build 17763.rs5_release.180914-1434

patch for 342.01 ?

Hi,
I tried your patch but first supported versions are 361.91 and above,
is there any way to make this patch work on older versions, especially 342.01 ? (I'm trying to setup a 8600GT in a VM running in a DELL t110ii)

Thanks in advance

Does it works now?

hi @sk1080
first of all thanks for your work for kvm.

I've tried this patch on windows 10 to nvidia 327.20 from nvidia official site

but I'm stucked in stage 6

  1. Install Driver Through Extracted Installer (In C:/NVIDIA/DisplayDriver/Version)

I didn't click any next button in nvidia installer, closes nvidia install in step 1

whenever I try to install, it raise error installer failed (see below, but in my case no items in list)
rkoi8r9

it seems nvidia check file integrity, any ideas?

Not compatible with v382.53 of the driver

The 1080 Ti but it doesn't seem to be compatible with v372.54 of the nvidia driver.

I tried to modify the patches for the new driver:
41FF978804000085C0 # 361.91 - 368.39
41FF97B804000085C0 # 372.54
41FF97E804000085C0 # 382.53

for the batch script the pattern also changes
488D4424504C8D4C24444533C04889442430 # 361.91 - 368.39, 372.54
0000B908000000E8A0870100488BF84885C0 # 382.53

sadly this didn't work out for me. I still got error 43 so I assume nvidia must have changed some things to prevent this.

Maybe you will be able to find a patch for the new driver someday.

I just wanted to share this. You can close this issue if you don't need it.

Latest Drivers?

I just tried the script with 381.65 and got the following:

[+] Unpacking nvlddmkm.sys
[+] Patching CPUID Check
[!] Failure: 0 occurrences of patch pattern found

So I presume the search string has changed. Do we know the latest version which the patcher does work with?

“Install Driver Through Extracted Installer “ failed !

i use qemu 2.9.0 and libvirtd 2.0.0 on ubuntu with kernel 4.13 .
my virtual machine is win10, the graphic card is NVIDIA GTX1070 and the driver is 388.31
i follow the steps listed as below:

  1. Start NVIDIA Driver Setup, Exit Before Installing (Unpacks to C:/NVIDIA)
  2. Install the appropriate WDK/DDK, See OS Support
  3. If on Windows 7, See Windows 7 Workaround
  4. Enable Test Mode and Reboot
  5. Open powershell and run patcher.ps1 C:/NVIDIA/DisplayDriver/Version/Win10_64/International/Display.Driver
  6. Install Driver Through Extracted Installer (In C:/NVIDIA/DisplayDriver/Version

when i goto 6, i double click the setup.exe file under C:/NVIDIA/DisplayDriver/388.31/Win10_64/International/ , then a failure appears :

ttt

i don't know what's going wrong, is the driver version too high ?
thanks for your help !

Error, Code 52 -> Code 43

Hi!

I'm trying to get this work on Ovirt while running windows 10 with 1070.
When I run patcher I get error code: https://i.imgur.com/4qCM4Ox.png
Then I edited code with: https://i.imgur.com/NWXNoHO.png
Now I get this error: https://i.imgur.com/zSyCaPH.png

I ignored these errors and still tried to install. First I get windows error code 52, unverified driver. This can be bypassed with startup option: Reboot with shift key pressed -> Disable driver check.

But after this I'm back to the error code 43.

VM has in log file defined: https://pastebin.com/F4rbdYtz
Where the important is : -cpu Haswell-noTSX,hv_time,hv_relaxed,hv_vapic,hv_spinlocks=0x1fff,hv_vendor_id=123456789abc,kvm=off

Any idea how to fix this?

372.70 Windows Cannot Verify the Driver Signature

Using the newer powershell script method with driver 372.70, it seems to patch the driver successfully but when I restart I get error code 52 (windows cannot verify the driver signature) and the only way to get it to work is to reboot with driver signing disabled. With the older python method and driver 372.54 I don't have this problem and everything works fine. I already tried installing the test certificate the powershell script generates (TestSign.cer) but it doesn't seem to help with the problem.

GTX 560 ti - Error 52

Hello, I have a GTX 560 ti, and I've been trying to get it working on Windows 10 proxmox VM, after patching the nvidia drivers, installing them and rebooting the VM I get Error 52. I tried booting in to "disable driver signature enforcement" mode, but then I just get a blue screen.
When I try patching the drivers I also get this error:
https://i.imgur.com/0yScofx.png
I am using SeaBIOS since the GPU doesn't support UEFI.
Has anybody successfully installed drivers for this card? Or at least any other nvidia 500 series card? If so, could you please share your configs/etc? Thanks!

EDIT: I managed to patch the drivers successfully on another computer, when I install those patched drivers on a VM, after a reboot the VM just constantly blue screens.

Thank you :o)

This is just a Thank You!

This worked great on my

ASUS Sabertooth X99
i7-5820K
GTX 1080
Kernel 4.8.13
qemu 2.7.0 with UEFI
libvirt 2.2.0
Windows 7 x64

Kind Regards
Amon

Syntax error

When I run the patcher script: ./patcher.ps1 C:\Users\<User>\Desktop\NVIDIA\DisplayDriver\<Version>\Win10_64\International\Display.Driver
I get this error
NKVMP_PS1E

Add another path to $inf2cat_paths

Please add the following path to that variable as well. For me, this was the location of that file.

C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/Inf2Cat.exe

Error: Cannot find path '\CurrentUser\PrivateCertStore' because it does not exist.

I got an error trying to patch 417.01 for the GTX 1060 Mobile with Max-Q Design:

I'm on Windows 10 pro.
I ran a powershell as administrator and executed the script as descriped in the Readme. Here is the result:

Certificate Path:  C:\Users\Admin\Desktop\nvidia-kvm-patcher-master\TestSign.cer
Get-ChildItem : Cannot find path '\CurrentUser\PrivateCertStore' because it does not exist.
At C:\Users\Admin\Desktop\nvidia-kvm-patcher-master\gencert.ps1:50 char:9
+ $Cert = Get-ChildItem Cert:\CurrentUser\PrivateCertStore | Where {$_. ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (\CurrentUser\PrivateCertStore:String) [Get-ChildItem], ItemNotFoundExce
   ption
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand

Cert Not Found in Root Store
Certificate not Found in User Store, Creating
Adding Certificate to Root Store
    [+] Signing Catalog File
The following certificate was selected:
    Issued to: SKSoftware
    Issued by: SKSoftware
    Expires:   Wed Dec 04 08:54:34 2019
    SHA1 hash: 78CE60FA3EDB26CEE5612AEBB0760648B5A62BAB

Done Adding Additional Store
Successfully signed: C:\NVIDIA\DisplayDriver\417.01\Win10_64\International\Display.Driver./nv_disp.cat

Number of files successfully Signed: 1
Number of warnings: 0
Number of errors: 0
The following certificate was selected:
    Issued to: SKSoftware
    Issued by: SKSoftware
    Expires:   Wed Dec 04 08:54:34 2019
    SHA1 hash: 78CE60FA3EDB26CEE5612AEBB0760648B5A62BAB

Done Adding Additional Store
Successfully signed: C:\NVIDIA\DisplayDriver\417.01\Win10_64\International\Display.Driver\nvlddmkm.sys

Number of files successfully Signed: 1
Number of warnings: 0
Number of errors: 0

In order to run the powershell script I had to run Set-ExecutionPolicy Unrestricted first! Otherwise Windows wouldn't let me run it.

Trying to run C:\NVIDIA\DisplayDriver\417.01\Win10_64\International\setup.exe results in an error message:
Windows cannot access the specified device, patch or file. You may not have the appropriate permissions to access the item.

Running it as administrator results in the same message.

Still receiving code 43 on Proxmox hosted Win10 guest, Gigabyte GTX 950

I'll try and provide as much info as I can here. Host machine is as follows:

Asrock
H97m-ITX/ac Motherboard
i7 4790
16GB non-ECC DDR3
2GB Gigabyte GTX 950

Currently running Proxmox 5.2-10, Qemu/KVM version 2.12.1. Confirmed IOMMU is available and enabled with all the documented steps to get that functional.

Guest OS is a nearly stock Win10 Pro 1803 install. Used Shutup10 to turn off the recommended options for this specific VM. Somewhere along the line of trying to troubleshoot getting the VM to even boot earlier I managed to get it reliably booting to where I can RDP in but now get the code 43 error. Here's my VM conf file as well as the process command line Proxmox is running with:

#args: -cpu host,+kvm_pv_unhalt,+kvm_pv_eoi,hv_vendor_id=Nvidia43FIX,kvm=off
hostpci0: 01:00.0,pcie=1,x-vga=1,romfile=Gigabyte.GTX950.2048.150806.rom
hostpci1: 01:00.1,pcie=1
agent: 1
bios: ovmf
boot: c
bootdisk: virtio0
cores: 4
cpu: host,hidden=1
cpuunits: 256
efidisk0: local-lvm:vm-100-disk-1,size=128K
ide0: local:iso/virtio-win-0.1.160.iso,media=cdrom,size=315276K
ide2: local:iso/Win10_Edu_1803_English_x64.iso,media=cdrom
machine: q35
memory: 6144
name: w10
net0: virtio=D6:07:4D:CD:BF:D2,bridge=vmbr0
numa: 1
ostype: win10
scsihw: virtio-scsi-pci
smbios1: uuid=f050c7d6-6ac2-4d7e-badb-2a2da01c7d6f
sockets: 1
virtio0: local-lvm:vm-100-disk-0,cache=writeback,size=128G
vmgenid: 0264bdbf-e2f6-4eae-ba9c-946568b7cfcf
root      2317 47.5 39.1 7988556 6329140 ?     SLl  10:45  36:57 /usr/bin/kvm -id 100 -name w10 -chardev socket,id=qmp,path=/var/run/qemu-server/100.qmp,server,nowait -mon chardev=qmp,mode=control -chardev socket,id=qmp-event,path=/var/run/qemu-server/100-event.qmp,server,nowait -mon chardev=qmp-event,mode=control -pidfile /var/run/qemu-server/100.pid -daemonize -smbios type=1,uuid=f050c7d6-6ac2-4d7e-badb-2a2da01c7d6f -drive if=pflash,unit=0,format=raw,readonly,file=/usr/share/pve-edk2-firmware//OVMF_CODE.fd -drive if=pflash,unit=1,format=raw,id=drive-efidisk0,file=/dev/pve/vm-100-disk-1 -smp 4,sockets=1,cores=4,maxcpus=4 -nodefaults -boot menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg -vga none -nographic -no-hpet -cpu kvm64,+lahf_lm,+sep,+kvm_pv_unhalt,+kvm_pv_eoi,hv_vendor_id=proxmox,hv_spinlocks=0x1fff,hv_vapic,hv_time,hv_reset,hv_vpindex,hv_runtime,hv_relaxed,hv_synic,hv_stimer,enforce,kvm=off -m 6144 -object memory-backend-ram,id=ram-node0,size=6144M -numa node,nodeid=0,cpus=0-3,memdev=ram-node0 -device vmgenid,guid=0264bdbf-e2f6-4eae-ba9c-946568b7cfcf -readconfig /usr/share/qemu-server/pve-q35.cfg -device usb-tablet,id=tablet,bus=ehci.0,port=1 -device vfio-pci,host=01:00.0,id=hostpci0,bus=ich9-pcie-port-1,addr=0x0,romfile=/usr/share/kvm/Gigabyte.GTX950.2048.150806.rom -device vfio-pci,host=01:00.1,id=hostpci1,bus=ich9-pcie-port-2,addr=0x0 -chardev socket,path=/var/run/qemu-server/100.qga,server,nowait,id=qga0 -device virtio-serial,id=qga0,bus=pci.0,addr=0x8 -device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 -iscsi initiator-name=iqn.1993-08.org.debian:01:e87aa99ef667 -drive file=/var/lib/vz/template/iso/virtio-win-0.1.160.iso,if=none,id=drive-ide0,media=cdrom,aio=threads -device ide-cd,bus=ide.0,unit=0,drive=drive-ide0,id=ide0 -drive file=/var/lib/vz/template/iso/Win10_Edu_1803_English_x64.iso,if=none,id=drive-ide2,media=cdrom,aio=threads -device ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2 -drive file=/dev/pve/vm-100-disk-0,if=none,id=drive-virtio0,cache=writeback,format=raw,aio=threads,detect-zeroes=on -device virtio-blk-pci,drive=drive-virtio0,id=virtio0,bus=pci.0,addr=0xa,bootindex=100 -netdev type=tap,id=net0,ifname=tap100i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown,vhost=on -device virtio-net-pci,mac=D6:07:4D:CD:BF:D2,netdev=net0,bus=pci.0,addr=0x12,id=net0 -rtc driftfix=slew,base=localtime -machine type=q35 -global kvm-pit.lost_tick_policy=discard

I originally tried the oldest driver I could find that supported this card which, according to Nvidia's own old drivers page, is 388.43. Also tried 391.35 per confirmation from other users here that it worked. Both times I've done a full DDU run between attempts. Windows' own auto driver install has been disabled via DDU so I haven't run into issues with it making attempts to interfere.

With all that said, both driver versions above that I've attempted have not been successful with this patch. Not sure if there's something I'm potentially missing.

What to run

Hi

I have a ESXI 6.0 with a Windows 10 VM.
I've run a your scripts, without any error's after i've run the "gencert.ps1".
What I have to run after this steps?
Driver Version 384.94

I've added added
pciHole.start = "1200"
pciHole.end = "2200"
hypervisor.cpuid.v0 = FALSE
to the VMX without success(With full system new installed).

Thanks
iGlaedr
System
i7 6700K
16 GB RAM
GA-Z170M-D3H
Zotac 980 TI >> Passthrough to WIN 10 VM

NVIDIA Installer Failed

Hello,

Great script! Thanks for all your effort.

I have been able to patch the driver successfully after some slight modifications to the script for paths, etc. I am facing an issue when installing the driver on the VM. The installer application fails with not much in the way of error messages. All I can see is "Graphics driver: Failed" The application does proceed past the compatibility checks before failing so I'm assuming it can recognize the GPU in the VM.

image

I did notice an event error around this time, but it might be unrelated. I get a lot of printer driver errors due to redirection since this is a terminal server. Here is the event:

Driver install failed, result=0x80070490 for devnode 'SWD\PRINTENUM\{FD5B3BFC-1A2D-4AC2-9870-13D1F154FDF6}'

Here is my environment:

Host: Server 2016 Datacenter Hyper-V Host
VM: Server 2016 Datacenter
GPU: NVIDIA GTX 1060 6GB (Passed to the VM through DDA)
Driver Version:

I was also a little unclear on which driver I should be grabbing from NVIDIA. I was following a guide that someone posted and it led me here. They were instructing people to use the CUDA installer, which didn't make any sense to me so I used the driver listed above.

...Just to be thorough, Installing the 442.19 Studio Driver unpatched does result in a proper device name in device manager, but I do receive error 43. This leads me to believe that DDA is working as expected.

  • Couple more troubleshooting steps I took:

    • Made sure DisplayDriver.nvi was pointing to nvlddmkm.sys
    • Made sure nvlddmkm.sy_.bak (17,221 KB) and nvlddmkm.sys (22,668 KB) had different file sizes.

Would love to help with development, but I haven't jumped into a disassembler in a few years and would still be a bit lost with anything driver related.

driver 430.64

patching seems not possible.

[+] Unpacking nvlddmkm.sys
[!] Failure: Unable to unpack nvlddmkm.sys

Still error code 43. Using Matebook X Pro laptop with dGPU. Windows 10 sees device, drivers install fine, but drivers block it from starting (guessing because it's prime). Have extracted vbios from BIOS in bare metal Windows 10 before running VM.

Error 43 with both 442.59 and 460.89 on Qubes 4.0.3 with Xen 4.8.5 and Windows 10 Pro 20H2/19042

I tried patching Nvidia drivers 442.59 and 460.89 to use my GTX 1060 6GB on Qubes 4.0.3 with Xen 4.8.5 but I sadly still get error 43.

The script for patching and signing went through without errors (after I fixed it up for newer versions of the Windows SDK). The driver is signed by SKSoftware:

signed_driver

The GPU is attached to the Windows VM with permissive and no-strict-reset, although enabling or disabling these does not make a difference for me:

dom0:01_00.0   VGA compatible controller: NVIDIA Corporation GP106 [GeForce GTX 1060 6GB]    Windows-Qube (permissive=True, no-strict-reset=True)
dom0:01_00.1   Audio device: NVIDIA Corporation GP106 High Definition Audio Controller       Windows-Qube (permissive=True, no-strict-reset=True)

Nouveau is blacklisted and the PCIe devices are hidden with the following in the kernel commandline: rd.qubes.hide_pci=01:00.0,01:00.1

Any ideas? (Apart from buying an AMD card, which I would do if they were available…)

Still NVIDIA driver error code 43 on Windows 10/VirtualBox

Hello,

I was trying to passthrough one of my NVIDIA Titan X (pascal)s to guest Windows 10 OS in VirtualBox.
First, I made a new virtual machine and installed Windows 10 on it.
I applied ACS override patch on the host OS to split the IOMMU groups and passed my GPU to the VirtualBox guest OS.
I was able to see an unknown VGA driver in the device manager (which came up as NVIDIA Tital X (pascal) after I installed the NVIDIA driver).
Then, I have followed your instructions to patch the NVIDIA installer in testsigning mode (The watermark was there and I tried NVIDIA driver version 384.76).
The patch was successful and the installer installed the driver correctly.
However, after the required reboot I saw NVIDIA driver error code 43 in the device manager.

Do you think this can be due to some issues in VirtualBox?
Have you tested passing through a GPU and installing NVIDIA driver on VirtualBox guest OS?
If you did, was it successful?

gtx680, unraid, still error 43

Hello, and thank you for writing this patcher.

Unfortunately I haven't gotten it to work properly so far. I followed the instructions, even added the kvm hidden property and tried to enable MSI, but the error 43 still persists.

GPU:
Zotac GTX 680 amp
driver: 391.24

System:
unRaid 6.5
qemu 2.11.1
libvirt 4.0.0

VM settings:
ovmf
bios: Q35-2.11
GTX680 added as secondary gpu with vnc gpu as first.

I have no idea what could be amiss except for maybe my hardware not being compatible (but the gpu passthrough works fine with an ubuntu guest so I don't know).
MSI does not seem to be active even with the MSISupported DWORD added in the registry.

I tried doing this, but it keeps spitting this error out.

[+] Patching CPUID Check
[+] Modifying Installer Config to Use Extracted Driver
[+] Attempting to Test Sign Driver
    [+] Detected OS Type: 10_X64
    [+] Generating Catalog File (this may take a while)
    [+] Generating and Installing Certificate
    [+] Signing Catalog File
The following certificate was selected:
    Issued to: SKSoftware
    Issued by: SKSoftware
    Expires:   Sun Oct 14 20:49:11 2018
    SHA1 hash: BDA6E827674375E713DCAD16F660B5113DE68E3C

Done Adding Additional Store
SignTool Error: The specified timestamp server either could not be reached or
returned an invalid response.
SignTool Error: An error occurred while attempting to sign: C:\NVIDIA\DisplayDriver\387.92\Win10_64\International\Display.Driver./nv_disp.cat

Number of files successfully Signed: 0
Number of warnings: 0
Number of errors: 1
The following certificate was selected:
    Issued to: SKSoftware
    Issued by: SKSoftware
    Expires:   Sun Oct 14 20:49:11 2018
    SHA1 hash: BDA6E827674375E713DCAD16F660B5113DE68E3C

Done Adding Additional Store
SignTool Error: The specified timestamp server either could not be reached or
returned an invalid response.
SignTool Error: An error occurred while attempting to sign: C:\NVIDIA\DisplayDriver\387.92\Win10_64\International\Display.Driver\nvlddmkm.sys

Number of files successfully Signed: 0
Number of warnings: 0
Number of errors: 1```

Did anyone succeed with this patch for NVIDIA Pascal?

Hi,

I tried every possible workaround and I simply can't get past Code 43.

Ubuntu 16.04.02
libvirtd (libvirt) 2.2.0
QEMU emulator version 2.6.2

ASUS X-99
NVIDIA 1060, 1080Ti

I have tried with

            <kvm>
                <hidden state='on'/>
            </kvm>
            ...
            <hyperv>
                <vendor_id state='on' value='whatever'/>
            </hyperv>

and also with patched drivers (I successfully patched the drivers) ... still Code 43.

And I verified that everything else works as expected since I did successfully pass through AMD RX480 and with works perfectly.

@sk1080 did you try this on Pascal GPUs?

Thanks!

Code 43 after installing

Hi, I'm using Arch Linux, 64 bit, I've done everything associated with setting up a dedicated GPU for my qemu Windows 10 Home x64 VM, including this patch. I still get Code 43. I also am unable to set the interrupts to MSI, messing with the registry does nothing, and I've double checked that I'm editing the right entry. Here are my relavent components:

MSI 970 G motherboard
AMD FX-8350 CPU
PNY GTX 970 4GB GPU (which has been blocked for the host with a vfio module)

I'm using libvirt + qemu + virt-manager

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.