virtual-display-rs icon indicating copy to clipboard operation
virtual-display-rs copied to clipboard

Download latest build here

Open MolotovCherry opened this issue 10 months ago • 20 comments

The latest master build has a lot of features and fixes, and is stable.

Between the current stable release and latest master, these are the following feature changes:

  • no admin access required for state updates to driver (cli tool, python bindings, or future gui)
  • working cli tool (thanks @kylewlacy!) (set NO_COLOR/FORCE_COLOR env var to disable or force enable colors)
  • optimized performance when under high cpu load
  • lots of miscellaneous improvements and fixes
  • hardware cursor support (for remote desktop apps, this is a big plus!)
  • up to 16 monitors (minus your only existing monitors, usable number might be slightly lower)
  • complete bindings for rust, and python (python 3.7+)
    • examples on how to use it are here
  • windows service which does the job of starting persisted monitors on boot (disable or don't install if you're not interested in persistence)
    • place vdd-user-session-service.exe wherever you want
    • run as admin .\vdd-user-session-service.exe --install to install service
    • to uninstall, run as admin .\vdd-user-session-service.exe --uninstall
    • (you must keep the exe at the same location, otherwise the system won't be able to find it. if you want to re-locate it, uninstall the service first, move to new location, then reinstall it)

Note: there is currently no gui in master release

Download here - updated 7/8/24

To install:

  • uninstall the driver completely
  • Follow the manual driver installation steps here (you can skip the registry file step, and skip certificate step if certificate is already installed)

MolotovCherry avatar Apr 09 '24 18:04 MolotovCherry

image Didnot see the vdd-user-session-service.exe in the folder

psychrabi avatar May 26 '24 16:05 psychrabi

Didnot see the vdd-user-session-service.exe in the folder

@psychrabi How did you download it? I see it in the zip from the provided download link in the post

image

MolotovCherry avatar May 26 '24 17:05 MolotovCherry

I redownloaded the driver now and i see the service.exe now image

psychrabi avatar May 27 '24 07:05 psychrabi

The download button on the job is not showing, why? I can't download the driver :(

fabiomilson avatar Aug 18 '24 04:08 fabiomilson

The download button on the job is not showing, why? I can't download the driver :(

@fabiomilson You can click the name of the artifact (driver) to initiate download

image

MolotovCherry avatar Aug 18 '24 05:08 MolotovCherry

Where is the documentation on how to use vdd-user-session-service.exe? The help flag isnt really telling much either:

 .\vdd-user-session-service.exe --help
Usage: vdd-user-session-service.exe [OPTIONS]

Options:
  -i, --install    Install the service
  -u, --uninstall  Uninstall the service
  -h, --help       Print help
  -V, --version    Print version

tristan-k avatar Aug 30 '24 15:08 tristan-k

  • .\vdd-user-session-service.exe --install

@tristan-k As it says in the first post: As admin, run .\vdd-user-session-service.exe --install to install it To uninstall it run as admin .\vdd-user-session-service.exe --uninstall

MolotovCherry avatar Aug 30 '24 15:08 MolotovCherry

.\vdd-user-session-service.exe -i

yaole-A avatar Aug 30 '24 15:08 yaole-A

So vdd-user-session-service.exe is just for installing the service but how do I create and edit virtual displays?

tristan-k avatar Aug 30 '24 15:08 tristan-k

Will HDR be added to this latest driver later?

yaole-A avatar Aug 30 '24 16:08 yaole-A

use the cli.exe to add monitor

yaole-A avatar Aug 30 '24 16:08 yaole-A

@yaoleiliu I'll look into HDR when I have time, but right now there's no ETA since I've been very busy.

@tristan-k Use virtual-display-driver-cli.exe to control the virtual displays. How to use it is displayed in the help commands, including subcommands.

.\virtual-display-driver-cli.exe --help
.\virtual-display-driver-cli.exe <subcommand> --help

MolotovCherry avatar Aug 30 '24 16:08 MolotovCherry

Thanks. I just installed the certificate with .\install-cert.bat, the service with .\vdd-user-session-service.exe --install and then tried adding a virtual display with .\virtual-display-driver-cli.exe add 1920x1080 but I do get an error.

.\virtual-display-driver-cli.exe add 1920x1080
Error: Failed to connect to Virtual Display Driver; please ensure the driver is installed and working

Caused by:
   0: Failed to connect to driver: Failed to open pipe: Das System kann die angegebene Datei nicht finden. (os error 2)
   1: Failed to open pipe: Das System kann die angegebene Datei nicht finden. (os error 2)
   2: Das System kann die angegebene Datei nicht finden. (os error 2)

tristan-k avatar Aug 30 '24 16:08 tristan-k

Thanks. I just installed the certificate with .\install-cert.bat, the service with .\vdd-user-session-service.exe --install and then tried adding a virtual display with .\virtual-display-driver-cli.exe add 1920x1080 but I do get an error.

.\virtual-display-driver-cli.exe add 1920x1080
Error: Failed to connect to Virtual Display Driver; please ensure the driver is installed and working

Caused by:
   0: Failed to connect to driver: Failed to open pipe: Das System kann die angegebene Datei nicht finden. (os error 2)
   1: Failed to open pipe: Das System kann die angegebene Datei nicht finden. (os error 2)
   2: Das System kann die angegebene Datei nicht finden. (os error 2)

you need install the driver after install-cert.batScreenshot_2024-08-31-00-19-59-669_com.github.android-edit.jpg

yaole-A avatar Aug 30 '24 16:08 yaole-A

Okay, so the prodecure is:

.\nefconc.exe --remove-device-node --hardware-id Root\VirtualDisplayDriver --class-guid "4D36E968-E325-11CE-BFC1-08002BE10318"
.\nefconc.exe --create-device-node --class-name Display --class-guid "4D36E968-E325-11CE-BFC1-08002BE10318" --hardware-id Root\VirtualDisplayDriver
.\nefconc.exe --install-driver --inf-path ".\VirtualDisplayDriver.inf"
.\install-cert.bat
.\vdd-user-session-service.exe --install
.\virtual-display-driver-cli.exe add 1920x108

tristan-k avatar Aug 30 '24 16:08 tristan-k

Okay, so the prodecure is:

.\nefconc.exe --remove-device-node --hardware-id Root\VirtualDisplayDriver --class-guid "4D36E968-E325-11CE-BFC1-08002BE10318"
.\nefconc.exe --create-device-node --class-name Display --class-guid "4D36E968-E325-11CE-BFC1-08002BE10318" --hardware-id Root\VirtualDisplayDriver
.\nefconc.exe --install-driver --inf-path ".\VirtualDisplayDriver.inf"
.\install-cert.bat
.\vdd-user-session-service.exe --install
.\virtual-display-driver-cli.exe add 1920x108

no the prodecure is: .\install-cert.bat .\nefconc.exe --remove-device-node --hardware-id Root\VirtualDisplayDriver --class-guid "4D36E968-E325-11CE-BFC1-08002BE10318" .\nefconc.exe --create-device-node --class-name Display --class-guid "4D36E968-E325-11CE-BFC1-08002BE10318" --hardware-id Root\VirtualDisplayDriver .\nefconc.exe --install-driver --inf-path ".\VirtualDisplayDriver.inf".\vdd-user-session-service.exe --install .\virtual-display-driver-cli.exe add 1920x108

yaole-A avatar Aug 30 '24 16:08 yaole-A

Okay, so the prodecure is:

.\nefconc.exe --remove-device-node --hardware-id Root\VirtualDisplayDriver --class-guid "4D36E968-E325-11CE-BFC1-08002BE10318"
.\nefconc.exe --create-device-node --class-name Display --class-guid "4D36E968-E325-11CE-BFC1-08002BE10318" --hardware-id Root\VirtualDisplayDriver
.\nefconc.exe --install-driver --inf-path ".\VirtualDisplayDriver.inf"
.\install-cert.bat
.\vdd-user-session-service.exe --install
.\virtual-display-driver-cli.exe add 1920x108

If you installed the driver before installing the certificate, it will cause a system error. To fix that, you need to completely uninstall the driver again, make sure the certificate is installed, then install the driver again.

(What yaoleiliu said is the correct procedure)

.\install-cert.bat
.\nefconc.exe --remove-device-node --hardware-id Root\VirtualDisplayDriver --class-guid "4D36E968-E325-11CE-BFC1-08002BE10318"
.\nefconc.exe --create-device-node --class-name Display --class-guid "4D36E968-E325-11CE-BFC1-08002BE10318" --hardware-id Root\VirtualDisplayDriver
.\nefconc.exe --install-driver --inf-path ".\VirtualDisplayDriver.inf"
.\vdd-user-session-service.exe --install
.\virtual-display-driver-cli.exe add 1920x108

MolotovCherry avatar Aug 30 '24 16:08 MolotovCherry

Got it. Now it kinda works. Though I'm still unable to connect to Sunshine because I'm using gpu partitioning with hyper-v and ran into an issue . According to the sunshine devs the display has to be connected to the GPU. But this is a different issue proably not related to this project.

[2024-08-30 18:44:22.900]: Info: ddprobe.exe [4] [] returned: 0x80070057
[2024-08-30 18:44:22.900]: Warning: Failed to set GPU preference. Capture may not work!
[2024-08-30 18:44:23.422]: Error: DuplicateOutput() test failed [0x80070057]
[2024-08-30 18:44:24.591]: Error: DuplicateOutput() test failed [0x80070057]
[2024-08-30 18:44:24.613]: Error: Failed to locate an output device

tristan-k avatar Aug 30 '24 16:08 tristan-k

Followup question: Is there an easy way with nefconc.exe to uninstall the certificates previously installed?

tristan-k avatar Aug 30 '24 19:08 tristan-k

Followup question: Is there an easy way with nefconc.exe to uninstall the certificates previously installed?

@tristan-k No, nefcon is only for drivers. You have to go into "Manage User Certificates" or "Manage Computer Certificates" and manually delete them.

There's a guide on how to manually install them here. You can just instead find them in those locations and remove them. https://github.com/MolotovCherry/virtual-display-rs?tab=readme-ov-file#installing-the-certificate

MolotovCherry avatar Aug 30 '24 19:08 MolotovCherry

Hi there, thanks so much for this program; it's working much better than my old dummy HDMI setup. The link for the new version has expired. Could you please renew it? I really appreciate it. https://github.com/MolotovCherry/virtual-display-rs/actions/runs/9846264686

bb12127 avatar Oct 16 '24 14:10 bb12127

Hi there, thanks so much for this program; it's working much better than my old dummy HDMI setup. The link for the new version has expired. Could you please renew it? I really appreciate it. https://github.com/MolotovCherry/virtual-display-rs/actions/runs/9846264686

@bb12127 Sure thing! Check here once build finishes https://github.com/MolotovCherry/virtual-display-rs/actions/runs/11368738431

From now on I will just attach the artifact to the page to make it easier, and so it doesn't expire Edit: driver.zip - updated 10/16/24

MolotovCherry avatar Oct 16 '24 15:10 MolotovCherry