HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
gnif
LookingGlass
C2017–2023
gnif / LookingGlass

LookingGlass

An extremely low latency KVMFR (KVM FrameRelay) implementation for guests with VGA PCI Passthrough.

11Distinct people
11Mentions
0Explicit recommenders
5.8KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

An extremely low latency KVMFR (KVM FrameRelay) implementation for guests with VGA PCI Passthrough.

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year11 dated mentions

Observed mentions: 2017-12-15 07:08:51 UTC to 2023-08-13 21:54:49 UTC.

012342017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments20172018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 4 mentions; 1 submissions, 3 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20202021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2023

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC110
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC413
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC101
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC101
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC202
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC101
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC101

What Hacker News says

11 sources
Unfortunately AMD cards suffer from a reset bug, still, when used with passthrough. The reset bug being that you can pass through the card fine, once. But if you try to pass it through again (or the card experiences an issue and needs to reset), they get caught in some kind of bad state and won’t work until power is removed and restored. Which requires a reboot or a only slightly less disruptive dance with system power states. For vega and 5000 series gpu’s, there’s https://github.com/gnif/vendor-reset Incidentally, nvidia gpus are so good at resetting, they’ve probably done so without you noticing. If the screen ever goes black for a fraction of a second and returns in normal usage, it was probably because it reset itself. The lower 6000 series lower than the 6800’s for example may or may not have the issue. It seems most “reference” car
Read the rest
ds are fine, but custom vendor cards often but not always have issues. My reference 6700 works fine, but a sapphire 6700 probably won’t. And the 7000 series is also fucky in a new way somehow. Gnif knows far more about this than me, and has basically thrown up his hands at how AMD doesn’t care. He’s made occasional posts about it on https://forum.level1techs.com/ Gnif is also responsible for Looking glass: https://github.com/gnif/LookingGlass When it comes to splitting a gpu into virtual ones with SR-IOV/MxGPU, that’s not really a thing with AMD. Whereas Nvidia will happily give you what you want if you shovel some money into their gaping maw, AMD won’t even give business customers the time if day if you aren’t worth billions. They very deliberately do not want the unwashed masses to use MxGPU. See: https://www.reddit.com/r/VFIO/comments/eqvn9z/amd_mxgpu_or_s... for a summary of the years of hopelessness on this functionality.
In VirGL – A virtual 3D GPU for use inside QEMU virtual machines
https://github.com/Arc-Compute/LibVF.IO/tree/master/ plus https://github.com/gnif/LookingGlass works pretty well. If you use an Intel GPU, particularly one of their new Arc dedicated GPUs, it supports the functionality on the consumer grade hardware without any trickery and you just need Looking Glass to map the outputs. If you really want multiple GPUs though you can also use a normal 1-in-4-out type PCIe switch and save a lot of cost on Thunderbolt components in-between. Low bandwidth ones are particularly dirt cheap due to crypto mining volume. Keep an eye out for ACS support or you may have to use an ACS override patch though.
In The death of the PCIe expansion card
It's gotten much easier with Nvidia cards thanks to VM gaming being officially supported. No more hiding the VM and that Error 47 nonsense. Basically you bind the graphics card to the vfio driver by writing the PCI ID to /sys/bus/pci/drivers/vfio-pci/new_id and then you can use it in qemu with -device vfio-pci,host=01:00.0. If you have sane IOMMU groups and have an extra GPU for the host it should work with just those two steps. You still have to decide about how you handle input and output, but that's very user specific. Virtual input over the qemu GUI works well enough, there's also an evdev thing that lets you switch by pressing both Ctrl keys, or pass an entire USB controller. For audio I recommend scream[1] for the lowest latency (I get 2ms VM->PA->Speaker with MuQSS scheduler) with full 7.1 audio and if you don't want a dedicated mo
Read the rest
nitor or switch monitor inputs there is Looking Glass[2] which captures frames and shuffles them to the host over shared memory. It also handles input via spice. It's still a bit of work, but for me that's mostly on the Windows side rather than the passthrough stuff itself. [1]: https://github.com/duncanthrax/scream [2]: https://github.com/gnif/LookingGlass
In I Will Never Use a Microsoft Account to Log Into My Own PC
I saw a recent thread about running an X server on Windows for Linux applications, and this is sort of the opposite. You can run a Windows VM with GPU passthrough on a Linux host and if you want to run them side by side without switching windows, you can use a VNC window or other, but the problem is you don't get hardware acceleration. Looking Glass solves this by copying the Windows GPU frame buffer onto the Linux side so it can be read transparently. It's also open source. Source: https://github.com/gnif/LookingGlass Quickstart: https://looking-glass.hostfission.com/wiki/Installation Reddit discussion: https://old.reddit.com/r/vfio This only works on a Linux host with Windows. There have been rumors that Apple might implement their own version for running perhaps a Windows VM or other VM transparently on a macOS host but those are just
Read the rest
based on some virtIO development that seems to be going on in macOS. Or maybe it's to virtualize iOS or iPadOS, who knows? Personally I use Proxmox, which is a Linux hypervisor based on QEMU / KVM but with other features and a web GUI for administration, to run Windows, macOS, and Linux simultaneously, as well as host containers for side projects and other self hosted services.
In Looking Glass: Run a Windows VM on Linux in a Window with Native Performance
This is totally possible and is very similar to how I have my desktop currently setup. Check out this subreddit[0] and this Arch wiki page [1] for a step by step tutorial. The tricky thing is for optimal performance you have to give a guest OS exclusive access to a graphics card. This means you need two graphics cards, one for the host (or a Linux vm) and one for Windows. However, many CPUs have integrated graphics that can be controlled by Linux while a discrete graphics card can be given to the Windows guest. Additionally, you need to have some sort of KVM switch as two graphics cards means two (or more) display outputs, but there is another option[2]. In my case, my processor (Ryzen 2700X) does not have integrated graphics and I don't have a spare video card to dedicate to the host system. I solve this with the following setup: Host (H
Read the rest
) - Arch Linux installation running KVM hypervisor Guest (A) - Primary Linux Install Guest (B) - Windows Install On boot I pass kernel arguments[3] to H to instruct it not to touch the graphics card. This gives me a completely headless boot and leaves my screen frozen on whatever the bootloader last had displayed. Once H boots up, it autostarts a VM for A, with the GPU passed in as well as the sound card and a USB controller. From A I can use my Linux install as normal. The interesting part is when I want to switch to Windows, I can ssh into H and kick off a script[4] that will tell A to suspend to disk (aka hibernate), which for all the GPU and other HW cares is the same as powering off, then to start B with all the same devices passed through. I can then do the same process to go back to my Linux guest. I haven't done this yet but I'm planning to put the swap/hibernate drives for both guests on an NVMe SSD so the suspend/resume should be super fast. The reason I have my main system as the Linux guest instead of just using the hypervisor is that loading and unloading the drivers for the GPU on the host is kinda wonky and has resulted in kernel panics for me (that I can't debug without a display). Additionally as far as I can tell there's no way to hotswap GPUs with display outputs in X so I'd have to restart all my desktop programs anyways. If you have an nVidia GPU you also might run into issues installing the drivers[5] inside the VM, and have to change some settings in the hypervisor to get around them. Let me know if you have any questions, I'm happy to help or provide more information. Ask here or see email in bio. [0] https://reddit.com/r/vfio [1] https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVM... [2] https://github.com/gnif/LookingGlass [3] video=efifb:off I don't have a good source on this, different systems may need different args [4] this script is not yet written, I have been using SSH from my laptop until now, I've only had this set up for like a week [5] search error code 43, it's also mentioned in [1]
In Ask HN: Why no hardware virtualisation of a dual OS boot?
> I might be outdated, but GPU virtualization does not allow you to use your display outputs on your graphic card. So for a workstation it isn't going to work as you would have to use another machine (sure, it could be a thin client) to remote desktop This may change now with looking Glass giving a fast way to share the frame buffer between host and guest, https://github.com/gnif/LookingGlass
In XCPng: libre XenServer

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.