From 71ab1625764b6b07c602bd7a92367fc7a44c88b3 Mon Sep 17 00:00:00 2001 From: nekohepott Date: Wed, 17 Jun 2026 04:16:26 +0300 Subject: [PATCH] fix for false gpu detection --- main.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index 6643521..7a905eb 100644 --- a/main.go +++ b/main.go @@ -230,13 +230,11 @@ func getCpu() string { } } - cpu = fmt.Sprintf(cpu) - cpu = strings.TrimSpace(cpu) - return cpu + return strings.TrimSpace(cpu) } func getGpu() string { - out, err := exec.Command("sh", "-c", "lspci -mm | grep -E 'VGA|3D'").Output() + out, err := exec.Command("sh", "-c", `lspci -mm | awk -F'"' '$2=="VGA compatible controller" || $2=="3D controller" || $2=="Display controller"'`).Output() if err != nil || len(out) == 0 { return "Unknown GPU" }