A Windows virtual display driver written in Rust (works with VR, etc)

Overview

Virtual Display Driver

Build Driver GitHub release (with filter)

This is a Windows driver made in Rust which creates a virtual desktop.

It has many uses, such as:

  • A private virtual desktop for VR use
  • For remote desktops
  • Getting a higher resolution (or higher refresh rate) display when you don't have a physical one on-hand (though note you can only use it in software/VR)
  • Other uses? Let me know!

Support: Windows 10 x64 +

How to install

  • Go to the releases section for the latest driver.
  • Download (you may receive a warning, just press accept)
  • Install certificate (see below section)
  • Open Device Manager
    • Click on any item
    • Click on Action menu item -> Add legacy hardware -> Next
    • Click Install the hardware that I manually select from a list (Advanced)
    • Click Next (Show All Devices will be selected)
    • Click Have Disk
    • Browse to the location of the folder, press Ok, and keep clicking the Next buttons

Installing the certificate

The certificate needs installation for Windows to accept the driver

  • In your downloaded zip, double click on the file DriverCertificate.cer
  • A window will popup with a Install Certificate button (click it)
  • Select Local Machine
  • Select Place All Certificates in the following store, click Browse and select Trusted Root Certification Authorities
  • Cick Next and Finish

Disabling the display

Disabling it can be done one of two ways

  • Disable the driver (and enable it only when you need to use)
  • Go to "Display Settings" and select "Show only on 1" (I don't think this setting gets saved across reboots however)

Note: Disabling any/all monitors can be done dynamically at runtime in the upcoming driver/control panel. ๐Ÿ˜„

Updating

  • Open Device Manager
  • Under the Display section, find the Virtual Display driver and double click
  • Click the Driver tab and the Update Driver button
  • Click Browse my computer for drivers, browse for the right location, and click Next

How to build

  • Download and install Visual Studio (use the 2022 edition)
  • Select and install the Desktop development with C++ workload as well as Windows SDK
  • Install the WDK
  • Install cargo-make if you don't have it
  • You can build it with cargo make -p dev build (debug) or cargo make -p prod build (release)
  • ... Or, fork my project and build it with github actions

Debugging

To see panic messages and other information, download DebugViewPP, run it, click on Log->Capture Global Win32 (note, this requires DebugViewPP be run with admin permissions)

Future goals

  • Work on allowing custom resolution / refresh rate
  • More than 1 monitor
  • App for easy configuring monitors

Extra notes

If you enabled while everything has been booted for awhile, some applications may not be able to see the virtual monitor. You can fix this by rebooting while having it enabled (or enable it quickly after you boot up). This seems to be an issue with Windows itself, but I do not know why. It has affected every single virtual monitor driver I have ever tried. If anyone does know, please feel free to share information ๐Ÿ˜ƒ

Contributions

All contributions are welcome! If you have any questions, feel free to post in the project Discussion section

Comments
  • Support custom resolutions/refresh rate

    Support custom resolutions/refresh rate

    Not hard to do, but I am unsure the method I want to go about doing this. I want to make it super easy and simple to do.

    Another concern is that it would require a driver restart in order to show the changes. I'm sure this can be fixed by e.g. exposing the different resolutions/refresh rates to windows instead, but this will require some research.

    If anyone has any suggestions on what you'd like, feel free to say~

    opened by MolotovCherry 2
  • Support multiple monitors

    Support multiple monitors

    Doable. I already put it up to 3 monitors and it seemed fine, but this needs to be inspected more so I can be sure it's optimized in the driver, e.g. 1 thread per monitor.

    opened by MolotovCherry 1
  • Bump bytemuck from 1.13.1 to 1.14.0

    Bump bytemuck from 1.13.1 to 1.14.0

    Bumps bytemuck from 1.13.1 to 1.14.0.

    Changelog

    Sourced from bytemuck's changelog.

    bytemuck changelog

    1.14

    • write_zeroes and fill_zeroes functions: Writes (to one) or fills (a slice) zero bytes to all bytes covered by the provided reference. If your type has padding, this will even zero out the padding bytes.
    • align_offset feature: causes pointer alignment checks to use the align_offset pointer method rather than as-casting the pointer to usize. This may improve codegen, if the compiler would have otherwise thought that the pointer address escaped. No formal benchmarks have been done either way.
    • must_cast feature: Adds must_* family of functions. These functions will fail to compile if the cast requested can't be statically known to succeed. The error messages can be kinda bad when this happens, but eliminating the possibility of a runtime error might be worth it to you.
    Commits
    • ff0b14d chore: Release bytemuck version 1.14.0
    • 88f5c8b chore: Release bytemuck_derive version 1.5.0
    • c22cf36 docs.
    • 01c2a07 derive changelog
    • 24b65bd changelog.
    • 1ba4215 Create align_offset feature so that we can continue to work on 1.34
    • caff759 Use align_offset to check alignment (#176)
    • b38d7d0 Have cfgs as part of the input to impl_unsafe_marker_for_simd (#207)
    • d9b23e3 rename these functions before publishing them.
    • d790c04 Add functions for writing zeroed bytes to &mut impl Zeroable and `&mut [imp...
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Desktop app for configuring monitor

    Desktop app for configuring monitor

    A desktop app with the following features :

    • Connects to driver backend
    • Allows to add/remove specific monitors on the fly
    • Disable / re-enable all monitors
    • Fine grained configuration of resolutions / refresh rates per resolution for each monitor
    opened by MolotovCherry 0
  • Ongoing: Official Rust WDK support

    Ongoing: Official Rust WDK support

    Work is ongoing at the wdkmetadata repository to get the metadata bindings done, and ultimately into windows-rs. Once enough of it is done, we can ditch all the manual binding crates here and fix up the driver code to be even more idiomatic. ๐Ÿ˜ƒ

    Tracking issue https://github.com/microsoft/wdkmetadata/issues/49

    opened by MolotovCherry 0
  • Limit each frame ms time on WaitForSingleObject

    Limit each frame ms time on WaitForSingleObject

    Currently hard coded to 16ms, which is fine for 60hz. We should share the monitor's refresh rate over and wait for the maximum of 1 frame for the refresh rate. Not a big deal right now, but could be a good optimization

    opened by MolotovCherry 0
Releases(v0.1.0)
  • v0.1.0(Sep 13, 2023)

    Currently the first display is hardcoded to 1920x1080@120hz.

    This will be changed in the future to allow customizable resolutions/refresh rates (and perhaps even multiple monitors).

    See instructions on the main page for how to install

    Also note, while I consider this a 0.1.0 release, it's more likely to be beta. Report any bugs/problems you have. If there are any crashes, follow the debugging steps on the main page and you can see the panic and report it.

    Source code(tar.gz)
    Source code(zip)
    virtual-desktop-driver-x64.zip(115.98 KB)
Owner
Cherry
I'm a software engineer who loves Rust, with experience in web technologies, app development, and some game design.
Cherry
Use Git installed in Bash on Windows/Windows Subsystem for Linux (WSL) from Windows and Visual Studio Code (VSCode)

WSLGit This project provides a small executable that forwards all arguments to git running inside Bash on Windows/Windows Subsystem for Linux (WSL). T

A. R. S. 1.1k Jan 3, 2023
Rust crate for interacting with the Windows Packet Filter driver.

NDISAPI-RS NDISAPI-RS is a Rust crate for interacting with the Windows Packet Filter driver. It provides an easy-to-use, safe, and efficient interface

Vadim Smirnov 6 Jun 15, 2023
Platform that enables Windows driver development in Rust. Developed by Surface.

windows-drivers-rs This repo is a collection of Rust crates that enable developers to develop Windows Drivers in Rust. It is the intention to support

Microsoft 1.1k Oct 11, 2023
Fuzzy Index for Python, written in Rust. Works like error-tolerant dict, keyed by a human input.

FuzzDex FuzzDex is a fast Python library, written in Rust. It implements an in-memory fuzzy index that works like an error-tolerant dictionary keyed b

Tomasz bla Fortuna 8 Dec 15, 2022
Windows-rs - Rust for Windows

Rust for Windows The windows crate lets you call any Windows API past, present, and future using code generated on the fly directly from the metadata

Microsoft 7.7k Dec 30, 2022
Use Thunk to build your Rust program that runs on old Windows platforms, support Windows XP and more!

Use Thunk to build your Rust program that runs on old platforms. Thunk uses VC-LTL5 and YY-Thunks to build programs that support old platforms. So, ho

null 6 May 21, 2023
Switch windows of same app with alt + ` on windows pc.

Windows Switcher Switch windows of same app with alt + ` on windows pc. 250k single file executable downloaded from Github Release. No installation re

null 172 Dec 10, 2022
Check if the process is running inside Windows Subsystem for Linux (Bash on Windows)

is-wsl Check if the process is running inside Windows Subsystem for Linux (Bash on Windows) Inspired by sindresorhus/is-wsl and made for Rust lang. Ca

Sean Larkin 6 Jan 31, 2023
Windows Capture Simple Screen Capture for Windows ๐Ÿ”ฅ

Windows Capture โ€ƒ Windows Capture is a highly efficient Rust library that enables you to effortlessly capture the screen using the Graphics Capture AP

null 3 Sep 24, 2023
Works out if this is running from inside a shell, and if so, which one.

pshell pshell answers the question "Is my application running in a shell, and if so, which one". Example: you are installing something and want to mak

Alec Brown 2 Nov 3, 2022
Kusa is a simple CLI tool that works on any platform and displays GitHub contribution graphs.

Kusa is a simple CLI tool that works on any platform and displays GitHub contribution graphs. Installation Homebrew (only macOS) $ brew tap Ryu0118/Ku

Ryu 103 Jun 18, 2023
A chat to help users understand lessons from St. Josemaria Escriva's works

A chat to help users understand lessons from St. Josemaria Escriva's works. I'll be using Rust, OpenAI API, and qdrant vector database. Non-profit code, only looking forward to enlightening minds.

Eduardo Lemos 3 Nov 9, 2023
Lemurs - A lightweight TUI display/login manager written in Rust ๐Ÿ’

Lemurs ?? A TUI Display/Login Manager written in Rust WIP: Whilst the project is working and installable, there are still a lot of bugs and limitation

Gijs Burghoorn 136 Jan 1, 2023
A controller for the display and fan of the Raspberry Pi Waveshare PoE HAT written in Rust ๐Ÿฆ€

???? RustBerry-PoE-Monitor RustBerry-PoE-Monitor is a Rust-based monitoring and control tool for the Raspberry Pi, specifically designed for use with

jack 5 Nov 27, 2023
A CLI tool based on the crypto-crawler-rs library to crawl trade, level2, level3, ticker, funding rate, etc.

carbonbot A CLI tool based on the crypto-crawler-rs library to crawl trade, level2, level3, ticker, funding rate, etc. Run To quickly get started, cop

null 8 Dec 21, 2022
A terminal ASCII media player. View images, gifs, videos, webcam, YouTube, etc.. directly in the terminal as ASCII art.

Terminal Media Player View images, videos (files or YouTube links), webcam, etc directly in the terminal as ASCII. All images you see below are just m

Max Curzi 36 May 8, 2023
A CLI tool for CIs and build scripts, making file system based caching easy and correct (locking, eviction, etc.)

FS Dir Cache A CLI tool for CIs and build scripts, making file system based caching easy and correct (locking, eviction, etc.) When working on build s

Dawid Ciฤ™ลผarkiewicz 5 Aug 29, 2023
A CLI tool you can pipe code and then ask for changes, add documentation, etc, using the OpenAI API.

AiBro This is your own little coding bro, immersed in the world of AI, crypto, and all other types of over hyped tech trends. You can pipe it code and

Josh Bainbridge 5 Sep 5, 2023
ESC/POS driver for Rust ๐Ÿฆ€

recibo - ESC/POS driver for Rust This project provides an implementation for a subset of Epson's ESC/POS protocol used by compatible receipt printers.

Jamie Hall 5 Jun 6, 2023