Hack your graphics
Switch drivers, interrogate GPU memory, try and keep the magic smoke from escaping into the atmosphere…
INTEL MIXES THINGS UP “The release of the more powerful Alchemist cards might end two decades of the AMD/Nvidia duopoly.”
There are some great tools for probing, tweaking and otherwise tinkering with GPU on Linux. Most of these are vendor-specific. Intel provide a number of utilities via the intel-gputools package. Once installed you can run $ sudo intel_gpu_top to see how busy your GPU is, how much power it’s using, whether hardware video codecs are in use and more. It’s also handy if you get confused about which ‘Gen’ your graphics are. If only we’d known about it two pages back…
AMD’s Catalyst Control Centre on Windows enables you to overclock your GPU and its memory, as well as tweak fan profiles. Corectrl on Linux makes it possible to do exactly the same thing, but probably with much less bloat. Corectrl is available on Fedora, Arch Linux’s AUR or you can build it yourself from source see (https:// gitlab.com/corectrl/corectrl). For Ubuntu there’s a handy PPA (https://launchpad.net/~ernstp/+archive/ ubuntu/mesarc), where you’ll also find newer builds of Mesa, libdrm and the amdgpu driver for X.org.
Another AMD tool popular with developers and tweakers on Windows is its Developer Tool Suite. This has been open sourced (as part of its longstanding GPUopen initiative) and can be obtained from https:// gpuopen.com/tools. The suite is aimed more at developers than anyone else, but anyone who’s even the slightest bit curious as to what their GPU is up to should find at least some of it interesting. The suite includes
GPU Profiler, Memory Visualizer, GPU Analyzer and
Developer Portal. That last one sounds a little scary, tbh.
Canonical’s hardware enablement stack (HWE) was intended to offer new kernels and drivers for users of the Ubuntu LTS. Otherwise they’d be missing features for two years until the next LTS appears. The HWE stack was previously an opt-in affair, with the recommendation being for users only to opt-in if they needed support for new hardware, or if something was broken. Since Ubuntu 20.04 though, everybody using desktop Ubuntu is automatically treated to the HWE stack. You can check if you have it by running:
$ hwe-support-status
Users running Ubuntu 22.04 will track the HWE stack without intervention, too. But if you want the very latest Mesa, Wayland, Vulkan and the like you might want to activate the Oibaf PPA (which has been generously providing fresh Mesa packages since 2011). This can be done with:
$ sudo add-apt-repository ppa:oibaf/graphics-drivers $ sudo apt update
$ sudo apt upgrade
The new packages are unlikely to break things (they do get tested), but it’s easy to remove them if you run into difficulties:
$ sudo apt install ppa-purge
$ sudo ppa-purge ppa:oibaf/graphics-drivers
Hardware ray tracing
New graphics cards make much fanfare of their raytracing abilities. This certainly makes for some prettylooking games and renders already, and the future will be even more exciting. In May 2022 Mesa announced a big change to the free RADV driver for Vulkan on Radeon hardware. With Mesa 22, support for Vulkan ray tracing has been extended as far back as GCN 1.0 cards. Previously, this support only extended back as far as Polaris and Vega cards.
It should be stressed that only the newest RDNA2 (RX 6000) cards have bespoke ray-tracing hardware; support on older cards is provided through Linear Bounding Volume Heirarchy (LBVH) calculations. Essentially, it’s soft-ray tracing, but it still provides a welcome boost for middle-aged cards. Nvidia actually did a similar thing for its non-RTX cards in 2019, albeit for Microsoft’s DXR API.
Speaking of Nvidia, it would be remiss of us not to mention (apart from its new driver strategy, of which you can read in the box, right) that in 2019 it released Quake 2 RTX. This is a ray-traced remaster of the original, created to show off their RTX cards. You can get it for free on Steam or directly from Nvidia at www. nvidia.com/en-us/geforce/campaigns/quake-II-rtx. It’s not just for Nvidia (or Windows) users, either. Platform
agnostic Vulkan ray tracing was added in 2020 so this should look quite glorious with the new RADV driver.
If you’d like to test out your GPU’s potency without exploding monsters and gibs, there is no shortage of synthetic benchmarking tools available. One of the most popular is GravityMark, which you can get from https://gravitymark.tellusim.com. Fans of astronomy will find this especially pleasing because it renders all sorts of lovely sights from our universe. And also what our planet would look like surrounded by a ring of as many asteroids as your GPU can draw. There’s a scoreboard too, so if you happen to have two RTX 3090s you might just be able to win the top spot.
Another popular purveyor of pretty benchmarking scenes is Unigine (see https://benchmark.unigine.com).
They haven’t put out a new offering in a while, but their Superposition (2017), Valley (2013) and Heaven (2009) releases still look lovely and all run beautifully on Linux. Superposition now includes a VR option for use with Oculus and SteamVR devices.
Smoother browser behaviour
We’ve mention VA-API a fair bit in previous cover features, mostly as a way to get smoother playback in your web browser. We’re a little miffed to report that to get this working on Firefox (at least with Intel hardware on Ubuntu 22.04) still seems to require starting the browser with a rather ugly (and potentially insecure):
$ MOZ_DISABLE_RDD_SANDBOX=1 firefox
Be that as it may, Intel is working on a few new things related to this. Its new, open source media API – OneAPI – has been enjoying a lot of attention lately, and part of that initiative is the OneAPI Video Processing Library (OneVPL, www.intel.com/content/www/us/en/ developer/tools/oneapi/onevpl.html). OneVPL is only for the very latest, Gen12 or later, hardware. In other Intel news, the first of its Arc line of discrete graphics cards, the A380 has launched in China. Initial benchmarks are rather underwhelming (behind that of Nvidia’s 1650 of three years ago), but this is an entry-level unit. We’re excited for the release of the more powerful Alchemist cards which maybe, just maybe, will end two decades of the AMD/Nvidia duopoly. It’s worth mentioning that the AMDGPU Pro driver stack (which still uses the open source AMDGPU kernel module) has its own Vulkan driver. It also has its own proprietary OpenGL, Vulkan as well OpenCL stacks. To use the Vulkan driver, you’ll need to disable Mesa’s RADV and also grab the Vulkan SDK from https:// vulkan.lunarg. com/sdk/ home. If you want to start exploring OpenCL (or proprietary Vulkan implementations), then you can install the whole stack directly from the package at www.amd.com/en/support/linux-drivers:
$ amdgpu-install --usecase=workstation -y --vulkan=pro --opencl=rocr,legacy
There’s also AMDVLK, AMD’s open alternative to the RADV Vulkan driver. But all accounts suggest that RADV is, well, pretty rad in comparison. And with that nod to late 80s colloquialisms we end our deep dive into the weird world of graphics on Linux. We’d love to hear your stories of pixelated woes or vector victories. Meanwhile, we’ll be busy playing the original (and now open source for 12 years) Quake. See over the page for our timeline.