5. GPUs Gaming - h8d13/k2-alpine GitHub Wiki
3D Graphics
Intro
$ lspci | grep "3D"
This should return your graphics card.
Nvidia
For Nvidia it will be a bit of a struggle (or straight up impossible, support dropped as of December 2024 for Musl, so we go to arch :1st_place_medal: ).
pacman -S nvidia nvidia-settings nvidia-prime mesa lib32-nvidia-utils vulkan-icd-loader lib32-vulkan-icd-loader nvidia-utils
If you went through archinstall and selected the drivers already you might only need: pacman -S nvidia-settings lib32-nvidia-utils
Reboot. Then nvidia-smi
to check.
Then you will need to prime-run x
Make sure to launch the NVIDIA settings app once at least.
I believe you can do more optimizations
export __GL_THREADED_OPTIMIZATIONS=1
export __GL_SYNC_TO_VBLANK=0
export __GL_SHADER_CACHE=1
Also disable compositor in KDE settings
At this point i like to do nvidia settings and steam settings and reboot one more time.
Steam
Add to launch command prime-run %command%
Also launch steam this way.
Or it will not use the nvidia GPU.
Also if steam itself is crashing on repeat at startup use stream --reset
In your steam settings > Downloads:
Shader pre-caching / Allow background Or it will take years to launch games.
Minecraft
I also like to do this with minecraft so that you can use f3 menu to see FPS and GPU being used. It's also a chunk technology so a great test for bad hardware.
pacman -S prismlauncher
You will need a mojang account.
700 fps on a card from 10 years ago :D
Worse yet if you have a Intel Integrated Graphics Card too, then you'll need to do more things.
First would be to force x11.
pacman -S xorg-server nvidia-xconfig
For more xorg info see: ArchXorg
To check if you did this right you can echo $XDG_SESSION_TYPE
The game under wayland might feel smooth for a bit but then will start burning :fire: I bet you can't wait to throw that card out the window and go red team. :red_circle:
Sounds oldschool too but don't forget reboots.... mkinitcpio -P this also happens after large updates, so you kind of know you have to restart. Some people even recommend to generate GRUB cfg at this point as it would add parameters there.
Another fix I found to often work is to force a different compatibility layer.
Check out the Spell Brigade on Steam :)
I also like to test on this game because there is a lot of things going on (100 things on the screen with animations, also in beta.)
AMD
For necessary Mesa drivers, you will need some more installs, details soon. But this section will be maybe 1/10th of size 🤣
KDE Specifics
For gaming you can disable your compositor simply going into settings > compositor and tick off enable at start up