This story was originally published and last updated .
Linux for Chromebooks has come a long way since Google introduced it in Chrome OS 69 a couple of years ago. On supported devices, it opened the door to an extensive library of desktop apps for users, like video editing tools and IDEs. GPU acceleration was an important milestone that made graphic intensive Linux app usable on Chrome OS. This is thanks to Virgil 3D, a component that allows the Linux container to tap into the hardware's GPU. In exciting news shared by Luke Short from VMware, Google is working on adding Vulkan passthrough into Virgil to improve app performance.
A round of commits spotted on GitLab shows that Google's Chia-l Wu has been working around a year to add Vulkan passthrough support into Virgil 3D from the QEMU hypervisor. Wu helped Valve in the past by submitting a set of patches for Mesa — an OpenGL library — to reduce load times in games. Work-in-progress code allows commercial and Proton-based Steam games to run on Chromebooks.
Vulkan passthrough support being tested with Steam games using Proton.
Today, Virgil 3D suffers from diminished OpenGL passthrough to KVMs. While nowhere near native performance speeds, the basic graphics acceleration allows Linux games to run on Chromebooks — albeit sluggishly. That may soon change with Vulkan in tow. Vulkan's low-level API design allows applications to gain more direct control over the GPU. Unlike OpenGL, it supports multi-core CPUs and offers improved rendering performance. Vulkan's minimal driver overhead and workload distribution across cores results in better energy efficiency, too.
Wu's efforts tie well with Borealis, Google's attempt at official Steam support for Chromebooks. Linux users using Steam have access to Proton, a compatibility layer to run Windows games. Since Proton requires Vulkan for translating DirectX calls, we may not see Borealis until passthrough support is complete. The effort will also benefit the larger Linux community. Tomeu Vizoso, an open-source driver developer at Collabora, reports that Wu's patches work with a traditional Linux desktop.
Benchmarks shows massive performance gains, more
Following our coverage, Vulkan passthrough support for Virgil 3D and Mesa has been submitted into those respective main branches recently. Chia-l Wu posted GPU benchmark numbers on GitLab about a month prior, and it shows impressive graphics performance on an Intel i7-7820HQ.
Work-in-progress Vulkan renderer code showed impressive Basemark GPU scores on an Intel i7-7820HQ. | GitLab
Wu benchmarked the Vulkan renderer using Basemark GPU's low, medium, and high settings. To recap, Virgil 3D (virtio-gpu) is a 3D-accelerated graphics driver for virtual machines, or VM. Basemark also shows vtest, a testing framework that isolates Virgil from the VM. Comparing the scores, the virtual environment nearly matches native speeds, averaging 92%. It's possible that its performance is even greater than the benchmark ran last month — time will tell.
Simple disk cache improves Valve's Portal 2 performance by 29%. | GitLab
Alongside Vulkan, Google's Stéphane Marchesin submitted a basic front-end disk cache for Virgil 3D a couple of days ago. Despite its simplistic approach of caching uncompiled shaders, it brought solid performance gains in games. Marchesin observed increased frame rate playing Valve's Portal 2 — jumping from 100 FPS to 129.
Linux and ARCVM (Android 11+) on Chromebooks will enjoy a big performance boost soon thanks to Vigil 3D's improvements. VMware's Luke Short explains Linux may take a small performance hit since it's a LXC container running in a VM, but the gains will heavily offset it. With Borealis — official Steam for Chromebooks — there shouldn't be performance penalties.
Vulkan passthrough is a step in the right direction to improve Linux graphic acceleration on Chromebooks. Luke Short mentions in a Tweet that a public beta will be ready for testing in Q3 2021, and we can't wait to try it out when it's available in the Chrome OS developer channels. We'll keep an eye out for changes in its development and update you on what we find.