Skip to content

Commit a6d4066

Browse files
committed
add fan curve support, parity with Linux daemon
fan curves and model strings current as-of: https://github.com/pop-os/system76-power/blob/79b02d/src/fan.rs
1 parent 264b41a commit a6d4066

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/main.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,19 @@ fn driver() -> io::Result<()> {
9090
debug!("{} {} uses standard fan curve", sys_vendor, product_version);
9191
FanCurve::standard()
9292
},
93+
("System76", "thelio-major-r1") => {
94+
debug!("{} {} uses threadripper2 fan curve", sys_vendor, product_version);
95+
FanCurve::threadripper2()
96+
},
97+
("System76", "thelio-major-r2" | "thelio-major-r2.1" | "thelio-major-b1" | "thelio-major-b2"
98+
| "thelio-major-b3" | "thelio-mega-r1" | "thelio-mega-r1.1" ) => {
99+
debug!("{} {} uses hedt fan curve", sys_vendor, product_version);
100+
FanCurve::hedt()
101+
},
102+
("System76", "thelio-massive-b1") => {
103+
debug!("{} {} uses xeon fan curve", sys_vendor, product_version);
104+
FanCurve::xeon()
105+
},
93106
_ => return Err(io::Error::new(
94107
io::ErrorKind::Other,
95108
format!(

0 commit comments

Comments
 (0)