mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
Fix NVIDIA environment variables for Maxwell/Pascal/Volta GPUs
Maxwell, Pascal, and Volta GPUs lack GSP (GPU System Processor) firmware required by NVD_BACKEND=direct. Applying direct backend unconditionally causes Aquamarine v3.3.0+ to fail with "Unknown-1" displays and blank screens. Changes: - Add GPU generation detection (Turing+ vs Maxwell/Pascal/Volta) - Turing+ (RTX 20xx+, GTX 16xx): NVD_BACKEND=direct + LIBVA_DRIVER_NAME=nvidia - Maxwell/Pascal/Volta: NVD_BACKEND=egl only (no GSP support) - Both generations: __GLX_VENDOR_LIBRARY_NAME=nvidia (universal) Regex improvements: - Fix Turing+ detection (was using Maxwell/Pascal pattern) - GT series: GT 1030 now properly detected (was missed) - Quadro: P/M series only (exclude Kepler K-series) - Volta: Titan V, Tesla V100, Quadro GV100 - Modern datacenter: A100, H100, T4, L-series - MX series: Fixed to match MX150/250/450 (was only MX1-9) Migration script (1770159912.sh) fixes existing broken installations by: - Detecting legacy NVIDIA GPUs on existing systems - Rewriting incompatible NVD_BACKEND=direct entries to egl - Creating automatic backups before modification Testing: Validated against GT 1030, GTX 960/1080, Quadro P620 (legacy egl backend) and GTX 1650, RTX 3080 (modern direct backend). Preserves existing Turing+ behavior exactly. No impact on non-NVIDIA systems. Fixes hyprwm/Hyprland#7001 Fixes hyprwm/Hyprland#8519 Fixes hyprwm/Hyprland#6343 Fixes hyprwm/Hyprland#7812
This commit is contained in:
@@ -4,12 +4,14 @@ if [ -n "$NVIDIA" ]; then
|
||||
# Check which kernel is installed and set appropriate headers package
|
||||
KERNEL_HEADERS="$(pacman -Qqs '^linux(-zen|-lts|-hardened)?$' | head -1)-headers"
|
||||
|
||||
if echo "$NVIDIA" | grep -qE "RTX [2-9][0-9]|GTX 16"; then
|
||||
# Turing (16xx, 20xx), Ampere (30xx), Ada (40xx), and newer recommend the open-source kernel modules
|
||||
# Turing+ (GTX 16xx, RTX 20xx-50xx, 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}|Quadro RTX|RTX A[0-9]{4}|A[1-9][0-9]{2}|H[1-9][0-9]{2}|T4|L[0-9]+"; then
|
||||
PACKAGES=(nvidia-open-dkms nvidia-utils lib32-nvidia-utils libva-nvidia-driver)
|
||||
elif echo "$NVIDIA" | grep -qE "GTX 9|GTX 10|Quadro P|MX1|MX2|MX3"; then
|
||||
# Pascal (10xx, Quadro Pxxx, MX150, MX2xx, and MX3xx) and Maxwell (9xx, MX110, and MX130) use legacy branch that can only be installed from AUR
|
||||
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
|
||||
PACKAGES=(nvidia-580xx-dkms nvidia-580xx-utils lib32-nvidia-580xx-utils)
|
||||
GPU_ARCH="maxwell_pascal_volta"
|
||||
fi
|
||||
# Bail if no supported GPU
|
||||
if [ -z "${PACKAGES+x}" ]; then
|
||||
@@ -29,12 +31,23 @@ EOF
|
||||
MODULES+=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)
|
||||
EOF
|
||||
|
||||
# Add NVIDIA environment variables
|
||||
cat >>$HOME/.config/hypr/envs.conf <<'EOF'
|
||||
# Add NVIDIA environment variables based on GPU architecture
|
||||
if [ "$GPU_ARCH" = "turing_plus" ]; then
|
||||
# Turing+ (RTX 20xx, GTX 16xx, and newer) with GSP firmware support
|
||||
cat >>$HOME/.config/hypr/envs.conf <<'EOF'
|
||||
|
||||
# NVIDIA
|
||||
# NVIDIA (Turing+ with GSP firmware)
|
||||
env = NVD_BACKEND,direct
|
||||
env = LIBVA_DRIVER_NAME,nvidia
|
||||
env = __GLX_VENDOR_LIBRARY_NAME,nvidia
|
||||
EOF
|
||||
elif [ "$GPU_ARCH" = "maxwell_pascal_volta" ]; then
|
||||
# Maxwell/Pascal/Volta (GTX 9xx/10xx, GT 10xx, Quadro P/M/GV, MX series, Titan X/Xp/V) lack GSP firmware
|
||||
cat >>$HOME/.config/hypr/envs.conf <<'EOF'
|
||||
|
||||
# NVIDIA (Maxwell/Pascal/Volta without GSP firmware)
|
||||
env = NVD_BACKEND,egl
|
||||
env = __GLX_VENDOR_LIBRARY_NAME,nvidia
|
||||
EOF
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user