Live data from Hacker News

Looking Glass: Run a Windows VM on Linux in a window with native performance

looking-glass.io

51–60 of 312 posts

Re: Looking Glass: Run a Windows VM on Linux in a window with native performance

#52

Earlier quoted context omitted.

It provides bare metal access to the entire hardware stack. So for instance you could run Linux via your integrated GPU (the one on many consumer CPUs) while passing through your dedicated GPU to the Windows VM. This is how I "gamed on Linux" from 2018~2020 when I ran Ubuntu as my primary OS. It's incredibly finicky to set up (shocker, I know!) but if you're able to get it working it's truly amazing. Talking like 1%…

Can you elaborate on the finickiness of it? What kind of "fixes" you needed to do, and how often really, and with a cause or just random with no precursors?

Everything about it is fickle. Motherboards and USB controllers present themselves different from maker to maker, and SKU to SKU. Any change in your hardware -- including plugging in something like a USB device -- sets off a chain of fighting the host OS and virtual machines for who gets to use that device, who gets to see that device at all, and the drivers needed for the hardware.

No one is making user software with VFIO in mind. You will get random apps that do not launch in your virtual machine despite everything else running smoothly.

You're screwing with it near daily, certainly weekly. Need to update a driver, such as your GPU on the virtual machine? May god have mercy on your soul that everything works after, or that you can even get the host OS to deal with the GPU correctly at all.

I can sort of tell you haven't really read up on one of these setups because you seem incredulous that running Windows inside Linux is somehow finicky.

It's not ready for prime time, period.

Re: Looking Glass: Run a Windows VM on Linux in a window with native performance

#53

Earlier quoted context omitted.

It provides bare metal access to the entire hardware stack. So for instance you could run Linux via your integrated GPU (the one on many consumer CPUs) while passing through your dedicated GPU to the Windows VM. This is how I "gamed on Linux" from 2018~2020 when I ran Ubuntu as my primary OS. It's incredibly finicky to set up (shocker, I know!) but if you're able to get it working it's truly amazing. Talking like 1%…

Just use Proton. Install games from Steam directly.

This is a non-answer. Steam is not and should not be the sole source of video games on PC. This is a workaround that doesn't even work as well as you imply.

> Just use Windows. Install games from developers directly.

See how silly that sounds to you ?

Re: Looking Glass: Run a Windows VM on Linux in a window with native performance

#54
post #40

The question everyone is wondering: is this ready for serious use for gaming and productivity (Eg, photoshop or game development)? Or is it very hard to get a smooth workflow going? If the workflow is not great, is there a clear path to solving that?

You don't need this for general productivity software, only stuff where QEMU's emulated GPU is too slow or otherwise insufficient (so games, video editing, etc).

The caveats are basically:

1. Setup is a bit annoying

LG can feed input into any VM but requires guest support for capture, so you need to do the setup with a direct monitor.

2. The passed-through card must have a monitor connected.

IIRC, this is an API issue since it just captures what would go to that monitor.

3. Some things are only visible on the real monitor.

They need different capture strategies for the regular desktop, system desktops (such as lock screens), and secure desktops (UAC prompts). Sometimes the transition fails, sometimes there is no strategy implemented for what you're trying to show.

4. Your CPU and motherboard must support IOMMU passthrough.

For Intel this means using Skylake+ and ensuring that it supports VT-d. For AMD this means using Ryzen with an X-series motherboard.

5. You need separate GPUs for the host and guest.

Blame GPU vendors for making VT-g an enterprise-only feature.

Re: Looking Glass: Run a Windows VM on Linux in a window with native performance

#55
post #18

If anyone is interested, the main developer, who goes by 'gnif' spends a decent amount of time on the dedicated Looking Glass sub-forum on the Level1Techs forum, here: https://forum.level1techs.com/c/software/lookingglass/142 Level1Techs also has a ton of information and help both on the forum, and their YouTube channel, about setting up Looking Glass and VFIO. The main host of the YouTube channel, Wendell, has forgo…

Is that the gnif from EEVBlog?

Re: Looking Glass: Run a Windows VM on Linux in a window with native performance

#56
post #18

If anyone is interested, the main developer, who goes by 'gnif' spends a decent amount of time on the dedicated Looking Glass sub-forum on the Level1Techs forum, here: https://forum.level1techs.com/c/software/lookingglass/142 Level1Techs also has a ton of information and help both on the forum, and their YouTube channel, about setting up Looking Glass and VFIO. The main host of the YouTube channel, Wendell, has forgo…

Is that the gnif from EEVBlog?

Yes, I am :)

Re: Looking Glass: Run a Windows VM on Linux in a window with native performance

#57
I run a VFIO setup with a single GPU - the linux host is headless, and Windows runs on top with the GPU. Its pretty awesome. Windows runs at native performance - no problem gaming or running other heavy workloads. The linux host acts as a devbox and runs a few other homeserver style services.

It's difficult to set up right but it taught me a lot about VMs and hardware. Once you get it setup well enough, its relatively painless. Like I haven't messed with my VM settings in over a year, everything just continues to work smoothly. Including windows updates, driver upgrades, most online games with anti-cheat etc. If i upgrade my hardware, it might take a day or two of tinkering to get it back up. Based on my benchmarking it runs within ~5% of native perf.

This is still the best guide IMO if you want to set it up - https://wiki.archlinux.org/title/PCI_passthrough_via_OVMF. Single GPU is basically the same as dual GPU, except you have to ensure the linux host does not take over the GPU or load any drivers for it during boot.

Re: Looking Glass: Run a Windows VM on Linux in a window with native performance

#58
post #18

If anyone is interested, the main developer, who goes by 'gnif' spends a decent amount of time on the dedicated Looking Glass sub-forum on the Level1Techs forum, here: https://forum.level1techs.com/c/software/lookingglass/142 Level1Techs also has a ton of information and help both on the forum, and their YouTube channel, about setting up Looking Glass and VFIO. The main host of the YouTube channel, Wendell, has forgo…

Note we also have a very active Discord where I try to be very active where most of the support and discussions happen.

https://discord.gg/52SMupxkvt

Re: Looking Glass: Run a Windows VM on Linux in a window with native performance

#59
post #21
post #18

If anyone is interested, the main developer, who goes by 'gnif' spends a decent amount of time on the dedicated Looking Glass sub-forum on the Level1Techs forum, here: https://forum.level1techs.com/c/software/lookingglass/142 Level1Techs also has a ton of information and help both on the forum, and their YouTube channel, about setting up Looking Glass and VFIO. The main host of the YouTube channel, Wendell, has forgo…

I looked into this project (and related GPU pass through projects) a few years ago. Putting the discussion and even some issue tracking into a "support thread" in this forum makes getting information really difficult. It's the same experience when you want to install LinageOS and realize you have to go through a long thread on XDA and sometimes reddit to solve any issue you may have.

We have tried very hard to rectify this with the B4 release by adding a documentation project to the repository, which is available in HTML form here:

https://looking-glass.io/docs/stable/

Re: Looking Glass: Run a Windows VM on Linux in a window with native performance

#60
post #18

If anyone is interested, the main developer, who goes by 'gnif' spends a decent amount of time on the dedicated Looking Glass sub-forum on the Level1Techs forum, here: https://forum.level1techs.com/c/software/lookingglass/142 Level1Techs also has a ton of information and help both on the forum, and their YouTube channel, about setting up Looking Glass and VFIO. The main host of the YouTube channel, Wendell, has forgo…

Just want to say that gnif is amazing. He is always happy to help out people on the looking glass support discord. Plus he's absolutely dedicated to continuing to improve the software he writes and the ecosystem around it. Top notch guy.

Thanks mate, your support is appreciated.
Post reply on HN