If like me you enjoy messing around with Vulkan, I’m sure you’ll be familiar with Renderdoc, the awesomest open-source graphics debugger ever. RenderDoc is a vital tool in sorting out most weird graphical errors that you’ll encounter in your graphics development adventures (it sure is for me), however on Linux things are a bit… homespun.
As far as I know, the only thing that exists that does the setup for you is a PPA which is out of date, and no snaps or flatpaks of it exist that I could find. So on Linux, you’ll have to do the setup yourself. If you’re a pro at Linux this shouldn’t be too much of a problem, but if you’re just starting out with Linux the process of getting it all set up can seem tedious.
I’ve recently had to move computers due to a defunct CMOS battery on my previous PC, and I had to do it all over again… then I realized that I might as well write down the process I go through for posterity, and as well if I need to do this again! So here we go… the road to happiness with installing RenderDoc on Linux.
(This is intended for Linux novices… if you’re a seasoned Linux user all this will most likely be second nature. This method should work for most distributions of Linux, whether it be Fedora-based, Ubuntu-based or Arch-based. I’ve seen that the directories I’m going to use exist for all of these.)
First, the easy part: getting the latest build of RenderDoc. The home page will usually detect your system and present you with the appropriate file, but if not go to the builds page where you can find both stable and nightly builds to download. I tend to go for the stable builds rather than the in-dev versions.
So first download the tar.gz file that is produced for Linux, and save it somewhere appropriate (I usually save it on the Desktop) and then extract it. Now where to install it?
Linux/UNIX tradition is to install stuff that’s not included in the distribution in
/opt. I stick by this tradition too, so let’s create the directory in
/opt, then copy it over (we’ll need to use sudo, and I usually do it from my home directory).
gaz@mycomputer:~$ sudo mkdir /opt/renderdoc gaz@mycomputer:~$ sudo cp -r Desktop/renderdoc_1.9/* /opt/renderdoc
This will have copied over all the files from the directory we’ve extracted to
/opt/renderdoc, however the system still won’t be able to find the binaries we need to use. We’ll need to create symbolic links to do this in
/usr/local/bin. Some may shout at me for this (and I’ve seen disuptes about
/usr/local/bin), but well, this is my road to happiness.
There are two binaries we’ll need to care about:
qrenderdoc, the graphical interface of RenderDoc, and
renderdoccmd, the CLI tool. Let’s create symbolic links for them both:
gaz@mycomputer:~$ sudo ln -s /opt/renderdoc/bin/renderdoccmd /usr/local/bin/renderdoccmd gaz@mycomputer:~$ sudo ln -s /opt/renderdoc/bin/qrenderdoc /usr/local/bin/qrenderdoc
Once we’ve linked them, open a new terminal and run
renderdoccmd – you should see a help message. However, we also need to register Renderdoc with the Vulkan layers installed by the SDK so it can intercept drawcalls. Luckily this is made quite easy by RenderDoc itself, so run
qrenderdoc and you should see the following window:
Click the “Warning: Vulkan capture is not configured” box, and RenderDoc will guide you through the configuration of Vulkan capture. I find this part fairly straightforward as the popups are very helpful, although as setting it up might involve some root level system changes you may be prompted for your root password during the setup.
And this is my road to happiness for installing RenderDoc on Linux. May you have many happy hours of Vulkan debugging!