fix(tui): fix GPU panel row showing AMD chipset devices, clear screen before TUI
isGPUDevice matched all AMD vendor PCIe devices (SATA, crypto coprocessors, PCIe dummies) because of a broad strings.Contains(vendor,"amd") check. Remove it — AMD Instinct/Radeon GPUs are caught by ProcessingAccelerator / DisplayController class. Also exclude ASPEED (BMC VGA adapter). Add clear before bee-tui to avoid dirty terminal output. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -814,12 +814,17 @@ func isGPUDevice(dev schema.HardwarePCIeDevice) bool {
|
|||||||
class := trimPtr(dev.DeviceClass)
|
class := trimPtr(dev.DeviceClass)
|
||||||
model := strings.ToLower(trimPtr(dev.Model))
|
model := strings.ToLower(trimPtr(dev.Model))
|
||||||
vendor := strings.ToLower(trimPtr(dev.Manufacturer))
|
vendor := strings.ToLower(trimPtr(dev.Manufacturer))
|
||||||
|
// Exclude ASPEED (BMC VGA adapter, not a compute GPU)
|
||||||
|
if strings.Contains(vendor, "aspeed") || strings.Contains(model, "aspeed") {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
// AMD Instinct / Radeon compute GPUs have class ProcessingAccelerator or DisplayController.
|
||||||
|
// Do NOT match by AMD vendor alone — chipset/CPU PCIe devices share that vendor.
|
||||||
return class == "VideoController" ||
|
return class == "VideoController" ||
|
||||||
class == "DisplayController" ||
|
class == "DisplayController" ||
|
||||||
class == "ProcessingAccelerator" ||
|
class == "ProcessingAccelerator" ||
|
||||||
strings.Contains(model, "nvidia") ||
|
strings.Contains(model, "nvidia") ||
|
||||||
strings.Contains(vendor, "nvidia") ||
|
strings.Contains(vendor, "nvidia")
|
||||||
strings.Contains(vendor, "amd")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func trimPtr(value *string) string {
|
func trimPtr(value *string) string {
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
clear
|
||||||
|
|
||||||
if [ "$(id -u)" -ne 0 ]; then
|
if [ "$(id -u)" -ne 0 ]; then
|
||||||
exec sudo -n /usr/local/bin/bee tui --runtime livecd "$@"
|
exec sudo -n /usr/local/bin/bee tui --runtime livecd "$@"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user