1 1
mabs

pwm1 missing or how is cpu fan control working on armbian now.

Recommended Posts

Hi,

 

I have two rockpro64 boards.

One board runs Debian buster with a slightly extended ayufan 5.4.0-rc1 kernel where as the other runs a Armbian (Debian) buster with the current project supplied 5.4.0-rc1 kernel.

 

On the Debian on I have installed the nice ats solution (https://github.com/tuxd3v/ats#install)

On the Armbian one the fan is running all the time. I tried to install ats there as well but I failed.

 

Also I found that basically the  /sys/devices/platform/pwm-fan/hwmon is not there, only upto pwm-fan I have.

 

Is there some module I need to load or compile into the kernel to get ats working on the Armbian based one as well?

 

Any hints are highly appreciated.

 

Kind Regards

Martin

Share this post


Link to post
Share on other sites

I have the same question.
Running the command 

luarocks build https://raw.githubusercontent.com/tuxd3v/ats/master/ats-master-0.rockspec

This warning comes:

 

Spoiler

root@RockHomeServer:~# ln -s /usr/bin/lua5.3 /usr/bin/lua
ln: failed to create symbolic link '/usr/bin/lua': File exists
root@RockHomeServer:~# ^C
root@RockHomeServer:~# luarocks build https://raw.githubusercontent.com/tuxd3v/ats/master/ats-master-0.rockspec
Cloning into 'ats'...
remote: Enumerating objects: 24, done.
remote: Counting objects: 100% (24/24), done.
remote: Compressing objects: 100% (22/22), done.
remote: Total 24 (delta 1), reused 8 (delta 0), pack-reused 0
Receiving objects: 100% (24/24), 106.18 KiB | 639.00 KiB/s, done.
Resolving deltas: 100% (1/1), done.
Warning: variable CFLAGS was not passed in build_variables
** PLATFORM = linux  **
** OS       = 64Bits **
** ARCH     = armv8-a+crc **
** TUNE     = cortex-a72.cortex-a53 **
gcc -c -march=armv8-a+crc -mtune=cortex-a72.cortex-a53 -fPIC -Wall -Werror -O3 -g -I/usr/include/lua5.3  -o debug.o src/debug.c
gcc -c -march=armv8-a+crc -mtune=cortex-a72.cortex-a53 -fPIC -Wall -Werror -O3 -g -I/usr/include/lua5.3  -o ats.o src/ats.c
gcc -shared -Wl,-soname,ats.so.0 -llua5.3  -o ats.so.0.9 debug.o ats.o
Install Method: LuaRocks ..
SystemD Detected ..
Searching for Previous Install, and Remove it:
Creating Library Path: /usr/local/lib/lua/5.3
mkdir: created directory '/usr/local/lib/lua'
mkdir: created directory '/usr/local/lib/lua/5.3'
Install ATS Service File ..........: ats.service in '/usr/local/lib/luarocks/rocks/ats/master-0'
Install ATS Config ................: ats.config in '/usr/local/lib/luarocks/rocks/ats/master-0'
Install ATS Tool ..................: ats in '/usr/local/lib/luarocks/rocks/ats/master-0'
Install new ATS Library ...........: ats.so.0.9 in '/usr/local/lib/luarocks/rocks/ats/master-0'
Creating soname symLink ........: ats.so in '/usr/local/lib/luarocks/rocks/ats/master-0'
Creating Service symLink .......: ats.service in '/lib/systemd/system'
Creating Binary symLink ........: ats in '/usr/local/sbin/ats'
Creating Config symLink ........: ats.conf in '/etc/ats.conf'
Creating SharedObject symLink ..: ats.so.0.9 in '/usr/local/lib/lua/5.3'
Created symlink /etc/systemd/system/basic.target.wants/ats.service → /usr/local/lib/luarocks/rocks/ats/master-0/ats.service.
Created symlink /etc/systemd/system/ats.service → /usr/local/lib/luarocks/rocks/ats/master-0/ats.service.
Starting ATS Service..
● ats.service - ATS - Active Thermal Service
   Loaded: loaded (/usr/local/lib/luarocks/rocks/ats/master-0/ats.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Thu 2019-12-05 18:42:38 CET; 8ms ago
  Process: 26327 ExecStart=/usr/local/sbin/ats (code=exited, status=1/FAILURE)
 Main PID: 26327 (code=exited, status=1/FAILURE)
make: *** [Makefile:236: install] Error 3

Error: Build error: Failed installing.
root@RockHomeServer:~#

 

Share this post


Link to post
Share on other sites

Hello,

At least for the tests done with 2 other colleagues,

 

Seems that Armbian kernel is missing a .config option..
'CONFIG_SENSORS_PWM_FAN=y'

 

Which is present in 'ayufan' kernels work..

 

ATS needs sysfs to communicate with the kernel driver, and is not there the pwm ctl: '/sys/class/hwmon/hwmon0/pwm1'

Share this post


Link to post
Share on other sites
On 12/6/2019 at 2:56 AM, Igor said:

 

On 12/6/2019 at 6:31 AM, Werner said:

 

On 12/6/2019 at 1:16 AM, tuxd3v said:

ATS needs sysfs to communicate with the kernel driver, and is not there the pwm ctl: '/sys/class/hwmon/hwmon0/pwm1'

Hello, Thanks for the quick fix of the problem.
(For stupid like me) Please create a step by step introduction, how and where I can find and correct the linux-rockchip64-dev.config!?! Or what do I have to do now after the update?

Share this post


Link to post
Share on other sites

Just wait for the next version bump, upgrade your kernel using apt and the module will be included. Then simply load the kernel module using modprobe pwm-fan .

Or build your own kernel package using the build script.

Share this post


Link to post
Share on other sites
15 minutes ago, Werner said:

Just wait for the next version bump, upgrade your kernel using apt and the module will be included. Then simply load the kernel module using modprobe pwm-fan .

Or build your own kernel package using the build script.

Many thanks. But wait is not my strength. ;)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
1 1