Introduction
Looking Glass is an open-source application that allows a Linux host to display the output of a Windows guest virtual machine with extremely low latency. It works by capturing the guest GPU's framebuffer through a shared memory interface (KVMFR), bypassing the need for a physical second monitor or video capture card. This makes GPU passthrough setups practical for daily use with near-native display performance.
What Looking Glass Does
- Captures the Windows guest GPU framebuffer via a shared memory (KVMFR) kernel module
- Displays the guest VM output in a window on the Linux host with sub-millisecond latency
- Passes keyboard and mouse input from the host to the guest VM seamlessly
- Supports cursor synchronization between host and guest without visible lag
- Eliminates the need for a second monitor or HDMI dummy plug in GPU passthrough setups
Architecture Overview
Looking Glass consists of two components: a host application that runs inside the Windows guest VM and a client application on the Linux host. The host captures frames from the guest GPU using the DXGI Desktop Duplication API and writes them to a shared memory region exposed through the KVMFR kernel module. The client reads from this shared memory and renders frames using OpenGL or EGL, achieving latency measured in microseconds rather than milliseconds typical of network-based solutions.
Self-Hosting & Configuration
- Requires a VFIO/GPU passthrough setup with a dedicated GPU assigned to the Windows guest
- The KVMFR kernel module must be loaded on the Linux host to create the shared memory device
- The host application must be installed and run inside the Windows guest VM
- Shared memory size should be configured based on display resolution (32-128 MB typical)
- Client display options including scaling, positioning, and input behavior are set via command-line flags
Key Features
- Sub-millisecond display latency using shared memory rather than network streaming
- No additional hardware required — no capture cards or dummy plugs needed
- Native cursor tracking that keeps the mouse responsive and synchronized
- Support for high-resolution and multi-monitor guest configurations
- Active development community with regular releases and documentation updates
Comparison with Similar Tools
- Parsec: Cloud gaming service with network streaming; Looking Glass uses shared memory for near-zero latency
- Moonlight/Sunshine: Game streaming over network; Looking Glass operates locally without network overhead
- Spice: QEMU display protocol with higher latency; Looking Glass bypasses the display protocol entirely
- Barrier/Synergy: Keyboard/mouse sharing tools; Looking Glass provides full display output, not just input sharing
FAQ
Q: Does Looking Glass replace GPU passthrough? A: No, Looking Glass complements GPU passthrough by providing a way to view the guest VM's display output on the host without a second monitor.
Q: What GPU is needed for the host? A: The host GPU only needs basic OpenGL/EGL support for the client window. The dedicated GPU passed through to the guest handles the actual rendering.
Q: Does Looking Glass support Linux guest VMs? A: The host application currently supports Windows guests only. Linux guest support is a community-requested feature.
Q: What kind of latency can I expect? A: Typical latency is under 1 millisecond for the display path, making it suitable for gaming and interactive applications.
Sources
- Repository: https://github.com/gnif/LookingGlass
- Documentation: https://looking-glass.io/docs/B6/