Looking Glass - Changelog

:arrow_right: Origional Thread :arrow_left:

2018-08-18: Contents originally cherry-picked from Triage thread.


Support Looking Glass

2 Likes

Fixed:

2 Likes

Alpha Version 4 Release

Fixes of note:

  • Cursor colors are now correct
  • Animated cursors don’t disappear when stationary anymore.
  • High DPI cursors are now supported
  • Client will now report KVMFR protocol version mismatch

Windows application needs to be updated, see attached build

3 Likes

Alpha Version 5 Release

Fixes of note:

  • Client startup mouse shape and position setup more reliable
  • Host now properly restarts the session when the guest signals for a restart
  • Cursor is no longer invisible on reconnect if it should be shown.
  • New -F switch to launch in borderless full screen mode.

Windows application needs to be updated, see attached build

2 Likes

I just added back vsync support to the client, the disable flag works. The implementation is special in that it prevents the OpenGL pipeline from queueing frames. This is needed to ensure that we don’t gradually get behind the guest.

This fixes flickering/black line issues at the cost of a tiny little bit of latency. Please note that YMMV on this since it’s a method of sync that has never been done before (as far as I can tell) and as such has not had much testing in the wild.

For the developers among us, here is the trick:

unsigned int before, after;
glXGetVideoSyncSGI(&before);
SDL_GL_SwapWindow(this->sdlWindow);
  
// wait for the swap to happen to ensure we don't buffer frames
glXGetVideoSyncSGI(&after);
if (before == after)
  glXWaitVideoSyncSGI(1, 0, &before)

glXGetVideoSyncSGI and glXWaitVideoSyncSGI are not well supported APIs, on NVidia they function well but I can not vouch for other platforms at current.

We only call wait if the GPU’s internal VSync (not frame) counter has not advanced.

Everyone, I completely forgot I had done this to my guest, If you disable mouse acceleration in Windows 10 your mouse will perfectly sync between the host and guest. The below registry magic does this.

4 Likes

Alpha Version 6 Release

Fixes of note:

  • DXGI DD capture no longer stalls waiting for frames, this fixes an issue where the client would appear hang at startup while waiting for the first frame.
  • Don’t update mouse scaling factors until the cursor position is known, this stops the cursor jumping around like mad before the first frame.
  • Postpone mouse events till the renderer is setup, this fixes a bug which would cause the client to crash when trying to set the cursor shape.
  • OpenGL now uses double buffering and disable vsync option now works.

Windows application needs to be updated, see attached build

4 Likes

Please everyone make very special note of this:

There is a reverse engineered method to enable the NvFBC capture API on consumer cards, it has been published by a third party, and no I will not be linking it here. Using said code/application with Looking Glass puts this entire project in jeopardy, the idiot (putting my feelings lightly) that posted the code is themselves at very high risk of being sued.

The NVIDIA Capture API is bound by the following License Agreement:

In it, it clearly states:

install, use and reproduce the software delivered by NVIDIA, make modifications and create derivative works of sample source code software delivered by NVIDIA and use documentation delivered by NVIDIA, provided that the software is executed only in NVIDIA GRID, Tesla or Quadro 2000+ hardware products that you separately obtain from NVIDIA or its affiliates, all to develop, test and service your products (each, a “Customer Product”) that are interoperable with NVIDIA GRID, Tesla or Quadro 2000+ hardware products

Use of the NVIDIA Capture API with Looking Glass by means of even a third party tool as mentioned above on non “NVIDIA GRID, Tesla or Quadro 2000+ hardware products” would be violating this license agreement.

If people start using this it is very likely going to land us in VERY hot water. Please DO NOT use any such software, either get a supported card or use DXGI DD like the rest of us.

6 Likes

Alpha Version 7 Release

Fixes of note:

  • The host application now waits for the Secure Desktop(UAC, LockScreen, etc…) rather then terminating.
  • The host application now waits around to restart after switching users
  • The KVMFR header format was optimized, old fields removed and restructure to use a “Frame” for cursor shapes.

Windows application needs to be updated, see attached build

4 Likes

If you are running from git head please note that the option parsing has changed to support per renderer options in preparation of multiple renderers in the future.

  • mipmap -m swtich has been relocated into the opengl renderer
  • vsync -v switch has been relocated into the opengl renderer

You can obtain a list of options by running, -o list for example:

./looking-glass-client -o list

Renderer Option List

OpenGL
      mipmap - Enable or disable mipmapping [default: enabled]
       vsync - Enable or disable vsync [default: enabled]

To use these options the format is as follows:

-o opengl:vsync=0 -o opengl:mipmap=0

All renderer names and option names are case-insensitive. Boolean (true/false) options understand the following values:

  • 1
  • 0
  • true
  • false
  • yes
  • no
  • on
  • off
  • enable
  • disable

As with switches, the last option will take precedence. For example, the below will have vsync enabled:

-o opengl:vsync=0 -o opengl:vsync=1

1 Like

People that are having problems with low performance please checkout the latest version from GitHub and try the new OpenGL-Basic renderer I have just added. It has been reported to perform better on certain older or lower performance hardware. Be sure to run make clean before building.

To use it specify the new -g option which will force it’s use:
./looking-glass-client -g OpenGL-Basic

To confirm it is in use check the output for:

Trying forced renderer
Using Renderer: OpenGL-Basic

Feature enhancement in latest git:

OpenGL splitMouse

This was previously hard coded in but is now disabled by default.

This feature when enabled draws mouse updates to the front buffer instead of waiting for full frame updates from the guest in an attempt to achieve better mouse input synchronization with the hardware cursor on the physical GPU. However on some hardware pipelines the excessive calls to glFlush causes a GPU pipeline stall and the mouse can become “jumpy”.

The down side to this is the current frame will be re-drawn on every mouse movement even if there was not a new frame from the guest, this will mean that the frame sync with the guest can be lost and there is a higher chance of frames being dropped. To avoid dropping frames you can turn vsync off at the side effect of screen tearing, it is up to you.

To turn this back on use the command line option below appropriate depending on the renderer you are using:

-o opengl:splitmouse=1 or -o opengl-basic:splitmouse=1

If you are primarily playing games or using applications that use a software, no mouse, or a rendered mouse, and the windows desktop experience doesn’t worry you too much this feature should be enabled for best performance if you wish to retain frame sync with the guest.

You can evaluate the effects of this feature by using the MPRT test (Avoid this test if you are prone to epilepsy) while moving the cursor around.

2 Likes

Feature enhancement in latest git:

OpenGL preventBuffer

This was previously hard coded but is now optional.

This feature when enabled (default) will ensure the video card never buffers more then one frame, this is needed to ensure the lowest latency possible as we are fed new frames from the host. This sometimes however is not desirable if the user is not playing games or using applications that require such low latency where a smoother more fluid user experience is required (ie: CAD applications). If disabled the video driver may buffer up to three frames depending on your hardware.

It is however possible to still achieve low latency with this feature turned off by also turning off vsync where a much higher frame rate will be displayed by the FPS monitor.

Please experiment to find out which combination of options work best for your particular needs and hardware.

1 Like

Another minor update,

FPS display now shows the UPS (Updates Per Second) from the guest separate to the local rendering FPS.

Also for those that are interested, at current I get the best responsiveness out of the following on my GTX 680:

/bin/looking-glass-client -o opengl:preventBuffer=0 -o opengl:vsync=1 -o opengl:splitMouse=1

It’s official, we now have an IRC channel on FreeNode, the prior owner (gnomethrower) has kindly relinquished the channel to us for Looking Glass.

Join me on #LookingGlass on the FreeNode network :smiley:

2 Likes

Alpha Version 8 Release

This update is quite large as it completely changes the way that rendering is performed so as to prevent holding up the capture API on the host. It decouples the capture rate from the client’s frame rate.

Note: Due to time constraints I have not yet updated the OpenGL-Basic renderer for the new API and as such it is disabled for the moment. I plan to integrate the basic renderer into the standard one and have an option to enable the basic mode when I get some more time.

Windows application needs to be updated, see attached build

1 Like

Alpha Version 9 Release

  • Adds multi threaded memory copy which helps with high resolution (4K) performance.
  • Performance improvements to DXGI DD
  • Improved client CPU utilization, doesn’t cause Xorg to hang randomly anymore.

Windows application needs to be updated, see attached build

7 Likes

Everyone, there is an update incoming that completely changes things, please be aware:

3 Likes

Alpha 10 Release:

This release changes how the guest VM needs to be configured, please refer to the quickstart guide for how to configure libvirt as ivshmem-server is no longer used

1 Like

Hi All,

I am back from my break, but due to the break I have much work to catch up on. Updates are still coming but will slow down as I do not have as much time at current.

A few things have happened in the last week though:

  • I finally got the TR system up and running, debugged the pci reset bug and produced a clean (non ugly) patch to fix the problem, see: https://patchwork.kernel.org/patch/10181903/

  • Since I now have a system with a Vega, I was able to reproduce some of the lag issues with mouse input, I just pushed in a change that partially fixes it, unfortunatly the cause is SDL2, it is calling XSync after every single call to X11_WarpMouse which is causing a backlog of X11 mouse move events.

    With the latest patch to LookingGlass this is worked around for normal mouse mode, but capture mode is still affected. You can remove the calls to XSync in src/video/x11/SDL_x11mouse.c and recompile SDL to work around this problem.

    I have submitted a report to the SDL developers to see about getting this fixed as per the documentation the calls to XSync are pointless anyway.

12 Likes