
Looking Glass: an extremely low latency KVM FrameRelay implementation - akyuu
https://looking-glass.hostfission.com
======
matxip
I actually set this up just the other day for my Windows 10 VM. To be clear,
the idea here is to run a Windows VM (with near native performance by passing
it a hardward graphicical device), then take the output directly from the VM
graphics card's memory and feed that to a Linux host where it can display that
output natively.

The primary demographic seems to be gamers that want to ditch Windows for
Linux, but don't want compromise on performance. I can attest to the
performance angle, but it has a number of rough edges.

This project seeks to solve input and output management. For example, I've
been used a second monitor and a hardware USB switch, which is attached to my
keyboard and mouse, for interacting with my VM. Looking glass actually
performs excellently for input capturing for me, but I'm finding the video
output just a touch too slow and find myself just switching my monitor input
instead. I'm thinking that might have more to do with my using Intel
integrated graphics on my host though, but I'm not sure. I'm pretty excited to
see where this goes nonetheless.

~~~
ah-
From what I've seen so far it copies every frame via the CPU and that gets
quite slow if you want to do it 60 times a second at high resolution.

Optimus etc. use DMA, so you can copy directly between the two devices.

Hopefully looking glass will support that as well in the future. Last time I
looked at least nvidias DMA support was officially restricted to quadro only,
so not sure it'll actually happen.

~~~
zeusk
Microsoft has support for cross-adapter rendering for (SurfaceBook dGPU is
hotpluggable) - where textures are resident in the dGPU memory (when in use)
but the render target surface lies in iGPU's memory which directly scans out
that surface every vsync.

Technically, it is slightly more complex because of how vsync works but zero
copy cross adapter rendering is possible.

I was an intern at the display kernel team this past summer and worked on a
similar project for VR displays (which adds further complexity due to late
stage reprojection and sensitivity to pipeline latency).

------
jlgaddis
Fellow network engineers: this isn't referring to the Frame Relay you're
thinking of [0].

[0]:
[https://en.wikipedia.org/wiki/Frame_Relay](https://en.wikipedia.org/wiki/Frame_Relay)

~~~
ZiiS
Nor the Looking Glass for that matter [0].

[0]:
[https://en.m.wikipedia.org/wiki/Looking_Glass_server](https://en.m.wikipedia.org/wiki/Looking_Glass_server)

~~~
nineteen999
Nor Sun's old 3D desktop environment
[https://en.wikipedia.org/wiki/Project_Looking_Glass](https://en.wikipedia.org/wiki/Project_Looking_Glass)

------
baal80spam
I don't really understand what is it. Could this software finally allow me to
play my Windows games on Linux host with near-perfect performance? Or is it
something else?

~~~
ah-
If you have two graphics cards and a modern processor you can pass one of them
through to a VM that can directly use it with native drivers, so you get
native GPU performance in that VM. However that means the picture only goes to
the physical outputs of that second GPU.

What Looking Glass does is take the output picture of that GPU and copy it
into a window on your host machine.

~~~
derefr
Is this much different than what a Thunderbolt-attached eGPU does when used to
accelerate host graphics on a notebook? (I mean, besides the bandwidth
available.)

~~~
wmf
Yeah, it's conceptually similar to Optimus or eGPUs but with two OSes instead
of one.

------
squaredpants
Relevant video:
[https://www.youtube.com/watch?v=okMGtwfiXMo](https://www.youtube.com/watch?v=okMGtwfiXMo)

------
ItExists
This is something that I was looking for a few years ago, I asked on the
internet if it exists and was told it doesn't and wouldn't work fast enough. I
didn't really believe those who told me it wouldn't work, but I didn't have
the skills to write something like this either. Glad someone else did though.
Thanks, this is amazing work!

------
arcaster
Congrats to Wendell at Level1Techs!

