From dce2be757198f0cf6be9abdbe0b80e0b8e1a8167 Mon Sep 17 00:00:00 2001 From: Tobias <96661824+CrazyWolf13@users.noreply.github.com> Date: Tue, 21 Oct 2025 11:45:46 +0200 Subject: [PATCH] fix: lspci --- misc/tools.func | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/misc/tools.func b/misc/tools.func index 84b23855..b5c17237 100644 --- a/misc/tools.func +++ b/misc/tools.func @@ -1818,6 +1818,14 @@ function setup_gs() { function setup_hwaccel () { msg_info "Setting Up Hardware Acceleration" + if ! command -v lspci &>/dev/null; then + msg_info "Installing pciutils (provides lspci)" + $STD apt -y update && $STD apt -y install pciutils || { + msg_error "Failed to install pciutils — cannot detect GPU" + return 1 + } + fi + # Detect GPU vendor (Intel, AMD, NVIDIA) local gpu_vendor gpu_vendor=$(lspci | grep -Ei 'vga|3d|display' | grep -Eo 'Intel|AMD|NVIDIA' | head -n1)