2014 was a great year for gaming on Linux. Popular titles like Civilization V, Dreamfall Chapters and Broken Age were released. Linux has been for a long time, the gaming platform that gamers deserved, but didn’t really need.
When playing a game, you would hope to have as little interference between the game itself and the computer hardware. Linux happens to have a huge advantage in reducing the gap between the game and the underlying hardware. It is endlessly configurable to the point that it can run efficiently on tiny watches as well as supercomputers.
‘Hardcore’ gamers often tweak their systems to an extreme, disabling every unnecessary service. Today we are going to give you some tips and discuss a few techniques that will help you in improving your gaming experience in Linux.
1) Turn off unnecessary services
When you are gaming on Linux, you can turn off a lot of unnecessary services to improve gaming performance. Some of the service are ‘core’ services that provide basic features while others might be specific to distro, desktop environment or other software. Here is a list of a few services that you can live without while gaming:
- VMware/virtualbox/libvirt – Assuming that you won’t be running a virtual machine while gaming.
- avahi – This is mostly used for discovery of network services like shared media libraries and such.
- bluetooth – Not required while gaming.
- cups – Linux’s printing service.
- apache/nginx/mysql/postgresq – Web and database servers that can sometimes be installed without your explicit knowledge when required by other software.
- samba – This service allows networking with Windows users.
So, how do you stop these services? Well, it depends on which Linux distro you use. If you are using a recent version of Ubuntu, you will need to run:
sudo service stop
In most other recent distros, the command that you need to run is:
sudo systemctl stop
If you use KDE software, also run akonadict1 stop to turn off some services that run in the background synching email, calendars etc. And balooctl stop to stop file indexing.
2) Turn off desktop composition
Desktop composition uses the graphics card to render the desktop environment, such as Windows, Windows controls etc. It utilizes the GPU to do the things it’s designed to do thereby freeing up the CPU. However, when you are playing a game, GPU is the one you need the most.
On Gnome 3 and Unity, you cannot turn off the desktop composition automatically. But, in the recent versions, the compositor recognizes when a game is run and dedicates all the resources to the game. On KDE, you can have it automatically suspended when the game is launched in a full-screen window or press the Alt+Shift+F12 shortcut. You can also use the following command:
qdbus org.kde.kwin /KWin toggleCompositing
3) Close resource intensive applications
This is a very common advice, but it’s worth mentioning. Resource intensive applications can adversely affect your gaming performance. For instance, all the web browsers use the GPU to improve browsing performance. And if these browsers are running in the background while you are gaming, you will definitely experience performance deterioration. So, it’s always a good practice to close all the applications that you won’t use while gaming.
4) Switch to a lighter desktop environment
We all love our fancy desktop. But when you are playing a game in full screen mode, features of your favourite desktop environment are wasted. So, you can switch to a lighter version of the desktop before you commence your game play.
5) Use performance monitoring tools for your GPU
Performance monitoring tools offer you detailed insights on the GPU performance. You can leverage the reports to tweak the settings of your Linux gaming environment to achieve better performance.
Since these tools are highly linked with the GPU driver, the tools that you use will depend greatly on the graphics hardware of your system. For instance, if you have an NVIDIA card, you can use the handy nvidia-smi command line tool that comes with the official driver. You can run nvidia-smi-1 to have it constantly update every few seconds. A graphical alternative would be nvidia-settings.
For AMD users, the raedontop command should work with both open and closed-source drivers. For Intel users there is intel_gpu_top. These tools might not be installed by default though.
These were a few suggestions that you can follow to improve the gaming performance on Linux. If you have something to add to this list, do let us know in the comments section below.