Giter Club home page Giter Club logo

nvidia-kvm-patcher's Introduction

nvidia-kvm-patcher

Quick Instructions:

1. Start NVIDIA Driver Setup, Exit Before Installing (Unpacks to C:/NVIDIA)
2. Install Windows 10 WDK
3. Install Python 3
4. Enable Testsigning and Reboot
5. Run python /path/to/patcher.py C:/NVIDIA/DisplayDriver/Version/Win10_64/International/Display.Driver
6. Install Driver Through Extracted Installer (In C:/NVIDIA/DisplayDriver/Version)

TLDR

So, so 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

Now, naturally, after some googling, you did something like this (libvirt config):

    <kvm>
      <hidden state='on'/>
    </kvm>

And this solves the problem, by masking off virtualization related CPUIDs/MSRs. However, this comes with the following issue: Naturally, you can't use those virtualization extensions anymore, as the guest has no way of detecting them

Now, supposing we want these extensions enabled, we could be smart and do some magic down at the KVM level to detect when nvidia is probing and only feed it the BS. However, I am not smart, and therefore I am going to do something very dumb...

This script patches the NVIDIA driver to "fix the bug", and then attempts to test sign it (Only setup for Windows 10 x64 currently).

It is fugly, but has been tested to work on NVIDIA drivers 361.91 and 368.39... For test signing to work without additional modification, one must be on Windows 10 x64, have the WDK installed, and run the script as an administrator.

Use At Your Own Risk...

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.

OS Support

At some time, I plan to update this to support OS such as windows 7 and 8, however, at this time, only Windows 10 x64 is supported

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.