E25 Light Ring no longer cycling just stays green

I noticed the light ring on my E25 suddenly changed to green rather than cycling through the various colors. The radax-led service is still running okay. I am seeing this error repeat in the journal log

Jan 23 05:37:21 radxa-e25 radxa-e25-led.sh[372]: /usr/local/bin/radxa-e25-led.sh: line 37: /sys/class/pwm/pwmchip0/pwm0/duty_cycle: No such file or directory
Jan 23 05:37:21 radxa-e25 radxa-e25-led.sh[372]: /usr/local/bin/radxa-e25-led.sh: line 38: /sys/class/pwm/pwmchip1/pwm0/duty_cycle: No such file or directory
Jan 23 05:37:21 radxa-e25 radxa-e25-led.sh[372]: /usr/local/bin/radxa-e25-led.sh: line 39: /sys/class/pwm/pwmchip2/pwm0/duty_cycle: No such file or directory

I think it happened after the last apt update / upgrade command. The pwmchip 0 / 1 / 2 part of the path exists but not the /pwm0 part.

Any ideas what would be causing this?

Hi!

I noticed this happens when you stop the radxa-led service: it disables the PWM.
To fix:
killall radxa-e25-led.sh
Then
/usr/local/bin/radxa-e25-led.sh start

Also, see my improved version in Difficulties with an E25 (last comment).

No, that didn’t seem to help.

This problem is persisting even after a cold boot.

And if you run this script, what happens?
for i in 0 1 2
do
echo 0 > /sys/class/pwm/pwmchip${i}/export
echo 255000 > /sys/class/pwm/pwmchip${i}/pwm0/period
echo normal > /sys/class/pwm/pwmchip${i}/pwm0/polarity
echo 127000 > /sys/class/pwm/pwmchip${i}/pwm0/duty_cycle
echo 1 > /sys/class/pwm/pwmchip${i}/pwm0/enable
done

That script fails with…

./test.sh: line 3: echo: write error: Device or resource busy
./test.sh: line 4: /sys/class/pwm/pwmchip0/pwm0/period: No such file or directory
./test.sh: line 5: /sys/class/pwm/pwmchip0/pwm0/polarity: No such file or directory
./test.sh: line 6: /sys/class/pwm/pwmchip0/pwm0/duty_cycle: No such file or directory
./test.sh: line 7: /sys/class/pwm/pwmchip0/pwm0/enable: No such file or directory
./test.sh: line 3: echo: write error: Device or resource busy
./test.sh: line 4: /sys/class/pwm/pwmchip1/pwm0/period: No such file or directory
./test.sh: line 5: /sys/class/pwm/pwmchip1/pwm0/polarity: No such file or directory
./test.sh: line 6: /sys/class/pwm/pwmchip1/pwm0/duty_cycle: No such file or directory
./test.sh: line 7: /sys/class/pwm/pwmchip1/pwm0/enable: No such file or directory
./test.sh: line 3: echo: write error: Device or resource busy
./test.sh: line 4: /sys/class/pwm/pwmchip2/pwm0/period: No such file or directory
./test.sh: line 5: /sys/class/pwm/pwmchip2/pwm0/polarity: No such file or directory
./test.sh: line 6: /sys/class/pwm/pwmchip2/pwm0/duty_cycle: No such file or directory
./test.sh: line 7: /sys/class/pwm/pwmchip2/pwm0/enable: No such file or directory

I have experimented a lot with the leds, but I have never seen this.
What kernel and linux version are you using?

root@radxa-e25:~# uname -a; lsb_release -a
Linux radxa-e25 4.19.193-58-rockchip-gbac1feba87f0 #rockchip SMP Tue Oct 18 09:36:57 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.5 LTS
Release: 20.04
Codename: focal

I changed to testing repo when I was trying to get the pre-built wireguard packages working… Maybe I should try changing back.

Linux radxa-e25 4.19.193-67-rockchip-g450948183988 #rockchip SMP Thu Jan 12 03:23:25 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.5 LTS
Release: 20.04
Codename: focal

Probably you just need to reinstall:
linux-image-4.19.193-58-rockchip-gbac1feba87f0
linux-headers-4.19.193-58-rockchip-gbac1feba87f0

(and of course re-compile wireguard)