A very tiny and low latency desktop streaming client for remote Windows guests with GPU passthrough which supports Nvidia NVENC, AMD VCE, VCN and Intel Quick Sync Video.
VDI Stream Client is a tiny and low latency Linux client which connects to Parsec Host running on Windows. It allows to run fully GPU accelerated Windows desktop environment on a remote machine while streaming the content to a local Linux system which process keyboard and mouse input. The remote server can be a virtual machine running on-top of on-premise deployments of Virtuozzo Hybrid Server, KVM or Xen. It can also connect to public clouds like Amazon (EC2 G3 Accelerated) or Microsoft Azure (NV6). It uses Simple DirectMedia Layer (SDL2) for low-level access to audio, video, keyboard, mouse and clipboard.
I'm using Linux on Desktop since more than 20 years already for several reasons - customization, small and tiny floating window managers like Fluxbox, ideal platform for engineers and developers and many more. However over the past couple of years my daily job required more attention which rely on Microsoft Windows applications like Microsoft Office and full fledged groupware solution like Microsoft Outlook. There exist open source alternative like LibreOffice and Thunderbird plus various Exchange connectors or even SOGo. They are all good in their niche but they didn't reach compatibility to satisfy me. I tried a lot of different ways of solving the problem (see below in the comparison table) but at the end I have only three main goals:
- GPU passthrough with remote support. Using hosted remote Windows desktop with full-fledged GPU acceleration for 3D, video decoding and encoding to run any kind of application with full GPU support as they would have been used locally.
- Low latency network connection. Using laptop running Linux to connect from anywhere to the Windows desktop and do my daily work. This must work via fast network like ethernet, roaming wireless and low bandwidth with unstable mobile broadband.
- Being very energy efficient on client. The laptop battery drain should not significantly increase while working on the remote desktop. Also the server should not become more energy hungry than needed for simple streaming.
In Linux ecosystem there exist already wide range of options to run Windows guest environment as virtual machine on-top of a Linux host and access either its local display or via remote display protocol, all of them have their pros and cons. Look at the table below for brief comparison.
Method | Local | Remote | 3D |
---|---|---|---|
QXL with Spice | Yes | Yes | No |
GPU Passthrough | Yes | No | Yes |
KVM FrameRelay | Yes | No | Yes |
iGVT-g | Yes | No | Yes (Intel only) |
Virgil 3D | Yes | Yes | Yes (Linux only) |
SPICE Streaming Agent | Yes | Yes | Yes (Linux only) |
Moonlight | Yes | Yes | Yes (Nvidia only) |
Parsec | Yes | Yes | Yes |
So why another streaming client is needed if one for Windows, Linux and macOS exist already? Well the Parsec client is focusing on gaming capabilities while VDI Stream Client is focusing on having a reliable daily working environment. The table below gives a brief overview about differences.
Features | VDI Stream Client | Parsec |
---|---|---|
Keyboard Input | Full | Partial |
Mouse Input | Full | Partial |
Gamepad Input | No | Yes |
Clipboard Sharing | Text only | Text only |
Remote | Yes | Yes |
DirectX | Yes | Yes |
OpenGL | Yes | Yes |
Resolution Sync | Host-to-Client | Client-to-Host |
Alt+Tab Integration | Yes | No |
Minimal GUI | Yes | No |
System SDL2 | Yes | No |
Auto Reconnect | Yes | No |
Screensaver Integration | Yes | No |
USB Redirection | Yes | No |
Color Mode 4:4:4 | SDK Bug | Yes |
Any recent GPU with OpenGL and VA-API support will work. When it comes to 4:4:4 color mode, part of the decoding work is made with FFmpeg (see notes below regarding 4:4:4 status). Nothing exist without drawbacks and that one for Parsec is that it is mandatory to have an account which is completely free. However communication between client and host is always made directly. Also the SDK is only available as pre-compiled library, so for those who fully rely on an open-source system, stop reading here. Some features are only available with a commercial subscription under Parsec Warp. It applies to 4:4:4 color mode which is required to encode images and streams without chroma subsampling for sharp and crystal clear text.
- Fully CLI based customization. User can specify all required parameters via command line switches, allow perfect integration into different window managers.
- Desktop in window support with XGrabKeyboard and XUngrabKeyboard while leaving mouse pointer ungrabbed. Supporting Alt+Tab and Windows special keys grab, even if assigned to the window manager.
- SDL window is created without
SDL_WINDOW_RESIZABLE
flag set, so window cannot be resized by window manager and always uses native host resolution (no more blurry desktop). - Host to client resolution sync with automatic window resize. User can change resolution in Windows control panel and client polls for the changes and adjust client window size.
- Specify client window size via command line and host will change native resolution to it once the connection has been established.
- Configurable mouse wheel sensitivity. User can specify mouse scroll speed via command line switch serving different needs and requirements.
- Modular architecture and can be extended with additional streaming host services like Nvidia GameStream via Moonlight libraries.
- Screen saver and screen locker support. By default screen saver support is enabled but user can specify command line switch to avoid setting SDL_EnableScreenSaver and disallow X server to lock the local screen.
- Built-in USB redirection with automatic reconnect support using usbredir protocol. User can specify via command line which local USB devices will be redirected to the host (e.g. to forward a webcam with microphone). However usbredir protocol is currently only supported if using KVM, Xen or Virtuozzo Hybrid Server with QEMU. Other virtualization solutions may use standard Linux USB/IP server and native Windows client driver.
- Support for disabling chroma subsampling to support color mode 4:4:4 with sharp and crisp text and better colors. Available for Nvidia Hosts running GTX 900 or better.
- Color mode 4:4:4 is not yet supported by the SDK. There is an open bug at Parsec SDK GitHub and Parsec team want to fix it with next SDK release. In official Parsec client it works already with some internal callbacks in the SDK.
- Resolution changes from client connected to the host are not persistent and only valid within the session. Once the last client disconnects the host restores original resolution.
- No macOS and Windows support yet. However porting should be fairly easy but I haven't tested it and pull requests are welcome.