Compare commits
20 Commits
Author | SHA256 | Date | |
---|---|---|---|
|
3443d8b347 | ||
|
cc0cacaa99 | ||
b0a8f86da2 | |||
|
0e929b5bff | ||
4de0dc36b2 | |||
89dbf8d30c | |||
a0c60847ce | |||
d32441b427 | |||
9fc5cee966 | |||
51909fa039 | |||
5a9c72e605 | |||
88f28b46b9 | |||
9b9aa5accf | |||
7161d37978 | |||
1700946adb | |||
06c1a96ddd | |||
0a31753bba | |||
5f1bd139d2 | |||
cf996aa449 | |||
796289d1bb |
@ -1,33 +0,0 @@
|
||||
diff --git a/src/pci_device.rs b/src/pci_device.rs
|
||||
index ef15d03..5645d9e 100644
|
||||
--- a/src/pci_device.rs
|
||||
+++ b/src/pci_device.rs
|
||||
@@ -317,18 +317,21 @@ impl Device {
|
||||
// Assume all Nvidia GPUs are dGPU
|
||||
class.starts_with("30") && (boot_vga == "0" || id.starts_with("10DE"))
|
||||
} else if id.starts_with("1002") {
|
||||
- debug!("Found AMD GPU {id} without boot_vga attribute at {:?}", device.sysname());
|
||||
-
|
||||
+ debug!("Found AMD Device {id} without boot_vga attribute at {:?}", device.sysname());
|
||||
// Sometimes AMD iGPU doesn't get a boot_vga attribute even in Hybrid mode
|
||||
// Fallback to the following method for telling iGPU apart from dGPU:
|
||||
// https://github.com/fastfetch-cli/fastfetch/blob/fed2c87f67de43e3672d1a4a7767d59e7ff22ba2/src/detection/gpu/gpu_linux.c#L148
|
||||
let mut dev_path = PathBuf::from(device.syspath());
|
||||
dev_path.push("hwmon");
|
||||
-
|
||||
- let hwmon_n_opt = dev_path.read_dir().map_err(
|
||||
- |e| GfxError::from_io(e, dev_path)
|
||||
- )?.next();
|
||||
-
|
||||
+
|
||||
+ let hwmon_n_opt = match dev_path.read_dir() {
|
||||
+ Ok(mut entries) => {
|
||||
+ entries.next()
|
||||
+ }
|
||||
+ Err(_e) => {
|
||||
+ None // Continue with the assumption it's not a dGPU
|
||||
+ }
|
||||
+ };
|
||||
match hwmon_n_opt {
|
||||
Some(hwmon_n_result) => {
|
||||
let mut hwmon_n = hwmon_n_result?.path();
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:300c5ca2f0449ea65ed3d9d4ce8e6933971c96a80a2949928c4834bfbba3480e
|
||||
size 224267
|
Loading…
x
Reference in New Issue
Block a user