News for hackers. Stuff that matters.
Re:Looking Glass: Run a Windows VM on Linux in a window with... by Rd6n6 on Sunday July 18, 2021 @01:14AM (#27870908)
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?
Re:Looking Glass: Run a Windows VM on Linux in a window with... by Nullabillity on Sunday July 18, 2021 @01:54AM (#27871021)
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... by gnif on Sunday July 18, 2021 @02:35AM (#27871135)

    1. We are working on it
    2. Not if it's a vGPU or a Quadro where EDID spoofing is allowed
    3. No, we capture everything now, even the windows Login screen and windows updates, etc.
    4. Yes
    5. Very yes!
Re:Looking Glass: Run a Windows VM on Linux in a window with... by Nullabillity on Sunday July 18, 2021 @03:03AM (#27871221)
> 3. No, we capture everything now, even the windows Login screen and windows updates, etc.

B3 and B4 both have pretty huge improvements here, but there are still a few rough corners. For example, when logging out the host shuts down immediately upon request, so you can't see the "program X is blocking shutdown" dialog.

But ultimately this is a very minor papercut for a very impressive and useful project.

Re:Looking Glass: Run a Windows VM on Linux in a window with... by gnif on Sunday July 18, 2021 @03:11AM (#27871254)
Really? I see this all the time with my VM when I shutdown via LG.
Re:Looking Glass: Run a Windows VM on Linux in a window with... by Nullabillity on Sunday July 18, 2021 @11:46AM (#27873884)
Huh, so this is a bit more involved than I thought. I just tried again to confirm (still on B4).

The first time I tried I just got the Looking Glass splash as soon as I clicked shut down. When I cancelled that and tried again I was able to see both the throbber and the prompt. When I let the VM sit idle for a while before trying again, the LG splash was back. Rebooting the VM also seems to bring back the splash reliably.

Re:Looking Glass: Run a Windows VM on Linux in a window with... by carlhjerpe on Sunday July 18, 2021 @05:39AM (#27871723)
Create a desktop shortcut to "shutdown -s -t 1" it'll keep shutting down even if an application might try to keep the system running.
Re:Looking Glass: Run a Windows VM on Linux in a window with... by sm_ts on Sunday July 18, 2021 @04:46AM (#27871589)
> 2. The passed-through card must have a monitor connected.

Regarding this, I don't know about LG, but with a standard QEMU VFIO setup, one use a single monitor connected to the two cards, and switch the input when required.

Re:Looking Glass: Run a Windows VM on Linux in a window with... by gnif on Sunday July 18, 2021 @05:32AM (#27871702)
Yup, this is a good option too, makes it easy to debug/diagnose when things go wrong with the guest VM too.

Just note that not all multi-input monitors are equal though, a small minority appear to the GPU as unplugged when the input selection is changed.

Re:Looking Glass: Run a Windows VM on Linux in a window with... by sm_ts on Sunday July 18, 2021 @04:44AM (#27871582)
(I haven't used LG, so these are general VFIO considerations).

I mantain a guide for setting up VFIO (https://github.com/saveriomiroddi/vga-passthrough), which I frequently use.

My conclusion is: for machines that are compatible with it, VFIO works very well. The technology itself is stable, so working on photoshop/game development etc. (from a technological perspective, there's no distinction between the two tasks) is not distinguishable from working on native.

I had VFIO on 4 machines I think, and one had problems which I couldn't solve, while the others worked well.

When used with QEMU, it requires some system settings and QEMU flags etc., so it's a bit annoying, but it's straightforward and documented process.

To put it in another way: if one wants to use VFIO seriously, it's best using hardware known to work well, rather trying to cram VFIO on a not very compatible system.

And also: one needs to be pratical. A USB soundcard solves countless hours of attempts to use the host's Pulseaudio system (meh).

Re:Looking Glass: Run a Windows VM on Linux in a window with... by carlhjerpe on Sunday July 18, 2021 @05:42AM (#27871736)
When gaming, as long as I don't have a lot of software running on the host, pipewire works great with pulse passthough, starts crackling if I run FF on the host, I guess something to do with nice levels
Re:Looking Glass: Run a Windows VM on Linux in a window with... by tbr1 on Sunday July 18, 2021 @01:39AM (#27870976)
It's quite easy to get it set up once you have a VM with GPU passthrough running (for which there are plenty of guides available online) -- just a double-click installation of a service on the Windows side, compiling a cmake project on the Linux side, and (optionally, for some extra performance) compiling a Linux kernel module.

After that it kind of just works, and continues working. I use it to play games and run Office apps, and have not had it break on me in a ~year of use. (Disclaimer: I occasionally contribute to the project now, but remember being impressed at how easy it was to get going when I first tried it out. Getting the VM working at all was the hardest part of the endeavor, but only took a few hours.)

Re:Looking Glass: Run a Windows VM on Linux in a window with... by AYoung010 on Sunday July 18, 2021 @01:45AM (#27870996)
Just to tack on, I set up windows with GPU pass-through and looking glass on my new laptop over the course of about 3 hours of on-and-off work using the excellent guide over at https://asus-linux.org/wiki/vfio-guide/