From 8c4fe2378131e0249adbb8bd15cf3c8c3ca3ac2b Mon Sep 17 00:00:00 2001 From: Matthew Schwartz Date: Thu, 29 May 2025 12:25:32 -0700 Subject: [PATCH 1/3] hardware: Detect ZOTAC Gaming Zone (Strix Point) --- src/hardware.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hardware.rs b/src/hardware.rs index 0108f4f..d851d05 100644 --- a/src/hardware.rs +++ b/src/hardware.rs @@ -89,7 +89,7 @@ pub(crate) async fn device_variant() -> Result<(DeviceType, String)> { (DeviceType::LegionGoS, product_name.to_string()) } ("Valve", _, "Jupiter" | "Galileo") => (DeviceType::SteamDeck, board_name.to_string()), - ("ZOTAC", _, "G0A1W") => (DeviceType::ZotacGamingZone, board_name.to_string()), + ("ZOTAC", _, "G0A1W" | "G1A1W") => (DeviceType::ZotacGamingZone, board_name.to_string()), _ => (DeviceType::Unknown, String::from("unknown")), }) } From ff08d33cc8895d7fd4f19a34ae41ac8e1dd62755 Mon Sep 17 00:00:00 2001 From: Matthew Schwartz Date: Thu, 29 May 2025 12:28:55 -0700 Subject: [PATCH 2/3] hardware: Add ZOTAC Gaming Zone to board_lookup test --- src/hardware.rs | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/src/hardware.rs b/src/hardware.rs index d851d05..0ffc691 100644 --- a/src/hardware.rs +++ b/src/hardware.rs @@ -364,6 +364,48 @@ pub mod test { device_variant().await.unwrap(), (DeviceType::Unknown, String::from("unknown")) ); + + write(crate::path(SYS_VENDOR_PATH), "ZOTAC\n") + .await + .expect("write"); + write(crate::path(BOARD_NAME_PATH), "INVALID\n") + .await + .expect("write"); + write(crate::path(PRODUCT_NAME_PATH), "INVALID\n") + .await + .expect("write"); + assert_eq!( + steam_deck_variant().await.unwrap(), + SteamDeckVariant::Unknown + ); + assert_eq!( + device_variant().await.unwrap(), + (DeviceType::Unknown, String::from("unknown")) + ); + + write(crate::path(BOARD_NAME_PATH), "G0A1W\n") + .await + .expect("write"); + assert_eq!( + steam_deck_variant().await.unwrap(), + SteamDeckVariant::Unknown + ); + assert_eq!( + device_variant().await.unwrap(), + (DeviceType::ZotacGamingZone, String::from("G0A1W")) + ); + + write(crate::path(BOARD_NAME_PATH), "G1A1W\n") + .await + .expect("write"); + assert_eq!( + steam_deck_variant().await.unwrap(), + SteamDeckVariant::Unknown + ); + assert_eq!( + device_variant().await.unwrap(), + (DeviceType::ZotacGamingZone, String::from("G1A1W")) + ); } #[test] From 74b036de5de0481f9278f566a1c725b15832f803 Mon Sep 17 00:00:00 2001 From: Matthew Schwartz Date: Thu, 29 May 2025 12:31:36 -0700 Subject: [PATCH 3/3] platform: Add platform configuration for ZOTAC Gaming Zone --- data/platforms/zotac-gaming-zone.toml | 10 ++++++++++ src/platform.rs | 1 + 2 files changed, 11 insertions(+) create mode 100644 data/platforms/zotac-gaming-zone.toml diff --git a/data/platforms/zotac-gaming-zone.toml b/data/platforms/zotac-gaming-zone.toml new file mode 100644 index 0000000..c78ec54 --- /dev/null +++ b/data/platforms/zotac-gaming-zone.toml @@ -0,0 +1,10 @@ +[performance_profile] +platform_profile_name = "zotac_zone_platform" +suggested_default = "custom" + +[tdp_limit] +method = "firmware_attribute" + +[tdp_limit.firmware_attribute] +attribute = "zotac_zone_platform" +performance_profile = "custom" \ No newline at end of file diff --git a/src/platform.rs b/src/platform.rs index 851396c..ad24c78 100644 --- a/src/platform.rs +++ b/src/platform.rs @@ -169,6 +169,7 @@ impl PlatformConfig { DeviceType::LegionGoS => "legion-go-series", DeviceType::RogAlly => "rog-ally-series", DeviceType::RogAllyX => "rog-ally-series", + DeviceType::ZotacGamingZone => "zotac-gaming-zone", _ => return Ok(None), }; let config = read_to_string(format!(