Skip to content

Commit

Permalink
[host] update information about PsExec now LG can run as a service
Browse files Browse the repository at this point in the history
  • Loading branch information
gnif committed Aug 13, 2020
1 parent dc4d1d4 commit 969effe
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 23 deletions.
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
B2-rc3-32-g4e1f947a09+1
B2-rc3-33-gdc4d1d49fa+1
17 changes: 0 additions & 17 deletions client/README.md
Expand Up @@ -35,23 +35,6 @@ Should this all go well you should be left with the file `looking-glass-client`

## Usage Tips

### High priority capture using DXGI and Secure Desktop (UAC) capture support

By default Windows gives priority to the foreground application for any GPU
work which causes issues with capture if the foreground application is consuming
100% of the available GPU resources. The looking glass host application is able
to increase the kernel GPU thread to realtime priority which fixes this, but in
order to do so it must run as the `SYSTEM` user account. To do this, please use
`PsExec` from SysInternals (Microsoft), for example:

PsExec64.exe -s -i -d looking-glass-host.exe

This will also enable the host application to capture the secure desktop which
includes things like the lock screen and UAC prompts.

A future update (likely Beta 3) will include a service launcher for the Looking
Glass host which will remove the need for `PsExec`.

### Key Bindings

By default Looking Glass uses the `Scroll Lock` key as the escape key for commands as well as the input capture mode toggle, this can be changed using the `-m` switch if you desire a different key.
Expand Down
20 changes: 20 additions & 0 deletions host/README.md
Expand Up @@ -65,6 +65,26 @@ Or if running as a system service it will be located in:
You can find out where the file is by right clicking on the tray icon and
selecting "Log File Location"

### High priority capture using DXGI and Secure Desktop (UAC) capture support

By default Windows gives priority to the foreground application for any GPU
work which causes issues with capture if the foreground application is consuming
100% of the available GPU resources. The looking glass host application is able
to increase the kernel GPU thread to realtime priority which fixes this, but in
order to do so it must run as the `SYSTEM` user account. To do this, Looking
Glass needs to run as a service. This can be accomplished by either using the
NSIS installer which will do this for you, or you can use the following command
to Install the service manually:

looking-glass-host.exe InstallService

To remove the service use the following command:

looking-glass-host.exe UninstallService

This will also enable the host application to capture the secure desktop which
includes things like the lock screen and UAC prompts.

## Why does this version require Administrator privileges

This is intentional for several reasons.
Expand Down
11 changes: 6 additions & 5 deletions host/platform/Windows/capture/DXGI/src/dxgi.c
Expand Up @@ -202,8 +202,8 @@ static bool dxgi_init()
{
DEBUG_INFO("The above error(s) will prevent LG from being able to capture the secure desktop (UAC dialogs)");
DEBUG_INFO("This is not a failure, please do not report this as an issue.");
DEBUG_INFO("To fix this run LG using the PsExec SysInternals tool from Microsoft.");
DEBUG_INFO("https://docs.microsoft.com/en-us/sysinternals/downloads/psexec");
DEBUG_INFO("To fix this, install and run the Looking Glass host as a service.");
DEBUG_INFO("looking-glass-host.exe InstallService");
}

// this is required for DXGI 1.5 support to function
Expand Down Expand Up @@ -408,9 +408,10 @@ static bool dxgi_init()
status = fn(GetCurrentProcess(), D3DKMT_SCHEDULINGPRIORITYCLASS_REALTIME);
if (FAILED(status))
{
DEBUG_INFO("Failed to set realtime GPU priority, this is not an error!");
DEBUG_INFO("To fix this run LG using the PsExec SysInternals tool from Microsoft.");
DEBUG_INFO("https://docs.microsoft.com/en-us/sysinternals/downloads/psexec");
DEBUG_WARN("Failed to set realtime GPU priority.");
DEBUG_INFO("This is not a failure, please do not report this as an issue.");
DEBUG_INFO("To fix this, install and run the Looking Glass host as a service.");
DEBUG_INFO("looking-glass-host.exe InstallService");
}
}
}
Expand Down

0 comments on commit 969effe

Please sign in to comment.