From 69aafd2a54a3458dab00f6cfe8a5ae0064067b57 Mon Sep 17 00:00:00 2001 From: Ilya Zlobintsev Date: Thu, 12 Nov 2020 14:44:32 +0200 Subject: [PATCH] Fixed GPU model detection --- daemon/src/gpu_controller.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/daemon/src/gpu_controller.rs b/daemon/src/gpu_controller.rs index 4c9be2a..de7d576 100644 --- a/daemon/src/gpu_controller.rs +++ b/daemon/src/gpu_controller.rs @@ -128,7 +128,7 @@ impl GpuController { &"PCI_ID" => { let ids = split.last().expect("failed to get split").split(':').collect::>(); vendor_id = ids.get(0).unwrap().to_string(); - model_id = ids.get(0).unwrap().to_string(); + model_id = ids.get(1).unwrap().to_string(); }, &"PCI_SUBSYS_ID" => { let ids = split.last().expect("failed to get split").split(':').collect::>(); @@ -160,6 +160,7 @@ impl GpuController { card_vendor_id.to_lowercase(), card_model_id.to_lowercase() ); + log::trace!("identifying {} \n {}", pci_id_line, card_ids_line); let lines: Vec<&str> = full_hwid_list.split('\n').collect();