Linux

From PCGamingWiki, the wiki about fixing PC games
Revision as of 03:11, 9 September 2021 by Keenanw (talk | contribs) (Some content rewrite to fix grammar and overall article issues.)
Linux
Linux cover
Developers
Linus Torvalds
Release dates
Linux September 17, 1991
Linux at Wikipedia

Key points

Wide variety of distributions (distros) available, allowing unparalleled user choice and customizability.
Some native Linux games may perform better or worse when compared to other operating systems.
Many Windows games can be played on Linux using Proton or Wine.

Resources

DistroWatch - page dedicated to Linux distributions
Linux Journey - a beginner-friendly page about learning Linux in general
ProtonDB - crowdsourced database of Proton (Steam Play) games performance
Phoronix - website dedicated to hardware and benchmarking in Linux
OpenBenchmarking - a list of user-made benchmarks in Linux
FlightlessMango - a list of user-made benchmarks in Linux
ARM - info on Linux ARM distros, devices, and software support
ArchWiki - wiki intended for Arch but is useful for other distros
Gentoo Wiki - wiki intended for Gentoo but is useful for other distros

Communities

Gaming On Linux - a large community dedicated for gaming on Linux
/r/linux_gaming - Linux gaming subreddit
/r/linux4noobs - subreddit dedicated for Linux newbies
/r/linuxquestions - subreddit dedicated to Linux-related questions
/r/linuxhardware - subreddit dedicated to Linux hardware
Linux Game Cast - pod/videocast
Back2Gaming - Gaming related news/guide page. More oriented into Linux

General

  • The strength and weakness of Linux is its freedom of user choice.
  • There are no best distros; it all depends on the user's need. It is common to switch between distros ("distro hopping") until settling on one.
  • Always refer to the documentation of the chosen distro in case there is a problem. It's advisable to check the ArchWiki regardless of the distro as it is broadly and succinctly written. In addition, reaching out to the distro's community for support is always an option.
  • Use virtual machines to test distros.

Distributions

There are two types of release models for Linux distros.

Fixed release

Offers stable packages.
Most distros are beginner-friendly.
Very little maintenance.
Package versions are usually tied to distro version, so the OS needs to be updated to get the latest packages.
Stable packages typically don't have the newest features. This is especially important in the case of GPU drivers.
Manual intervention is required to add user-made repositories in some distros.
Updating a distro to the latest version doesn't normally require a fresh install, but can take up to several hours.
Many Debian-based distros offer "backports" and/or "testing" modes that provide newer versions of some packages than what the stable version does.
Distribution Based on Desktop(s) [fr note 1] Release cycle Supported by[fr note 2] Description
Ubuntu and Ubuntu flavours Debian GNOME, KDE Plasma, LXQt, Budgie, MATE, Xfce, UKUI 6 months, 2 years for LTS Steam, GOG, many commercial developers The most popular distribution. Ubuntu LTS (Long Term Support) is officially supported by Steam. Ubuntu non-LTS is updated more often and contains newer packages and functionality. Ubuntu flavours offer different desktop environments with the same compatibility of Ubuntu.
Pop! OS Ubuntu GNOME 6 months same as Ubuntu[fr note 3] An Ubuntu-based distro created and maintained by System76 which utilizes its own repository. Unlike Ubuntu, it includes much more recent drivers for graphics cards and it's generally more recommended for beginners.
Linux Mint Ubuntu LTS Cinnamon, MATE, XFCE Up to 2 years same as Ubuntu[fr note 3] The most popular beginner-friendly Linux distribution. LMDE 2 Edition is based on Debian. Packages may be much older compared to Ubuntu LTS releases. The main advantage of Linux Mint is the built-in kernel upgrader.
KDE Neon Ubuntu LTS KDE Plasma Up to a year same as Ubuntu[fr note 3] A distro created by the KDE community. Compared to Kubuntu (A KDE Plasma-flavoured Ubuntu), it provides the latest version of the KDE Plasma desktop environment, while simultaneously being able to use packages from Ubuntu.
openSUSE Leap Independent GNOME, KDE Plasma, XFCE 1 year for each new release Leap uses source from SUSE Linux Enterprise (SLE), which gives it a great level of stability. openSUSE has YaST, which is a user-friendly GUI to install packages, manage the system, and install Nvidia proprietary drivers in a simple way.
SteamOS Debian (Oldoldstable)[1] GNOME Varies Steam Linux distribution made by Valve Corporation specifically for the Steam Machine or couch gaming. It currently provides the latest stable Linux kernel along with newer GPU drivers and an option to act as a desktop system. It may be behind in terms of packages updates.
As of June 2021, SteamOS is based on Debian Jessie, meaning that non-Steam packages have not been updated since 2016.
  1. Default options are marked in bold
  2. look at Official Support TODO: add it
  3. 3.0 3.1 3.2 Support is not official, but the distros are similar enough that everything which works for Ubuntu will work in Pop! OS.

Rolling release

Provides the latest version of packages once made available.
No distro upgrade procedure is required, as most distros have only one version.
A package update may cause stability issues.
No currently-listed rolling release distribution has official support from any digital distribution store, due to the distros' reliance on .rpm binaries instead of .deb.
Some distros offer a semi-rolling release, meaning that packages will be tested before releases.
Distribution Based On Desktop(s)[rr note 1] Description
Arch Linux Independent GNOME, KDE Plasma, XFCE, MATE, Cinnamon, LXDE, LXQT, SUGAR, Deepin, Budgie, UKUI Arch Linux is a distribution designed for advanced users looking to customize every aspect of their system, building from the ground up rather than the top down. There are a huge amount of packages available through the AUR (Arch User Repository). Arch Linux does not have a graphical installer and requires research on the user's part in order to properly install.
Fedora and Fedora Spins Independent GNOME, KDE Plasma, XFCE, MATE, Cinnamon, LXDE, LXQT, SUGAR Fedora is a very stable, independent rolling release distribution sponsored by Red Hat Enterprise. GNOME is its default desktop environment but has many alternatives. It is nearly as user-friendly as Ubuntu, but with the advantage of more up-to-date packages and better upgrades between versions. Spins offer different desktop environments, but when it comes to compatibility, they are virtually the same as Fedora.
Manjaro Arch Linux GNOME, KDE Plasma, Xfce Manjaro is based on Arch Linux and offers a user-friendly experience out of the box. By default it comes with Nvidia's proprietary drivers which makes it very easy to install. It uses the Pamac app to install native, AUR, Flatpak, and Snap packages in a simple way.
openSUSE Tumbleweed Independent GNOME, KDE Plasma, XFCE A rolling version of openSUSE which uses automated testing to provide more stability than many other rolling releases. When used with BTRFS on a root partition, snapshots are taken before and after updates, allowing easy restores if there is an update breakage.
Solus Independent Budgie, GNOME, MATE, KDE Plasma Despite following the rolling release model, it provides stable packages and features great hardware compatibility with any GPU. It includes a special tool called Linux Steam Integration (LSI) which allows users to easily customize Steam, ranging from using the libraries from the system (native mode) or a forced 32-bit mode. Only stable releases of library and software are added with very few exceptions--such as Nvidia's Vulkan beta drivers.
  1. Default options are marked in bold

Desktop environments

By default, Linux is a text/command-line based operating system. However, the Linux community has created varieties of desktop environments to offer a user-friendly GUI experience. Most include their own basic software for common use cases such as a file explorer or word processor.

Name Min RAM Description
GNOME 4 GB

One of the oldest desktop environments that is still continuously updated. However, it is very limited in customization, forcing the user to install a third-party tweaking tool to change things such as the color theme and icon set.

KDE Plasma 4 GB

The first desktop environment which sees regular maintenance and feature updates. It is a familiar GUI experience as on Windows, but allows nearly complete customization.

Budgie 4 GB

Created by a Solus developer and currently maintained by Solus Team. It serves as an alternative for GNOME with a much more desktop-like interface, which bears similarities to modern Windows.

Cinnamon 4 GB

Created by Linux Mint Team, Cinnamon brings an appearance similar to GNOME 2 with a modern twist by using some of the features present in GNOME 3, including its compositor's integration with Nvidia GPU. Cinnamon allows you to run in Hardware mode (Default) and Software mode (No Composition).

XFCE 2 GB

Starting off as a clone of a Unix-like desktop environment called CDE, it became its own with a Windows XP-like appearance and light memory usage. XFCE is well-suited for low-end hardware.

MATE 2 GB

MATE spawned as a spiritual successor to GNOME 2 after a controversial change in GNOME 3. It is recommended for Windows and Mac users while providing its own featureset such as mouse hover audio previewing.

LXDE 2 GB

LXDE (Lightweight X11 Desktop Environment) is a lightweight and fast feature-rich desktop environment. It is designed to be user friendly and slim, while keeping resource usage low. LXDE strives to be modular, so each component can be used independently with few dependencies.

LXQT 2 GB

Despite its limited features and customization along with the lack of compositor, it is perfectly suited for the lowest end hardware.

Kernel

Wikipedia page
It is important to update the Linux kernel as new versions provide security updates, bugfixes, better performance, and support for hardware. A distro's repository contains all the supported versions for that distro.

There are two main releases of the official Linux kernel:

  • Long Term Support (LTS) is slightly behind in terms of hardware support and features, but offers better stability and has longer support.
  • Stable release (sometimes called the current release) offers the best hardware support and the newest features. It should be the default choice for a gaming machine and be avoided only if it causes issues.

Despite these differences, both releases offer the same security updates.

Kernel replacement

This section is meant for advanced users, you can easily break your OS, if you don't know what you are doing!

While both stable and LTS Linux kernel releases can be used for gaming, there are also community-made ones which add features and improvements. These kernels may or may not improve one's gaming experience and may require DKMS (dynamic kernel module support) versions of drivers and headers to make hardware usable with multiple kernels.

The most notable releases:

For help with installing different kernels on a distro, consult the kernel's official website or the distro's knowledgebase.
It is advised to keep the current official kernel in case of issues.
UKUU is an useful utility for swapping kernels.

Microcode

ArchWiki article

It is very important to install the microcode for the CPU as the manufacturer provides security and stability updates.

Most distributions use either package manager or some kind of firmware/drivers manager to update the microcode.

Hardware

Graphics

ArchWiki's ATI and Catalyst Article
ArchWiki's AMDGPU/AMDGPU Pro Article
ArchWiki's Nvidia and Nouveau Article
ArchWiki's Intel Graphics Article
Brand Driver type Kernel driver Library Supported GPU Vulkan support
AMD/ATI Open Source Radeon Mesa (GLX and DRI) GCN 2 and older architecture No
AMDGPU GCN and newer architecture1 Yes (RadV, AMDVLK)
Proprietary AMDGPU Pro GCN and newer architecture Yes
Fglrx Catalyst GL Library GCN 3 and older architecture No
Nvidia Open Source Nouveau Mesa (GLX and DRI) Any Nvidia GPU
Proprietary Nvidia Nvidia GLX From Kepler based GPUs to recent Yes
Nvidia 390 Nvidia 390 GLX From Fermi based GPUs to recent
Nvidia 340 Nvidia 340 GLX For Tesla based GPUs No
Nvidia 304 Nvidia 304 GLX From GeForce 6 series to Tesla based GPUs
Nvidia 173 Nvidia 173 GLX GeForce 5 FX series (NV30 to NV36)
Nvidia 96 Nvidia 96 GLX From GeForce 2/3/4 MX/Ti
Intel Open Source Xorg Intel2 Mesa (GLX and DRI) Any Intel HD Graphics GPU Yes (ANV)
Xorg modesetting

1 - GCN 1 and 2 architecture support in AMDGPU is experimental.

2 - Do not use it on Intel HD 4000 series and newer GPU.

Generally, AMD/ATI users should use the open source driver as it provides the best performance and support compared to the proprietary ones, while Nvidia users should stick to the proprietary ones. There are some things to remember:

  • Try not to install drivers from the GPU manufacturer's website unless forced to, as distro maintainers package the driver to be offered from the package manager.
  • If forced to use Catalyst, Nvidia 173, or Nvidia 96 drivers, one must downgrade Xorg to the last supported version.
  • Before using the open source driver one must install LLVM and Linux Firmware packages.
  • When using a 64-bit system, it is recommended to install the 32-bit version of the drivers if possible.[citation needed]

Installing drivers

Ubuntu (and Ubuntu-derived distros such as Mint, Pop!_OS, and Neon)

Use sudo add-apt-repository <PPA repository> to add one. Make sure to run sudo apt update in order to update the repository list after adding one.

Repository Description
ppa:paulo-miguel-dias/pkppa Padoka Stable Mesa. For AMD/Intel/Nouveau GPU drivers, also contains Wayland.
ppa:paulo-miguel-dias/mesa Padoka Unstable Mesa. Same as the previous, however it is the developer version. Mind the issues you may encounter.
ppa:graphics-drivers/ppa "Graphics Drivers" Teams' PPA. Contains the recent proprietary Nvidia drivers and the Vulkan drivers for that GPU.
ppa:ubuntu-x-swat/updates Ubuntu X Team's Stable Mesa. For AMD/Intel/Nouveau GPU drivers, also contains Wayland.

Fedora To install support for Vulkan API (will be functional only if you have a Vulkan capable GPU and driver), execute the following command sudo dnf install vulkan-loader vulkan-loader.i686

Instructions
  1. Launch the terminal and update/reboot system: sudo dnf update && reboot
  2. Launch the terminal and add the official repos: sudo dnf install fedora-workstation-repositories
  3. Enable the Nvidia driver repo: sudo dnf config-manager --set-enabled rpmfusion-nonfree-nvidia-driver
  4. Reboot, then verify the addition of the repository using the following command: sudo dnf repository-packages rpmfusion-nonfree-nvidia-driver info
  5. Open the software app, select Add-ons > Hardware Drivers > NVIDIA Linux Graphics Driver > Install

openSUSE

Please refer to the openSUSE User Documentation Project for instructions.

Optimus support

Nvidia Optimus Linux guide
Optimus support in Nvidia GPUs is still considered to be troublesome.

In case of laptops which has Nvidia Optimus support, it is recommended to have PRIME enabled, which can be done by installing an additional package. Follow the distro’s documentation to set this up.

AMD users only require running the game with the DRI_PRIME=1 command.

Audio

ArchWiki page

Audio is mostly handled by ALSA, with or without PulseAudio. You may set up to use ALSA only, however it is mostly recommended to use with the latter, as it acts as a main central configuration point for audio itself and some games are set to use PA by default. When using a sound card you must install ALSA Firmware package from your repository, while in case of using Bluetooth headphones in PulseAudio, install its PulseAudio Bluetooth library.

When it comes to API in Linux games, there are multiple of them such as OpenAL (Otherwise known as OpenAL Soft), SDL_mixer, SteamAudio, FMOD and more. But the most popular ones are the first two APIs.

You may also encounter the OSS, also known as Open Sound System, released in 1995, it was used as a default sound manager which was added into the kernel, until it was replaced by ALSA in 2.5 version release of Linux kernel. Linux games released till 2001 were using it to play any sound. Even to this day, the OSS is still being updated but it is not much used anymore. If you ever encounter a software where it supports only this audio interface and complaing about the lack of /dev/dsp, you have to either install the OSS itself and set the audio up (the hard way) or rely on emulation. In general, installing the OSSP package and enabling/starting its daemon process (osspd) is enough to do it as it supports both PulseAudio and ALSA, but it is not updated frequently.

Another way is to use the OSS emulator for the specific audio interface:

  • PulseAudio can use the padsp command which can be found with the PulseAudio utility package or in some distros, already included with the main software.
  • ALSA users should install the alsa-oss package and then use the aoss, if using a 64-bit system you need to use the -32 argument if you run a 32-bit application.

Do not run aoss if you are using PulseAudio, all you will get is a static noise mixed with the white ones at high volume!

In case of MIDI, installing Timidity is required along with either soundfonts or FreePats package. Depending on the distro, it will either set it up automatically or require manual intervention. Keep in mind that if you are using PulseAudio, all the sounds, beside the MIDI music, will be muted unless you include the -iA -Os argument for the timidity command as either an autostart or as a user-made service.

You can also use Fluidsynth, however bear in mind that it uses more CPU and needs to be set up to work alongside with PulseAudio, but compared to Timidity, it is more up to date.

Input devices

Libinput ArchWiki article
Touchpad ArchWiki article
Keyboard Configuration in Xorg ArchWiki article
Touchscreen ArchWiki article

The keyboard and mouse are supported on the go, however if using XOrg you must have its input-libinput (input-evdev being the alternative) package installed as well in order to work, however by default it will support only 3 buttons for the mouse, in order to use all of them, you have to configure it manually. When using a laptop you may also need to install XOrg's Synaptic package to have access to all features of your touchpad, against the touchscreen it will either work out of the box (besides some calibration) or being very tedious, especially when it is not supported by Linux kernel.

Wayland users only requires the libinput package itself, which also supports XOrg.

If using a mouse dedicated for gaming, there is a universal configurator called Piper. Due to the fact that the software is still new, there is a limited support for some mouse devices, it does support some of the Logitech mouses. However, there are some other ones made specifically for a product from one company:

Controller support

All DirectInput and XInput controllers are supported. In case of issues with XInput controllers, it is recommended to install xboxdrv.

If dealing with a game that has a very limited or no controller support at all, the AntiMicroX program offers a solution. It allows the user to bind keyboard and mouse inputs to the controller. However, it currently only works with Xorg.

Other

Disk partitioning

By default the most common format used in Linux is EXT4 which manages the files much more efficiently than Windows' NTFS. While NTFS is supported, it is generally not recommended to use it for running installed games from it as it may cause compatibility issues, depending on the software.

The most important aspect is the swap partition; it generally acts as RAM replacement. The absence of it will cause software to shut down due to low memory, and it's commonly used when putting the PC in Hibernation or Sleep mode. The size of the swap disk depends on how much RAM is available in the computer.

If less than 8 GB of RAM, increase the swap disk. If more than 8 GB of RAM, decrease the swap disk.

It is generally recommended to partition disks in this particular order: / (Root) Home Swap disk

The partition order also affects the performance of the HDD/SSD as the first partition has a higher priority than the subsequent ones. A user can create multiple partitions for each directory with a specific disk size to use or use the entire free space on Root and leave some for swap.

Wayland or Xorg?

Wayland is newer than Xorg and is considered to be technically superior.
Wayland is not supported by older proprietary games.

See the Arch Wiki's pages on Wayland and Xorg for more detailed information.

The main advantages of Wayland are:

  • Passive compositioning when fetching pixel data from the client, which removes any kind of latency.
  • Isolating I/O of every window and provide smaller access to root for running the code, improving the security.
  • Acts as both display server and as a compositor. Whereas XOrg only acts as a former with a third party compositor being required.
  • Backwards compatibility with software that rely on XOrg through XWayland.

This all however depends on the GPU driver as there are two buffer APIs of which Wayland utilizes, as well as its implementation for the desktop environment.

GPU Driver Buffer API
AMD Open Source GBM
Intel
Nvidia
Proprietary (From 364.12+) EGLStreams

Both the GNOME and KDE Plasma desktop environments support Wayland for all APIs. The Nvidia proprietary driver, however, is lagging behind in terms of support, as it lacks most of the key extensions, like Vulkan support, along with low performance on XWayland. AMD and Intel drivers, however, contain all the required extensions for a full experience.

Certain APIs used for software would require a specific package or an environment variable to run in Wayland mode:

  • GTK3 - Supported and enabled by default since 3.20, if not, use the GDK_BACKEND=wayland command at the beginning.
  • Qt5 - Requires the Qt5 Wayland package. After that you can either set the environment variable QT_QPA_PLATFORM=wayland or run the Qt 5 application with the -platform wayland command-line argument.
  • SDL2 - Added in 2.0.2 enabled by default since 2.0.4. If not, use SDL_VIDEODRIVER=wayland command before running the application. You can enforce newer SDL2 on games and use the command, although there may be a risk of graphical glitches to appear.
  • GLFW - Install the Wayland version package of GLFW instead of X11, support added in 3.2.
  • EFL - Enabled by default.
  • Clutter - Included with clutter package
  • FreeGLUT - Has initial support.

Warning: these environment variables can break many commercial games! Wayland support is still relatively new, and proprietary Linux games often rely on older versions of libraries which do not have support for Wayland.

The best option is to use Wayland by default for your typical workflow, but force older games to run under X.org:[2]

  • GTK3 - Set GDK_BACKEND=x11
  • Qt5 - Set QT_QPA_PLATFORM=xcb
  • SDL2 - Set SDL_VIDEODRIVER=x11

Alternatively, you may try to force the game to use system libraries as opposed to its own runtime (see Store:Steam#Use_Native_Steam_runtime_mode)

Benchmarking

ArchWiki article
Gallium HUD Guide

It is entirely possible to benchmark native Linux games in this system by using the Phoronix Test Suite. While it is not in GUI form, it's actually very easy to use. You will need to download any game you wish to benchmark through this program and later on run it. The biggest advantage is that once it's completed, it will save the information as a webpage which the program automatically generates, creating a separate result is not required, as the program can also include it to the existing ones, making a comparison between the hardware you have used or settings much easier.

If decided to benchmark on your own, whether the game has a built-in benchmark or not, using Gallium HUD is recommended. Due to the option of displaying the FPS, CPU or even the GPU load graph while running the software and can be customized to your need and it is available when the Mesa package (version 13 or newer) has been installed. This option is only available for AMD, Intel HD and Nouveau.

Another much simpler and available for every kind of GPU is the glxosd which requires installing the package with the same name and just like Gallium HUD, you need to type glxosd before launching a game. The settings can be changed in the glxosd_config.lua file located in /etc/glxosd/. It is recommended to change the refresh rate of displaying the information as by default it will show the current info after 3 seconds (In config file it's 3000).

Steam users can use Valve's voglpref which only works for Steam. It will display both information in the Terminal and at the custom website which can be accessed privately, from there you perform any task you want, although you need to know the SteamID of the game you wish to benchmark.

PCI passthrough

ArchWiki page
/r/VFIO reddit page

Since Linux 3.9 and recent QEmu version, it is possible to passthrough a graphics card, motherboard or even other hardwares into the virtual machine. The main advantage of it is having a native GPU working on Windows 7/8/10 in virtual machine such as the KVM or QEmu, which allows you to play Windows games on it without even using the dual-boot or relying on Wine to do so! However, there are some disadvantages:

  • Your CPU must support hardware virtualization and IOMMU
  • Your motherboard must also support IOMMU
  • Your GPU must support UEFI
  • You need a 2nd hardware for PCI passthrough
  • It takes some time to set up and the whole process may be a little tough for beginners

The following links and the subreddit can be used to learn about the process. Keep in mind that it is not possible to perform a PCI passthrough from Windows. This can be done only in Linux itself!

Wine

Main page
/r/wine_gaming
Application Database

WINE (Wine Is Not an Emulator) is a compatibility layer which allows you to run Windows programs in Unix/Linux environment, its main advantage is a wide support of Windows versions ranging from 3.11 to Windows 10 and supports both 32-bit and 64-bit versions of their systems (32 bit only if you have a 32 bit version of Wine). Besides that some games may even work better than on native Windows such as games which use OpenGL or Vulkan rendering. However a manual intervention may be required if there are issues and checking the WineHQ’s App Database to see if it’s compatible and how to make it work. There are multiple versions of this program each with their own differences:

  • Normal
  • Staging - Provides additional features such as CSMT which may or may not improve the performance of the game and contains community-made patches which improves the compatibility.
  • Gallium Nine - Uses Gallium3D State Tracker, which dramatically improves the performance for games using DirectX 9, as it won’t translate Direct3D calls into OpenGL.
  • Proton - A fork of Wine created by Valve and CodeWeavers which includes special patches and additional addons such as DXVK, FAudio, ESync etc. mainly dedicated for gaming and is integrated with Steam, but it is possible to use without it.
  • Proton-GE - A fork of Proton by GloriousEggroll that has FFmpeg enabled for FAudio by default, and all of Proton's patches ported over to be applied to WINE, as well as Wine-staging and VKD3D. Proton-GE will work better with some games and some games only work on GE, this is a case by case basis so refer to ProtonDB.
  • tkg - Considered to be a "Wine to rule them all!" it contains a large set of patches and features from other community project to provide the best performance and compatibility for games and can be easily customized to your preference, however it was mainly made for Arch Linux (and distros based on it), but it is possible to use it in other distributions. A Protonified version uses Proton as a base instead.

So far only AMD and Nvidia graphics cards which rely on open source drivers have a support for Gallium 3D Nine which greatly benefits the compatibility and performance with DirectX 9-based games.

If WINE itself is hard to use there are also front-ends which may improve your experience with it:

Name Release Notes
Lutris Free
Can also act as a client for native games and emulators.
Provides community-maintained scripts for installing games on Wine or even Steam through Wine.
Can provide different Wine version for specific games.
Can install multiple editions of Wine, including the community ones.
Can directly use Proton.
May be a little hard to install the game on Wine by yourself
PlayOnLinux Free
Beginner friendly
Includes precompiled scripts for automatic installation
Very slow development
The precompiled installation scripts are outdated, along with third-party libraries.
The precompiled scripts may even damage your system. It is recommended to use the option to install the software on your own.
Crossover Commercial
Superior in terms of compatibility than PlayOnLinux
Provides patches and improvements which are later on added to Wine Staging
Buying the product will also provide support for Wine development
Q4Wine Free
Moderately easy to use
Implemented Winetricks, providing latest version of third-party libraries (Manual update is required)
Implemented AppDB for checking the software compatibility on the go.
Manual compiling/installing other Wine versions is required for more than one.

Stores and clients

Name Client available Registers Linux sales? Notes
Steam Yes Yes
  • By default, the client includes libraries required for native games to run (Runtime mode), but it is possible to make the software use libraries from your system instead (Native mode)
  • Includes Proton by default (may require manual installation from Tools tab) and any Windows game being ran on Proton counts as a Linux sale.
Humble Bundle No Yes
  • The store does not provide with information about required dependencies for the game.
GOG.com No Yes
  • Game's store page shows required dependencies to run.
  • Uses MojoSetup as an installer.
  • Running the start.sh script may cause issues, run the binary executable if that happens instead.
Itch.io Yes (Optional) Yes None
Feral Store No Yes
  • Sells only Mac and Linux ports they have made.
Game Jolt Yes (Optional) Unknown
Flathub No No
  • Offers open-source freeware games. Overlap with the distros' own package repositories is high.
Snap Store Yes (Optional) No
  • Offers a mix of open-source freeware games and preconfigured Wine games.
  • Offers some games for ARM, PowerPC and System z distro installations.
ZOOM Platform No Unknown
  • Very small game selection (10 games total) as of March 2021.

Improvements

Hardware

Disable mitigations for transient execution CPU vulnerabilities

Be aware that disabling these will cause your PC to be susceptible to multiple vulnerabilities such as Spectre, Meltdown, Zombieland etc. Use it with discretion.
Outside of specific microbenchmarks, disabling the default mitigations should result into an average performance increase of 5-10%. The following parameter used in here is available only in 5.1.13 kernel or newer (or backports to 3.16.68, 4.4.180, 4.9.176, 4.14.119 and 4.19.43), for others see this parameters string.
Edit the GRUB settings

Open up the grub file found in /etc/default/ with a text editor as root and in GRUB_CMDLINE_LINUX_DEFAULT= add mitigations=off at the end.

Re-generate the grub.cfg using one of these commands as root:

grub-mkconfig -o /boot/grub/grub.cfg

update-grub     # Used by Ubuntu based distros, easy version of the 1st one.

Disable mouse acceleration in Xorg

Some desktop environments offer an option to set up the mouse acceleration directly from the settings menu (Such as KDE Plasma, GNOME and later on MATE)
Create a new Xorg rule

Create a config file in /etc/X11/xorg.conf.d/ as any number-custom name.conf (for example 50-mouse-acceleration.conf, keep in mind that it does not accept spaces in names) as super user/root and add the following script:

Section "InputClass"
	Identifier "My Mouse"
	Driver "libinput"
	MatchIsPointer "yes"
	Option "AccelProfile" "flat"
EndSection

Then restart the system or Xorg (In most distros its Ctrl+Alt+Backspace ←)

Improve shutdown time in systemd

Edit the system.conf

In some desktop environments such as LXQt, the system shutdown or restart process may take longer due to Systemd having the time to stop the session set to 1 minute 30 seconds by default.

  1. Edit as a root the system.conf file located in /etc/systemd/
  2. Find DefaultTimeoutStartSec and DefaultTimeoutStopSec, uncomment them if necessary and set the time limit in seconds.
  3. Type sudo systemctl daemon-reload

OR

Install watchdog package and enable/run the watchdog service.

Resolution scaling with xrandr

It is entirely possible to scale the resolution through multiplications (--scale) or by resolution (--scale-from) with xrandr command. Provided that you input the monitor name and your current resolution, which can be learned by using xrandr -q command (It will also list available resolutions).

Here are some examples:

  • xrandr --output VGA1 --mode 1024x768 --scale 0.5x0.5 - this will downscale the resolution by 0.5 while using 1024x768 resolution in VGA1 monitor.
  • xrandr --output VGA3 --mode 1920x1080 --scale-from 1440x900 - This command will imitate the 1440x900 resolution under 1080p in your VGA3 monitor.

Software

Use Feral Game Mode to improve the performance

Most distros includes the software in their repository, it is recommended to install both 64 and 32 bit versions to apply in every game, if not, the source code can be found in the GitHub page.
Supports custom scripts
Developers can use it to implement in their games.

Feral Game Mode is used by Feral Interactive to provide optimization in their games (From Rise Of The Tomb Raider) when being ran, it provides changes to these following processes:

  • CPU governor
  • Input/Output priority
  • Process niceness
  • Kernel scheduler
  • Screensaver inhibiting
  • GPU performance mode (Nvidia and AMD), GPU overclocking (Nvidia)

Once the package is installed, you can activate it when running other games with gamemoderun *game executable/launcher*, on Steam add gamemoderun %command% into Launch Options.

Enable 32-bit support for your distro

Enable 32-bit library support in Ubuntu/Debian based distros

As Ubuntu/Debian 64-bit distros have 32-bit libraries disabled by default, this can cause compatibility issues with the software (Especially with upgrading Wine). To enable it you must use these following commands:

sudo dpkg --add-architecture i386
sudo apt update
In Debian unstable, one can optionally also add support for x32 with sudo dpkg --add-architecture x32, although not all that many games support it.

List missing dependencies

List the missing dependencies

As GOG, Steam and other stores mostly support Ubuntu due to its popularity in both making another distribution (Such as Linux Mint) or wide use, there can be a limited support for the other distros such as Arch Linux, Fedora, etc. Mostly in terms of requiring dependencies to run the game or a software.

The ldd command can be used to check which dependency does it require and if they are in your system.

ldd <binary file>

After running the command, it'll list all the *.so files the software uses, if there is a "Not found" somewhere, this is the moment to learn which package does it contain the file.

The missing dependency checkup can be even easier with the inclusion of the grep command.

ldd <binary_file> | grep "Not found"

This will only look for the lines related to "Not found" only, if nothing shows up then you have everything you need.

Improve compiling speed in AUR (Manjaro, Antergos, Arch Linux)

Open makepkg.conf as root and under MAKEFLAGS add -j#. Where # is the sum of (number of CPU cores you wish to use) + 1 (so if you wish to use 4 cores, you need to put -j5 for example)

Keep in mind that some programs requires using one core for the stability sake.

Create a script which the game uses libraries from your system instead

Make a native executable for your game
This method may improve the compatibility and sometimes even improve the performance of it on your Linux system. Can be useful in older Linux games that rely on older SDL interface such as Majesty.
  1. Create an empty text file and open it with any text editor.
  2. Add this following script:
#!/bin/sh
LD_LIBRARY_PATH=/path/to/library /path/to/executable

3. Replace /path/to/library with one of these paths:

  • If the game is 64-bit /usr/lib64
  • If the game is 32-bit and you are using a 64-bit system /usr/lib32
  • If the game is 32-bit /usr/lib

4. Once done, save it and make it executable using either chmod command or via Properties with your file manager.

Notes

  • You are required to learn which library does the game uses and install them if not available. Each game has its own library folder which you may learn about it.

Common fixes

Hardware

The Nvidia DKMS driver won't install after updating it
If none of them won't work, you may have to downgrade your kernel and wait for the update that fixes it. Provided that you or someone else reported this issue.

Text Mode

  1. Boot up to your kernel
  2. Enter the text mode by pressing Ctrl+Alt+F2-F10 and if necessary, stop the display manager.
  3. Type in as root, dkms install nvidia/<version> --all. If everything is done successfully type reboot.

LiveCD/LiveUSB

  1. Boot to the LiveCD/LiveUSB
  2. Mount your partition(s) using mount /dev/sd<disk and partition and Chroot it with chroot <root partition> (In Arch Linux system it's arch-chroot instead).
  3. Type in dkms install nvidia/<version> --all. Once it's done without any errors, you can restart the system.
Set up a primary monitor in multi-monitor setup[citation needed]
  1. Install xrandr using your linux distribution's package manager.
  2. Run xrandr from a terminal emulator and find the name of the monitor you want to set as the primary (i.e. "HDMI-0").
  3. Run xrandr --output <name> --primary.

Notes

To automate this when the system starts, prepend the command to your ~/.xinitrc-file, or your desktop environment's equivalent.
No sound[citation needed]

Open the Terminal and type as root gpasswd -a <username> audio, if that did not work then:

  1. Open the group file as root in a text editor located in /etc folder.
  2. Find the following line
    audio:x:29:pulse
  3. Add a comma and your username ex:
    audio:x:29:pulse,tux
Crackling sound/audio delay in PulseAudio

Type in terminal this command to stop and then start PulseAudio at the same time:

pulseaudio -k && pulseaudio --start
You can bind this command as a keyboard command in your DE.

Software

Screen tearing
You may also use GNOME, Cinnamon and KDE Plasma which use their own compositor that directly communicates with the GPU without any performance loss from Nvidia side.

Nvidia users can fix the screen tearing by enabling Force Composition Pipeline in Nvidia Settings, if it persists, enable Force Full Composition (Keep in mind that it reduces the performance in games even more).

AMD and Intel HD users do not have to do anything as DRI3 handles the refresh rate by default without compromising the performance, provided the compositor contains the Present extension.

If it persists, chances are you may be required to install and use a 3rd party compositor such as Compiz, Compton etc.

References