Giter VIP home page Giter VIP logo

vgpu_unlock-rs's Introduction

Rust-based vgpu_unlock

Unlock vGPU functionality for consumer-grade NVIDIA GPUs.

This tool is to be used with the kernel patches from the main vgpu_unlock repository!

Dependencies

  • This tool requires Rust. You can install it via your package manager or via .
  • Rust requires a linker to be installed to be able to create the shared library. Typically, this is installed with the C compiler through your distribution's package manager.
  • The dependencies from the main vgpu_unlock project excluding Python and frida.

Installation

In the following instructions <path_to_vgpu_unlock_rs> needs to be replaced with the path to this repository on the target system.

Install the NVIDIA vGPU driver and kernel driver patches as detailed in the main vgpu_unlock project README. Ignore the steps regarding editing the systemd service unit files.

Run cargo build --release to compile the shared library.

Create the directories /etc/systemd/system/nvidia-vgpud.service.d and /etc/systemd/system/nvidia-vgpu-mgr.service.d.

Create the files /etc/systemd/system/nvidia-vgpud.service.d/vgpu_unlock.conf and /etc/systemd/system/nvidia-vgpu-mgr.service.d/vgpu_unlock.conf with the following:

[Service]
Environment=LD_PRELOAD=<path_to_vgpu_unlock_rs>/target/release/libvgpu_unlock_rs.so

Create the directory /etc/vgpu_unlock which will house the vGPU profile override configuration file.

Create the file /etc/vgpu_unlock/profile_override.toml with the profile fields that are to be overridden. The following is an example for nvidia-55 (GRID P40-2A) that sets the number of heads to 1, sets the framebuffer to be 1920x1080 (1920 * 1080 = 2073600 pixels), enables CUDA, and disables the frame-rate limiter.

[profile.nvidia-55]
num_displays = 1
display_width = 1920
display_height = 1080
max_pixels = 2073600
cuda_enabled = 1
frl_enabled = 0

If you want to enable VM migration or snapshotting, you must recompile the nvidia-vgpu-vfio kernel module with NV_KVM_MIGRATION_UAPI equal to 1. Then, create the file /etc/vgpu_unlock/config.toml and add the following:

unlock_migration = true

Happy hacking!

vgpu_unlock-rs's People

Contributors

erin-allison avatar mbilker avatar polloloco avatar tonymanou avatar

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.