Add virtual monitors to your windows 10 device! Works with Oculus software, obs, and any desktop sharing software

Overview

License MIT and CC0 or Public Domain, whichever is least restrictive -- Use it

AS IS - NO IMPLICIT OR EXPLICIT warranty This may break your computer, it didn't break mine. It runs in User Mode which means it's less likely to cause system instability like the Blue Screen of Death. Check out the latest release to download

If you want me to build on this donate eth or similar here: 0xB01b6328F8Be53c852a54432bbEe630cE0Bd559a

Thanks to https://github.com/akatrevorjay/edid-generator for the hi-res EDID.

Indirect Display Driver Sample

This is a sample driver that shows how to create a Windows Indirect Display Driver using the IddCx class extension driver.

Background reading

Start at the Indirect Display Driver Model Overview on MSDN.

Customizing the sample

The sample driver code is very simplistic and does nothing more than enumerate a single monitor when its device enters the D0/started power state. Throughout the code, there are TODO blocks with important information on implementing functionality in a production driver.

Code structure

  • Direct3DDevice class
    • Contains logic for enumerating the correct render GPU from DXGI and creating a D3D device.
    • Manages the lifetime of a DXGI factory and a D3D device created for the render GPU the system is using to render frames for your indirect display device's swap-chain.
  • SwapChainProcessor class
    • Processes frames for a swap-chain assigned to the monitor object on a dedicated thread.
    • The sample code does nothing with the frames, but demonstrates a correct processing loop with error handling and notifying the OS of frame completion.
  • IndirectDeviceContext class
    • Processes device callbacks from IddCx.
    • Manages the creation and arrival of the sample monitor.
    • Handles swap-chain arrival and departure by creating a Direct3DDevice and handing it off to a SwapChainProcessor.

First steps

Consider the capabilities of your device. If the device supports multiple monitors being hotplugged and removed at runtime, you may want to abstract the monitors further from the IndirectDeviceContext class.

The INF file included in the sample needs updating for production use. One field, DeviceGroupId, controls how the UMDF driver gets pooled with other UMDF drivers in the same process. Since indirect display drivers tend to be more complicated than other driver classes, it's highly recommended that you pick a unique string for this field which will cause instances of your device driver to pool in a dedicated process. This will improve system reliability in case your driver encounters a problem since other drivers will not be affected.

Ensure the device information reported to IddCxAdapterInitAsync is accurate. This information determines how the device is reported to the OS and what static features (like support for gamma tables) the device will have available. If some information cannot be known immediately in the EvtDeviceD0Entry callback, IddCx allows the driver to call IddCxAdapterInitAsync at any point after D0 entry, before D0 exit.

Careful attention should be paid to the frame processing loop. This will directly impact the performance of the user's system, so making use of the Multimedia Class Scheduler Service and DXGI's support for GPU prioritization should be considered. Any significant work should be performed outside the main processing loop, such as by queuing work in a thread pool. See SwapChainProcessor::RunCore for more information.

Comments
  • Device manager error

    Device manager error

    I wonder if anyone else has had issues trying to install this device manually with device manager. I've tried this while running device manager as an administrator and ran the bat file first. Even after rebooting I still get

    "An error has occurred during the installation of the device."

    I hope something can be done, it'd be lovely to enable a few extra monitors for VR use.

    regards

    opened by DrDillis 9
  • (question) How did you build an EDID with multiple modes?

    (question) How did you build an EDID with multiple modes?

    Sorry for making an issue for this, but discussions are disabled. Anyway... how exactly did you get https://github.com/akatrevorjay/edid-generator to create an EDID with multiple display modes? It seems to me like it only supports building an EDID with a single mode. Or am I understanding this wrong and windows gets the mode list for settings from something different?

    opened by AAGaming00 8
  • Code 19

    Code 19

    I have installed the IddSampleDriver on 2 versions of windows on the same machine, the first one on an original installation of windows worked perfectly, but the second one is a tweaked windows called AtlasOS, and even through all other apps and services have been working so far, the driver install the certificate rightly but when I install it gives me code 19: "Windows cannot start this hardware device because its configuration information (in the registry) is incomplete or damaged. (Code 19)" I have tried to uninstall the driver and install again and many other already given solutions on the others issues but nothing seems to work, and I have no idea on how to make it work as a virtual monitor became basically essential to some of the tasks I do daily, so if anyone can help I'm going to be very happy about it.

    opened by emanuelfranklyn 3
  • Cloning/duplicating display doesn't work, resolution messes up

    Cloning/duplicating display doesn't work, resolution messes up

    I'm using this to try and get Parsec working on a headless computer, and after installation I set the resolution of the virtual monitor to the same as the monitor I had temporarily attached (1920x1080) and set it to duplicate, as I assumed (wrongly, it appears) that it would need to be that way for it to show the "normal" display on the virtual one for Parsec to use. But every time I try, it just resets it to an extremely low resolution, which makes everything big and messes up all my windows, which are now all resized very small and moved around when I revert back to extended vs duplicated. This is on a fairly recent Win10 ver (21H2 I think) and a GTX 770 with updated drivers outputting via HDMI to a FHD monitor, using the latest version (0.0.1.2) of IddSD.

    opened by vertigo220 3
  • Point to the repo of the fork itself

    Point to the repo of the fork itself

    See https://github.com/roshkins/IddSampleDriver/issues/26. Pointed the fork to the main page instead of in the releases as I have added important information in the readme.

    opened by sitiom 2
  • "The ALPC message requested is no longer available." Error code 31

    Device Manager reports this in the device status. "This device is not working properly because Windows cannot load the drivers required for this device. (Code 31)

    The ALPC message requested is no longer available." If it helps, I'm running on Windows 11.

    opened by eeveeishpowered 2
  • Missing resolutions

    Missing resolutions

    This works well, but I have two issues. I can only scroll through 3 resolutions, 1920x1080, 1024x768, 800x600. I need more, and I think it's available, but for some reason I can't access them, is there a way I can fix this?

    Second is, I use this fake virtual display driver so that I can switch off my main display when I'm mirroring it to another one. When the whole screen updates, or when a new window is being drawn, the driver stutters. Why does it stutter? Is that fixable too?

    opened by dannyboi07 2
  • Properly remove and re-install new release

    Properly remove and re-install new release

    Hi, I was wanted to create a driver for a custom resolution for my ultra wide. I compiled the code accordingly and installation through device manager works as expected. However, after I remove the driver using pnputil.exe, everything seems to be alright and the display is removed in the device manager. However, whenever I install a new release I compiled, ad additional monitor is added despite my compiled driver only contains 1 display.

    Now I have like 14 monitors in my device manager 😞

    Any help is appreciated

    opened by JeffersonDing 1
  • Device 'ROOT\DISPLAY\0000' not started: Device has problem: 0x1f (CM_PROB_FAILED_ADD), problem status: 0xc0000001

    Device 'ROOT\DISPLAY\0000' not started: Device has problem: 0x1f (CM_PROB_FAILED_ADD), problem status: 0xc0000001

    os:windows 10.0.19043 i download IddSampleDriver.zip from release tag and follow the steps,when finished image it seem like has problems and the setupapi.dev.log error.txt

    opened by docterling 1
  • Support 3:2 Aspect Ratio Resolutions

    Support 3:2 Aspect Ratio Resolutions

    I use IddSampleDriver for Moonlight (NVIDIA Game Streaming) from my gaming PC to a Surface Pro 3 which is a 3:2 aspect ratio and 2160x1440 resolution. Unfortunately this is not an option in the resolution list and I have been unable to figure out creating a custom resolution since the option is gone from the NVIDIA Control Panel while my monitor is turned off. Please let me know if there is a way to easily add my own resolution, or if you can release an update with 3:2 resolutions such as 2160x1440, I am willing to donate some ETH.

    opened by InternalErrorX 1
  • Point to the repo of the fork itself

    Point to the repo of the fork itself

    See https://github.com/roshkins/IddSampleDriver/issues/26. Pointed the fork to the main page instead of in the releases as I have added important information in the readme.

    Closes #1 Closes #2 Closes #8 Closes #11 Closes #15 Closes #16 Closes #22 Closes #24 Closes #25

    opened by sitiom 0
  • Wrong refresh rate on multiple monitors

    Wrong refresh rate on multiple monitors

    Hi there and thanks for very useful driver. I'm using it in a QEMU-KVM linux virtualized environment where there is a Win11 guest with gpu passthrough. A cable from the VGA output displays directly the virtual machine, while i'm using the created "virtual monitor" attached to "looking glass" so that i can extend the monitor to the host one. Everything works correctly except for the refresh rate of the virtual monitor that should be at a144hz but is capped at 60hz (that is the refresh rate of the physical monitor). If i exclude the physical monitor, and use the virtual one only the refresh rate is correctly set to 144hz (i can spot the difference from 60hz). Is there any clue on this? Thanks for your attention

    Best regards

    opened by MarcoRoccagliSigma 1
  • BAT file

    BAT file

    The BAT file doesn't work because it contains an error: ./CertMgr.exe /add IddSampleDriver.cer /s /r localMachine root It should be.\ instead of ./ So the full working command is: .\CertMgr.exe /add IddSampleDriver.cer /s /r localMachine root

    opened by shpyro 0
  • Low Performance of just Windows Animations

    Low Performance of just Windows Animations

    As the title says, I could for example play intense games at same to normal speeds and such, however just pure windows anims such as opening start or minimizing a window appears very choppy on the real display and vdisplays.

    Windows 11 (Stable) 22H2

    opened by HisashiASM 0
  • not able to remove the monitor created

    not able to remove the monitor created

    I'm not able to unistall the virtual monitor i've created, i could only "disconnect the display" but i'd like to know the procedure to remove it completly

    opened by McGrumpy 2
  • System becomes unresponsive after setting up 4 virtual monitors

    System becomes unresponsive after setting up 4 virtual monitors

    After setting up 4 of these monitors, attempting to move programs to the virtual monitors or set the resolution to the virtual monitors, the entire system crashes and it requires a reboot.

    Any ideas on how to fix this issue?

    opened by CallumCat 0
  • Notes on installation

    Notes on installation

    Certificates

    You certainly don't need certmgr.exe to install the certificates (I'm not even sure if you are even allowed to bundle that). Here is a command that equivalently works using builtin Windows commands:

    certutil -addstore -f root IddSampleDriver.cer
    certutil -addstore -f TrustedPublisher IddSampleDriver.cer
    

    @roshkins Please remove certmgr.exe next time. You can replace the contents of installCert.bat with this:

    @echo off
    
    set CERTIFICATE="%~dp0IddSampleDriver.cer"
    
    certutil -addstore -f root %CERTIFICATE%
    certutil -addstore -f TrustedPublisher %CERTIFICATE%
    
    pause
    

    Silent installation

    I have found out that nefcon allows you to do this, adding the proper device node and then installing the driver all in the command line (Perhaps I can use devcon to do this, but they don't provide publically available binaries and bundle it instead in the WDK). Example:

    # alternatively you can use nefconw for no output
    nefconc --create-device-node --hardware-id ROOT\iddsampledriver --class-name Display --class-guid 4d36e968-e325-11ce-bfc1-08002be10318
    nefconc --install-driver --inf-path IddSampleDriver.inf
    

    Installation Script

    Now we can combine both of those to provide a single, easy-to-use script that sets up everything for you:

    # Install certificates
    certutil -addstore -f root IddSampleDriver.cer
    certutil -addstore -f TrustedPublisher IddSampleDriver.cer
    
    # Copy option.txt to C:\IddSampleDriver if it does not exist
    if (!(Test-Path "C:\IddSampleDriver\option.txt")) {
        Write-Host -Foreground Yellow "'C:\IddSampleDriver\option.txt' not found. Creating..."
        mkdir -force "C:\IddSampleDriver" | Out-Null
        Copy-Item -Path option.txt -Destination "C:\IddSampleDriver"
    }
    
    # Install driver
    nefconw --create-device-node --hardware-id ROOT\iddsampledriver --class-name Display --class-guid 4d36e968-e325-11ce-bfc1-08002be10318
    nefconw --install-driver --inf-path IddSampleDriver.inf
    

    I have added @ge9's IddSampleDriver to Scoop (https://github.com/ScoopInstaller/Nonportable/pull/26). Installation is as easy as doing scoop bucket add nonportable and scoop install iddsampledriver-ge9-np -g in an elevated prompt. If anyone is interested in making a Chocolatey package, feel free to look here.

    Ping @ge9, can you open the issues tab on your fork? People shouldn't be reporting installation issues from your fork in here.

    opened by sitiom 5
Releases(0.1.1)
  • 0.1.1(Nov 22, 2022)

  • 0.0.1(Apr 8, 2021)

    If you'd like to see me develop this, you can donate eth here: 0xB01b6328F8Be53c852a54432bbEe630cE0Bd559a Here is a quick driver that I wrote that makes 5 virtual monitors available! You can increase the resolution (and it will take more gpu resources too, so be careful). Anyways, have some fun! Here are some notes on installation:

    Get 5 virtual monitors for the price of zero!

    Steps (for experienced pros only!!!)

    1. Download the latest release as a zip file, and extract all.

    2. As an administrator, Run the *.bat file to add the driver certificate as a trusted root certificate. (I'm getting reports that the bat might not work, run the command from an elevated command prompt from the extracted folder).

    3. Don't install the inf. Open device manager, click on any device, then click on the "Action" menu and click "Add Legacy Hardware"

    4. Select "Add hardware from a list (Advanced)" and then select Display adapters

    5. Click "Have Disk..." and click the "Browse..." button. Navigate to the extracted files and select the inf file.

    6. You are done! Go to display settings to customize the resolution of the additional displays. These displays show up in Oculus and should be able to be streamed from.

    7. You can enable/disable the display adapter to toggle the monitors.

    Source code(tar.gz)
    Source code(zip)
    IddSampleDriver.zip(60.91 KB)
Owner
Rashi Abramson
Rashi Abramson
A program that allows you to hide certain windows when sharing your full screen

Invisiwind Invisiwind (short for Invisible Window) is an application that allows you to hide certain windows when sharing your full screen.

Joshua T. 75 Dec 20, 2022
Fix some extrinsic parameter importing problems. 6-axis IMU works now. Lidar without ring works now.

LVI-SAM-MODIFIED This repository is a modified version of LVI-SAM. Modification Add function to get extrinsic parameters.The original code assumes the

null 88 Dec 9, 2022
A Keg tracking system that monitors weight

KegScale A Keg tracking system that monitors weight Right now the arduino zeros the scale when it turns on and subracts the weight of 5 gallon corny k

null 11 Mar 2, 2022
BKM-10Rduino is an Arduino based alternative for the Sony BKM-10R control unit typically used with Sony broadcast monitors like the BVM-D20F1a/e/u

BKM-10Rduino BKM-10Rduino is an Arduino (natch) based alternative for the Sony BKM-10R control unit typically used with Sony broadcast monitors like t

Aaron Bonham 11 Oct 5, 2022
Lyrics mod for Beat Saber (Oculus Quest)

BeatSinger BeatSinger is a mod that displays song lyrics while playing Beat Saber. Direct port of BeatSinger for Oculus Quest. Installation ⚠️ Be care

Alexander 13 Nov 8, 2022
hacktober fest 2021 repo, push any code which works for dsa

Hacktoberfest 2021 ✨ This repo contains collection of all competitive programming algorithms. I will be happy to accept any contributions during Hackt

Utkarsh Gupta 1 Oct 30, 2021
A npm package that lets you automate your windows desktop.

js-macro A npm package that lets you automate your windows desktop. npm i js-macro Examples Simple cursor usage const { cursor } = require("js-macro"

5 Jul 30, 2022
A npm package that lets you automate your windows desktop.

js-macro A npm package that lets you automate your windows desktop. npm i js-macro Examples Simple cursor usage const { cursor } = require("js-macro"

5 Jul 30, 2022
Add anything about data structure and algorithm in any language.

Hacktoberfest 2021 Follow the README below to get started! Note : This repo is excluded from the Hacktoberfest but you can still contribute and the re

null 33 Dec 6, 2022
Professor Terence Parr has taught us how to create a virtual machine Now it is time to pwn virtual machine

My First real world CTF Simple Virtual Machine Challenge description Professor Terence Parr has taught us how to create a virtual machine Now it is ti

null 1 Feb 17, 2022
A beginner friendly repo in the world of open source. Contribute here to add here project in any languages.

Hacktober Fest 2021 Heyy There (●'◡'●) Here you can contribute to opensource project in any valid language and project. Just follow the contribution g

Anonymous-inception 6 May 24, 2022
Add a code in any language

Hii I AM SHAMIL THOMAS & I WELCOME YOU TO HacktoberFest 2021 Give a star to the repository if you like it ⭐ Add a code in any language ❓ What's Hackto

null 24 Nov 5, 2022
Any one can add their programs here ,but program should not be repeated.

Hactoberfest2021 To All the Beginners Guys Don't Forget to give star to this repo. Any one can add their programs here ,but program should not be repe

Varun.py 22 Nov 4, 2022
Add a command interpreter (eg., REPL) to any C++ program

Command Interpreter This header-only library makes it easy to add command evaluation to a C++ program. #include "command_interpreter.hpp" class Arith

Empirical Software Solutions, LLC 421 Dec 31, 2022
Bobby Cooke 328 Dec 25, 2022
BMI_automatics-faceshielding-device - this is a project utilizing STM32, MATLAB,Softmax classifier to achieve a portable face shielding(mask) device

BMI_automatics-faceshielding-device this is a project utilizing STM32, MATLAB,Softmax classifier to achieve a portable face shielding(mask) device in

Lyu Tian 2 Dec 23, 2021
Display array is a board that sets 6 ST7735 display with a resolution of 80x160px in a linear array sharing the clock, data, rs, backlight pins together

The display array is a board that sets 6 ST7735 display with a resolution of 80x160px in a linear array sharing the clock, data, rs, backlight pins together, and leaving individual access to the cs lines of each display, This board allows you to display images with a resolution of 480x160px.

Josue Alejandro Gutierrez 70 Dec 19, 2022
Simple command-line program for sharing the display image on a local network.

XCast is a simple server/client command line program for sharing screen under X. With XCast you have the ability to either pull the display from a rem

Vito Čuček 3 Dec 12, 2021
Doom port to the Ikea Tradfri RGB1923R5 and any device using Silicon labs EFR32MG21 based modules

MG21DOOM Doom port to the Ikea Tradfri RGB1923R5 lamp and any device using Silicon labs EFR32MG21 based modules. Coded by Nicola Wrachien. WARNING Do

null 20 Aug 2, 2022