Arch Linux for Gaming (or anything else)
Back to arch-linux.
My prefered distro, Slackware, is a tough system for gaming. I’ve done it, but it’s way off the beaten path. Some of my trials and tribulations here.
So after some brief consideration, I picked Arch for Linux gaming.
This web page (card) exists to capture my install notes. I did it twice (my existing EFI partition was too small the first time), which allowed me to do it more cleanly the second time and avoid some wrong turns.
The Arch Linux Wiki is rightly famous for being one of the greatest Linux documentation resources and the installation guide is no exception. I followed it and won’t duplicate it all on this page:
Arch Linux installation guide (archlinux.org)
But I will put my notes in roughly the same order as the guide.
Format the partitions
I used cfdisk
, the TUI "graphical" tool for partitioning because
it was available and it’s what I’m used to from installing Slackware.
My layout:
/dev/sda1 4Gb EFI /dev/sda2 16Gb Swap /dev/sda3 (remainder) root
My problem on my first installation was having a more "normal" EFI partition size of 100Mb! But Arch follows another convention that puts all boot data on the EFI partition, so it needs to be much larger. 1Gb should do it, but I wasn’t messing around this time.
Mount the file systems
After a lot of reading (in the Arch wiki, linked from the install guide above),
I decided to go with the EFI partition mount point /boot
for convenience
Arch is expecting this by default, so everything will "just work" after an
install and upgrade.
mount -m /dev/sda1 /mnt/boot swapon /dev/sda2 mount /dev/sda3 /mnt
/mnt
is the mount point for the new installation from the installation,
so /mnt
will be /
in the installed file system
(and /mnt/boot
will be /boot
).
(Also, -m
creates the directory for a mount point as needed.)
Install essential packages
I added some basics along with the kernel:
pacstrap -K /mnt base linux linux-firmware vim openssh man-db man-pages
Boot loader
This is the last piece of the partition and mounting puzzle above.
If you choose to mount a large (1Gb or greater) EFI partition
at mount point /boot
, this part will be very easy.
I chose GRUB as the path of least resistance:
pacman -S grub efibootmgr grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB grub-mkconfig -o /boot/grub/grub.cfg
I rebooted into my new installation at this point to test it.
Network configuration
I made some wrong turns here, but ultimately went with the systemd services (shudder) because they were already installed and that’s what the installation media uses.
Otherwise, you’ll need to install any needed packages before rebooting into the new system or you’ll have a chicken-and-egg problem of trying to get packages over the network without a network connection.
I got the device name enp3s0
from ip link
:
cat /etc/systemd/network/20-wired.network [Match] Name=enp3s0 [Network] DHCP=yes
And enable and start the network link and domain resolution service with:
systemctl enable systemd-networkd --now systemctl enable systemd-resolved --now
I knew I was good when I could ping external domains.
This is the end of the Arch Installation Guide. It’s a working system that boots into the Linux console terminal and has networking.
Update: And I later enabled sshd with:
systemctl enable sshd.service --now
Xorg
To get X Windows working, I followed the instructions: Xorg on the Arch wiki (archlinux.org).
There are a billion options for window management under Xorg and Arch pretty much has them all.
I usually run the hardcore tiling window manager, dwm
, straight from startx
on my Slackware machines, but I figured I’d use a more mainstream desktop
environment in the form of Xfce (I already use many of the Xfce utilities such
as the Thunar file manager and the Xfce terminal.) I love how lightweight and
familiar Xfce is. It’s a really easy choice when I don’t think a tiling WM is
the way to go.
Finally, I chose LXDM as the display manager for a graphical login.
The package list here includes drivers for my AMD Radeon GPU:
pacman -S xorg xf86-video-amdgpu mesa vulkan-radeon xfce4 lxdm
To get LXDM to start Xfce after logging in:
cat /etc/lxdm/lxdm.conf ... session=/usr/bin/startxfce4 ...
And enable the LXDM service to make it show up on start:
systemctl enable lxdm
Then reboot…Nice, I’m in X!
One of the first things I noticed was that my $PATH
wasn’t
set upon login. The reason is that graphical logins such as that provided
by LXDM don’t source .bash_profile
by default because the "POSIX shell"
is used instead and there’s no guarantee that any Bash-isms will work.
So I learned that a good practice is to put anything you always want to
run when you login into .profile
and then put source .profile
in
.bash_profile
, which will contain everything else you’d want to run
in a Bash login shell (if any).
(It’s probably not super clear from the above paragraph, so I’ll state
it plainly: LXDM runs $HOME/.profile
after you login!)
The next thing I installed was Firefox.
Audio (ALSA)
Audio has always "just worked" out of the box with Slackware, so I had no idea where to even begin with Arch when nothing came out of my speakers.
I screwed around with installing Pulseaudio and other horrors, but it turned out that I just needed to set the default "card" and unmute it (muted by default) with Linux’s own ALSA drivers/libraries.
For me, that was:
cat /etc/asound.conf defaults.pcm.card 1 defaults.ctl.card 1
To make the changes to the /etc/asound.conf
file apply, just
re-run (or re-start) whatever application you’re using to play
sound and it should be using the new settings. There is no need
to restart a service or anything.
Also install the alsa-utils library to unmute the master channel:
pacman -S alsa-utils alsamixer
The alsamixer settings will be kept between restarts, so this should be a permanent fix.
ALSA volume control
(Update 2025-08-23: See my Xfce card for notes on controling audio volume with the keyboard media keys!)
On this particular machine, I find myself wanting to change audio volume frequently in software. (Part of the reason is that the otherwise excellent inexpensive Logitech Z313 speaker system I’ve got has an absolutely terrible volume control - it doesn’t control the headphone volume, the wheel is a cheap little thing on the side of the control unit, and changing the volume makes scratchy sounds and cuts out when it’s in a "bad" position, so you have to keep searching for a "good spot".)
Anyway, the point is, opening up alsamixer
in a terminal to control
volume is fine for an adjustment once a month or whatever. But for frequent
changes, I really want a system tray control.
Sadly, xfce4-mixer
is no longer an option. (I did try it, but it just hangs
and Internet lore says that it’s not gonna work until somebody adopts it and
gives it some love. Something upstream, I guess.)
Thankfully, there are other ALSA sound mixers. PNMixer works for me and is in the AUR:
(See my notes on installing AUR packages on my arch-pacman-cheatsheet page.)
In Xfce’s "main" panel, navigate to Applications > Settings > Session and Startup, then go to the Application Autostart tab and click the Add button. I entered the following:
-
Name: PNMixer
-
Description: ALSA audio control
-
Command: pnmixer
-
Trigger: on login
Then I restarted and, bam, there’s PNMixer in the system tray.
When you click on the speaker icon, it opens up and you can either drag a slider, use your mouse scroll wheel, or the up/down arrow keys on your keyboard to adjust volume. Yay!
Steam and multilib
I love the fact that Valve has put so much work into Proton and is one of the few industry forces making mainstream games available to non-Windows platforms. I remember being very skeptical of Steam when it was first announced - I did not want to give up physical ownership of my games. But Valve has earned my trust.
Okay, now the entire point of this arch install and why I’m switching from Slackware on this machine…games!
Steam and many games are still 32-bit for…uh, reasons that I don’t want to talk about. So we need "multilib" packages to provide 32-bit libraries for these applications.
I followed the instructions on the wiki:
Steam on the Arch wiki (archlinux.org)
Basically, you uncomment the multilib repo in /etc/pacman.conf
to enable it, then do an upgrade with pacman -Syu
to make the
packages visible to a search. Now you’re ready to install Steam
and dependencies (pacman -S steam
- and pick the correct 32-bit
GPU stuff, lib32-vulkan-radeon
in my case).
Again, the wiki page above has the whole list of things to install
and do, including some other 32-bit packages and a "stub mode" for
systemd-resolved
(you make a symlink, I have no idea why, but
it worked…)
And after all of the above, I was able to play most games through Steam/Proton.
(I currently don’t have sound in some "Windows-only" games, but I’m hoping that will be an easy enough fix. I’ll try to update here when I get it figured out.)
A Proton plus ALSA sound fix
I didn’t have sound with certain games (I’m pretty sure they were all Windows games using Proton, but I didn’t check very carefully).
It turns out that Proton won’t read the ALSA configuration from
/etc/
(maybe it’s sandboxed?). But it will read the ALSA sound config
from your home directory.
The sound fix was as easy as:
cp /etc/asound.conf ~/.asoundrc
The remaining games immediately had sound and after restarting, Steam game trailer videos in the store had sound too (a lack of which did not bother me enough to investigate on its own).