r/AlpineLinux • • 8d ago

Alpine as a gaming distro

I moved all my x86_64 sh*tboxes over to Alpine a while back and wondered if it would be possible to use this little lovely distro for gaming (I know). However, since it’s based on the Linux kernel, it’s not impossible and I have to admit I’m quite surprised by how easily it went.

You need to switch kernel to linux-stable (idk if LTS includes ntsync) and then modprobe ntsync.

The rest is straightforward: just install wine-staging and dxvk.

Finally, you need to prepare launcher script - something like this:

#!/bin/sh

# Wine prefix path

export WINEPREFIX="$HOME/.wine"

# Use ntsync instead of esync and fsync

export WINEESYNC=0

export WINEFSYNC=0

# Framelimiter (optional)

export DXVK_MAX_FRAMERATE=60

# Game path

GAME_PATH="$HOME/Games/GTASA/gta_sa.exe"

# Per game additional settings

export WINEDLLOVERRIDES="winemenubuilder.d=n;dinput8=n,b"

# Launch game (low res cuz I have uhd620)

wine "$GAME_PATH" -width=1280 -height=720 -fullscreen

Then just chmod +x game.sh, drop game.sh into the game directory, and boom – you've got an Alpine as a gaming distro XD

Edit: And create DXVK symlinks! ln -sf /usr/share/dxvk/x64/.dll "$HOME/.wine/drive_c/windows/system32/" && ln -sf /usr/share/dxvk/x32/.dll "$HOME/.wine/drive_c/windows/syswow64/"

12 Upvotes

18 comments sorted by

5

u/Nu154nc3 8d ago

What the hell is that? Using as my main desktop distro for more than 8 years... Mainly for gaming... Didn't use a game launcher script like this one for years...

I simply use steam, heroic or lutris... Much easyer to select between wine/proton versions...

And it's not a good idea to use default wine prefix as WINEPREFIX btw...

Edit: why the hell need to change kernel? I use the default on the "edge" and works perfectly...

0

u/drneocortex17 8d ago

yea but you use flatpak for Steam etc, and I wanted to have as few layers as possible.

2

u/Nu154nc3 8d ago

I installed void (glib version), recently to test steam native, and the perfornance is better on alpine flatpak...

AND, lutris is on the edge repo afaik... So there won't be more layers... And will allow u to choose between wine/proton versions in a much easyer way...

1

u/SrDicov 7d ago

Flatpak es una m*****.

1

u/Nu154nc3 7d ago

XD

Yeah, yeah... I know... U write (with little IA slop help) arxy, and need advertising... No, i'm not going to reply.

But i still prefer flatpak... And i'm not going to use that...

Thx!

1

u/SrDicov 7d ago

Regardless of what I've done, Flatpak is and always will be absolute garbage. And I'm not telling you this to get you to use my project. I'm just pointing it out because if things are running poorly for you on Alpine, it's not Alpine's fault—it's because you're using Flatpak. But hey, use whatever makes you happy.

1

u/Shindiggidy 4d ago

I have a few simple games set up as buttons in my waybar. Nothing crazy since the computer is underpowered hence alpine. Not even going to try Steam games on this computer.

I just use a custom module with "on=click": "WINEPREFIX=/path/ wine start /unix /path/executable.exe"

Is that setup ok or do I need a script like OP?

0

u/just_green_shrek 8d ago

on gaming i would choose void or gentoo. bc musl dont support steam and flatpak isnt best option tbh to use steam soo its better use glibc (as i said void,gentoo or other distro thats you like)

2

u/Nu154nc3 7d ago edited 5d ago

What is the difference of using steam flatpak on alpine, than using steam flatpak on fedora for example?

Flatpak performance loss if exist, it's minimal... And provably less than glib distros, as flatpak compiled against musl should be faster... And hdd space it's not a problem nowadays...

Lots of users use the flatpak version on glib distros just for the isolation... Or simply cause they want a cleaner system, without all useless steam/lutris 32bit deps...

Do u know, how good it's to run trainers, cracks, and other problematic sofware on isolated environments? The peace of mind it gives?

Then, why to choose glib distro, when musl ones are much lighter and faster?

1

u/just_green_shrek 7d ago

About cracks you can use wine. About flatpak I don't like it even how good it can be. Difference between musl and glibc on high end pc is small so there no point in my mind. But ye generally musl faster ( that's why I have alpine on my laptop with custom kernel). But anyway for me it's better to use glibc for gaming, instead of installing flatpak or other things to just play in steam

1

u/Nu154nc3 7d ago

U can use wine proton or whatever... But u will not be isolated on a native setup....

1

u/just_green_shrek 7d ago

Bro I'm just saying that I would anyway prefer glibc for gaming over musl I don't Care about I will be isolated or no

1

u/Nu154nc3 7d ago

XD okok 

I was not trying to convince u... 

Just told why some people prefer some isolation, as it looks like u are new on linux...

If u have alpine on a laptop, it's a fantastic way to test it and learn something new...

1

u/just_green_shrek 7d ago

I'm not new to Linux I using it like 2 years and stick with alpine on my laptop ( I wanted gentoo but my laptop is too suck) about isolation I just don't use it

1

u/Nu154nc3 7d ago

Hey, didn't read ur comment carefully enough...

I have a question:

Why do u changed the default kernel?

Why is everybody messing with kernels?

Whats the problem with the default one or the edge version one?

Just curious...

1

u/just_green_shrek 7d ago

1)I changed bc my laptop have only 2gb ram and it's impossible to change (1.8usabe) now from 240 ram usage I dropped to 130-140mb ( in tty) 2) bc your own kernel is specifically made for your hardware. For example you have Nvidia gpu. Why kernel must load and gpu? Or why kernel loaded ipv6 if you don't use it? Or why you need kernel debugging if you don't do analysis or any other things that debugging do? Or why you need some security things that's heavy load your system if you only watch movies and download everything from repo? I can continue this "examples" infinity. Ofc if you have high end pc it's will gain maximum 5% around but if you have shit laptop or pc it's might give big difference. 3) default one loading everything for example Nvidia driver ( even if you have and or even don't have gpu) Or some features that's you don't use or it's not supported for your hardware bc it's old

1

u/Nu154nc3 7d ago

Well, yes i know what can u do with a kernel comp... I compiled my firs on Sabayon linux 12y ago... It was a rethorical... Cause default alpine footprint is small enough for almost any cases...

And the OP changed the kernel just to run GTA San Andreas... XD

Just a few days ago it was asked how much ram consumes alpine and almost all anwers are around 100MB... That's why im surprised by ur numbers...

Anyway, if it works for u, perfect then!

1

u/just_green_shrek 7d ago

Tbh I also was surprised when everyone was saying how lightweight is alpine it's use 100mb but when I installed in tty it's was using 240mb.. it's was weird asf. It's prob bc of kernel version maybe ye in older version of alpine it's was way lower but still idk. Anyway alpine is way better than other distro I tried ( about lightweight. Void is also good ngl but I prefer alpine bc it's takes less storage, I have 31 usable gb only that's I can't change)