[Temp FIX] for armbian-bsp-cli-helios64 21.05.8 fancontrol service fail.


SIGSEGV
 Share

2 2

Recommended Posts

A few Armbian packages were updated (armbian-bsp-cli-helios64, armbian-config, armbian-firmware &armbian-zsh) to version 21.05.08.

At some point I noticed that the fancontrol service had failed to start up after the reboot - it was complaining about a file missing(/dev/thermal-cpu). If you run into this after the update, just update your /etc/fancontrol to the content below and your fancontrol should go back to normal.

 

 

# Helios64 PWM Fan Control Configuration
# Temp source : /dev/thermal-cpu
# After 21.05.08 [2021.08.10]
# Temp source : /dev/thermal-board
INTERVAL=10
# FCTEMPS=/dev/fan-p6/pwm1=/dev/thermal-cpu/temp1_input /dev/fan-p7/pwm1=/dev/thermal-cpu/temp1_input
# After 21.05.08 [2021.08.10]
FCTEMPS=/dev/fan-p6/pwm1=/dev/thermal-board/temp1_input /dev/fan-p7/pwm1=/dev/thermal-board/temp1_input
MINTEMP=/dev/fan-p6/pwm1=40 /dev/fan-p7/pwm1=40
MAXTEMP=/dev/fan-p6/pwm1=110 /dev/fan-p7/pwm1=110
MINSTART=/dev/fan-p6/pwm1=60 /dev/fan-p7/pwm1=60
MINSTOP=/dev/fan-p6/pwm1=40 /dev/fan-p7/pwm1=40
MINPWM=20

 

Link to post
Share on other sites

Donate and support the project!

@Igor no. This is a) a new problem and the proposed fix is IMHO not correct. AND b) the old fix (on branch https://github.com/armbian/build/tree/helios64-udev-hwmon-fix) was never merged, tested or anything else. 

 

Regarding the old problem:

As mentioned in the previous thread, I do NOT have a helios64 so cannot test any changes. Nobody else stepped up to test and report back. Also sometime later someone said:
 

  

On 6/24/2021 at 5:00 PM, halfa said:

The 21.05.6 release fixed the regression in the package build process (couldn't find a related commit, maybe during the build targets reworks?), removing the "legacy" udev rule and adding the correct one.

root@helios64:~ # apt info armbian-bsp-cli-helios64
Package: armbian-bsp-cli-helios64
Version: 21.05.6

Given that this is fixed, I don't know if there is a need to patch the upstream Heisath. I'm willing to test you're version of the merged udev rule but I don't have a legacy env. to properly test the other one.

 

SO  I assumed this had magically fixed itself and did not need further attention. Read here for full thread: 

 

 

Regarding the new problem:

Simply changing the fancontrol rules from thermal-cpu to thermal-board is incorrect AFAIK. Looking at the udev rules: https://github.com/armbian/build/blob/master/packages/bsp/helios64/90-helios64-hwmon.rules

It should be thermal-cpu for the cpu temperature and thermal-board for the board temperature. And then it only makes sense to attach the fancontrol to the CPU temp.

 

Why the thermal-cpu is not available anymore I don't know. But it is not a solution to the root cause to just fix the fancontrol to the board temp. We should instead investigate why the thermal-cpu node is not available anymore and fix it.

Maybe @aprayoga or @gprovost are back from their break? 

 

EDIT: Looking back at it, maybe it is the same problem.

@SIGSEGV can you check if you have the 90-helios64-hwmon.rules or the 90-helios64-hwmon-legacy.rules in your udev?

 

EDIT2:

PR here: https://github.com/armbian/build/pull/3092

Link to post
Share on other sites

@Heisath

Right now the file present on the installation is: '90-helios64-hwmon-legacy.rules'

I'll update the title of this post to mark a temporary fix, I agree with both of you that the fans should be tied to the CPU temperatures and not the board. But since the release broke monitoring having the fan control tied to something is better than nothing - otherwise the fan don't even spin up.

Link to post
Share on other sites

  • SIGSEGV changed the title to [Temp FIX] for armbian-bsp-cli-helios64 21.05.8 fancontrol service fail.

Ok @SIGSEGV thanks for confirming that the old bug is back.

 

So the buildscript still does not correctly seperate between legacy and current.

 

If you are able to build images yourself it would be great if you could build a helios64 image (current) from this pr/branch https://github.com/armbian/build/pull/3092  and test if it works + the correct files are present.

 

 

Link to post
Share on other sites

On 8/11/2021 at 3:17 PM, Igor said:

Lets's wait for some input here then.

 

I am using Armbian 21.05.8 Buster with Linux 5.10.43-rockchip64 on a Helios64 (fully updated - in particular with armbian-bsp-cli-helios64 21.05.8) and there would not appear to be any issue with a missing thermal cpu node.

 

# cat /dev/thermal-cpu/temp1_input
45000
# cat /dev/thermal-board/temp1_input
35437
# fancontrol status
Loading configuration from /etc/fancontrol ...

Common settings:
  INTERVAL=10

Settings for /dev/fan-p6/pwm1:
  Depends on /dev/thermal-cpu/temp1_input
  Controls 
  MINTEMP=40
  MAXTEMP=110
  MINSTART=60
  MINSTOP=40
  MINPWM=0
  MAXPWM=255

Settings for /dev/fan-p7/pwm1:
  Depends on /dev/thermal-cpu/temp1_input
  Controls 
  MINTEMP=40
  MAXTEMP=110
  MINSTART=60
  MINSTOP=40
  MINPWM=0
  MAXPWM=255

File /var/run/fancontrol.pid exists, is fancontrol already running?

 

Link to post
Share on other sites

For anybody here looking for a solution, see the other thread (where you will find a manual fix)

 

@ebin-dev you need to look at what file you have in /etc/udev/rules.d/, as long as you didn't reboot you'll not have the issue.

 

Hello back @Heisath! I updated to armbian 21.05.8 and indeed I'm back on the old udev rule. If we still don't now why sometime the build mess up with the legacy settings, but if it's the ONLY thing that is related to the legacy switch, we might as well either merge both files into one, accommodating both CPU device tree thermal tree path. @Igor what do you think? I think I can make a PR for that.

Link to post
Share on other sites

1 hour ago, halfa said:

you need to look at what file you have in /etc/udev/rules.d/, as long as you didn't reboot you'll not have the issue.

 

My Helios64 shuts down overnight - it boots every day - so the changes made by "armbian-bsp-cli-helios64 21.05.8" are active on my system. I do not observe any issue though.

I checked the rules in /etc/udev/rules.d/ : the legacy hwmon rule is not present and the remaining hwmon rule contains the following:

 

# cat 90-helios64-hwmon.rules
# Helios64 persistent hwmon

ACTION=="remove", GOTO="helios64_hwmon_end"

#
KERNELS=="p6-fan", SUBSYSTEMS=="platform", ENV{_HELIOS64_FAN_}="p6", ENV{_IS_HELIOS64_FAN_}="1", ENV{IS_HELIOS64_HWMON}="1"
KERNELS=="p7-fan", SUBSYSTEMS=="platform", ENV{_HELIOS64_FAN_}="p7", ENV{_IS_HELIOS64_FAN_}="1", ENV{IS_HELIOS64_HWMON}="1"
KERNELS=="2-004c", SUBSYSTEMS=="i2c", DRIVERS=="lm75", ENV{IS_HELIOS64_HWMON}="1"

SUBSYSTEM!="hwmon", GOTO="helios64_hwmon_end"

ENV{HWMON_PATH}="/sys%p"
#
ATTR{name}=="cpu", ENV{IS_HELIOS64_HWMON}="1", ENV{HELIOS64_SYMLINK}="/dev/thermal-cpu"
#
ENV{IS_HELIOS64_HWMON}=="1", ATTR{name}=="lm75", ENV{HELIOS64_SYMLINK}="/dev/thermal-board"
ENV{_IS_HELIOS64_FAN_}=="1", ENV{HELIOS64_SYMLINK}="/dev/fan-$env{_HELIOS64_FAN_}"

#
ENV{IS_HELIOS64_HWMON}=="1", RUN+="/bin/ln -sf $env{HWMON_PATH} $env{HELIOS64_SYMLINK}"

LABEL="helios64_hwmon_end"

 

Link to post
Share on other sites

I don't think keeping the old file around would be an issue anyway, if somebody can hand me the resulting deb package I can test it on my helios64.

Else I would need to find a way to build the whole image (which may not be a bad thing? :))

Link to post
Share on other sites

@ebin-dev I have 0 ideas how you ended up in that situation but on my side the version 21.05.8 is installed and it indeed contain the legacy udev rule (and you can confirm for yourself by looking at the package in the mirror at http://mirrors.dotsrc.org/armbian-apt/pool/focal-utils/a/armbian-bsp-cli-helios64/)

root@helios64 $ dpkg -s armbian-bsp-cli-helios64
Package: armbian-bsp-cli-helios64
Status: install ok installed
Priority: optional
Section: kernel
Installed-Size: 1
Maintainer: Igor Pecovnik <igor.pecovnik@****l.com>
Architecture: arm64
Version: 21.05.8
Replaces: zram-config, base-files, armbian-tools-focal, linux-focal-root-legacy-helios64 (<< 21.05.8~), linux-focal-root-current-helios64 (<< 21.05.8~), linux-focal-root-edge-helios64 (<< 21.05.8~)
Provides: linux-focal-root-legacy-helios64, linux-focal-root-current-helios64, linux-focal-root-edge-helios64
Depends: bash, linux-base, u-boot-tools, initramfs-tools, lsb-release, fping
Recommends: bsdutils, parted, util-linux, toilet
Suggests: armbian-config
Breaks: linux-focal-root-legacy-helios64 (<< 21.05.8~), linux-focal-root-current-helios64 (<< 21.05.8~), linux-focal-root-edge-helios64 (<< 21.05.8~)
Description: Tweaks for Armbian focal on helios64

root@helios64 $ dpkg -L armbian-bsp-cli-helios64 | grep legacy
/etc/udev/rules.d/90-helios64-hwmon-legacy.rules

 

Link to post
Share on other sites

3 hours ago, halfa said:

the version 21.05.8 is installed and it indeed contain the legacy udev rule

 

Thanks for following up on this. The same package is installed on my system, but the legacy udev rule is not present. However, I can not exclude that I might have deleted it manually weeks ago due to suggestions in the forum. Anyway - this configuration seems to work at least for me (Armbian 21.05.8 Buster with Linux 5.10.43-rockchip64).

 

# dpkg -s armbian-bsp-cli-helios64
Package: armbian-bsp-cli-helios64
Status: install ok installed
Priority: optional
Section: kernel
Installed-Size: 1
Maintainer: Igor Pecovnik <igor.pecovnik@****l.com>
Architecture: arm64
Version: 21.05.8
Replaces: zram-config, base-files, armbian-tools-buster, linux-buster-root-legacy-helios64 (<< 21.05.8~), linux-buster-root-current-helios64 (<< 21.05.8~), linux-buster-root-edge-helios64 (<< 21.05.8~)
Provides: linux-buster-root-legacy-helios64, linux-buster-root-current-helios64, linux-buster-root-edge-helios64
Depends: bash, linux-base, u-boot-tools, initramfs-tools, lsb-release, fping
Recommends: bsdutils, parted, util-linux, toilet
Suggests: armbian-config
Breaks: linux-buster-root-legacy-helios64 (<< 21.05.8~), linux-buster-root-current-helios64 (<< 21.05.8~), linux-buster-root-edge-helios64 (<< 21.05.8~)
Description: Tweaks for Armbian buster on helios64

 

Link to post
Share on other sites

Hope I'm not adding noise to this thread.  Thought I would add another report matching @ebin-dev.  I just upgraded my Helios64 to this new package as well, and my fancontrol remains working after a reboot (both /dev/thermal-cpu and /dev/thermal-board are present).  I can confirm that I don't have a legacy file in /etc/udev/rules.d, and the contents of the 90-helios64-hwmon.rules file matches that posted by @ebin-dev.  I'm pretty sure I've never modified any of the files in /etc/udev/rules.d.

Link to post
Share on other sites

@halfa

I get this as output:

Package: armbian-bsp-cli-helios64
Version: 21.05.8
Priority: optional
Section: kernel
Maintainer: Igor Pecovnik <igor.pecovnik@****l.com>
Installed-Size: 1,024 B
Provides: linux-focal-root-legacy-helios64, linux-focal-root-current-helios64, linux-focal-root-edge-helios64
Depends: bash, linux-base, u-boot-tools, initramfs-tools, lsb-release, fping
Recommends: bsdutils, parted, util-linux, toilet
Suggests: armbian-config
Breaks: linux-focal-root-legacy-helios64 (<< 21.05.8~), linux-focal-root-current-helios64 (<< 21.05.8~), linux-focal-root-edge-helios64 (<< 21.05.8~)
Replaces: zram-config, base-files, armbian-tools-focal, linux-focal-root-legacy-helios64 (<< 21.05.8~), linux-focal-root-current-helios64 (<< 21.05.8~), linux-focal-root-edge-helios64 (<< 21.05.8~)
Download-Size: 417 kB
APT-Manual-Installed: yes
APT-Sources: http://apt.armbian.com focal/focal-utils arm64 Packages
Description: Tweaks for Armbian focal on helios64

 

I see a few packages listed under 'Breaks'

Link to post
Share on other sites

On 8/16/2021 at 10:33 AM, halfa said:

@m11k can you run
 

sudo apt info armbian-bsp-cli-helios64

and post the output?

For those affected by the issue, the file has been patched to handle both the legacy and 5.10 kernel logic https://github.com/armbian/build/pull/3092

Sorry for the late reply.  I get the following:

Package: armbian-bsp-cli-helios64
Version: 21.05.8
Priority: optional
Section: kernel
Maintainer: Igor Pecovnik <igor.pecovnik@****l.com>
Installed-Size: 1,024 B
Provides: linux-buster-root-legacy-helios64, linux-buster-root-current-helios64, linux-buster-root-edge-helios64
Depends: bash, linux-base, u-boot-tools, initramfs-tools, lsb-release, fping
Recommends: bsdutils, parted, util-linux, toilet
Suggests: armbian-config
Breaks: linux-buster-root-legacy-helios64 (<< 21.05.8~), linux-buster-root-current-helios64 (<< 21.05.8~), linux-buster-root-edge-helios64 (<< 21.05.8~)
Replaces: zram-config, base-files, armbian-tools-buster, linux-buster-root-legacy-helios64 (<< 21.05.8~), linux-buster-root-current-helios64 (<< 21.05.8~), linux-buster-root-edge-helios64 (<< 21.05.8~)
Download-Size: 417 kB
APT-Manual-Installed: yes
APT-Sources: http://apt.armbian.com buster/buster-utils arm64 Packages
Description: Tweaks for Armbian buster on helios64

N: There are 5 additional records. Please use the '-a' switch to see them.

 

Link to post
Share on other sites

 Share

2 2