The added advantage is that Linux provides more efficiency because it does not require a lot of memory. The article provides a detailed guide on setting up Ubuntu Linux as a platform for gaming.
Gaming on Linux
Gaming on Linux was a difficult task as it requires a lot of workarounds and specific hardware. But, the introduction of the game distribution platform known as Steam Play in 2012 revolutionized the Linux gaming experience. It allows gamers to play Windows games in Linux and introduces thousands of games specific to it but it did not support most of the triple-A games for Linux.
However, the integration of Proton with Steam Play adds a compatibility layer that has simplified gamer’s experience of playing thousands of Windows games on Linux. It further contains popular tools like Wine and DXVK that enhance game performance and user experience by relieving them from the burden of understanding the underlying system.
Setting up Linux for gaming requires some workarounds. Follow this step by step guide for a better experience of gaming on Linux:
Getting the Latest Video Drivers
Video drivers provide optimal system performance for games. Install the latest video drivers on your system by running the following commands.
To help Linux run 32-bit applications in a 64-bit architecture, enable the 32-bit libraries in debian-based distributions.
Run the following dpkg command in Ubuntu:
For users with AMD Graphic cards, install the AMD Mesa driver as follows:
Lutris is a free-open source game management platform that provides smooth game installation and optimal settings. Lutris requires some dependencies for successful installation. For that, let’s begin with Wine installation to add a compatibility layer for running Windows applications on Linux. Without these dependencies, Litrus tools might not perform all the functions required for an optimized gaming experience:
Wine and Dependencies Installation
Download the repository key to add it to the system, as follows:
Finally add the Wine repository and update the system to install wine-staging version:
Get the debian compatible package for OpenSUSE Build Service by adding its repository for automatic updates, as follows:
Now download and add the repository key:
Finally update the system to install lutris:
Esync aims to reduce the performance overhead of Wine in scenarios like CPU bound. It helps with the compile-time and improves the performance of the CPU. Use the following command to check if it is enabled by default.
It will return output in the form of numbers. A number greater than 500,000 means esync is enabled. If not edit the system.conf & user.conf files inside /etc/systemd directory with the following line:
Similarly, to maintain the settings after reboot set the ulimit value in the limits.conf file inside /etc/security as follows:
[domain] [type] [item] [value]
User hard nofile 524288
Such that the above settings enforces hard limits on the user (replace it with the username), to process 524288 open files.
Enable the GameMode
GameMode is a set of libraries and daemons that provide on request temporary optimizations to the hosting system or on a game for better game experience.
GameMode unlocks all cores of the system. It makes sure that no unusual background processes are running simultaneously with the game that might interrupt the performance. GameMode currently supports optimizations such as, custom scripts, input/output priority, kernel scheduler, etc.
Games like Rise of the Tomb Raider, Total War: Three Kingdoms, DiRT 4 etc integrate its support and players only need to run the game for its activation. While others need to request the GameMode support by launching the game using following command:
For Steam, Type gamemoderun %command% at the game launch option. Before, GameMode installation, install the following dependencies on Ubuntu:
Now Install GameMode as follows:
Issues and Custom installation of Proton
As mentioned earlier, the compatibility layer that Proton provides has some issues as it is a bit under-developed as compared to Wine. But, users can resolve them by performing the custom installation of Proton.
For more details, check the Proton Update Script on Github. cd into the root folder and wget to download the cproton.sh file, allow execution permission, and run the script as follows.
Enabling ACO Compiler (AMD Users)
AMD compiler enhances performance by switching it from LLVM to ACO. It allows the ACO compiler games to perform exceptionally fast on Linux.Install latest video drivers for AMD to enable ACO compiler. After installation, include the following line in the /etc/environment file as:
Enabling the ACO compiler is optional as it might allow most ACO compatible to perform exceptionally well. However, it can also cause issues for some games.
Setting up Linux for gaming can be a tough job, but playing games on Linux can be a better experience as it consumes limited PC resources. The article provides a step-by-step guide to customize Linux for gaming purposes and better game performance. We also give information for AMD users to help them set up their PC for gaming.
Even though Linux is in wide use for work, Windows is still dominating the gaming world. Linux provides high-level customization on every aspect of the system to make it suitable to play the best of all games.