1

Looking Glass is an open source application that allows the use of a KVM configured with a passthrough GPU without an attached physical monitor, keyboard or mouse.

In Looking Glass terminology, the host software is the term for the piece of Looking Glass that runs in the VM guest (the VM where the GPU is used). The client software is the term for the piece that runs on the Linux host, showing the rendered frames.

The Looking Glass host is currently Windows-only, and covers the main use case: run Windows-only GPU-heavy software in a Windows VM, showing the result on the Linux host.

I have a slightly different use case: I pass my beefier headless GPU through from a Linux host to a Linux VM guest. It works fine there for GPU computations based on OpenCL or CUDA or whatever. I'd also like to be able to run 3D software on that Linux VM guest, and display the result on my Linux host.

Thus: Is there an equivalent technology for a Linux guest on a Linux host? Or, alternatively, are there any Looking Glass hosts for Linux?

gspr
  • 199
  • 1
  • 6

2 Answers2

3

I am the Author of Looking Glass.

The project already has Linux guest support as the host application is agnostic and can be built for both. Please note though that the support for the Linux guest is currently lacking features such as cursor support, etc.

Geoffrey
  • 334
  • 3
  • 9
  • That seems fantastic! Is this documented somewhere? The webpage still says that Windows 10 is the only supported guest OS. I don't wanna turn the comment field into a chat, but are there some notes somewhere that I could take a look at in order to get started with this? – gspr Jun 07 '21 at 10:54
  • windows host is the only supported guest OS simply due to not having an active dev working on the Linux host. I simply do not have time to support both platforms but put enough of the framework there if someone were to get invovled. – Geoffrey Jun 07 '21 at 23:02
  • I understand. But is your comment saying the opposite of your answer? I'm confused. And is anything written down about the Linux-Linux combo anywhere? – gspr Jun 08 '21 at 08:29
  • Developer support != Software support. The software has partial support but at the moment there is no active maintainer for the Linux host application. If you want to know more please join the LG Discord Server, which is the place to discuss these things. – Geoffrey Jun 08 '21 at 09:00
  • Ah, sorry, my bad. I was misreading you. Thanks for the advice. – gspr Jun 08 '21 at 12:26
0

While not a shared memory device solution, one option for getting great performance and accelerated graphics from headless cards on Linux is to use NoMachine. In my opinion NoMachine works better than other solution like RDP and VNC, and has support most devices Linux/MacOS/Windows/Android etc...

To use acceleration with NVIDIA's headless Tesla card for example and support your CUDA apps, install the NVIDIA driver first and then use these instructions from VirtualGL for configuring Xorg to use a headless card.

Run nvidia-xconfig --query-gpu-info to obtain the bus ID of the GPU. Example:

GPU #0:
  Name      : Tesla M60
  ...
  PCI BusID : PCI:136:0:0

Create an appropriate xorg.conf file for headless operation:

sudo nvidia-xconfig -a --allow-empty-initial-configuration --use-display-device=None --virtual=1920x1200 --busid {busid}

Replace {busid} with the bus ID you obtained in Step 1. Leave out --use-display-device=None if the GPU is headless, i.e. if it has no display outputs. If you are using version 440.xx or later of the NVIDIA proprietary driver, then edit xorg.conf and add Option "HardDPMS" "false" under the Device- or Screen -section.

Then install NoMachine and if you run nvidia-smi you should see Xorg is running on the NVIDIA GPU. If you don't want to use NoMachine Your other option is to use VirtualGL with xrdp, VNC, or xpra. and launch your desktop with vglrun , for example vglrun xfce4-session which I use, but YMMV using other desktops.

If you don't need CUDA apps, I've had luck getting the Open Source driver nouveau working out of box accelerating NoMachine.

Peregrino69
  • 2,337
  • 1
  • 15
  • 22
UserZer0
  • 137
  • 5