Pt 5, Setting up Looking Glass
Prerequisites
- Pt 1, Creating the VM
- Pt 2, Enabling IOMMU
- Pt 3, Isolating the GPU
- Pt 4, Attaching the GPU to the VM
Why
Requiring a monitor to be physically plugged into the passthrough GPU at all times is inconvenient on a laptop. Looking Glass reads the GPU’s raw frames directly so the VM can be viewed/controlled without a monitor on that GPU — but it needs IVSHMEM set up first.
Calculating the IVSHMEM size
- Multiply the desired max resolution’s width and height.
- Multiply by the BPP (4 for SDR, 8 for HDR).
- Multiply by 2 to get the frame size in bytes.
- Divide by 1,048,576 to convert to MiB.
- Add 10.
- Round up to the nearest power of two.
Example for 1920×1200 SDR: 1920 × 1200 = 2,304,000 → × 4 = 9,216,000 → × 2 = 18,432,000 → ÷ 1,048,576 ≈ 17.58 → + 10 ≈ 27.58 → nearest power of two ≥ 27 is 32 MiB.
Adding IVSHMEM to the VM
Enable XML editing in Virt Manager (Edit → Preferences → General → Enable XML editing), then add before </devices> in the VM’s XML:
<shmem name='looking-glass'>
<model type='ivshmem-plain'/ >
<size unit='M'>32</size>
</shmem>Create /etc/tmpfiles.d/10-looking-glass.conf (replace user with the actual username) so the shared-memory file exists on boot:
# Path Mode UID GID Age Argument
f /dev/shm/looking-glass 0660 user kvm - -
Apply it immediately with systemd-tmpfiles --create /etc/tmpfiles.d/10-looking-glass.conf.
Installing Looking Glass
- Host: install the Looking Glass Client — on Arch-based distros, the AUR package builds it automatically.
- Guest: install the Windows Host Binary from the Looking Glass download page, making sure the IVSHMEM Driver component is checked.
With the GPU’s video hardware set to None in Virt Manager (so the GPU is the only display) and the VM started, launch the Looking Glass client on the host — it exits immediately if there’s no SPICE server to connect to, so give Windows and the Looking Glass server time to start first.

The Looking Glass client successfully connected and rendering the VM’s display — confirms the IVSHMEM + Looking Glass pipeline is working end-to-end.
If the display stays blank with CPU usage pinned at a constant value, try disabling ROM BAR for the GPU device in the VM’s PCI host device settings:

CPU usage flat-lined at a fixed percentage with no display output — the symptom that indicated ROM BAR needed to be disabled for this GPU.
Removing the physical-monitor requirement
The GPU still needs something to think is plugged in. Two options: a physical HDMI/DP dummy plug, or a virtual display driver. The Virtual Display Driver project was used for this: install the latest release inside the guest, run VDD Control.exe, click Install Driver (confirm the driver-install prompt). Once the virtual display shows up under Device Manager → Display Adapters, the physical monitor can be unplugged and Looking Glass keeps working.
Custom resolutions (e.g. for a 16:10 panel, where the driver only ships 16:9 presets) can be added to C:\VirtualDisplayDriver\vdd_settings.xml:
<resolution>
<width>1920</width>
<height>1200</height>
<refresh_rate>30</refresh_rate>
</resolution>The refresh rate value in the resolution entry doesn’t matter much — a separate setting in the same file applies the real refresh rate to all resolutions, once the driver is restarted from the Virtual Driver Control GUI.