Simplify the steam install so we don't need user intervention for drivers

This commit is contained in:
David Heinemeier Hansson
2026-05-03 15:58:32 +02:00
parent 37a073d8fb
commit dbefc1b850
4 changed files with 35 additions and 9 deletions
+6
View File
@@ -0,0 +1,6 @@
#!/bin/bash
# omarchy:summary=Detect whether the computer has an NVIDIA GPU with GSP firmware (Turing or newer).
# GTX 16xx, RTX 20xx-50xx, RTX Pro, Quadro RTX, datacenter A/H/T/L series.
lspci | grep -i 'nvidia' | grep -qE "GTX 16[0-9]{2}|RTX [2-5][0-9]{3}|RTX PRO [0-9]{4}|Quadro RTX|RTX A[0-9]{4}|A[1-9][0-9]{2}|H[1-9][0-9]{2}|T4|L[0-9]+"
+6
View File
@@ -0,0 +1,6 @@
#!/bin/bash
# omarchy:summary=Detect whether the computer has an NVIDIA GPU without GSP firmware (Maxwell/Pascal/Volta).
# GTX 9xx/10xx, GT 10xx, Quadro P/M/GV, MX series, Titan X/Xp/V, Tesla V100.
lspci | grep -i 'nvidia' | grep -qE "GTX (9[0-9]{2}|10[0-9]{2})|GT 10[0-9]{2}|Quadro [PM][0-9]{3,4}|Quadro GV100|MX *[0-9]+|Titan (X|Xp|V)|Tesla V100"
+20 -2
View File
@@ -5,6 +5,24 @@
set -e
echo "Now pick dependencies matching your graphics card"
sudo pacman -S steam
PACKAGES=(steam)
# Pick the lib32 vulkan provider matching detected GPU(s) so pacman doesn't prompt.
if omarchy-hw-nvidia-gsp; then
PACKAGES+=(lib32-nvidia-utils)
elif omarchy-hw-nvidia-without-gsp; then
PACKAGES+=(lib32-nvidia-580xx-utils)
fi
declare -A VULKAN_DRIVERS=(
[Intel]=lib32-vulkan-intel
[AMD]=lib32-vulkan-radeon
)
for vendor in "${!VULKAN_DRIVERS[@]}"; do
if lspci | grep -iE "(VGA|Display).*$vendor" >/dev/null; then
PACKAGES+=("${VULKAN_DRIVERS[$vendor]}")
fi
done
omarchy-pkg-add "${PACKAGES[@]}"
setsid gtk-launch steam >/dev/null 2>&1 &
+3 -7
View File
@@ -1,15 +1,11 @@
NVIDIA="$(lspci | grep -i 'nvidia')"
if [[ -n $NVIDIA ]]; then
if lspci | grep -qi 'nvidia'; then
# Check which kernel is installed and set appropriate headers package
KERNEL_HEADERS="$(pacman -Qqs '^linux(-zen|-lts|-hardened)?$' | head -1)-headers"
# Turing+ (GTX 16xx, RTX 20xx-50xx, RTX Pro, Quadro RTX, datacenter A/H/T/L series) have GSP firmware
if echo "$NVIDIA" | grep -qE "GTX 16[0-9]{2}|RTX [2-5][0-9]{3}|RTX PRO [0-9]{4}|Quadro RTX|RTX A[0-9]{4}|A[1-9][0-9]{2}|H[1-9][0-9]{2}|T4|L[0-9]+"; then
if omarchy-hw-nvidia-gsp; then
PACKAGES=(nvidia-open-dkms nvidia-utils lib32-nvidia-utils libva-nvidia-driver)
GPU_ARCH="turing_plus"
# Maxwell (GTX 9xx), Pascal (GT/GTX 10xx, Quadro P, MX series), Volta (Titan V, Tesla V100, Quadro GV100) lack GSP
elif echo "$NVIDIA" | grep -qE "GTX (9[0-9]{2}|10[0-9]{2})|GT 10[0-9]{2}|Quadro [PM][0-9]{3,4}|Quadro GV100|MX *[0-9]+|Titan (X|Xp|V)|Tesla V100"; then
elif omarchy-hw-nvidia-without-gsp; then
PACKAGES=(nvidia-580xx-dkms nvidia-580xx-utils lib32-nvidia-580xx-utils)
GPU_ARCH="maxwell_pascal_volta"
fi