Skip to content

Commit baa41e4

Browse files
committed
Add Trixie backports to GPU drivers (more recent)
1 parent 157b661 commit baa41e4

File tree

2 files changed

+38
-24
lines changed

2 files changed

+38
-24
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
deb http://deb.debian.org/debian trixie-backports main contrib non-free non-free-firmware
2+

Trixie/config/includes.chroot/etc/skel/Desktop/Install-GPU-Drivers.sh

Lines changed: 36 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
set -e
33

4-
echo "=== GPU Auto-Installer for TriOs 13 (Bepis) ==="
4+
echo "=== GPU Auto-Installer for TriOS 13 (Bepis) ==="
55
echo
66
echo "WARNING: This script installs and configures GPU drivers."
77
echo "USE ONLY on a fully installed TriOs system (not a live session)."
@@ -16,12 +16,29 @@ if [ "$EUID" -ne 0 ]; then
1616
fi
1717

1818
echo
19-
echo "=== Preparing system and enabling 32-bit architecture ==="
19+
echo "=== Preparing system ==="
2020
echo
2121

22-
dpkg --add-architecture i386
2322
apt-get update -y
2423

24+
# ─── Enable Trixie Backports (if available) ───────────────────
25+
if ! grep -Rq "trixie-backports" /etc/apt/sources.list*; then
26+
echo "[*] Adding Debian Trixie Backports repository..."
27+
echo "deb http://deb.debian.org/debian trixie-backports main contrib non-free non-free-firmware" \
28+
> /etc/apt/sources.list.d/backports.list
29+
fi
30+
31+
apt-get update -y
32+
33+
# Detect if backports is actually available
34+
if apt-cache policy | grep -q "trixie-backports"; then
35+
_apt_target="trixie-backports"
36+
echo "[*] Using packages from Trixie Backports when available."
37+
else
38+
_apt_target="stable"
39+
echo "[!] Backports not detected; using stable repositories only."
40+
fi
41+
2542
# ─── Install basic dependencies ──────────────────────────────
2643
apt-get install -y --no-install-recommends \
2744
pciutils \
@@ -30,7 +47,7 @@ apt-get install -y --no-install-recommends \
3047
ubuntu-drivers-common || true
3148

3249
# ─── Install general graphics tools and firmware ─────────────
33-
apt-get install -y --no-install-recommends \
50+
apt-get install -y -t "$_apt_target" --no-install-recommends \
3451
xserver-xorg-video-all \
3552
mesa-utils \
3653
mesa-vulkan-drivers \
@@ -45,7 +62,9 @@ apt-get install -y --no-install-recommends \
4562
vdpau-driver-all
4663

4764
# ─── 32-bit (Steam) driver support ───────────────────────────
48-
apt-get install -y --no-install-recommends \
65+
dpkg --add-architecture i386
66+
apt-get update -y
67+
apt-get install -y -t "$_apt_target" --no-install-recommends \
4968
libgl1:i386 \
5069
libglx-mesa0:i386 \
5170
libglu1-mesa:i386 \
@@ -73,50 +92,43 @@ if echo "$GPU_INFO" | grep -qi nvidia; then
7392
fi
7493
if [ -n "$_driver" ]; then
7594
echo "[*] Installing recommended NVIDIA driver: $_driver"
76-
apt-get install -y "$_driver"
95+
apt-get install -y -t "$_apt_target" "$_driver"
7796
else
7897
echo "[!] Could not auto-detect recommended NVIDIA driver."
79-
echo " Installing fallback: nvidia-driver (latest stable)."
80-
apt-get install -y nvidia-driver
98+
echo " Installing fallback: nvidia-driver (latest available)."
99+
apt-get install -y -t "$_apt_target" nvidia-driver
81100
fi
82101

83-
apt-get install -y nvidia-settings nvidia-prime
84-
102+
apt-get install -y -t "$_apt_target" nvidia-settings nvidia-prime
85103
echo "[*] Installing 32-bit NVIDIA libraries for Steam..."
86-
apt-get install -y libnvidia-gl:i386 libnvidia-egl-gbm1:i386 || true
104+
apt-get install -y -t "$_apt_target" libnvidia-gl:i386 libnvidia-egl-gbm1:i386 || true
87105
fi
88106

89107
# ─── AMD ─────────────────────────────────────────────────────
90108
if echo "$GPU_INFO" | grep -qi amd; then
91109
echo "[*] AMD GPU detected — installing open drivers..."
92-
apt-get install -y xserver-xorg-video-amdgpu
110+
apt-get install -y -t "$_apt_target" xserver-xorg-video-amdgpu
93111
echo "[*] Installing Vulkan and OpenCL support..."
94-
apt-get install -y mesa-vulkan-drivers mesa-opencl-icd clinfo
112+
apt-get install -y -t "$_apt_target" mesa-vulkan-drivers mesa-opencl-icd clinfo
95113
echo "[*] Installing 32-bit AMD/mesa Vulkan support..."
96-
apt-get install -y mesa-vulkan-drivers:i386 mesa-opencl-icd:i386
114+
apt-get install -y -t "$_apt_target" mesa-vulkan-drivers:i386 mesa-opencl-icd:i386
97115
fi
98116

99117
# ─── Intel ───────────────────────────────────────────────────
100118
if echo "$GPU_INFO" | grep -qi intel; then
101119
echo "[*] Intel GPU detected — installing open drivers..."
102-
apt-get install -y xserver-xorg-video-intel
120+
apt-get install -y -t "$_apt_target" xserver-xorg-video-intel
103121
echo "[*] Installing VA-API and Vulkan support..."
104-
apt-get install -y intel-media-va-driver-non-free libvulkan1 mesa-vulkan-drivers
122+
apt-get install -y -t "$_apt_target" intel-media-va-driver-non-free libvulkan1 mesa-vulkan-drivers
105123
echo "[*] Installing 32-bit Intel Vulkan drivers..."
106-
apt-get install -y mesa-vulkan-drivers:i386 libvulkan1:i386
124+
apt-get install -y -t "$_apt_target" mesa-vulkan-drivers:i386 libvulkan1:i386
107125
fi
108126

109127
# ─── Hybrid (NVIDIA + Intel/AMD) ─────────────────────────────
110128
if echo "$GPU_INFO" | grep -qi nvidia && echo "$GPU_INFO" | grep -Eqi 'amd|intel'; then
111129
echo "[*] Hybrid GPU setup detected (NVIDIA + Intel/AMD)."
112130
echo "[*] Installing PRIME and switch utilities..."
113-
apt-get install -y nvidia-prime bbswitch-dkms
114-
fi
115-
116-
# ─── Steam optional (auto-install) ───────────────────────────
117-
if ! command -v steam >/dev/null 2>&1; then
118-
echo "[*] Steam not found. Installing it from Debian repos..."
119-
apt-get install -y steam-installer
131+
apt-get install -y -t "$_apt_target" nvidia-prime bbswitch-dkms
120132
fi
121133

122134
# ─── Cleanup ─────────────────────────────────────────────────

0 commit comments

Comments
 (0)