Looking Glass Client Loops (Never Connects to Looking Glass Host)

Hey there!

I recently had my first succesfully GPU passthrough into my QEMUI/KVM system and then started setting up looking glass. I have compiled the local linux (I am running Fedora 33) side client, added the shared memory buffer into my XML definition for the VM, installed the “IVSHMEM Device” on windows, and have the Looking Glass windows service running. I expected that I was ready to startup the client from within my Linux and connect but I just keep looping this output:
[lleipold@localhost ~]$ ./looking-glass-client
7398635317 [I] main.c:1646 | main | Looking Glass (B2-rc4-0-g969effedde)
7398635335 [I] main.c:1647 | main | Locking Method: Atomic
7398790982 [I] ivshmem.c:180 | ivshmemOpenDev | KVMFR Device : /dev/shm/looking-glass
7398828792 [I] egl.c:188 | egl_initialize | Double buffering is off
7398837783 [I] egl.c:202 | egl_initialize | Multisampling enabled, max samples: 4
7398837795 [I] main.c:1074 | try_renderer | Using Renderer: EGL
7398919580 [I] main.c:1399 | lg_run | Using Clipboard: X11
7398924314 [I] egl.c:405 | egl_render_startup | Supported extensions: EGL_EXT_platform_base EGL_EXT_device_base EGL_EXT_device_enumeration EGL_EXT_device_query EGL_KHR_client_get_all_proc_addresses EGL_EXT_client_extensions EGL_KHR_debug EGL_KHR_platform_x11 EGL_EXT_platform_x11 EGL_EXT_platform_device EGL_KHR_platform_wayland EGL_EXT_platform_wayland EGL_MESA_platform_gbm EGL_KHR_platform_gbm EGL_MESA_platform_surfaceless
7398924326 [I] egl.c:411 | egl_render_startup | use native: false
7399020646 [I] egl.c:500 | egl_render_startup | Vendor : NVIDIA Corporation
7399020656 [I] egl.c:501 | egl_render_startup | Renderer: GeForce RTX 3090/PCIe/SSE2
7399020658 [I] egl.c:502 | egl_render_startup | Version : OpenGL ES 3.2 NVIDIA 455.38
7399238643 [I] main.c:1530 | lg_run | Host ready, reported version: B2-rc4-0-g969effedde
7399238660 [I] main.c:1531 | lg_run | Starting session
7399438624 [I] main.c:1567 | lg_run | Waiting for the host to restart…
7399438708 [I] main.c:1530 | lg_run | Host ready, reported version: B2-rc4-0-g969effedde
7399438711 [I] main.c:1531 | lg_run | Starting session
7399740286 [I] main.c:1567 | lg_run | Waiting for the host to restart…
7400740548 [I] main.c:1530 | lg_run | Host ready, reported version: B2-rc4-0-g969effedde
7400740569 [I] main.c:1531 | lg_run | Starting session
7400840026 [I] main.c:1567 | lg_run | Waiting for the host to restart…
7400840038 [I] main.c:1530 | lg_run | Host ready, reported version: B2-rc4-0-g969effedde
7400840043 [I] main.c:1531 | lg_run | Starting session
7401139986 [I] main.c:1567 | lg_run | Waiting for the host to restart…
7402140184 [I] main.c:1530 | lg_run | Host ready, reported version: B2-rc4-0-g969effedde
7402140197 [I] main.c:1531 | lg_run | Starting session
7402339006 [I] main.c:1567 | lg_run | Waiting for the host to restart…
7402339017 [I] main.c:1530 | lg_run | Host ready, reported version: B2-rc4-0-g969effedde
7402339020 [I] main.c:1531 | lg_run | Starting session
7402538963 [I] main.c:1567 | lg_run | Waiting for the host to restart…
7403539010 [I] main.c:1530 | lg_run | Host ready, reported version: B2-rc4-0-g969effedde
7403539023 [I] main.c:1531 | lg_run | Starting session
7404640935 [I] main.c:1567 | lg_run | Waiting for the host to restart…
7405640130 [I] main.c:1530 | lg_run | Host ready, reported version: B2-rc4-0-g969effedde
7405640144 [I] main.c:1531 | lg_run | Starting session
7405840115 [I] main.c:1567 | lg_run | Waiting for the host to restart…
7405840126 [I] main.c:1530 | lg_run | Host ready, reported version: B2-rc4-0-g969effedde
7405840129 [I] main.c:1531 | lg_run | Starting session
7406140190 [I] main.c:1567 | lg_run | Waiting for the host to restart…
7407141126 [I] main.c:1530 | lg_run | Host ready, reported version: B2-rc4-0-g969effedde


with the
"
Starting session
Waiting for the host to restart…
Host ready, reported version: B2-rc4-0-g969effedde
"
repeating indefinitely until I ctrl c close out of the client.

I’ll attach the full host logs here as well.

I am not allowed to upload the actual file here, since I am a new user. But I am going to copy out the bits that matter from each of the two logs host side.
For the “looking-glass-host-service” nothing relevant is present but its short enough, here is the full contents:
Startup
Terminating the host application
Host application terminated
Finished
Startup
Terminating the host application
Host application terminated
Finished
Startup
Terminating the host application
Host application terminated
Finished

Then on the other log “looking-glass-host” lots of interesting things are happening over and over, this is the repeating bit:
1159342407 [I] platform.c:329 | app_init | System timer resolution: 48.82 ns
1159342832 [I] app.c:444 | app_main | Looking Glass Host (B2-rc4-0-g969effedde)
1159349815 [I] app.c:454 | app_main | IVSHMEM Size : 32 MiB
1159350147 [I] app.c:455 | app_main | IVSHMEM Address : 0x2DD0000
1159350427 [I] app.c:456 | app_main | Max Pointer Size : 64 KiB
1159350707 [I] app.c:457 | app_main | KVMFR Version : 2
1159351020 [I] app.c:505 | app_main | Max Frame Size : 15 MiB
1159351304 [I] app.c:520 | app_main | Trying : NVFBC (NVidia Frame Buffer Capture)
1159360461 [I] wrapper.cpp:88 | NvFBCInit | NvFBC SDK Version: 112
1163596810 [I] app.c:520 | app_main | Trying : DXGI
1163658781 [I] dxgi.c:388 | dxgi_init | Device Descripion: NVIDIA TITAN X (Pascal)
1163659134 [I] dxgi.c:389 | dxgi_init | Device Vendor ID : 0x10de
1163659449 [I] dxgi.c:390 | dxgi_init | Device Device ID : 0x1b00
1163659779 [I] dxgi.c:391 | dxgi_init | Device Video Mem : 12147 MiB
1163660063 [I] dxgi.c:392 | dxgi_init | Device Sys Mem : 0 MiB
1163660342 [I] dxgi.c:393 | dxgi_init | Shared Sys Mem : 7998 MiB
1163660636 [I] dxgi.c:394 | dxgi_init | Feature Level : 0xb100
1163660915 [I] dxgi.c:395 | dxgi_init | Capture Size : 3840 x 2160
1163661215 [I] dxgi.c:396 | dxgi_init | AcquireLock : enabled
1163662750 [I] dxgi.c:518 | dxgi_init | Source Format : DXGI_FORMAT_B8G8R8A8_UNORM
1163663667 [I] app.c:542 | app_main | Using : DXGI
1196459529 [I] platform.c:329 | app_init | System timer resolution: 48.82 ns
1196459919 [I] app.c:444 | app_main | Looking Glass Host (B2-rc4-0-g969effedde)
1196466641 [I] app.c:454 | app_main | IVSHMEM Size : 32 MiB
1196466981 [I] app.c:455 | app_main | IVSHMEM Address : 0x2BF0000
1196467321 [I] app.c:456 | app_main | Max Pointer Size : 64 KiB
1196467594 [I] app.c:457 | app_main | KVMFR Version : 2
1196467951 [I] app.c:505 | app_main | Max Frame Size : 15 MiB
1196468239 [I] app.c:520 | app_main | Trying : NVFBC (NVidia Frame Buffer Capture)
1196473254 [I] wrapper.cpp:88 | NvFBCInit | NvFBC SDK Version: 112
1196609247 [I] app.c:520 | app_main | Trying : DXGI
1196654134 [I] dxgi.c:388 | dxgi_init | Device Descripion: NVIDIA TITAN X (Pascal)
1196654463 [I] dxgi.c:389 | dxgi_init | Device Vendor ID : 0x10de
1196654738 [I] dxgi.c:390 | dxgi_init | Device Device ID : 0x1b00
1196655009 [I] dxgi.c:391 | dxgi_init | Device Video Mem : 12147 MiB
1196655303 [I] dxgi.c:392 | dxgi_init | Device Sys Mem : 0 MiB
1196655574 [I] dxgi.c:393 | dxgi_init | Shared Sys Mem : 7998 MiB
1196655861 [I] dxgi.c:394 | dxgi_init | Feature Level : 0xb100
1196656133 [I] dxgi.c:395 | dxgi_init | Capture Size : 3840 x 2160
1196656420 [I] dxgi.c:396 | dxgi_init | AcquireLock : enabled
1196657446 [I] dxgi.c:518 | dxgi_init | Source Format : DXGI_FORMAT_B8G8R8A8_UNORM
1196658171 [I] app.c:542 | app_main | Using : DXGI
1235401065 [E] app.c:257 | captureStart | Maximum frame size of 33177600 bytes excceds maximum space available
1235515890 [I] platform.c:329 | app_init | System timer resolution: 48.82 ns
1235516480 [I] app.c:444 | app_main | Looking Glass Host (B2-rc4-0-g969effedde)
1235525702 [I] app.c:454 | app_main | IVSHMEM Size : 32 MiB
1235526229 [I] app.c:455 | app_main | IVSHMEM Address : 0x2DC0000
1235526794 [I] app.c:456 | app_main | Max Pointer Size : 64 KiB
1235527100 [I] app.c:457 | app_main | KVMFR Version : 2
1235527392 [I] app.c:505 | app_main | Max Frame Size : 15 MiB
1235527675 [I] app.c:520 | app_main | Trying : NVFBC (NVidia Frame Buffer Capture)
1235531197 [I] wrapper.cpp:88 | NvFBCInit | NvFBC SDK Version: 112
1235676057 [I] app.c:520 | app_main | Trying : DXGI
1235722503 [I] dxgi.c:388 | dxgi_init | Device Descripion: NVIDIA TITAN X (Pascal)
1235723192 [I] dxgi.c:389 | dxgi_init | Device Vendor ID : 0x10de
1235723737 [I] dxgi.c:390 | dxgi_init | Device Device ID : 0x1b00
1235724062 [I] dxgi.c:391 | dxgi_init | Device Video Mem : 12147 MiB
1235724341 [I] dxgi.c:392 | dxgi_init | Device Sys Mem : 0 MiB
1235724611 [I] dxgi.c:393 | dxgi_init | Shared Sys Mem : 7998 MiB
1235724899 [I] dxgi.c:394 | dxgi_init | Feature Level : 0xb100
1235725172 [I] dxgi.c:395 | dxgi_init | Capture Size : 3840 x 2160
1235725455 [I] dxgi.c:396 | dxgi_init | AcquireLock : enabled
1235726490 [I] dxgi.c:518 | dxgi_init | Source Format : DXGI_FORMAT_B8G8R8A8_UNORM
1235727239 [I] app.c:542 | app_main | Using : DXGI
1235727528 [E] app.c:257 | captureStart | Maximum frame size of 33177600 bytes excceds maximum space available
1235848851 [I] platform.c:329 | app_init | System timer resolution: 48.82 ns
1235849497 [I] app.c:444 | app_main | Looking Glass Host (B2-rc4-0-g969effedde)
1235855956 [I] app.c:454 | app_main | IVSHMEM Size : 32 MiB
1235856318 [I] app.c:455 | app_main | IVSHMEM Address : 0x2D40000
1235856668 [I] app.c:456 | app_main | Max Pointer Size : 64 KiB
1235856939 [I] app.c:457 | app_main | KVMFR Version : 2
1235857307 [I] app.c:505 | app_main | Max Frame Size : 15 MiB
1235857653 [I] app.c:520 | app_main | Trying : NVFBC (NVidia Frame Buffer Capture)
1235862600 [I] wrapper.cpp:88 | NvFBCInit | NvFBC SDK Version: 112
1235944526 [I] app.c:520 | app_main | Trying : DXGI
1235989148 [I] dxgi.c:388 | dxgi_init | Device Descripion: NVIDIA TITAN X (Pascal)
1235989553 [I] dxgi.c:389 | dxgi_init | Device Vendor ID : 0x10de
1235989827 [I] dxgi.c:390 | dxgi_init | Device Device ID : 0x1b00
1235990107 [I] dxgi.c:391 | dxgi_init | Device Video Mem : 12147 MiB
1235990388 [I] dxgi.c:392 | dxgi_init | Device Sys Mem : 0 MiB
1235990657 [I] dxgi.c:393 | dxgi_init | Shared Sys Mem : 7998 MiB
1235990952 [I] dxgi.c:394 | dxgi_init | Feature Level : 0xb100
1235991238 [I] dxgi.c:395 | dxgi_init | Capture Size : 3840 x 2160
1235991528 [I] dxgi.c:396 | dxgi_init | AcquireLock : enabled
1235992555 [I] dxgi.c:518 | dxgi_init | Source Format : DXGI_FORMAT_B8G8R8A8_UNORM
1235993313 [I] app.c:542 | app_main | Using : DXGI
1236982381 [E] app.c:257 | captureStart | Maximum frame size of 33177600 bytes excceds maximum space available
1237074103 [I] platform.c:329 | app_init | System timer resolution: 48.82 ns
1237074529 [I] app.c:444 | app_main | Looking Glass Host (B2-rc4-0-g969effedde)
1237082298 [I] app.c:454 | app_main | IVSHMEM Size : 32 MiB
1237082733 [I] app.c:455 | app_main | IVSHMEM Address : 0x2C00000
1237083171 [I] app.c:456 | app_main | Max Pointer Size : 64 KiB
1237083585 [I] app.c:457 | app_main | KVMFR Version : 2
1237083933 [I] app.c:505 | app_main | Max Frame Size : 15 MiB
1237084208 [I] app.c:520 | app_main | Trying : NVFBC (NVidia Frame Buffer Capture)
1237087817 [I] wrapper.cpp:88 | NvFBCInit | NvFBC SDK Version: 112
1237173201 [I] app.c:520 | app_main | Trying : DXGI
1237220918 [I] dxgi.c:388 | dxgi_init | Device Descripion: NVIDIA TITAN X (Pascal)
1237221417 [I] dxgi.c:389 | dxgi_init | Device Vendor ID : 0x10de
1237221828 [I] dxgi.c:390 | dxgi_init | Device Device ID : 0x1b00
1237222246 [I] dxgi.c:391 | dxgi_init | Device Video Mem : 12147 MiB
1237222670 [I] dxgi.c:392 | dxgi_init | Device Sys Mem : 0 MiB
1237223095 [I] dxgi.c:393 | dxgi_init | Shared Sys Mem : 7998 MiB
1237223525 [I] dxgi.c:394 | dxgi_init | Feature Level : 0xb100
1237223868 [I] dxgi.c:395 | dxgi_init | Capture Size : 3840 x 2160
1237224160 [I] dxgi.c:396 | dxgi_init | AcquireLock : enabled
1237225167 [I] dxgi.c:518 | dxgi_init | Source Format : DXGI_FORMAT_B8G8R8A8_UNORM
1237225915 [I] app.c:542 | app_main | Using : DXGI
1237226204 [E] app.c:257 | captureStart | Maximum frame size of 33177600 bytes excceds maximum space available
1237298804 [I] platform.c:329 | app_init | System timer resolution: 48.82 ns
1237299460 [I] app.c:444 | app_main | Looking Glass Host (B2-rc4-0-g969effedde)
1237305875 [I] app.c:454 | app_main | IVSHMEM Size : 32 MiB
1237306231 [I] app.c:455 | app_main | IVSHMEM Address : 0x2CE0000
1237306636 [I] app.c:456 | app_main | Max Pointer Size : 64 KiB
1237306915 [I] app.c:457 | app_main | KVMFR Version : 2
1237307283 [I] app.c:505 | app_main | Max Frame Size : 15 MiB
1237307625 [I] app.c:520 | app_main | Trying : NVFBC (NVidia Frame Buffer Capture)
1237312461 [I] wrapper.cpp:88 | NvFBCInit | NvFBC SDK Version: 112
1237397510 [I] app.c:520 | app_main | Trying : DXGI
1237443431 [I] dxgi.c:388 | dxgi_init | Device Descripion: NVIDIA TITAN X (Pascal)
1237443763 [I] dxgi.c:389 | dxgi_init | Device Vendor ID : 0x10de
1237444051 [I] dxgi.c:390 | dxgi_init | Device Device ID : 0x1b00
1237444325 [I] dxgi.c:391 | dxgi_init | Device Video Mem : 12147 MiB
1237444608 [I] dxgi.c:392 | dxgi_init | Device Sys Mem : 0 MiB
1237444877 [I] dxgi.c:393 | dxgi_init | Shared Sys Mem : 7998 MiB
1237445167 [I] dxgi.c:394 | dxgi_init | Feature Level : 0xb100
1237445439 [I] dxgi.c:395 | dxgi_init | Capture Size : 3840 x 2160
1237445726 [I] dxgi.c:396 | dxgi_init | AcquireLock : enabled
1237446711 [I] dxgi.c:518 | dxgi_init | Source Format : DXGI_FORMAT_B8G8R8A8_UNORM
1237447475 [I] app.c:542 | app_main | Using : DXGI
1238435913 [E] app.c:257 | captureStart | Maximum frame size of 33177600 bytes excceds maximum space available
1238526570 [I] platform.c:329 | app_init | System timer resolution: 48.82 ns
1238527010 [I] app.c:444 | app_main | Looking Glass Host (B2-rc4-0-g969effedde)
1238534245 [I] app.c:454 | app_main | IVSHMEM Size : 32 MiB
1238534683 [I] app.c:455 | app_main | IVSHMEM Address : 0x2DA0000
1238535125 [I] app.c:456 | app_main | Max Pointer Size : 64 KiB
1238535545 [I] app.c:457 | app_main | KVMFR Version : 2
1238535865 [I] app.c:505 | app_main | Max Frame Size : 15 MiB
1238536141 [I] app.c:520 | app_main | Trying : NVFBC (NVidia Frame Buffer Capture)
1238540100 [I] wrapper.cpp:88 | NvFBCInit | NvFBC SDK Version: 112
1238622336 [I] app.c:520 | app_main | Trying : DXGI
1238667719 [I] dxgi.c:388 | dxgi_init | Device Descripion: NVIDIA TITAN X (Pascal)
1238668065 [I] dxgi.c:389 | dxgi_init | Device Vendor ID : 0x10de
1238668336 [I] dxgi.c:390 | dxgi_init | Device Device ID : 0x1b00
1238668609 [I] dxgi.c:391 | dxgi_init | Device Video Mem : 12147 MiB
1238668891 [I] dxgi.c:392 | dxgi_init | Device Sys Mem : 0 MiB
1238669160 [I] dxgi.c:393 | dxgi_init | Shared Sys Mem : 7998 MiB
1238669443 [I] dxgi.c:394 | dxgi_init | Feature Level : 0xb100
1238669714 [I] dxgi.c:395 | dxgi_init | Capture Size : 3840 x 2160
1238670004 [I] dxgi.c:396 | dxgi_init | AcquireLock : enabled
1238671092 [I] dxgi.c:518 | dxgi_init | Source Format : DXGI_FORMAT_B8G8R8A8_UNORM
1238671812 [I] app.c:542 | app_main | Using : DXGI

See above.

You need to increase the size of the ivshmem device inside the XML config for you VM. Increase by factors of two, so if you currently have 32mb, increase it to 64mb.

I solved it! I didn’t set the shared memory size as BIG ENOUGH! To resolve this issue if you have it, simply change the XML file to the right size (I did 128MB), e.g. XML edit:
shmem name=‘looking-glass’>
model type=‘ivshmem-plain’/>
size unit=‘M’>128
address type=‘pci’ domain=‘0x0000’ bus=‘0x09’ slot=‘0x01’ function=‘0x0’/>
/shmem>
note: removed starting < so that it would print on each line of this XML.
After I changed this, i needed to FIRST remove my existing memory file called looking-glass at the location:
rm -f /dev/shm/looking-glass
then recreate the thing using the standard procedure:
touch /dev/shm/looking-glass
chown lleipold:kvm /dev/shm/looking-glass
chmod 600 /dev/shm/looking-glass
replace lleipold with YOUR user that has virt manager access.

1 Like