Glad I could help.
If you would like some further help with housekeeping tasks just let me know.
Glad I could help.
If you would like some further help with housekeeping tasks just let me know.
Ok, let’s give this a go…
Looking good!
I went ahead and made the news public.
Last night I added DXGI 1.5 suport to Looking Glass which in some cases may improve performance substantially. As part of this the EGL renderer and DXGI capture both now also support RGB 10-bit HDR without any performance overhead. If anything it will be faster then prior.
The older DXGI API captures the desktop and then converts it to BGRA if it is not already in that format, which as it turns out many titles are not. The new API lets us bypass this conversion and take the raw frame data in it’s native format.
This locks us to requring windows 10, and I believe this new API is only available in the October 2018 update for Windows 10, it would be greaat if people could confirm. While I do not like enforcing an updated Windows install, this change is too major to ignore it’s potential benefits.
For the technical, the new API is:
Details of the above change are described in my latest video:
Good news everyone, all pending tasks holding back the Alpha 12 release have been completed! The changes between A11 and A12 are substantial and listed below. I will have A12 released within the next hour or so.
67 files changed, 6694 insertions(+), 1688 deletions(-)
Code Cleanup:
Features
Bugs fixed:
Tuning:
Edit: Correction, the next release will be A12 to give some testing time before releasing B1.
A few minor changes have gone into git master, this is not a release notice but a notice of a commit that may improve spice cursor performance considerably. Please see:
I am working on some more updates to the Spice interface that will help both performance and hopefully bring spice guest agent communications (read, Clipboard Sync).
It’s slow going due to the fact that RedHat have not updated the spice protocol documentation since 2009 which is full of errors, typos and missing a ton of information about the later versions of the protocol. It’s even a “Draft” according to the title page.
I have opened a ticket to try to get some traction on this being updated over here:
I am honestly not surprised that it hasn’t been maintained however, as far as I am aware Looking Glass is the first and only third party spice client implementation to date.
Made some more progress today, the latest version in git now supports client to host clipboard sync for text. To make it work you will need to ensure you have the spice-agent tools installed in windows and the appopriate spicevmc device on the guest.
-device virtio-serial-pci \
-chardev spicevmc,debug=10,id=vdagent,name=vdagent \
-device virtserialport,chardev=vdagent,name=com.redhat.spice.0
Demo of new Clipboard Functionality:
Good news, as of a few minutes ago Looking Glass just got host to guest clipboard sync! I will make a demo video when I get a chance a bit later on.
Just a status update. Over the past week I have been working on rewriting the host application for several reasons.
I am very pleased to announce there is a new c-host
directory in the git repository. This is a pure C rewrite with DXGI support and preliminary XCA SHM support (Yes, you read that right, Linux support!)
The state of DXGI is good, it works but with a few minor issues. XCA capture on the other hand requires some TLC to get it working correctly.
If you would like to build this application under windows it couldn’t be easier, simply install mingw64
and ensure your path is configured correctly, then run gmake
.
Another long awaited update that will make many people happy. I have updated the project to make far better use of cmake. There are now options to enable/disable core features for people that want to build on platforms that may not have support for them.
It is now possible to disable the following features:
Feature | cmake option | default | description |
---|---|---|---|
OpenGL | ENABLE_OPENGL | Enabled | The Legacy OpenGL Renderer |
EGL | ENABLE_EGL | Enabled | The modern OpenGL ES Renderer |
X11 Clipboard | ENABLE_CB_X11 | Enabled | X11/Xorg Clipboard Integration |
For those unfamiliar with cmake, to specify these you must pass the -D
switch, for example:
mkdir build
cd build
cmake -DENABLE_OPENGL=0 ..
make
New feature, Scroll Lock is now also a super/escape key for additional commands.
For now there is only additional command bound which is ScrollLock+N
for the EGL renderer which increases the gain/brightness of the capture source to assist with monitors with poor brightness when playing games that are dark.
Note that I am streaming at the moment, if you would like a demo just ask in the chat box.
Edit: Two more new keybinds.
ScrollLock+F
= Full Screen Toggle
ScrollLock+I
= Spice KB/Mouse Input Enable Toggle
Still getting this ready for the Beta 1 (B1) release, today a major milestone was accomplished that has been holding this back. The option parsing, loading and saving has been overhauled to a platform agnostic interface. This has changed a few things of note for the end user:
The old short option arguments have mostly been deprecated, some have been kept around however to make this transition a little smoother for those launching LG from scripts, etc.
The new format is as follows:
module:name=value
For example, to turn on the FPS display the argument would be:
win:showFPS=yes
If you wish to put this into a configuration file, the format would be:
[win]
showFPS = yes
Below lists the current options as they stand at the time of posting this:
Long | Short | Value | Description |
---|---|---|---|
app:configFile | -C | NULL | A file to read additional configuration from |
app:shmFile | -f | /dev/shm/looking-glass | The path to the shared memory file |
app:shmSize | -L | 0 | Specify the size in MB of the shared memory file (0 = detect) |
app:renderer | -g | auto | Specify the renderer to use |
app:license | -l | no | Show the licence for this application and then terminate |
Long | Short | Value | Description |
---|---|---|---|
win:title | Looking Glass (client) | The window title | |
win:position | center | Initial window position at startup | |
win:size | 1024x768 | Initial window size at startup | |
win:autoResize | -a | no | Auto resize the window to the guest |
win:allowResize | -n | yes | Aallow the window to be manually resized |
win:keepAspect | -r | yes | Maintain the correct aspect ratio |
win:borderless | -d | no | Borderless mode |
win:fullScreen | -F | no | Launch in fullscreen borderless mode |
win:fpsLimit | -K | 200 | Frame rate limit (0 = disable - not recommended) |
win:showFPS | -k | no | Enable the FPS & UPS display |
win:ignoreQuit | -Q | no | Ignore requests to quit (ie: Alt+F4) |
win:noScreensaver | -S | no | Prevent the screensaver from starting |
win:alerts | -q | yes | Show on screen alert messages |
Long | Short | Value | Description |
---|---|---|---|
input:grabKeyboard | -G | yes | Grab the keyboard in capture mode |
input:escapeKey | -m | 71 = ScrollLock | Specify the escape key, see https://wiki.libsdl.org/SDLScancodeLookup for valid values |
input:hideCursor | -M | yes | Hide the local mouse cursor |
Long | Short | Value | Description |
---|---|---|---|
spice:enable | -s | yes | Enable the built in SPICE client for input and/or clipboard support |
spice:host | -c | 127.0.0.1 | The SPICE server host or UNIX socket |
spice:port | -p | 5900 | The SPICE server port (0 = unix socket) |
spice:input | yes | Use SPICE to send keyboard and mouse input events to the guest | |
spice:clipboard | yes | Use SPICE to syncronize the clipboard contents with the guest | |
spice:clipboardToVM | yes | Allow the clipboard to be syncronized TO the VM | |
spice:clipboardToLocal | yes | Allow the clipboard to be syncronized FROM the VM | |
spice:scaleCursor | -j | yes | Scale cursor input position to screen size when up/down scaled |
Long | Short | Value | Description |
---|---|---|---|
egl:vsync | no | Enable vsync |
Long | Short | Value | Description |
---|---|---|---|
opengl:mipmap | yes | Enable mipmapping | |
opengl:vsync | yes | Enable vsync | |
opengl:preventBuffer | yes | Prevent the driver from buffering frames | |
opengl:amdPinnedMem | yes | Use GL_AMD_pinned_memory if it is available |
The list of options and their current values are obtainable by launching the application with the -h
or --help
option, for example:
./looking-glass-client -h
The following is a complete list of options accepted by this application
|-----------------------------------------------------------------------------------------------------------------|
| Long | Short | Value | Description |
|-----------------------------------------------------------------------------------------------------------------|
| app:configFile | -C | NULL | A file to read additional configuration from |
| app:shmFile | -f | /dev/shm/looking-glass | The path to the shared memory file |
| app:shmSize | -L | 0 | Specify the size in MB of the shared memory file (0 = detect) |
| app:renderer | -g | auto | Specify the renderer to use |
| app:license | -l | no | Show the licence for this application and then terminate |
|-----------------------------------------------------------------------------------------------------------------|
|-------------------------------------------------------------------------------------------------------|
| Long | Short | Value | Description |
|-------------------------------------------------------------------------------------------------------|
| win:title | | Looking Glass (client) | The window title |
| win:position | | center | Initial window position at startup |
| win:size | | 1024x768 | Initial window size at startup |
| win:autoResize | -a | no | Auto resize the window to the guest |
| win:allowResize | -n | yes | Aallow the window to be manually resized |
| win:keepAspect | -r | yes | Maintain the correct aspect ratio |
| win:borderless | -d | no | Borderless mode |
| win:fullScreen | -F | no | Launch in fullscreen borderless mode |
| win:fpsLimit | -K | 200 | Frame rate limit (0 = disable - not recommended) |
| win:showFPS | -k | no | Enable the FPS & UPS display |
| win:ignoreQuit | -Q | no | Ignore requests to quit (ie: Alt+F4) |
| win:noScreensaver | -S | no | Prevent the screensaver from starting |
| win:alerts | -q | yes | Show on screen alert messages |
|-------------------------------------------------------------------------------------------------------|
|---------------------------------------------------------------------------------------------------------------------------------------|
| Long | Short | Value | Description |
|---------------------------------------------------------------------------------------------------------------------------------------|
| input:grabKeyboard | -G | yes | Grab the keyboard in capture mode |
| input:escapeKey | -m | 71 = ScrollLock | Specify the escape key, see https://wiki.libsdl.org/SDLScancodeLookup for valid values |
| input:hideCursor | -M | yes | Hide the local mouse cursor |
|---------------------------------------------------------------------------------------------------------------------------------------|
|------------------------------------------------------------------------------------------------------------------|
| Long | Short | Value | Description |
|------------------------------------------------------------------------------------------------------------------|
| spice:enable | -s | yes | Enable the built in SPICE client for input and/or clipboard support |
| spice:host | -c | 127.0.0.1 | The SPICE server host or UNIX socket |
| spice:port | -p | 5900 | The SPICE server port (0 = unix socket) |
| spice:input | | yes | Use SPICE to send keyboard and mouse input events to the guest |
| spice:clipboard | | yes | Use SPICE to syncronize the clipboard contents with the guest |
| spice:clipboardToVM | | yes | Allow the clipboard to be syncronized TO the VM |
| spice:clipboardToLocal | | yes | Allow the clipboard to be syncronized FROM the VM |
| spice:scaleCursor | -j | yes | Scale cursor input position to screen size when up/down scaled |
|------------------------------------------------------------------------------------------------------------------|
|------------------------------------------|
| Long | Short | Value | Description |
|------------------------------------------|
| egl:vsync | | no | Enable vsync |
|------------------------------------------|
|------------------------------------------------------------------------------------|
| Long | Short | Value | Description |
|------------------------------------------------------------------------------------|
| opengl:mipmap | | yes | Enable mipmapping |
| opengl:vsync | | yes | Enable vsync |
| opengl:preventBuffer | | yes | Prevent the driver from buffering frames |
| opengl:amdPinnedMem | | yes | Use GL_AMD_pinned_memory if it is available |
|------------------------------------------------------------------------------------|
The c-host
FINALLY has a application Icon, Tray icon and context menu
Two new configurables added:
Prior to this update, these were hard coded to 1us, this change increases these to 1000us as their default as this should be fast enough for most use cases. This has reduced the client’s CPU consumption by about 80% in my dev configuration.
These values are simply how long to wait before checking for another update from the host if there wasn’t already an update pending.
EGL texture streaming has been updated to use persistent memory mappings which should also improve performance and help us to skip 1/2 frames if/when we start to fall behind the host. It may induce minor tearing but should provide for an overall better experience.
Another milestone reached, the host application can now be cross compiled for Windows on Linux using mingw64.
geoff@aeryn:~/Projects/LG/LookingGlass/c-host/build# cmake -DCMAKE_TOOLCHAIN_FILE=../toolchain-mingw64.cmake -DUSE_NVFBC=1 -DNVFBC_SDK="/home/geoff/Projects/LG/NVIDIA Capture SDK" ..
-- The C compiler identification is GNU 8.3.0
-- Check for working C compiler: /usr/bin/x86_64-w64-mingw32-gcc
-- Check for working C compiler: /usr/bin/x86_64-w64-mingw32-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Performing Test COMPILER_SUPPORTS_MARCH_NATIVE
-- Performing Test COMPILER_SUPPORTS_MARCH_NATIVE - Success
-- The CXX compiler identification is GNU 8.3.0
-- Check for working CXX compiler: /usr/bin/x86_64-w64-mingw32-g++
-- Check for working CXX compiler: /usr/bin/x86_64-w64-mingw32-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
--
-- Configuring done
-- Generating done
-- Build files have been written to: /home/geoff/Projects/LG/LookingGlass/c-host/build
geoff@aeryn:~/Projects/LG/LookingGlass/c-host/build# make
Scanning dependencies of target lg_common
[ 5%] Building C object common/CMakeFiles/lg_common.dir/src/crash.windows.c.obj
[ 11%] Building C object common/CMakeFiles/lg_common.dir/src/stringutils.c.obj
[ 16%] Building C object common/CMakeFiles/lg_common.dir/src/stringlist.c.obj
[ 22%] Building C object common/CMakeFiles/lg_common.dir/src/option.c.obj
[ 27%] Linking C static library liblg_common.a
[ 27%] Built target lg_common
Scanning dependencies of target capture_DXGI
[ 33%] Building C object platform/Windows/capture/DXGI/CMakeFiles/capture_DXGI.dir/src/dxgi.c.obj
[ 38%] Linking C static library libcapture_DXGI.a
[ 38%] Built target capture_DXGI
Scanning dependencies of target capture_NVFBC
[ 44%] Building C object platform/Windows/capture/NVFBC/CMakeFiles/capture_NVFBC.dir/src/nvfbc.c.obj
[ 50%] Building CXX object platform/Windows/capture/NVFBC/CMakeFiles/capture_NVFBC.dir/src/wrapper.cpp.obj
[ 55%] Linking CXX static library libcapture_NVFBC.a
[ 55%] Built target capture_NVFBC
Scanning dependencies of target capture
[ 61%] Building C object platform/Windows/capture/CMakeFiles/capture.dir/__/__/__/src/capture.c.obj
[ 66%] Linking C static library libcapture.a
[ 66%] Built target capture
Scanning dependencies of target platform_Windows
[ 72%] Building C object platform/Windows/CMakeFiles/platform_Windows.dir/src/platform.c.obj
[ 77%] Building C object platform/Windows/CMakeFiles/platform_Windows.dir/src/windebug.c.obj
[ 83%] Building C object platform/Windows/CMakeFiles/platform_Windows.dir/src/mousehook.c.obj
[ 88%] Linking C static library libplatform_Windows.a
[ 88%] Built target platform_Windows
Scanning dependencies of target looking-glass-host
[ 94%] Building C object CMakeFiles/looking-glass-host.dir/src/app.c.obj
[100%] Linking C executable looking-glass-host.exe
[100%] Built target looking-glass-host
geoff@aeryn:~/Projects/LG/LookingGlass/c-host/build# ls -lah looking-glass-host.exe
-rwxr-xr-x 1 geoff geoff 745K May 22 15:33 looking-glass-host.exe
At the request of several people I have setup a Ko-Fi account for those that would rather donate there instead of Patreon.