Giter Site home page Giter Site logo

fan-control-rock5b's Introduction

Fan-control

A tool to control fan speed by temperature automatically for ROCK5B.

Features

  1. Control fan speed by temperature. (above 45 degrees)
  2. set fan speed manually

Build & install

make package
dpkg -i fan-control*.deb

Usage

systemctl enable fan-control
systemctl start fan-control

Configuration

configuration file locations is /etc/fan-control.json, Configuration parameter description:

Configuration Description
pwmchip pwmchip id, 1 for auto scan
gpio gpio id, 0 is default gpio
pwm-period PWM period
temp-map temperature configuration table
temp temperature, in degrees Celsius
duty duty ratio
duration duration, in second

License

MIT License

fan-control-rock5b's People

Contributors

pymumu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

fan-control-rock5b's Issues

建议增加自动搜索pwm设备

将pwm-fan加入设备树后,pwm export将会找不到
控制风扇会直接使用接口/sys/class/hwmon/hwmon1/pwm1,不需要再初始化任何pwm了

stayed on max even though temp dropped to 31'c

Not sure what happened but for some reason stayed on max even though temp dropped to 31'c

Didn't do any checks but had a rough script running.

#!/bin/bash
stress-ng -c 8 --vm 8 --vm-bytes 512M&
echo start > temp.txt
while true
do
	echo $(cat /sys/class/thermal/thermal_zone*/temp)
	echo $(cat /sys/class/thermal/thermal_zone*/temp) >> temp.txt
	echo $(date +"%T")
	echo $(date +"%T") >> temp.txt
	sleep 20
done

When I hot ctrl+c to escape the script the fan was already fast at 50c but heard up go up another notch and there it stuck even though temps where back down to 31c

PS the cpu freq buffs to get 2400000Mhz have turned this exceptionally cool SoC into a bit of a hot one.

Submission to Snapcraft

Thank you, @pymumu, for this great little programme. It works well.
Please consider submitting it to an app store like Snapcraft so we can auto-update whenever there is a new version.

rock5b风扇停止不了

大佬,我的系统为Ubuntu22.04, 开机后风扇自动开启,使用您这个工程也停止不了它的运行

Systemd: Failed to start fan control for rock5b

I used Armbian and added your fan-control software

At first boot, it works well, but after that when I check the log, I found that it cannot run correctly.

I have no idea about hot to check about that, but any idea about that ?

fan control with rock 5a

hello,

I tried your program on my rock 5a and it doesn't work
is there anything to activate it?

regards

Fan-control won't start on Rock 5b

Hello,

I'm running Armbian and this software won't start. I'm getting these errors:

$ sudo /usr/sbin/fan-control 
pwmchip: 0
gpio: 0
pwm-period: 20000
temp-map:
  speed: 0, temp: 20, duty: 8400, duration: 10
  speed: 1, temp: 50, duty: 9600, duration: 2
  speed: 2, temp: 60, duty: 10800, duration: 2
  speed: 3, temp: 70, duty: 16000, duration: 5
Failed to export GPIO, No such file or directory
Failed to export GPIO, No such file or directory
Failed to export GPIO, No such file or directory
Failed to export GPIO, No such file or directory
Failed to export GPIO, No such file or directory
Failed to export GPIO, No such file or directory
Failed to init GPIO

Looking at the source, I think it is trying to access the file /sys/devices/platform/fd8b0010.pwm/pwm/pwmchip0/pwm0/export (among others.) That directory exists only so far as /sys/devices/platform/fd8b0010.pwm/pwm/pwmchip0 and doesn't contain pwm0.

Listing that directory:

$ ls -al
total 0
drwxr-xr-x 3 root root    0 Jul 10 15:21 .
drwxr-xr-x 3 root root    0 Jul 10 15:21 ..
lrwxrwxrwx 1 root root    0 Jul 10 16:48 device -> ../../../fd8b0010.pwm
--w------- 1 root root 4096 Jul 10 15:21 export
-r--r--r-- 1 root root 4096 Jul 10 16:48 npwm
drwxr-xr-x 2 root root    0 Jul 10 16:48 power
lrwxrwxrwx 1 root root    0 Jul 10 15:21 subsystem -> ../../../../../class/pwm
-rw-r--r-- 1 root root 4096 Jul 10 15:21 uevent
--w------- 1 root root 4096 Jul 10 15:21 unexport

I'm using Armbian Bookworm, Minimal CLI which includes no firmware installed automatically. So, could I be missing required firmware? Or, could the needed file be elsewhere?

Thanks,
Richard

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.