Return to Level1Techs.com

Looking Glass - Triage

helpdesk
lookingglass
#1745

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

0 Likes

#1746

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 127.0.0.1 on PC1, which you would also have to change (usually to 0.0.0.0) to bind to the actual interface.

0 Likes

#1747

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

0 Likes

#1748

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

#1749

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

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

0 Likes

#1750

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

Problem:
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?

logs:

Blockquote
[I] spice.c:197 | spice_connect | Remote: 127.0.0.1:5900
[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

0 Likes

#1751

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

https://www.spice-space.org/download/windows/spice-guest-tools/spice-guest-tools-latest.exe

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

0 Likes

#1752

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'>
  <name>gamer</name>
  <uuid>d968748c-ceb8-4818-ac43-ab1c16309f33</uuid>
  <title>Gamer</title>
  <description>Windows gaming appliance</description>
  <memory unit='KiB'>13631488</memory>
  <currentMemory unit='KiB'>13631488</currentMemory>
  <memoryBacking>
    <hugepages/>
  </memoryBacking>
  <vcpu placement='static'>6</vcpu>
  <iothreads>1</iothreads>
  <cputune>
    <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'/>
  </cputune>
  <os>
    <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'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <hyperv>
      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='8191'/>
      <vendor_id state='on' value='nvidia'/>
    </hyperv>
    <kvm>
      <hidden state='on'/>
    </kvm>
    <vmport state='off'/>
  </features>
  <cpu mode='host-passthrough' check='none'>
    <topology sockets='1' cores='3' threads='2'/>
    <cache level='3' mode='emulate'/>
  </cpu>
  <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'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <pm>
    <suspend-to-mem enabled='yes'/>
    <suspend-to-disk enabled='yes'/>
  </pm>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <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>
    <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'/>
    </disk>
    <controller type='usb' index='0' model='qemu-xhci'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
    </controller>
    <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>
    <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>
    <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>
    <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>
    <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>
    <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>
    <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>
    <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>
    <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>
    <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>
    <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>
    <controller type='scsi' index='0' model='virtio-scsi'>
      <driver iothread='1'/>
      <address type='pci' domain='0x0000' bus='0x09' slot='0x00' function='0x0'/>
    </controller>
    <controller type='sata' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
    </controller>
    <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'/>
    </controller>
    <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>
    <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'/>
    </interface>
    <channel type='unix'>
      <target type='virtio' name='org.qemu.guest_agent.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <source>
        <address domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0' multifunction='on'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <source>
        <address domain='0x0000' bus='0x01' slot='0x00' function='0x1'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x1'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <source>
        <address domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <source>
        <address domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <source>
        <address domain='0x0000' bus='0x01' slot='0x00' function='0x2'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <source>
        <address domain='0x0000' bus='0x01' slot='0x00' function='0x3'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x08' slot='0x00' function='0x0'/>
    </hostdev>
    <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'/>
    </shmem>
  </devices>
</domain>

Issues

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?

0 Likes

#1753

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

But thanks for the try :smiley:

edit:

here my virt-manager :smiley:

config:

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:

0 Likes

#1754

Did you tried the render options? you can try:

looking-glass-client -g “OpenGL”

0 Likes

#1755

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.

0 Likes

#1756

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’/>
</shmem>

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:

0 Likes

#1757

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.

0 Likes

#1758

did you try installing
spice-tools for windows
https://www.spice-space.org/download/windows/spice-guest-tools/spice-guest-tools-latest.exe
i installed this and i could copy and paste just fine
you may have to disable the qxl display

0 Likes

#1759

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

0 Likes

#1760

@developers
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.

2 Likes

#1761

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.

Host:

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

Guest:
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

#1762

@gnif

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/bfd.inc.h:5:14: 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

edit2:
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?

0 Likes

#1763

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 https://github.com/gnif/LookingGlass/blob/master/client/DEBUGGING.md

1 Like

#1764

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.

0 Likes