Return to

Looking Glass - Triage


allow my vm to connect to my host how?
through ssh
is it a configuration file to edit?



No, not though ssh.

Think about the topology of your configuration as if they are physical PCs.

  1. PC1 has QEMU on it, runing the Spice server which is a TCP server.
  2. PC2 is running Windows, with keyboard and mouse coming from PC1 via Spice
  3. PC3 is running Linux, and needs to feed keyboard and mouse input to Spice for PC2 via PC1.

So PC3 needs to connect to PC1 on port 5900 instead of the localhost. You may have to configure PC1 to accept connections from PC3 depending on your network/firewall configuration. Spice may also only be configured to listen (bind) on on PC1, which you would also have to change (usually to to bind to the actual interface.



oh ok
this makes more sense
edit- but not fully

do you by any chance have a place where this is explained or shown how to edit, ive got no clue what my network/firewall configuration is and how to edit it to accept connections, i get what your saying just not the means to do it



I am sorry but this is very OS and configuration dependent, I suggest you create a new thread asking how to accomplish this as it is now outside the realms of LG Triage.

1 Like


I don’t find “PCI standard RAM Controller” in device manager.

Got it working, problem with my virsh edit and good ol restart :+1:



Good morning every one.

First of all sry for my bad englisch.
Now to my problem:

First specs:

  • Distro: Manjaro
  • Kernel: 5.0.5-1
  • Version looking glass tried: 11a,12a,Builded the latest version from source both client and host
  • Version Qemu: 3.1.0-2 and Qemu-git package: 6:4.0.0rc3.r

If i use scroll lock for mouse, the mouse jumps back to the start place when i click (anywhere).
If i don’t use scroll lock my mouse only updates when i click (i know this one should come from qemu you said).

With every configuration it has the same behavior.

Edit1: Also Copy text or pictures does not work if this is even suposed to work right now.

Edit2: Im right now compiling the newst Qemu code from git to try this one

Edit3: also same problem with latest build of qemu!

Can you help me?


[I] spice.c:197 | spice_connect | Remote:
[I] egl.c:377 | egl_render_startup | Vendor : Intel Open Source Technology Center
[I] egl.c:378 | egl_render_startup | Renderer: Mesa DRI Intel® HD Graphics 630 (Kaby Lake GT2)
[I] egl.c:379 | egl_render_startup | Version : OpenGL ES 3.2 Mesa 18.3.5
[I] main.c:1182 | run | Waiting for host to signal it’s ready…
[I] spice.c:409 | spice_on_common_read | notify message: keyboard channel is insecure
[I] main.c:1191 | run | Host ready, starting session
[W] spice.c:626 | spice_on_main_channel_read | main channel unhandled message type 105
[I] main.c:753 | eventFilter | Server Mode: on
[W] spice.c:626 | spice_on_main_channel_read | main channel unhandled message type 105
[I] main.c:753 | eventFilter | Server Mode: off
[W] spice.c:626 | spice_on_main_channel_read | main channel unhandled message type 105
[I] main.c:753 | eventFilter | Server Mode: on
[W] spice.c:626 | spice_on_main_channel_read | main channel unhandled message type 105
[I] main.c:753 | eventFilter | Server Mode: off
[W] spice.c:626 | spice_on_main_channel_read | main channel unhandled message type 105
[I] main.c:753 | eventFilter | Server Mode: on
[W] spice.c:626 | spice_on_main_channel_read | main channel unhandled message type 105
[I] main.c:753 | eventFilter | Server Mode: off



to enable copy and paste you need to install the spice guest tools windows exe located here

@skydel0 can you show me a what you have in virt-manager for spice



Specs / Setup

OS: Archlinux (4.14 kernel, qemu etc. up-to-date)
CPU: i7 6700 (2 Cores Host, 6 Cores Guest)
RAM: 16GB 2666Mhz (2GB host, 14GB Guest)
Resoluion: 1080p

libvirt configuration
<domain type='kvm'>
  <description>Windows gaming appliance</description>
  <memory unit='KiB'>13631488</memory>
  <currentMemory unit='KiB'>13631488</currentMemory>
  <vcpu placement='static'>6</vcpu>
    <vcpupin vcpu='0' cpuset='1'/>
    <vcpupin vcpu='1' cpuset='2'/>
    <vcpupin vcpu='2' cpuset='3'/>
    <vcpupin vcpu='3' cpuset='5'/>
    <vcpupin vcpu='4' cpuset='6'/>
    <vcpupin vcpu='5' cpuset='7'/>
    <emulatorpin cpuset='0,4'/>
    <iothreadpin iothread='1' cpuset='0,4'/>
    <type arch='x86_64' machine='pc-q35-3.1'>hvm</type>
    <loader readonly='yes' type='rom'>/home/tadly/.local/share/ovmf/OVMF-pure-efi.fd</loader>
    <boot dev='hd'/>
      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='8191'/>
      <vendor_id state='on' value='nvidia'/>
      <hidden state='on'/>
    <vmport state='off'/>
  <cpu mode='host-passthrough' check='none'>
    <topology sockets='1' cores='3' threads='2'/>
    <cache level='3' mode='emulate'/>
  <clock offset='localtime'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
    <timer name='kvmclock' present='yes'/>
    <timer name='hypervclock' present='yes'/>
    <suspend-to-mem enabled='yes'/>
    <suspend-to-disk enabled='yes'/>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='none' io='native' discard='unmap'/>
      <source file='/dev/disk/by-id/wwn-0x5002538d7027c81c'/>
      <target dev='sda' bus='scsi'/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='none' io='native'/>
      <source file='/dev/disk/by-id/wwn-0x5000c500b9a432e8'/>
      <target dev='sdb' bus='scsi'/>
      <address type='drive' controller='0' bus='0' target='0' unit='2'/>
    <controller type='usb' index='0' model='qemu-xhci'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
    <controller type='pci' index='0' model='pcie-root'/>
    <controller type='pci' index='1' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='1' port='0x8'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/>
    <controller type='pci' index='2' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='2' port='0x9'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    <controller type='pci' index='3' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='3' port='0xa'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    <controller type='pci' index='4' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='4' port='0xb'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x3'/>
    <controller type='pci' index='5' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='5' port='0x10'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0' multifunction='on'/>
    <controller type='pci' index='6' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='6' port='0xc'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x4' multifunction='on'/>
    <controller type='pci' index='7' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='7' port='0xd'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x5'/>
    <controller type='pci' index='8' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='8' port='0xe'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x6'/>
    <controller type='pci' index='9' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='9' port='0xf'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x7'/>
    <controller type='pci' index='10' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='10' port='0x11'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/>
    <controller type='pci' index='11' model='pcie-to-pci-bridge'>
      <model name='pcie-pci-bridge'/>
      <address type='pci' domain='0x0000' bus='0x0a' slot='0x00' function='0x0'/>
    <controller type='scsi' index='0' model='virtio-scsi'>
      <driver iothread='1'/>
      <address type='pci' domain='0x0000' bus='0x09' slot='0x00' function='0x0'/>
    <controller type='sata' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
    <controller type='virtio-serial' index='0'>
      <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
    <controller type='pci' index='12' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='12' port='0x12'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x2'/>
    <interface type='bridge'>
      <mac address='52:54:00:e9:18:b1'/>
      <source bridge='br0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
    <interface type='network'>
      <mac address='52:54:00:b2:a8:7f'/>
      <source network='isolated'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x0c' slot='0x00' function='0x0'/>
    <channel type='unix'>
      <target type='virtio' name='org.qemu.guest_agent.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <hostdev mode='subsystem' type='pci' managed='yes'>
        <address domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
      <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0' multifunction='on'/>
    <hostdev mode='subsystem' type='pci' managed='yes'>
        <address domain='0x0000' bus='0x01' slot='0x00' function='0x1'/>
      <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x1'/>
    <hostdev mode='subsystem' type='pci' managed='yes'>
        <address domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
      <address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
    <hostdev mode='subsystem' type='pci' managed='yes'>
        <address domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
    <hostdev mode='subsystem' type='pci' managed='yes'>
        <address domain='0x0000' bus='0x01' slot='0x00' function='0x2'/>
      <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
    <hostdev mode='subsystem' type='pci' managed='yes'>
        <address domain='0x0000' bus='0x01' slot='0x00' function='0x3'/>
      <address type='pci' domain='0x0000' bus='0x08' slot='0x00' function='0x0'/>
    <memballoon model='none'/>
    <shmem name='looking-glass'>
      <model type='ivshmem-plain'/>
      <size unit='M'>32</size>
      <address type='pci' domain='0x0000' bus='0x0b' slot='0x01' function='0x0'/>


1. Simply launching the host application causes FPS loss

The games where tested using Borderelss Fullscreen.
As soon as I start looking-glass I see a ~10 FPS loss.
Stopping looking glass does not give those back. I have to restart the game.
Tested with Skyrim SE (modded) and Rocket League (Haven’t had a lot of time to debug this weekend).

I actually do not fault looking glass for this because I see similar FPS loss when launching parsec.

However… Does this even make sense?
To me it doesn’t hence why I’m asking especially as I’m not yet connecting a client.

2. Looking Glass Client feels like ~40 FPS (Game running with > 100 FPS)

Playing native on the TV it’s silky smooth (well 60Hz smooth) but through looking glass it feels more like playing with 40 FPS while the game renders > 100.
Anything that comes to mind that I could check?
Also, the monitor that’s hooked up simultaneously is smooth while looking-glass is connected.

3. 1080p Guest outputting to 4K Host?

Currently I’m switching the hosts resolution to 1080p whenever I launch looking-glass and back to 4K on close.
Having the host on 4K causes an insane performance hit. This is probably due to X11 having to scale the whole thing?

Changing resolutions is not ideal though (it’s quite slow) so I’m curious if there might be a way around this?



I already tryed this and it does not help me :frowning:

But thanks for the try :smiley:


here my virt-manager :smiley:


wind10-2.txt (5.9 KB)

The Tablett input was the problem for the mouse!
So the mouse problem is fixxed now thanks a lot :slight_smile:
This is Fucking awsome thanks for all the hard work making this poosible :smiley:

The copy pasting stuff problem is not so crytical but i also would be happy if it works :smiley:



Did you tried the render options? you can try:

looking-glass-client -g “OpenGL”



Was thinking about mentioning it and ended up forgetting.

I assume you mention this in regards to either 2. or 3.

In case of 2.

I am using opengl right now as it improves performance significantly, yes.
While using OpenGL and disabling vsync -o opengl:vsync=0 I still have the feels like 40fps issue.

In case of 3.

IIRC I was only testing EGL while on 4k but doubt OpenGL would make a difference.
I will test this anyways just to be 100% sure.



Maybe you could also give looking glass more resources?

<shmem name=‘looking-glass’>
<model type=‘ivshmem-plain’/>
<size unit=‘M’>128</size>
<address type=‘pci’ domain=‘0x0000’ bus=‘0x0b’ slot=‘0x01’ function=‘0x0’/>

4096 × 2160 x 4 x 2 = 70778880 bytes
70778880 / 1024 / 1024 = 67.5 MiB + 2 = 69 MB

so you need 64 MB that means you should use the next bigger: 128 MB :smiley:
i hope i could help :smiley:



As I understood, the memory sizes is related to the guests resolution (which in my case is 1080p).
In case more memory actually does improve things, this would be valuable information to have in the quickstart guide IMO.

I’ll try this as well this evening.



did you try installing
spice-tools for windows
i installed this and i could copy and paste just fine
you may have to disable the qxl display



Did some more testing (only had 15 mins. to spare though) and here are my findings.

1. Bigger memory size

As suspected, it doesn’t help much in regards to the host outputting in 4k.
Using 64M combined with OpenGl does feel smoother than 32M does though.

However, while having the peripherals connected to the guest directly, latency with OpenGL is bigger than with EGL.
I assume this is a typical buffer issue?

2. MASSIVE fps loss when connecting the client

Again, with OpenGL at 1080p with a 64M memory file.
In Skyrim SE I loose about 50-60 FPS as soon as I connect the client application.

Not sure what else to add :sweat_smile:

Edit: All tests are based of off master branch builds



Have you ever thought about using RDMA instead of a shared memory device? While 56GbE has become super cheap, with CX3 for example, we could take advantage by sr-iov and “share” the card on host and vm and maybe use it to share the “screen” over network with almost no latency and no image quality loss.



yes i installed the tools.

I disabled the display in Windows way befor i installed Looking glass :smiley:

Iv tried now various diffrent video card emulation types: Virtio, QLX and VGA.
But nothing chnaged :frowning:

But i found a new problem. If i play over Looking glass i have some small freezez every 20 sec. and it seems to press some keys along the freezes. That means after the freez my player in cs:go just walk in one direction without me pressing the key xD

It works with nvidia gamestream without thees freezez so i think the hardware should be fine.


I7 7700K 1 Core with 2 Threads
Intel Corporation HD Graphics 630
7 GB Ram

I7 7700K 3 Cores with 2 Threads
NVIDIA Corporation GM204 [GeForce GTX 970]
9GB Ram

Nothing Like CPU, GPU or Ram is on 100% usage.

Can someone imagine what the problem maybe could be?

ps. I have to use OpenGL cause EGL needs to much ressources. My Frames on the guest drops from 160 FPS to 30-40 with EGL in csgo (even with ALT+TAB). With OpenGL the frames are stable but there are the Freezez :frowning:

Edit: I don’t enabled the fps viewer. so this should nnot be the problem :smiley:

1 Like



when trying to reinstall looking glass
/build/client# make
Scanning dependencies of target lg_common
[ 1%] Building C object common/CMakeFiles/lg_common.dir/src/crash.linux.c.o
In file included from /home/imre/client/build/common/src/crash.linux.c:35:0:
/home/imre/client/build/common/src/ fatal error: bfd.h: No such file or directory
#include <bfd.h>

edit: i got it installed, but one day all a sudden looking glass just stopped working so i wanted to reinstall to see whats up and i get this error

im having trouble recreating my success from the first time trying vm->vm
do i need to add the shmem file to both the vms? meaning linux and windows

i just keep getting this error

~/client/build/client$ ./looking-glass-client -f /dev/uio0 -L 64 -s
[I] main.c:757 | run | Looking Glass ()
[I] main.c:758 | run | Locking Method: Atomic
[I] main.c:751 | try_renderer | Using Renderer: EGL
[I] main.c:824 | run | Using: EGL
[I] main.c:961 | run | Waiting for host to signal it’s ready…
Bus error (core dumped)

the windows vm is capturing and i have all the files set up im just stuck

so in short do i add the shmem file to both vms?



It’s in your head, you’re just wasting RAM, more memory doesn’t increase performance in any way.

Run the game in windowed full screen mode, this is a known and documented limitation with DXGI capture for many titles, especially those from Bethesda.

Yes, but those are pro only features, nobody here, including myself owns any such equipment.

We already have zero image quality loss, and “almost no latency”, When LG is performing correctly, at most there is one frame of latency.

EGL is OpenGL, just a more modern take on it. If you are seeing better legacy OpenGL performance then EGL, then your host GPU is simply too old/slow. Also the client side renderer should not be able to affect the guests’s FPS, they are decoupled.

Please do for the purposes of testing, what FPS and UPS is LG reporting?

Stop using the master tree if you can’t diagnose issues like this. You are simply missing a new dependency (binutils-dev).

You need the windows and linux guests to both have the shared memory device, not the file itself.

Please provide a back trace, see

1 Like


Well I know that with the current implementation of a shared memory device there is already (almost) no latency, but I was thinking if you just could switch to RDMA by using Soft-RoCE for the host and Paravirtualized RDMA Device (PVRDMA) for the guest, so there is no need to have a physical RDMA capable nic for doing RDMA from guest to host but implementing it this way would just give the posibility to use it over network w/o any extra work (for those who already own one, or those who want to spend ~100$ for two cards and a cable)

My idea was that using an already existing technology which is capable of what we want to do could lead to less developer work, then implementing a special use case technique for this.

And a nice extra of doing it the rdma way would be it is not limited to KVM, so it could be used on esxi/xen/almost all hypervisors (or even bare-metal to share it almost latency free) too.