โก Ultra-fast native virtual display and monitor manager for Java โ create, reconfigure, and control true Windows 10/11 hardware displays on-the-fly at 60โ500 Hz.
FastMonitor is the display topology and virtual output management substrate of the FastJava ecosystem. Powered by Windows User-Mode Driver Framework (UMDF), Indirect Display Driver (IDD / IddCx) technology, and direct Win32 DeviceIoControl endpoints, FastMonitor creates authentic, OS-level virtual monitors on demand. Unlike sluggish window streaming or fake virtual desktop workarounds, displays generated by FastMonitor register directly with the Desktop Window Manager (DWM) and DirectX Graphics Infrastructure (DXGI) as genuine hardware outputs โ supporting arbitrary custom resolutions (up to 8K), variable refresh rates (60โ500 Hz), deterministic sub-microsecond control latency, zero JVM garbage collection allocations, and seamless synergy with FastScreen, FastGPU, FastVulkan, and FastRobot.
import fastmonitor.FastMonitor;
import fastmonitor.FastMonitor.Config;
public class Demo {
public static void main(String[] args) {
// 1. Initialize FastMonitor native backend
FastMonitor.init();
// 2. Define virtual monitor configuration (1080p @ 60Hz)
Config config = new Config(1920, 1080, 60, "FastMonitor-Virtual-1");
// 3. Create virtual monitor instance with AutoCloseable lifecycle
try (FastMonitor monitor = FastMonitor.create(config)) {
System.out.println("Created virtual monitor with ID: " + monitor.id());
// 4. Activate display output in Windows desktop topology
monitor.activate();
// 5. Query active virtual display topology
System.out.println("Monitors: " + FastMonitor.dumpAllMonitorsJson());
// 6. Dynamically reconfigure on-the-fly to 1440p @ 144Hz
monitor.reconfigure(new Config(2560, 1440, 144, "FastMonitor-Virtual-1-Gaming"));
// 7. Deactivate or let try-with-resources clean up
monitor.deactivate();
}
FastMonitor.shutdown();
}
}- Why FastMonitor?
- Quick Start
- Key Features
- Real-World Use Cases
- Architecture & Pipeline
- Performance Characteristics
- API Quick Reference
- Driver Architecture & Integration
- Installation
- Technical Demos & Benchmarks
- Documentation
- Platform Support
- Related Projects
- License
Traditional approaches to multi-display automation, headless testing, and isolated UI rendering suffer from major OS and JVM limitations:
- Miracast / Wireless Streaming Overhead: Streaming fake displays over network loops incurs massive frame latency (30โ80 ms), high CPU/GPU compression penalties, and connection drops.
- Lack of True DXGI Outputs: Mock window frames cannot be captured cleanly via DXGI Desktop Duplication without recursive Droste effects or coordinate window clipping.
- Inability to Test Multi-Display Topologies: CI/CD pipelines, headless testing agents, and autonomous AI bots typically run without physical monitors attached, breaking graphics initialization.
- No Dynamic Refresh Rate or High-Res Control: Fixed dummy plugs (HDMI dongles) cannot switch dynamically between 60 Hz, 144 Hz, 240 Hz, 4K, or 8K on demand.
FastMonitor resolves all these barriers by interfacing directly with the Windows IDD driver layer:
- True DXGI Outputs: Virtual displays are genuine OS-level displays visible to DirectX, Vulkan, and Windows Settings.
- Zero GC Churn: Functions operate on raw primitive handles and compact descriptors with 0 bytes heap allocation pressure.
- Sub-Microsecond Control: Attach, reconfigure, or detach monitors with instant Win32 kernel dispatches.
- Dynamic Adaptability: Switch resolution and refresh rate on running instances without disconnecting the monitor.
| Feature | HDMI Dummy Plug | Miracast / Software Stream | FastMonitor |
|---|---|---|---|
| Output Type | Fixed Physical Hardware | Emulated Network Stream | True Windows IDD Display |
| Creation Latency | Manual insertion | 2โ5 seconds | < 10 ms (Programmatic) |
| Dynamic Resolutions | โ Fixed EDID | โ Arbitrary (Up to 8K) | |
| Refresh Rates | 60 Hz (Fixed) | 30โ60 Hz | โ 60โ500 Hz Variable |
| DXGI Desktop Duplication | โ Yes | โ No | โ Full DXGI Output Support |
| Heap Allocation Pressure | N/A | High network churn | 0 Bytes / op (Zero GC) |
| Automation & CI Friendly | โ Requires hardware | โ 100% Code-Driven |
- ๐ฅ๏ธ True Hardware-Accelerated Virtual Displays โ Genuine Windows display adapter outputs managed via IDD (Indirect Display Driver) UMDF subsystem.
- โก Dynamic Refresh & Resolution Scaling โ Instantiate displays up to 8K (7680ร4320) with refresh rates from 60 Hz to 500 Hz.
- ๐๏ธ Zero JVM Heap Churn โ Direct native JNI bindings with deterministic sub-microsecond control paths.
- ๐ Automatic VDD Setup & Cleanup โ Downloads verified MikeTheTech packages on demand and removes the temporary device node when the demo closes.
- ๐ก๏ธ Graceful Software Fallback โ Emulation mode ensures tests and higher-level code run reliably even before driver installation.
- ๐ฏ Seamless FastJava Synergy โ Direct pairing with FastScreen (2000 FPS capture), FastGPU (DX12 swapchains), and FastRobot (background input injection).
- ๐๏ธ Streamer & Broadcast Isolation โ Provision dedicated virtual display outputs for OBS Studio and capture cards, guaranteeing leak-free broadcasts without exposing private desktop notifications, chats, or credentials.
- ๐ฆ Zero-Bloat Deployment โ Lightweight Java 17+ library with automated native DLL extraction via
FastCore.
- ๐๏ธ Streamer Privacy & Leak-Proof Broadcasts (FastScreen): Spin up an isolated 120โ240 Hz virtual display as a pristine streaming canvas for OBS/Twitch/YouTube โ broadcast games, tutorials, or slides at full framerate without the risk of accidentally revealing private Discord DMs, browser tabs, or desktop notifications.
- ๐ค Autonomous AI Agent Workspaces (FastRobot): Allocate dedicated virtual screens where AI agents can launch apps, click, and navigate without disturbing user desktop focus.
- ๐ธ Isolated Ultra-High-FPS Capture (FastScreen): Render and capture offscreen game or simulation frames at 240+ FPS without window interference.
- ๐ฎ DirectX & Vulkan Headless Pipelines (FastGPU / FastVulkan): Bind swapchains directly to dedicated virtual displays for ultra-low latency rendering.
- ๐งช Automated GUI & Multi-Monitor CI Testing: Spin up 2, 4, or 8 virtual screens in headless CI runners to validate complex multi-window applications.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Java Application (FastMonitor) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ JNI (Zero-GC Descriptors)
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ FastMonitor Native C++ Bridge (fastmonitor.dll) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Win32 PnP + VDD settings
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ MikeTheTech VDD / Windows IDD (IddCx) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ IddCx / UMDF DWM Registration
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Windows DWM & DXGI Output Topology โ
โ (FastScreen Capture / FastGPU SwapChain Target) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
| Operation | Latency | Memory Impact | JNI Overhead |
|---|---|---|---|
| Backend Init | < 1 ms | Zero persistent heap | Negligible |
| Virtual Monitor Creation | VDD settings update | PnP device restart | JNI call |
| Mode Reconfiguration | Win32 display mode change | Existing display device | JNI call |
| Driver Setup | Download on demand | SHA-256 verified packages | Normal Windows approval |
| Demo Teardown | Remove device node | Driver package retained | Windows PnP removal |
| Method | Return Type | Description |
|---|---|---|
FastMonitor.init() |
boolean |
Initializes the native MikeTheTech VDD backend |
FastMonitor.shutdown() |
void |
Shuts down the backend and clears remaining virtual monitor slots |
FastMonitor.isDriverPresent() |
boolean |
Returns true if the MikeTheTech VDD device node is present |
FastMonitor.driverVersion() |
int |
Returns version reported by native driver, or 0 if emulation |
FastMonitor.create(Config) |
FastMonitor |
Creates and registers a new virtual monitor |
id() |
int |
Returns logical identifier of monitor |
config() |
Config |
Returns current resolution, refresh rate, and name |
reconfigure(int, int, int) |
boolean |
Zero-GC: Dynamically updates width, height, and refresh rate via primitives |
reconfigure(Config) |
boolean |
Dynamically updates resolution and refresh rate via Config |
activate() |
boolean |
Activates display output in Windows desktop topology |
deactivate() |
boolean |
Deactivates display output without destroying handle |
destroy() |
boolean |
Destroys virtual display and detaches from Windows |
close() |
void |
AutoCloseable implementation delegating to destroy() |
FastMonitor.removeDriverDevice() |
boolean |
Removes the VDD device node after shutdown while retaining its driver package |
FastMonitor.dumpAllMonitorsJson() |
String |
Returns JSON status snapshot of all active monitors |
FastMonitor controls the MikeTheTech Virtual Display Driver (MttVDD), an Indirect Display Driver built on Microsoft's IddCx model. It writes the desired monitor count to C:\VirtualDisplayDriver\vdd_settings.xml, restarts the MttVDD PnP device so Windows applies the topology, and uses Windows display APIs to configure modes.
FastMonitor is distributed via JitPack. It requires FastCore as the unified native library loader.
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependencies>
<!-- FastMonitor Core -->
<dependency>
<groupId>com.github.andrestubbe</groupId>
<artifactId>FastMonitor</artifactId>
<version>0.1.0</version>
</dependency>
<!-- FastCore Native Loader -->
<dependency>
<groupId>com.github.andrestubbe</groupId>
<artifactId>FastCore</artifactId>
<version>0.1.0</version>
</dependency>
</dependencies>repositories {
maven { url 'https://jitpack.io' }
}
dependencies {
implementation 'com.github.andrestubbe:FastMonitor:0.1.0'
implementation 'com.github.andrestubbe:FastCore:0.1.0'
}Download the latest pre-compiled JARs directly to add them to your project's classpath:
- ๐ฆ FastMonitor-0.1.0.jar (The Core Library)
- โ๏ธ FastCore-0.1.0.jar (The Mandatory JNI Loader)
Important
Both JARs must be present in your classpath for FastMonitor's native functions to operate correctly.
To create genuine Windows OS display outputs visible in Windows 10/11 Display Settings, DXGI Desktop Duplication, OBS Studio, and games, you must install the signed open-source Indirect Display Driver (IDD):
Important
Without this driver, FastMonitor operates in Emulation Mode (software mock state for headless CI and unit tests). Installing this driver is required for real hardware-accelerated display outputs.
When FastMonitor installs the driver, it downloads pinned driver-only and signed NefCon releases from GitHub, checks both archives against fixed SHA-256 hashes, and invokes NefCon without launching the MikeTheTech setup wizard. Windows still displays the normal administrator-consent prompt. The setup also adds the package's verified publisher certificate to the Local Machine Trusted Publishers store. FastMonitor starts the new driver with zero monitors so the host application can add one when activated.
Note
FastMonitor controls the MikeTheTech Virtual Display Driver through its configuration file and Windows PnP APIs.
If the VDD device is missing, the demo automatically downloads the two pinned archives, verifies their hashes, then starts Windows certutil and the signed NefCon utility with normal administrator elevation. The installation step does not run PowerShell or the third-party setup wizard. When the demo exits, it clears the monitor count and removes the MttVDD device node; the driver package remains installed for the next run.
pnputil /enum-devices /instanceid ROOT\DISPLAY\0000The demo removes only the MttVDD device node when it exits. To also delete the driver package from Windows Driver Store, use:
# 1. Find the published INF name (e.g. oemXX.inf)
$oem = (pnputil /enum-drivers | Select-String -Pattern "MttVDD.inf" -Context 1,0 | ForEach-Object { $_.Context.PreContext[0] -replace "Published Name:\s+", "" }).Trim()
# 2. Delete driver package from Windows Driver Store
if ($oem) { pnputil /delete-driver $oem /uninstall /force }- Using the library without a driver? FastMonitor can initialize in deterministic software-emulation mode; it tracks monitors in memory and does not create a Windows display.
FastMonitor.isDriverPresent()reports whether the VDD device is installed. - Running the demo without a driver? The demo tries to install the pinned driver and stops if installation is cancelled or fails. After initialization, it creates and activates a virtual monitor; Windows then exposes that monitor as a real display output in Display Settings, subject to the driver's supported modes.
| Case | Java Example | Launcher | Description |
|---|---|---|---|
| Interactive Showcase Demo | Demo.java | run-demo.bat |
Demonstrates creating, activating, reconfiguring resolution/refresh rate, and tearing down virtual displays with real-time JSON topology inspection. |
| JMH Microbenchmark Suite | Benchmark.java | run-benchmark.bat |
Standardized microbenchmarks measuring virtual display allocation throughput, mode reconfiguration latency, and zero-heap memory pressure. |
- COMPILE.md: Full compilation guide (MSVC C++17 build chain + JNI setup).
- REFERENCE.md: Full API descriptions and driver interface contracts.
- PHILOSOPHY.md: Engineering rationale and zero-allocation principles.
- ROADMAP.md: Future milestones and planned features.
| Platform | Architecture | Status | Minimum Requirement |
|---|---|---|---|
| Windows 11 | x64 | โ Fully Supported | Windows 11 Build 22000+ / IddCx 1.4+ |
| Windows 10 | x64 | โ Fully Supported | Windows 10 Version 1809+ / WDDM 2.0+ |
| Windows Server | x64 | โ Fully Supported | Windows Server 2019/2022 (Desktop Experience) |
| Linux | x64 / ARM64 | โ N/A | Windows IDD Driver Specific |
| macOS | Apple Silicon / Intel | โ N/A | Windows IDD Driver Specific |
MIT License โ See LICENSE file for details.
- FastDisplay โ Native display monitoring and DPI API for Java
- FastMonitor โ Virtual display control for Java
- FastTheme โ Native Windows styling and dynamic theming
- FastUI โ High-performance deterministic UI for Java
- FastProportion โ Aspect-ratio scaling for Java
- FastGrid โ Zero-allocation layout engine for Java
- FastCore โ Native library loader and FFM gateway for Java
Part of the FastJava Ecosystem โ Making the JVM faster. โก