GPU Passthrough + Windows VM with Looking Glass #3455
Replies: 8 comments 25 replies
-
|
This is amazing! |
Beta Was this translation helpful? Give feedback.
-
|
Want to test GPU passthrough before it's merged? Follow these steps: # 1. Fetch PR branch
git -C "$OMARCHY_PATH" fetch origin pull/3454/head
git -C "$OMARCHY_PATH" checkout -B feat/omarchy-gpu-passthrough FETCH_HEAD
# 2. Switch to test branch
omarchy-update-branch feat/omarchy-gpu-passthrough
# 3. Test features
omarchy-gpu-passthrough info detect # Check hardware compatibility
omarchy-gpu-passthrough setup # Run setup (backs up config files)
sudo reboot # Apply kernel parameters
# 4. Verify configuration (after reboot)
omarchy-gpu-passthrough info verify # Check everything is configured correctly
# Optional: generate reports (helpful for troubleshooting)
omarchy-gpu-passthrough info report # Hardware configuration summary
omarchy-gpu-passthrough info diagnose # Full diagnostic report
# 5. Install Windows VM
omarchy-windows-vm install # Install Windows VM with Looking Glass
# 6. Return to master
omarchy-update-branch master
git -C "$OMARCHY_PATH" branch -D feat/omarchy-gpu-passthroughNotes:
|
Beta Was this translation helpful? Give feedback.
-
|
omarchy-gpu-passthrough-diagnostics-20251128_003120.txt Hello brother, greetings! I'm coming from YouTube since you asked me to share the report generated about the RAM error problem. I assigned 4GB and 6 cores to the VM. This is the error: ❯ ERROR: qemu-system-x86_64: unable to map backing store for guest RAM: Invalid argument |
Beta Was this translation helpful? Give feedback.
-
|
This works great - 4gb Sapphire + 12gb RTX 2060 I fixed this with adding the linux zen kernel, then ACS patch. Here are the full details on how I got it running on my older workstation. Environment
Issue 1: Setup Wizard Fails Silently (GRUB users)Problem: Cause: Script expects Limine bootloader, fails when GRUB is detected. Workaround: Manually create config file: sudo tee /etc/omarchy-gpu-passthrough.conf << 'CONF'
GPU_PCI_ADDR="04:00.0"
GPU_NAME="NVIDIA GeForce RTX 2060 12GB"
GPU_VENDOR_ID="10de"
GPU_DEVICE_ID="1f03"
GPU_AUDIO_ID="10f9"
GPU_DRIVER_ORIGINAL="nvidia"
GPU_IOMMU_DEVICES="04:00.0 04:00.1"
CONFSuggestion: Add GRUB support or clearer error message when non-Limine bootloader detected. Issue 2: IOMMU Group Not Viable (AMD 500 Series Chipset)Problem: Docker container crashes with: Cause: AMD 500 series chipset puts GPU in same IOMMU group as USB controller, SATA, NVMe boot disk, and Ethernet. Can't bind all to vfio-pci. Fix: Install linux-zen kernel (has ACS override patch) and add kernel parameter: # Install linux-zen
sudo pacman -S linux-zen linux-zen-headers
# Add ACS override to GRUB
sudo sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT="\(.*\)"/GRUB_CMDLINE_LINUX_DEFAULT="\1 pcie_acs_override=downstream,multifunction"/' /etc/default/grub
sudo grub-mkconfig -o /boot/grub/grub.cfg
# Reboot into linux-zen kernelSuggestion: Detect bad IOMMU grouping during setup and warn user about ACS override requirement. Issue 3: Looking Glass Device Not FoundProblem: Looking Glass host app in Windows shows "Looking glass device not found" Cause: kvmfr module loaded but Fix: # Create kvmfr config
echo 'options kvmfr static_size_mb=128' | sudo tee /etc/modprobe.d/kvmfr.conf
# Reload module with size parameter
sudo modprobe -r kvmfr
sudo modprobe kvmfr static_size_mb=128
# Fix permissions
sudo chown $USER:kvm /dev/kvmfr0
sudo chmod 660 /dev/kvmfr0
# Create udev rule for persistence
echo 'SUBSYSTEM=="kvmfr", OWNER="'$USER'", GROUP="kvm", MODE="0660"' | sudo tee /etc/udev/rules.d/99-kvmfr.rulesSuggestion: Issue 4: Package Conflict (netcat)Problem: Installation fails due to gnu-netcat vs openbsd-netcat conflict. Fix: sudo pacman -S openbsd-netcat # replaces gnu-netcatSummary of Required Manual Steps (GRUB + AMD 500 series)
Files Created/Modified
Issue 5: Looking Glass Client Exits Instantly (SPICE socket permissions)Problem: Cause: SPICE socket at Fix: sudo chmod 777 /var/run/omarchy-windows/spice.sockSuggestion: Docker container should create socket with user-accessible permissions, or add udev rule / tmpfiles.d config. Issue 6: IOMMU Group Numbers Change After ACS OverrideProblem: After enabling ACS override, GPU moves to different IOMMU group (e.g., 15 → 21, audio → 22). Docker compose config has hardcoded group number. Cause: ACS override splits groups, changing group assignments. Fix: Update # Find new group numbers
basename $(readlink /sys/bus/pci/devices/0000:04:00.0/iommu_group) # GPU
basename $(readlink /sys/bus/pci/devices/0000:04:00.1/iommu_group) # Audio
# Update docker-compose.yml devices section with new group numbersSuggestion: |
Beta Was this translation helpful? Give feedback.
-
|
Hi, first of all, thank you so much for your work, I really appropriate it! I ran into an issue during during the install script. After downloading windows, attempting to boot it causes the docker container to shut down and the install script to hang, only printing the used storage space every minute. The logs from the docker container are: https://pastebin.com/1ZDxP02w This is with the latest commits in your branch from 3 hours ago. Running the install script again, choosing to do a quick reinstall and disabling gpu pass through allows the container to start and windows to start installing. If there is anything else I can provide that would be useful, let me know! Thank you once again for working on this :) |
Beta Was this translation helpful? Give feedback.
-
|
Hey, boss! I have a new problem... I've been trying all day to get LG to access the virtual machine, but I can't get it to work. It connects with RDP. I followed the steps in your video to disable the Red Hat image controller. If I keep this controller active, I can access it with LG, but the performance is terrible... I only use a monitor connected directly to the motherboard with the iGPU. Something curious is that if I access it with RDP + keep alive, I can see the LG service in Windows running, but it doesn't connect to my host. I even downloaded it from the official B7 website, compiled it, and ran that exe file (stopping the process that comes with the B7 in your project), and I can access the client, but it doesn't allow me to control it at all. I could see the movements but not the mouse in the RDP window, and when I close RDP, the LG client window also closes. Here is my configuration in case you see anything. Thank you for everything. |
Beta Was this translation helpful? Give feedback.
-
|
Hey, gave it another go, here are the results: ❯ ERROR: qemu-system-x86_64: -device vfio-pci,host=0000:01:00.0: vfio 0000:01:00.0: group 2 is not viable Here are the diagnostic results: omarchy feat/omarchy-gpu-passthrough ❯ omarchy-gpu-passthrough info detect GPU Detection Detected 2 GPU(s): GPU 1: Intel Corporation CoffeeLake-H GT2 [UHD Graphics 630] GPU 2: NVIDIA Corporation TU106M [GeForce RTX 2060 Mobile] ✓ IOMMU: Enabled === Hardware Configuration Report === SYSTEM Omarchy: MOTHERBOARD BIOS SETTINGS GPUs [2] NVIDIA Corporation TU106M [GeForce RTX 2060 Mobile] (01:00.0) IOMMU GROUPS (for passthrough) DISPLAY CONFIGURATION Monitors per GPU: DRIVER VERSIONS GPU PASSTHROUGH STATUS Generated: 2025-11-29 19:18:25 GPU Passthrough Diagnostics ℹ️ Collecting system information... [SYSTEM INFORMATION] [CPU] [Operating System] [Bootloader] [Motherboard] [Display Session] [GPU INFORMATION] [GPU 1: Intel Corporation CoffeeLake-H GT2 [UHD Graphics 630]] DRM Card: card1 [GPU 2: NVIDIA Corporation TU106M [GeForce RTX 2060 Mobile]] [IOMMU INFORMATION] IOMMU Status: Enabled Active VFIO IOMMU Groups: 1 [GPU 1: Intel Corporation CoffeeLake-H GT2 [UHD Graphics 630]] [GPU 2: NVIDIA Corporation TU106M [GeForce RTX 2060 Mobile]] [KERNEL CONFIGURATION] [Kernel Command Line] [IOMMU Parameters] iommu=pt: ✓ Enabled [LOADED KERNEL MODULES] [VFIO Modules] [NVIDIA Modules] [AMD GPU Modules] [DRIVER VERSIONS] [NVIDIA Driver] [AMD GPU Driver] [VFIO Driver] [GPU PASSTHROUGH CONFIGURATION] [GPU Configuration: /etc/omarchy-gpu-passthrough.conf] GPU Passthrough Config - Generated 2025-11-29GPU_PCI_ADDR="01:00.0" [Limine Configuration: /etc/default/limine] [VFIO Configuration: /etc/modprobe.d/vfio.conf] VFIO GPU Passthrough - Generated 2025-11-29options vfio-pci disable_vga=1 [Driver Blacklist: /etc/modprobe.d/blacklist-gpu-passthrough.conf] GPU Passthrough - Prevent NVIDIA auto-load at bootinstall nvidia /bin/false [System Environment (/etc/environment)] [PROCESSES USING GPU] [NVIDIA GPU Processes] [DRI Device Handles] [NVIDIA Device Handles] [RECENT GPU PASSTHROUGH LOGS] [Last 50 lines of /var/log/omarchy-gpu-passthrough/gpu-passthrough.log] RELEVANT BOOT MESSAGES (dmesg) [IOMMU Messages] [VFIO Messages] [Boot VGA Device] [PCI Passthrough Messages] [END OF DIAGNOSTICS REPORT] Report saved to: /tmp/omarchy-gpu-passthrough-diagnostics-20251129_191825.txt ✓ Report saved: /tmp/omarchy-gpu-passthrough-diagnostics-20251129_191825.txt Issues here imo: Device: 0000:00:01.0 |
Beta Was this translation helpful? Give feedback.
-
|
Hello, I'd like to contribute the output of my attempt at setting up passthrough on my computer (Lenovo Legion 5 laptop in hybrid graphics mode) After running omarchy-gpu-passthrough info detect |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
GPU Passthrough + Windows VM with Looking Glass
Got GPU passthrough working with Looking Glass for Windows VM. This is for the request in #3307.
PR: #3454
Demo: YouTube - full setup, Fortnite, CS2, benchmarks
How it works:
You can bind your GPU to the VM for gaming, then switch it back to the host whenever you want. Looking Glass gives you low-latency display through shared memory so there's basically no lag. I can play Fortnite or CS2 in the VM, then switch the GPU back to the host and use LM Studio while the VM is still running.
There's hardware spoofing built in - it auto-detects your SMBIOS info so Windows sees real hardware instead of VM stuff. Anti-cheat works because of this. Fortnite and CS2 both run fine.
Setup is an interactive wizard that handles IOMMU config, kernel parameters, driver stuff, and sets up Hyprland to use your integrated GPU so your desktop stays on the iGPU.
What I'm running:
Community tested hardware:
What hasn't been tested yet:
Important: Looking Glass needs a display on GPU
Your dedicated GPU needs a display connected - otherwise Windows won't render anything. Options:
Want to try it?
You need 2 GPUs - one for the VM, one integrated for your desktop. Setup wizard does most of the work.
If you test it, run
omarchy-gpu-passthrough info verifyafter reboot to check everything is configured correctly. Let me know:omarchy-gpu-passthrough info diagnoseand share the outputIf it doesn't work that's also good to know - helps me figure out what hardware has issues.
Heads up:
This is experimental. There's a chance of black screen on first boot (there's a TTY2 recovery thing in the PR if that happens). Back up your stuff before trying.
Thanks for any testing or feedback!
Beta Was this translation helpful? Give feedback.
All reactions