Gaming in arch linux

Steam

Steam is a popular game distribution platform by Valve.

Contents

Installation

Enable the multilib repository and install the steam package.

The following requirements must be fulfilled in order to run Steam on Arch Linux:

  • Installed 32-bit version OpenGL graphics driver.
  • Generated en_US.UTF-8 locale, preventing invalid pointer error.
  • The GUI heavily uses the Arial font. See Microsoft fonts. An alternative is to use ttf-liberation or fonts provided by Steam instead.
  • Install wqy-zenhei to add support for Asian languages.
  • If using systemd-networkd for network management, install lib32-systemd in order for Steam to be able to connect to its servers.

SteamCMD

Alternative Flatpak installation

Steam can also be installed with Flatpak as com.valvesoftware.Steam from Flathub. The easiest way to install it for the current user is by using the Flathub repo and flatpak command:

The Flatpak application currently does not support themes. Also you currently cannot run games via optirun / primusrun , see Issue#869 for more details.

Steam installed via Flatpak is not able to access your home directory and overriding this will cause Steam to not run because it is not safe. However, you can freely add directories outside the home directory. If you want to add an external library, run the following command to add it:

Asian Font Problems with Flatpak

If you are having problem getting Asian fonts to show in game, it is because org.freedesktop.Platform does not include it. First try mounting your local font :

If that does not work, consider this hack: make the fonts available by directly copying the font files into org.freedesktop.Platform’s directories, e.g.

Directory structure

The default Steam install location is

/.local/share/Steam . If Steam cannot find it, it will prompt you to reinstall it or select the new location. This article uses the

/.steam/root symlink to refer to the install location.

Library folders

Every Steam application has a unique AppID, which you can find out by looking at its Steam Store page path.

Steam installs games into a directory under LIBRARY/steamapps/common/ . LIBRARY normally is

/.steam/root but you can also have multiple library folders (Steam > Settings > Downloads > Steam Library Folders).

In order for Steam to recognize a game it needs to have an appmanifest_AppId.acf file in LIBRARY/steamapps/ . The appmanifest file uses the KeyValues format and its installdir property determines the game directory name.

Usage

Steam also accepts an optional Steam URL, see the Steam browser procotol.

Launch options

When you launch a Steam game, Steam executes its launch command in a Bash shell. To let you alter the launch command Steam provides launch options, which can be set for a game by right-clicking on it in your library, selecting Properties and clicking on Set Launch Options.

By default Steam simply appends your option string to the launch command. To set environment variables or pass the launch command as an argument to another command you can use the %command% substitute.

Examples

  • only arguments: -foo
  • environment variables: FOO=bar BAZ=bar %command% -baz
  • completely different command: othercommand # %command%

Tips and tricks

Start Minimized

It is possible to have Steam start minimized to the system tray, rather than taking focus. Simply add -silent to the list of arguments in the autostart file.

Fsync patch

Valve has released a special kernel patch that should help increase FPS in massively-threaded applications. There are few methods to get and use this patch:

  • Use binary kernel provided directly from Valve. See Unofficial user repositories#valveaur and once you add this repository, kernel packages linux-fsync and linux-fsync-headers become available. You will likely need to replace some regular packages (e.g. nvidia ) with DKMS packages (e.g. nvidia-dkms ) as well.
  • Install linux-zen kernel that includes the fsync patches since the 5.2 release[2]
  • Install linux-pfAUR or linux-pf-gitAUR kernel.

Proton Steam-Play

Valve developed a compatibility tool for Steam Play based on Wine and additional components named Proton. It allows you to launch many Windows games (see compatibility list).

Читайте также:  Windows in the skies

It is open-source and available on GitHub. Steam will install its own versions of Proton when Steam Play is enabled.

Proton needs to be enabled on Steam client: Steam > Settings > Steam Play. You can enable Steam Play for games that have and have not been whitelisted by Valve in that dialog.

If needed, to force enable Proton or a specific version of Proton for a game, right click on the game, click Properties > General > Force the use of a specific Steam Play compatibility tool, and select the desired version. Doing so can also be used to force games that have a Linux port to use the Windows version.

You can also install Proton from AUR with proton AUR or proton-git AUR , but extra setup is required for them to work with Steam. See the Proton GitHub for details on how Steam recognizes Proton installs.

Big Picture Mode without a window manager

To start Steam in Big Picture Mode from a Display manager, you can either:

  • Install steamos-compositorAUR
  • Alternatively, install steamos-compositor-plusAUR , which hides the annoying color flashing on startup of Proton games and adds a fix for games that start in the background
  • Manually add a Steam entry (but you lose the steam compositor advantages: mainly you cannot control Big Picture mode with keyboard or gamepad):

create a /usr/share/xsessions/steam-big-picture.desktop file with the following contents:

Steam skins

The Steam interface can be customized using skins. Skins can overwrite interface-specific files in

To install a skin:

    Place its directory in

/.steam/root/skins .

  • Open Steam > Settings > Interface and select it.
  • Restart Steam.
  • An extensive list of skins can be found in this Steam forums post.

    Creating skins

    Nearly all Steam styles are defined in

    /.steam/root/resource/styles/steam.styles (the file is over 3,500 lines long). For a skin to be recognized it needs its own resource/styles/steam.styles . When a Steam update changes the official steam.styles your skin may become outdated, potentially resulting in visual errors.

    /.steam/root/skins/skins_readme.txt for a primer on how to create skins.

    Changing the Steam notification position

    The default Steam notification position is bottom right.

    You can change the Steam notification position by altering Notifications.PanelPosition in

    • resource/styles/steam.styles for desktop notifications, and
    • resource/styles/gameoverlay.styles for in-game notifications

    Both files are overwritten by Steam on startup and steam.styles is only read on startup.

    Use a skin

    You can create a skin to change the notification position to your liking. For example to change the position to top right:

    Live patching

    gameoverlay.styles can be overwritten while Steam is running, allowing you to have game-specific notification positions.

    And the #Launch options should be something like:

    Steam Remote Play

    Steam has built-in support for remote play.

    See this Steam Community guide on how to setup a headless streaming server on Linux.

    Steam Controller

    Normally a Steam controller requires the use of the Steam-overlay. In non-Steam native Linux games however the overlay may not be practical. For that, while the Steam client is running it will maintain a «desktop configuration». With your Steam controller, configure the desktop configuration for it as a generic XBOX controller. As long as the Steam client is running you can then use your Steam controller in other games, such as GOG games, as an XBOX controller. Make sure to select your type of controller to map to in «general controller settings».

    Sharing Games With Windows Using Proton / Other Compatibility Layers

    With the addition of Proton compatibility for games has increased thanks to Valve, you can use custom forks such as Proton GE or others, to increase the amount of games that will work with it, you can extend this further to create a steam library on an NTFS volume containing your games, the only thing you ideally will have to force the uid and gid of the user you are currently logged in as so Steam may write files as needed, you will also need to make sure not to have the noexec option in your fstab or Steam will not be able to detect your games.

    Источник

    Gaming in arch linux

    1,556 уникальных посетителей
    125 добавили в избранное

    This guide is only for Arch and Ubuntu. Any derivatives like Manjaro, Mint, PopOS, etc should also work.

    Читайте также:  Поиск внутри файлов word windows 10

    If your Distro is not here, you run into any problems or have any more additions to this guide, Leave a comment and I will add it. Any help is more than welcome 🙂

    If you are not a Linux user, check out my other guide on How to choose the right Distro Install it and then come back to optimize it for gaming 🙂

    Multilib is required by Steam, So if you are running Steam you can skip this step, If you can not find Steam in your repositories this is your issue.

    Having the right GPU drivers is imporant, else games won’t run properly.

    If you have a GTX9xx or newer you need driver version 430. If you have a GTX 8xx or lower you need driver version 418 and if you have a GTX5xx or lower you need driver version 390. Pick the right driver version. If you even have an older card, manually check which driver you need: https://www.nvidia.com/Download/index.aspx?lang=en-us

    If you have an AMD card you just need the newest version.

    If you use Gnome or GDM you might need to disable Wayland, This is not always the case, But I include it here just in case, If your System won’t reboot you can try this

    Installing the newest kernel is generally the easiest kernel switch, There are other kernels available, I will include them later.

    To install the newest kernel

    This is the default in Arch, no need to do anything, the newest kernel will be present.

    Now ukuu is installed, in this program you can select the newest stable kernel click install and when you reboot the new kernel is used. Do not remove your old kernel. If anything goes wrong you can select which kernel to boot in the grub screen at startup and remove the kernel that gives you trouble.

    Gamemode [github.com] puts all your hardware in performance mode, it fixes some common problems and it just sounds cool 😛

    Nvidia users might want to enable all options listed here to improve performance in games

    Force Full Composition Pipeline avoids screen tearing by letting the GPU do all the scaling.
    Triple Buffer avoids stuttering gameplay It allows for a stream of data instead of chunks of data.
    IndirectGLXProtocol forces the game to directly communicate with the Nvidia drivers.
    Coolbits enables your card to be overclocked which gamemode will make use of.

    Try this one with risk, It will be sure to crash GNOME, I am not sure about other DEs

    just add it to the end of the file

    If you run into any problems, just hit CTRL ALT F3 to switch to a different tty login, run the command to edit the file again and put a # in front of the options that are giving you trouble and reboot

    Alternatively you can just completely remove the file with the following command and reboot

    Try this one with risk, It will be sure to crash GNOME, I am not sure about other DEs

    just add it to the end of the file

    If you run into any problems, just hit CTRL ALT F3 to switch to a different tty login, run the command to edit the file again and put a # in front of the options that are giving you trouble, Most likely the last one

    Alternatively you can just completely remove the file with the following command

    Libstrangle [gitlab.com] is a tool that helps you control framerates but also vsync settings. This is especially handy for games that do not support these features, You would like to half your framerate to make it run better save some power or just give your hardware a break.

    If you run Arch it will be in the AUR, for other distros you have to run the following commands

    Libstrangle can be used in multiple ways depending on what you want to achieve.

    To use libstrangle you can simply type strangle and then the amount of frames you want to run. There are some examples below, But the features you will probably use are Vsync which you use by using the -v option, the rules for OpenGL and Vulkan are different, Here is what each number does for the different apis.

    Читайте также:  Vpn windows проверка подлинности

    OpenGL 0 Force off, 1 Force on, n — Sync to refresh rate
    Vulkan 0 Force off, 1 Mailbox mode, 2 Traditional vsync, 3 Adaptive vsync

    You can also limit the game depending on the power state of your device, Set it to 60 while charging and on 30 while discharging for example. You do this by adding a second number right after a colon. in example, strangle 60:30. There are more features but they are not that commonly used, you can check the gitlab link above or simply type strangle -h for more information.

    To limit the framerate of supertuxkart to 30 simply run

    To Force enable vsync on 60 fps for an OpenGL Steam game set the launch option to

    To set the framerate of a vulkan game on Steam to 120 fps but 60 on battery power with adaptive vsync set this as your launch command

    Mangohud [github.com] is a monitoring tool for Vulkan and OpenGL applications. It can show CPU and GPU usage, temps, But also framerates, frametimes and a lot more.

    If you are on Arch you can find it in the AUR, If you are on Fedora you can find it in your repos.

    For other distros execute the following commands.

    To configure it with a GUI you can check out GOverlay below. For a manual configuration you can edit

    If you want exactly my configuration you can just copy this into it without the need for GOverlay.

    You can tweak all the little things you want here. You can also create different configurations per game by adding a MangoHud.conf file to the game directory.

    To use it for any game change its launch option to

    To use it with non Steam games use the following command

    Some games might need the 32 bit version, try this if the normal command fails.

    VKBasalt [github.com] is a post processing layer for Vulkan which enables you to enhance graphics further. It only works with Vulkan, This includes all Proton games.

    If you are on Arch, it will be in the AUR, Just look for Basalt using your package manager.

    If you are on a different distro you need to manually build it.

    /.config/vkBasalt && cp /usr/share/vkBasalt/vkBasalt.conf.example

    You can tweak all the little things you want here. You can also create different configurations per game by adding a vkBasalt.conf file to the game directory.

    To use VKBasalt for any particular game enter this as a launch option.

    You can also start non Steam games this way by typing the following command

    GOverlay [github.com] is a Graphical User Interface for managing MangoHud and VKBasalt

    If you are on a Arch based distro you can find it in the AUR, just install it with your favorite package manager. You can also find it in your repos if you are on Fedora.

    If you are on a different Linux distro you can install it manually.

    First install Lazarus and git with your package manager, it should be in your repositories, and maybe it is already installed. I will list the installation method for Debian based systems, change the first command if you are on a different distro.

    xpad works great, is the default on modern Linux distros and supports a wide range of controllers, But if you are like me and you only Xbox One controllers then using xpadneo is much better.

    For Bluetooth to work with xpad and the Xbox One controllers you need to disable ertm (This is not needed for xpadneo)

    create the config file

    Add the following line to the document and save and exit with CTRL + X.

    xpadneo [atar-axis.github.io] supports Xbox One controllers wired and over bluetooth, It enables Force Feedback even the vibration inside the triggers, It supports battery level indication, It also fixes the mapping in many many games that where previously unplayable with a Xbox One controller on Linux.

    Your Linux distribution should now be optimized for gaming, Have fun 🙂

    If you have run into any problems, Have any suggestions or additions or you are missing your favorite distro, Please let me know, and i will do my best make this guide complete.

    Источник

    Оцените статью