diff --git a/lib/get_specs.py b/lib/get_specs.py index 3057f1c..8170d79 100644 --- a/lib/get_specs.py +++ b/lib/get_specs.py @@ -311,15 +311,17 @@ def get_gpu_info(): parts = line.split(',') if bool(re.match(r'^[0-9]+$', parts[0])): - gpu_name = parts[1] + gpu_name = parts[1].strip() + gpu_id = parts[5].strip(); print("parts") print(parts) - print("p1" + gpu_name) - if gpu_name == "NVIDIA Graphics Device" and parts[5] in GPU_ID_TO_NAME: - gpu_name = GPU_ID_TO_NAME[parts[5]] - print("p2" + gpu_name) + print("p1:" + gpu_name) + print("p1:" + gpu_id) + if gpu_name == "NVIDIA Graphics Device" and gpu_id in GPU_ID_TO_NAME: + gpu_name = GPU_ID_TO_NAME[gpu_id] + print("p2:" + gpu_name) - gpu_str = f"{len(lines)-1}x {gpu_name.strip()}" + gpu_str = f"{len(lines)-1}x {gpu_name}" print(gpu_str) gpu_mem = round(int(filter_non_numeric(parts[4]).strip())/1024, 2) except Exception as e: