diff --git a/AppImage/components/hardware.tsx b/AppImage/components/hardware.tsx
index f60b25b..fab6d4b 100644
--- a/AppImage/components/hardware.tsx
+++ b/AppImage/components/hardware.tsx
@@ -16,7 +16,6 @@ import {
Cpu,
MemoryStick,
Cpu as Gpu,
- Info,
} from "lucide-react"
import useSWR from "swr"
import { useState } from "react"
@@ -249,7 +248,7 @@ export default function Hardware() {
-
+
{hardwareData.gpus.map((gpu, index) => (
{gpu.type}
- {gpu.driver_version && (
+ {gpu.slot && (
+
+ PCI Slot
+ {gpu.slot}
+
+ )}
+
+ {gpu.pci_driver && (
Driver
+ {gpu.pci_driver}
+
+ )}
+
+ {gpu.pci_kernel_module && (
+
+ Kernel Module
+ {gpu.pci_kernel_module}
+
+ )}
+
+ {gpu.driver_version && (
+
+ Driver Version
{gpu.driver_version}
)}
@@ -320,11 +340,6 @@ export default function Hardware() {
)}
-
-
-
- Click for detailed information
-
))}
@@ -357,6 +372,24 @@ export default function Hardware() {
PCI Slot
{selectedGPU.slot}
+ {selectedGPU.pci_class && (
+
+ Class
+ {selectedGPU.pci_class}
+
+ )}
+ {selectedGPU.pci_driver && (
+
+ Driver
+ {selectedGPU.pci_driver}
+
+ )}
+ {selectedGPU.pci_kernel_module && (
+
+ Kernel Module
+ {selectedGPU.pci_kernel_module}
+
+ )}
{selectedGPU.driver_version && (
Driver Version
diff --git a/AppImage/scripts/flask_server.py b/AppImage/scripts/flask_server.py
index 1fab3b7..41d3949 100644
--- a/AppImage/scripts/flask_server.py
+++ b/AppImage/scripts/flask_server.py
@@ -807,7 +807,7 @@ def get_smart_data(disk_name):
print(f"[v0] Extracted partial data from text output, continuing to next attempt...")
else:
print(f"[v0] No usable output (return code {result.returncode}), trying next command...")
-
+
except subprocess.TimeoutExpired:
print(f"[v0] Command timeout for attempt {cmd_index + 1}, trying next...")
continue
@@ -1665,6 +1665,22 @@ def get_detailed_gpu_info(gpu):
return detailed_info
+def get_pci_device_info(pci_slot):
+ """Get detailed PCI device information for a given slot"""
+ pci_info = {}
+ try:
+ # Use lspci -vmm for detailed information
+ result = subprocess.run(['lspci', '-vmm', '-s', pci_slot], capture_output=True, text=True, timeout=5)
+ if result.returncode == 0:
+ for line in result.stdout.split('\n'):
+ line = line.strip()
+ if ':' in line:
+ key, value = line.split(':', 1)
+ pci_info[key.strip().lower().replace(' ', '_')] = value.strip()
+ except Exception as e:
+ print(f"[v0] Error getting PCI device info for {pci_slot}: {e}")
+ return pci_info
+
def get_gpu_info():
"""Get GPU information from lspci and enrich with temperature/fan data from sensors"""
gpus = []
@@ -1696,6 +1712,12 @@ def get_gpu_info():
'type': 'Discrete' if vendor in ['NVIDIA', 'AMD'] else 'Integrated'
}
+ pci_info = get_pci_device_info(slot)
+ if pci_info:
+ gpu['pci_class'] = pci_info.get('class', '')
+ gpu['pci_driver'] = pci_info.get('driver', '')
+ gpu['pci_kernel_module'] = pci_info.get('kernel_module', '')
+
detailed_info = get_detailed_gpu_info(gpu)
gpu.update(detailed_info)
@@ -2639,3 +2661,4 @@ if __name__ == '__main__':
print("API endpoints available at: /api/system, /api/storage, /api/network, /api/vms, /api/logs, /api/health, /api/hardware")
app.run(host='0.0.0.0', port=8008, debug=False)
+, debug=False)
diff --git a/AppImage/types/hardware.ts b/AppImage/types/hardware.ts
index 808c60b..9df7a3f 100644
--- a/AppImage/types/hardware.ts
+++ b/AppImage/types/hardware.ts
@@ -89,6 +89,9 @@ export interface GPU {
name: string
vendor: string
type: string
+ pci_class?: string
+ pci_driver?: string
+ pci_kernel_module?: string
driver_version?: string
memory_total?: string
memory_used?: string