mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-12-22 23:16:29 +01:00
Fix AMD GPU firmware installation by adding non-free-firmware repository
- Add non-free-firmware repository for Debian before attempting to install firmware-amd-graphics - Support both Debian Bookworm (12) and Trixie (13)/Sid - Install firmware-amd-graphics for all AMD GPUs detected, not just APUs - Improve error handling with warning message if firmware installation fails Fixes #10177
This commit is contained in:
@ -2644,9 +2644,42 @@ function setup_hwaccel() {
|
||||
return 1
|
||||
}
|
||||
|
||||
# For AMD CPUs without discrete GPU (APUs)
|
||||
if [[ "$cpu_vendor" == "AuthenticAMD" && -n "$gpu_vendor" ]]; then
|
||||
$STD apt -y install libdrm-amdgpu1 firmware-amd-graphics || true
|
||||
# For AMD GPUs, firmware-amd-graphics is needed but requires non-free-firmware repository
|
||||
if [[ "$os_id" == "debian" ]]; then
|
||||
# Add non-free-firmware repository if not already present
|
||||
if [[ ! -f /etc/apt/sources.list.d/non-free-firmware.sources ]]; then
|
||||
if [[ "$os_codename" == "bookworm" ]]; then
|
||||
cat <<EOF >/etc/apt/sources.list.d/non-free-firmware.sources
|
||||
Types: deb
|
||||
URIs: http://deb.debian.org/debian
|
||||
Suites: bookworm bookworm-updates
|
||||
Components: non-free-firmware
|
||||
|
||||
Types: deb
|
||||
URIs: http://deb.debian.org/debian-security
|
||||
Suites: bookworm-security
|
||||
Components: non-free-firmware
|
||||
EOF
|
||||
elif [[ "$os_codename" == "trixie" || "$os_codename" == "sid" ]]; then
|
||||
cat <<EOF >/etc/apt/sources.list.d/non-free-firmware.sources
|
||||
Types: deb
|
||||
URIs: http://deb.debian.org/debian
|
||||
Suites: trixie trixie-updates
|
||||
Components: non-free-firmware
|
||||
|
||||
Types: deb
|
||||
URIs: http://deb.debian.org/debian-security
|
||||
Suites: trixie-security
|
||||
Components: non-free-firmware
|
||||
EOF
|
||||
fi
|
||||
$STD apt update
|
||||
fi
|
||||
|
||||
# Now install AMD firmware and libdrm
|
||||
$STD apt -y install libdrm-amdgpu1 firmware-amd-graphics || {
|
||||
msg_warn "Failed to install AMD firmware - may need manual installation"
|
||||
}
|
||||
fi
|
||||
;;
|
||||
NVIDIA)
|
||||
|
||||
Reference in New Issue
Block a user