how to activate Vulkan in Crostini on your Chromebook right now
The time is right: welcome to our exclusive guide on how to use Vulkan in Crostini! This unleashes the full gaming power of Chromebooks by allowing more modern games to run. More importantly, it also allows Steam’s Proton compatibility layer to perform to its full potential, meaning the majority of Windows games will now run on Chromebooks. How cool is that ?!
Let me say that using Crouton would be much easier and lead to better results when it comes to using Vulkan on your Chromebook. Especially considering the performance success Vulkan is currently getting in Crostini. Crouton natively supports OpenGL, Vulkan, and even OpenCL as it avoids some of the layers and complexity of Crostini.
Advertisement
I still have a few caveats to dismiss before I begin. You should have intermediate knowledge of Linux, a modern AMD or Intel Chromebook (ideally one of the devices that supports Borealis for the best results), and have your Chrome OS device in the Developer or Canary channel hidden for the best experience. . In this guide, I won’t go through all the little details and will continue assuming you’ve met the prerequisites. All that being said, let me break down the steps in order: activate Vulkan, install Arch Linux, install the latest development graphics drivers and test it.
The first step is to start the Crostini virtual machine, named “terminina”, with Vulkan support enabled. Make NOT open the “Terminal” application on Chrome OS. Make sure to turn it off if it is running. Instead, open the “crosh” shell by pressing the buttons on the keyboard CTRL, ALT, and t. Then start it manually from the command line.
Advertisement
crosh> vmc start --enable-gpu --enable-vulkan termina
The second step is to install Arch Linux as a Crostini container. Check out the ArchWiki guide on setting up a Crostini container or this amazing video from my friend ChrisTitusTech where it goes through everything, including how to install the Arch Linux User (AUR) package manager named “yay”. AUR is my favorite thing about Arch Linux. With it, you can install almost any Linux program thanks to community contributors. Many packages are also provided for the latest development versions of the packages. We will come back to that later. Make sure you are in the Arch Linux container before continuing.
The third step is to install “mesa-git” and “lib32-mesa-git” as a non-root user using “yay”. Mesa is the open source Linux graphics driver. I have been working with the respective maintainers of the AUR packages over the last few months to upstream all the manual changes I have made to build the new VirtIO Venus driver. In short: it’s even easier to install now.
$ yay -S mesa-git lib32-mesa-git
The fourth step is to tell Vulkan to use our new VirtIO Venus driver. Make sure the new driver will be loaded now and on subsequent reboots:
Advertisement
$ export VK_ICD_FILENAMES=VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/virtio_icd.i686.json:/usr/share/vulkan/icd.d/virtio_icd.x86_64.json
$ echo "export VK_ICD_FILENAMES=VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/virtio_icd.i686.json:/usr/share/vulkan/icd.d/virtio_icd.x86_64.json" | sudo tee -a /etc/environment
Finally, let’s validate that it works! You should see “venus” reported as the driver. If you see “llvmpipe” you are using the wrong driver and you probably did something wrong with the last step. This is the processor-based graphics rendering engine for Vulkan that is only used for automated testing. It’s incredibly slow, you probably never want to use it.
$ vulkaninfo | grep driverName
driverName = venus
driverName = venus
$ vkcube
You can then run the âvkcubeâ demo application which will display a basic rotating 3D cube. If you see this, rejoice! You did it !
At this point, I recommend installing Steam and enabling Proton (no more disabling the Vulkan backend!) And finding out which of your favorite Windows games is running. With Valve’s commitment to Proton, gaming on Chrome OS and Linux will only get better. Good luck, have fun and let us know what your experience of using Vulkan in Crostini is like!
Advertisement