Tool to Control Fan - fanctl
#21
In an unloaded state,
date, time, cores frequency, temperature, PWM:
2018-09-20,00:06:43,408,408,408,408,816,816,39,0
2018-09-20,00:06:44,408,408,408,408,816,816,40,0
2018-09-20,00:06:45,408,408,408,408,816,816,39,190
2018-09-20,00:06:46,408,408,408,408,816,816,40,190
2018-09-20,00:06:47,408,408,408,408,816,816,40,115
2018-09-20,00:06:48,408,408,408,408,408,408,40,115
2018-09-20,00:06:49,408,408,408,408,816,816,39,115
2018-09-20,00:06:50,408,408,408,408,816,816,39,115
2018-09-20,00:06:51,408,408,408,408,816,816,40,115
2018-09-20,00:06:52,408,408,408,408,816,816,40,0
2018-09-20,00:06:53,408,408,408,408,816,816,40,0
2018-09-20,00:06:54,408,408,408,408,816,816,39,0
2018-09-20,00:06:55,408,408,408,408,816,816,39,0

Code:
#!/bin/sh

while true :
do
 now=$(date "+%F,%H:%M:%S")
 temp=$(cat /sys/devices/virtual/thermal/thermal_zone0/temp)
 freq0=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq)
 freq1=$(cat /sys/devices/system/cpu/cpu1/cpufreq/scaling_cur_freq)
 freq2=$(cat /sys/devices/system/cpu/cpu2/cpufreq/scaling_cur_freq)
 freq3=$(cat /sys/devices/system/cpu/cpu3/cpufreq/scaling_cur_freq)
 freq4=$(cat /sys/devices/system/cpu/cpu4/cpufreq/scaling_cur_freq)
 freq5=$(cat /sys/devices/system/cpu/cpu5/cpufreq/scaling_cur_freq)
 pwm1=$(cat /sys/class/hwmon/hwmon0/pwm1)
 echo $now,$(( freq0 /1000 )),$(( freq1 /1000 )),$(( freq2 /1000 )),$(( freq3 /1000 )),$(( freq4 /1000 )),$(( freq5 /1000 )),$(( temp / 1000 )),$(( pwm1 )) >> /var/log/temperature.log
 sleep 1
done
_____________________________________________________________________________________________________________________________________________
my SOHO NAS RockPro64 4GB v2.1 / eMMC 32GB / PCIe -> 4*SATA Marvell 88SE9235 / SD-card 64 GB / NAS Casing / image Debian Stretch Minimal / Kernel 4.4.xxx ayufan
my Multimedia desktops: ASUS H310T G5500, ODROIDs -XU4, -XU3, -C2, -C1;
my trash BananaPi; RPi B, B+; ODROID-W
  Reply
#22
(09-15-2018, 02:13 PM)amator_1 Wrote: wat am i doing wrong?
this is wat i get
:~# systemctl status fanctl                                                                                                  
● fanctl.service - Active Thermal Fan Service                                                                                            
  Loaded: loaded (/lib/systemd/system/fanctl.service; enabled; vendor preset: enabled)                                                  
  Active: activating (auto-restart) (Result: exit-code) since Sat 2018-09-15 22:10:16 CEST; 1s ago                                      
 Process: 1847 ExecStart=/usr/sbin/fanctl (code=exited, status=127)
Main PID: 1847 (code=exited, status=127)            
Can anyone help

Hello amator_1,

If you are in Ubuntu,
You need to upgrade kernel too(Debian Strech also needs kernel update), so that it will export to SysFs the Functionalities fanctl need.

To do so, you can:
Code:
apt-get clean
apt-get update
apt-get install linux-rockpro64 -y
apt-get install linux-image-4.4.138-1094-rockchip-ayufan-gf13a8a9a4eee linux-headers-4.4.138-1094-rockchip-ayufan-gf13a8a9a4eee cpufrequtils

Then reboot, and you should be fine.  Shy
Hope it helps
  Reply
#23
(09-15-2018, 04:05 PM)tuxd3v Wrote:
(09-15-2018, 02:13 PM)amator_1 Wrote: wat am i doing wrong?
this is wat i get
:~# systemctl status fanctl                                                                                                  
● fanctl.service - Active Thermal Fan Service                                                                                            
  Loaded: loaded (/lib/systemd/system/fanctl.service; enabled; vendor preset: enabled)                                                  
  Active: activating (auto-restart) (Result: exit-code) since Sat 2018-09-15 22:10:16 CEST; 1s ago                                      
 Process: 1847 ExecStart=/usr/sbin/fanctl (code=exited, status=127)
Main PID: 1847 (code=exited, status=127)            
Can anyone help

Hello amator_1,

Can you post the result of these 4 commands?
Code:
ls -l /sys/class/{thermal/thermal_zone{0,1}/temp,hwmon/hwmon0/pwm1}

ls: cannot access '/sys/class/hwmon/hwmon0/pwm1': No such file or directory
-r--r--r-- 1 root root 4096 Sep 21 09:42 /sys/class/thermal/thermal_zone0/temp
-r--r--r-- 1 root root 4096 Sep 21 09:42 /sys/class/thermal/thermal_zone1/temp


ls -l /usr/bin/lua
lrwxrwxrwx 1 root root 15 Sep 21 09:42 /usr/bin/lua -> /usr/bin/lua5.3



ls -l /usr/lib/aarch64-linux-gnu/lua/5.3/sleep.so
lrwxrwxrwx 1 root root 47 Sep 21 09:41 /usr/lib/aarch64-linux-gnu/lua/5.3/sleep.so -> /usr/lib/aarch64-linux-gnu/lua/5.3/sleep.so.0.1



ls -l /usr/sbin/fanctl
-r-xr-x--- 1 root root 8056 Sep 21 09:41 /usr/sbin/fanctl

regards

Hi tuxd3v
I added the results as copy past the questions above.
Thanks for the reply
  Reply
#24
(09-21-2018, 01:54 AM)Hi tuxd3v Wrote: I added the results as copy past the questions above.
Thanks for the reply

Ok, the problem seems to be related with pwn:
"
ls -l /sys/class/{thermal/thermal_zone{0,1}/temp,hwmon/hwmon0/pwm1}
ls: cannot access '/sys/class/hwmon/hwmon0/pwm1': No such file or directory
"
Maybe is exported to SysFs with another name..
Check if it has another names on SysFs

For Example:
Code:
find /sys -name \*pwm\*

This is to Find were the pwm is  Shy
regards
  Reply
#25
While he does not update the kernel, he will not find it.
and the kernel is by ayufan
_____________________________________________________________________________________________________________________________________________
my SOHO NAS RockPro64 4GB v2.1 / eMMC 32GB / PCIe -> 4*SATA Marvell 88SE9235 / SD-card 64 GB / NAS Casing / image Debian Stretch Minimal / Kernel 4.4.xxx ayufan
my Multimedia desktops: ASUS H310T G5500, ODROIDs -XU4, -XU3, -C2, -C1;
my trash BananaPi; RPi B, B+; ODROID-W
  Reply
#26
(09-21-2018, 09:43 AM)romtorwator Wrote: While he does not update the kernel, he will not find it.
and the kernel is by ayufan

Yes its true,
first he need kernel update..

Without it, will not be able to get those Controls via SysFs.
  Reply
#27
[quote pid='40992' dateline='1537559674']
(09-21-2018, 09:43 AM)romtorwator Wrote: While he does not update the kernel, he will not find it.
and the kernel is by ayufan

Yes its true,
first he need kernel update..

Without it, will not be able to get those Controls via SysFs.
[/quote]

Ho do I update the kernel , I use openmediavault  see attachement


Attached Files Thumbnail(s)
   
  Reply
#28
(09-22-2018, 03:27 AM)amator_1 Wrote: Ho do I update the kernel

4.4.132-1075 this is the old kernel, it does not yet have this, you need at least 4.4.132-1083, but better current:

Code:
sudo apt-get update
sudo apt-get install linux-image-4.4.138-1094-rockchip-ayufan-gf13a8a9a4eee
sudo apt-get install linux-headers-4.4.138-1094-rockchip-ayufan-gf13a8a9a4eee
sudo apt-get install linux-firmware-image-4.4.138-1094-rockchip-ayufan-gf13a8a9a4eee
sudo reboot

or download here and install the packages https://github.com/ayufan-rock64/linux-k...hip-ayufan
_____________________________________________________________________________________________________________________________________________
my SOHO NAS RockPro64 4GB v2.1 / eMMC 32GB / PCIe -> 4*SATA Marvell 88SE9235 / SD-card 64 GB / NAS Casing / image Debian Stretch Minimal / Kernel 4.4.xxx ayufan
my Multimedia desktops: ASUS H310T G5500, ODROIDs -XU4, -XU3, -C2, -C1;
my trash BananaPi; RPi B, B+; ODROID-W
  Reply
#29
(09-22-2018, 03:44 AM)romtorwator Wrote:
(09-22-2018, 03:27 AM)amator_1 Wrote: Ho do I update the kernel

4.4.132-1075 this is the old kernel, it does not yet have this, you need at least 4.4.132-1083, but better current:

Code:
sudo apt-get update
sudo apt-get install linux-image-4.4.138-1094-rockchip-ayufan-gf13a8a9a4eee
sudo apt-get install linux-headers-4.4.138-1094-rockchip-ayufan-gf13a8a9a4eee
sudo apt-get install linux-firmware-image-4.4.138-1094-rockchip-ayufan-gf13a8a9a4eee
sudo reboot

or download here and install the packages https://github.com/ayufan-rock64/linux-k...hip-ayufan

Thank u romtorwator, i will try to update.
  Reply
#30
SOLVED

Thanks to everybody for the help.
kernel update did the job. Heart Heart Heart
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  PWM Fan Control Python Script superbox 0 1,268 02-04-2022, 10:02 PM
Last Post: superbox

Forum Jump:


Users browsing this thread: 3 Guest(s)