-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall_gpu_drivers.sh
More file actions
executable file
·35 lines (29 loc) · 947 Bytes
/
Copy pathinstall_gpu_drivers.sh
File metadata and controls
executable file
·35 lines (29 loc) · 947 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
echo "--- Starting GPU Driver Installation ---"
install_nvidia_drivers() {
echo "Installing NVIDIA drivers..."
sudo pacman -S --noconfirm --needed nvidia nvidia-utils
echo "NVIDIA drivers installed."
}
install_amd_drivers() {
echo "Installing AMD drivers..."
sudo pacman -S --noconfirm --needed mesa xf86-video-amdgpu
echo "AMD drivers installed."
}
install_intel_drivers() {
echo "Installing Intel drivers..."
sudo pacman -S --noconfirm --needed mesa xf86-video-intel
echo "Intel drivers installed."
}
# Check for GPU and install appropriate drivers
if lspci | grep -qi "nvidia"; then
install_nvidia_drivers
elif lspci | grep -qi "amd"; then
install_amd_drivers
elif lspci | grep -qi "intel"; then
install_intel_drivers
else
echo "No dedicated GPU detected. Using Mesa defaults."
sudo pacman -S --noconfirm --needed mesa
fi
echo "--- GPU Driver Installation Complete ---"