Hi,
I'm used to control the onboard LEDs through the /sys/class/leds filesystem interface. That used to work just fine in older models and other devices like Orange Pi. Now I got a Raspberry Pi 5 and tried to do the same. Basically, it works. But a little bit unexpected.
So, I can disable the triggers of both LEDs to make them stop doing things on their own:
Then I can control the LEDs manually. Turn both LEDs off:
And on:
The PWR LED (the red one) does exactly that. But the ACT LED (the green one) behaves inverted. When turned on, it goes off, and when turned off, it goes on. Web resources suggest that there is an "invert" file in that directory, but I can't see it and can't read it because it's not there.
Will I have to live with this behaviour and treat the RPi 5 as the odd one and invert that logic in code, or can it be configured properly?
I'm running the latest Raspberry Pi OS 64-bit lite.
I'm used to control the onboard LEDs through the /sys/class/leds filesystem interface. That used to work just fine in older models and other devices like Orange Pi. Now I got a Raspberry Pi 5 and tried to do the same. Basically, it works. But a little bit unexpected.
So, I can disable the triggers of both LEDs to make them stop doing things on their own:
Code:
echo "none" | sudo tee /sys/class/leds/ACT/triggerecho "none" | sudo tee /sys/class/leds/PWR/trigger
Code:
echo "0" | sudo tee /sys/class/leds/ACT/brightnessecho "0" | sudo tee /sys/class/leds/PWR/brightness
Code:
echo "1" | sudo tee /sys/class/leds/ACT/brightnessecho "1" | sudo tee /sys/class/leds/PWR/brightness
Will I have to live with this behaviour and treat the RPi 5 as the odd one and invert that logic in code, or can it be configured properly?
I'm running the latest Raspberry Pi OS 64-bit lite.
Statistics: Posted by ygoe — Sun Mar 09, 2025 1:54 pm