arnavion / tpfancontrol-rs Goto Github PK
View Code? Open in Web Editor NEWTemperature and fan controller for Thinkpads on Linux
Temperature and fan controller for Thinkpads on Linux
Invoking sudo tpfancontrol
errors out:
Error: sysfs error with /sys/class/hwmon/hwmon2/temp1_input: No such file or directory (os error 2)
I don't understand the function of these monitors, but I'm pretty sure the better way to find these paths is to do:
$ find /sys/devices -type f -name "temp*_input"
In my device, the output is:
/sys/devices/platform/coretemp.0/hwmon/hwmon3/temp3_input
/sys/devices/platform/coretemp.0/hwmon/hwmon3/temp1_input
/sys/devices/platform/coretemp.0/hwmon/hwmon3/temp2_input
/sys/devices/virtual/thermal/thermal_zone0/hwmon0/temp1_input
/sys/devices/virtual/thermal/thermal_zone0/hwmon0/temp2_input
Thinkfan makes you include these in your config file, for instance. Other tools find them on their own.
My device is a ThinkPad L540
running Artix Linux
using runit
for init.
I have created systemd service:
[Unit]
Description=tpfancontrol-rs
[Service]
Type=oneshot
User=root
Environment="RUST_BACKTRACE=1"
ExecStart=/home/kobi/github/tpfancontrol-rs/target/release/tpfancontrol &
[Install]
WantedBy=multi-user.target
however service fails with:
● tpfancontrol-rs.service - tpfancontrol-rs
Loaded: loaded (/etc/systemd/system/tpfancontrol-rs.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2021-03-15 11:54:24 CET; 5min ago
Process: 65399 ExecStart=/home/kobi/github/tpfancontrol-rs/target/release/tpfancontrol & (code=exited, status=101)
Main PID: 65399 (code=exited, status=101)
bře 15 11:54:24 pop-os tpfancontrol[65399]: 2: core::result::unwrap_failed
bře 15 11:54:24 pop-os tpfancontrol[65399]: at ./build/rustc-n7HJ8w/rustc-1.47.0+dfsg1+llvm/library/core/src/result.rs:1220
bře 15 11:54:24 pop-os tpfancontrol[65399]: 3: cursive::backend::termion::Backend::init
bře 15 11:54:24 pop-os tpfancontrol[65399]: 4: cursive::cursive::Cursive::termion
bře 15 11:54:24 pop-os tpfancontrol[65399]: 5: tpfancontrol::main
bře 15 11:54:24 pop-os tpfancontrol[65399]: note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
bře 15 11:54:24 pop-os tpfancontrol[65399]: [6B blob data]
bře 15 11:54:24 pop-os systemd[1]: tpfancontrol-rs.service: Main process exited, code=exited, status=101/n/a
bře 15 11:54:24 pop-os systemd[1]: tpfancontrol-rs.service: Failed with result 'exit-code'.
bře 15 11:54:24 pop-os systemd[1]: Failed to start tpfancontrol-rs.
Can you please help me to run the binary at boot using systemd?
First of all: Well done, great tool! However, I have problems with mapping the fan levels.
At level = 0, the fan speed is ~2000 rpm, where the fan should actually be off, and for any level higher than 0, it is constantly 2400 rpm.
Any idea why this is?
I am running Linux Mint 20.2 (with Kernel 5.13.0-21) on a Thinkpad T495s.
Hello!
I've got noisy problem with my X240. I tried to run your software but I can't find config.toml.example anywhere..
What I did:
$ hub clone --depth 1 Arnavion/tpfancontrol-rs && cd tpfancontrol-rs/
$ cargo build # sudo ?
$ sudo mkdir /etc/tpfancontrol
$ sudo cp config.toml.example /etc/tpfancontrol/config.toml
$ cargo run # ran with error
$ sudo cargo run # ran with error as well
error:
Finished dev [unoptimized + debuginfo] target(s) in 0.03s
Running `target/debug/tpfancontrol`
Error: sysfs error with /sys/class/hwmon/hwmon2/temp1_input: No such file or directory (os error 2)
Do I need to modify something in the conf file other than thresholds?
I'm not familiar with Rust; hopefully, I'm not doing something obviously wrong.
If I wanted to start tpfancontrol-rs on boot or login, should I run cargo run
in the directory or there is a binary I'm missing? (could not find anything in ~/.cargo/bin
)
mismatched types
--> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/cursive-0.10.0/src/backend/termion.rs:222:46
|
222 | let terminal = AlternateScreen::from(MouseTerminal::from(
| _____________________________________^
223 | | ::std::io::stdout().into_raw_mode().unwrap(),
224 | | ));
| |^ expected struct AlternateScreen
, found struct MouseTerminal
|
= note: expected struct AlternateScreen<_>
found struct MouseTerminal<RawTerminal<Stdout>>
For more information about this error, try rustc --explain E0308
.
error: could not compile cursive
due to previous error
warning: build failed, waiting for other jobs to finish...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.