Jump to content

Turn off the leds (pwr_led)


Go to solution Solved by Torte,

Recommended Posts

Posted

It largely depends on the system.

 

A simple "echo 0 > /sys/devices/platform/leds/leds/system-led/brightness" will kill the heartbeat on a T6. (The heartbeat itself is activated in the DTB.)

 

The other leds should available along the same path (user_led, etc.).

NB I have found no other way of restoring the heartbeat than rebooting.

Posted

As mentioned it might be possible or not. Depends on board.

Check /sys for keywords led and trigger.

cat the trigger file/s to get an idea what values it accepts.

  • Solution
Posted

I wrote a small guide for customizing the status LED's behaviour on the MKS-Klipad50 board.

 

The available LEDs and their names in "/sys/class/leds/" will be different on other boards, but the general behaviour should be the same. Just make sure to change the filenames like "firefly:blue:user" in the examples to those available on your system.

 

Posted

Below is the brightness file I found in the /sys folder. Unfortunately, I can't turn off the pwr_led light no matter what I try. I have been able to turn off the light on devices such as raspberry 3b and king3399 before, so I don't know if it is a system problem?

 

# root @ nanopct4 in /sys [12:13:15]

$ find . -name "*brightness*"

./devices/platform/gpio-leds/leds/status_led/brightness

./devices/platform/gpio-leds/leds/status_led/max_brightness

./devices/platform/fe330000.mmc/leds/mmc2::/brightness

./devices/platform/fe330000.mmc/leds/mmc2::/max_brightness

Posted (edited)

(Please ignore, this doesn't apply to the NanoPC T4)

 

You can try if the LEDs show up after "sudo modprobe pinctrl-rk805".


The switch from rockchip64 kernel 6.6.x to 6.12.x included a change that made the "pinctrl-rk805" being built as a module instead of compiled-in. That module does not get autoloaded, so it has to be added to /etc/modules.
On the Klipad50, the gpio-leds are attached to the rk805 gpio bank, which is not known to the system without that kernel module. Only after loading that module, the LEDs appeared under /sys/class/leds and started working.
 

Edit:

- Board is NanoPC T4 - sorry, I haven't seen the label
- The NanoPC T4 does not have the rk805 controller, so this posting does not apply.

 

Edit#2:

Do "sudo gpioset 0 13=1" or "sudo gpioset 0 13=0" change the LED state?

Edited by Torte
Posted (edited)

I managed to disable heartbeat.

I am running HA based on debian trixie and my it was only led i could change to off

echo 0 | sudo tee /sys/class/leds/state-led/brightness



 

 

Edited by linuxenjoerno

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...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines