The host application seems to not be running Looking-Glass

shane@shane-System-Product-Name:~/LookingGlass/client/build$ ./looking-glass-client

2741440516 [I]               main.c:1599 | main                           | Looking Glass (B2-rc2-9-g67dec216d2+1)
2741440531 [I]               main.c:1600 | main                           | Locking Method: Atomic
2741478412 [I]            ivshmem.c:180  | ivshmemOpenDev                 | KVMFR Device     : /dev/shm/looking-glass
2741517708 [I]                egl.c:187  | egl_initialize                 | Double buffering is off
2741529903 [I]                egl.c:201  | egl_initialize                 | Multisampling enabled, max samples: 4
2741529912 [I]               main.c:1054 | try_renderer                   | Using Renderer: EGL
2741560427 [I]               main.c:1378 | lg_run                         | Using Clipboard: X11
2741562098 [E]              event.c:109  | lgWaitEventAbs                 | Timed wait failed
2741564551 [I]                egl.c:394  | 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_EXT_platform_wayland EGL_MESA_platform_gbm EGL_MESA_platform_surfaceless
2741564560 [I]                egl.c:400  | egl_render_startup             | use native: false
2741571746 [I]                egl.c:489  | egl_render_startup             | Vendor  : Intel
2741571755 [I]                egl.c:490  | egl_render_startup             | Renderer: Mesa Intel(R) UHD Graphics 630 (CFL GT2)
2741571757 [I]                egl.c:491  | egl_render_startup             | Version : OpenGL ES 3.2 Mesa 20.0.4
2741764621 [ ]               main.c:1458 | lg_run                         | ================================================================================
2741764631 [I]               main.c:1459 | lg_run                         | The host application seems to not be running
2741764632 [I]               main.c:1460 | lg_run                         | Waiting for the host application to start...
2770892550 [ ]               main.c:1465 | lg_run                         | ================================================================================
2770892562 [I]               main.c:1466 | lg_run                         | Please check the host application is running and is the correct version
2770892565 [I]               main.c:1467 | lg_run                         | Check the host log in your guest at %TEMP%\looking-glass-host.txt
2770892567 [I]               main.c:1468 | lg_run                         | Continuing to wait...

Here are the logs from the virtual machine %TEMP%\looking-glass-host.txt

[I]                app.c:350  | app_main                       | Looking Glass Host (B1-rc6-6-gb979752989+1)
[I]                app.c:351  | app_main                       | IVSHMEM Size     : 32 MiB
[I]                app.c:357  | app_main                       | IVSHMEM Address  : 0x2CE0000
[I]                app.c:366  | app_main                       | Max Cursor Size  : 1 MiB
[I]                app.c:367  | app_main                       | Max Frame Size   : 15 MiB
[I]                app.c:368  | app_main                       | Cursor           : 0x2CE0080 (0x00000080)
[I]                app.c:374  | app_main                       | Frame 0          : 0x2DE0080 (0x00100080)
[I]                app.c:374  | app_main                       | Frame 1          : 0x3D60000 (0x01080000)
[I]                app.c:381  | app_main                       | Trying           : NVFBC (NVidia Frame Buffer Capture)
[I]          wrapper.cpp:88   | NvFBCInit                      | NvFBC SDK Version: 112
[I]                app.c:381  | app_main                       | Trying           : DXGI
[I]               dxgi.c:322  | dxgi_init                      | Device Descripion: NVIDIA GeForce RTX 2080 Ti
[I]               dxgi.c:323  | dxgi_init                      | Device Vendor ID : 0x10de
[I]               dxgi.c:324  | dxgi_init                      | Device Device ID : 0x1e07
[I]               dxgi.c:325  | dxgi_init                      | Device Video Mem : 11049 MiB
[I]               dxgi.c:326  | dxgi_init                      | Device Sys Mem   : 0 MiB
[I]               dxgi.c:327  | dxgi_init                      | Shared Sys Mem   : 8190 MiB
[I]               dxgi.c:328  | dxgi_init                      | Feature Level    : 0xc100
[I]               dxgi.c:329  | dxgi_init                      | Capture Size     : 1920 x 1080
[I]               dxgi.c:418  | dxgi_init                      | Source Format    : DXGI_FORMAT_B8G8R8A8_UNORM
[I]                app.c:282  | captureStart                   | Using            : DXGI
[I]                app.c:290  | captureStart                   | Capture Size     : 7 MiB (8294400)
[I]                app.c:292  | captureStart                   | ==== [ Capture  Start ] ====
[I]                app.c:65   | pointerThread                  | Pointer thread started
[I]                app.c:160  | frameThread                    | Frame thread started

What I’ve done so far:

  • Downloaded looking-glass repo / the cmake build was successful.
  • added libvirt machine configuration
  • made the shared memory file
  • disabled apparmor
  • added the IVSHMEM Driver to my windows host
  • added the C++ Redistributable to my windows host
  • I even added a scheduler for windows to run looking-glass on startup.

What I think the problem is:
When I open the spice graphical interface on virtual machine manager it closes looking-glass. Do I need to configure the display spice? also I saw a few reddit threads saying to remove video QXL is this true?

Also I can see the windows sign in screen on my other monitor but the display is not coming up on the looking-glass-client its just showing the purple background waiting.

You MUST use the same version of client and host. You seem to be using a bleeding edge client and a B1 host. Either download the bleeding-edge host version from the site (or build it with mingw yourself) and build the latest client code, or use the B1 host you have now and build a client using a checkout of the same tag of the B1 you run.

Never view your passthrough VM using spice. I setup my spice display driver to “none”. I usually attach a monitor to the passthrough GPU and use EvDev keyboard and mouse to do initial setup, then when looking-glass is working, I’ll remove EvDev and replace the monitor with a dummy HDMI plug.

Also, you need to remember that the scheduler task will kick in AFTER logon, so you’ll have to setup an auto-logon on the VM to get the account logged-in automatically and the LG host running.

3 Likes

Oh ok, I see my linux host is running version “B2-rc2” and my windows machine is running version “B1-rc6”. I will download the correct version on windows and see if that fixes the problem. Also thanks for reminding me to setup auto-login so that my scheduler can run looking-glass on startup.

Technically speaking, if i setup the windows scheduler and login correctly, I will never have to look at my monitor plugged into the gpu right?

Sorta :grinning:

  • You need to remember that something needs to be plugged into the GPU output to make it think it needs to render, so either a monitor or a HDMI dummy plug needs to be there. You can’t leave the GPU unplugged.
  • There are also those times where Windows does updates right after boot (that blue screen with the twirling dots circle). This is too early for the LG host to go on so you’ll be headless until it fully boots and auto-logons (I usually watch virt-manager’s CPU load graph to see when the update/logon process is done and the system is idling).
  • And there’s also the times when you update the LG software. The product is under heavy beta development and updates are common, frequent and important. The latest versions are very picky about version mismatch (they actually check it to avoid regression) so you’ll need to atomically update both the host and the client. I wrote a little batch script that runs before the host and checks the presence of a new host file in the same folder then copies it over the old one. I simply drop the new host file in the folder, reboot the VM and update the client and I’m all set.
2 Likes

Thank you very much, one last question :grin: Let’s say my client version is B1-162 for example how would i go about finding the host version B1-162? After looking on the site it seems the host version is a couple months old and no longer available for download. I could easily just update my client version, but you said something about building the host myself using a git checkout which ive never used before. Thanks again!

OK, so you’ve got a few options here. Currently, you can use:

  • Official release (and the only one that is getting official support); currently is B1
  • Release candidate which is pretty stable; currently B2-rc2
  • Bleeding Edge, the latest build, might contain nasty bugs

(personal recommendation: B1 is pretty old and has some issues, B2-rc2 works quite well, I’m using bleeding edge)

To get your host and client:

  • Goto the download page at: https://looking-glass.hostfission.com/downloads
  • Pick the row of one of the 3 types (Official, Candidate or Bleeding-Edge)
  • Click on the windows host download link to get the host
  • Click on the “Source Code” to get the source version corresponding to that host version
  • Now follow the client build instructions in the Guide
  • You now have a host and client that should work together

I’m not sure if you built the client from git or from source download. The above are instructions for source download. If you used git to download the repo, I can give you details on how to checkout the repo.

1 Like

Regarding your question about how to build a host for a specific version, here are the steps for building on Linux.

  • You’ll need to install the mingw64 cross-compiler toolchain which depends on your distro. On Ubuntu, for example, you’ll sudo apt-get install mingw-w64
  • Make sure the toolchain is in your path (try x86_64-w64-mingw32-gcc --version to see if the compiler runs)
  • Clone a fresh copy of LG from GitHub: git clone --recursive https://github.com/gnif/LookingGlass.git
  • cd LookingGlass
  • Now look at your client log and grab the version string that it prints. Suppose the version shown is B1-162-g3acfbdce02+1. We need to find that string in the history of the VERSION file in the source. We’ll use the git journal for that: git log -G 'B1-162-g3acfbdce02\+1' VERSION (please note the backslash in-front the + to escape it from git). This will search the repo history for any changes corresponding to this string. You should get two results, one with an earlier date that represents the state of the repo when this version was set, and another later one that represents the change from this version to the superseding one. Copy the commit hash of the earlier one. and the commit date (Mar 22).
  • Now let’s checkout that commit. Issue git checkout b953b2b807742b34fa31d23b252a5fa16c32eb35. The repo now is at version B1-162-g3acfbdce02+1
  • The host is also dependent on the LGMP project so we need to roll this one also back to a date on or earlier
  • cd repos/LGMP
  • issue git log and review the commit dates until you reach a date on or the first earlier one (from the date you captured above) - in our case there’s a commit on Jan 31. Copy the commit hash.
  • Now roll the LGMP project to that commit by issuing git checkout c4c0a6bd8000dd7dc57c9fe5c686399ca6b39e34 (that’s the hash we just copied)
  • We are now ready to build:

cd ../../c-host
mkdir build
cd build
cmake -DCMAKE_TOOLCHAIN_FILE=../toolchain-mingw64.cmake ..
make

  • If all went well you should have looking-glass-host.exe in the current directory
1 Like