Disabling the red LED - possible upgrade to `luckfox-config`

  • Hello, the user space shutdown indicator can be controlled through the sysfs interface or the gpiod tool.
  • Hi yangxj121,

    I do not fully understand sorry! I want to turn off the red system LED, but cannot see how to?

    Thank you kindly
  • Hello,If you want to turn off the red indicator light on the board, you can directly modify the "sys/class/led" directory to disable it, or disable the "led" node in the device tree.
  • Thank you. Is there no /etc/luckfox.cfg option or /etc/init.d/ file that can be easily changed so that it does not turn on after reboot?

    I can modify the device tree if need be, but I rather use factory image, hence I thought adding it to `luckfox-config` could be good (which modifies device tree anyway)

    -P
  • To disable the LED using sysfs as suggested previously:

    Code: Select all

    echo 'none' > /sys/devices/platform/leds/leds/work-led/trigger

    There appear to be other modes of LED operation, i.e. caps lock/num lock/etc. The available options can be found by running:

    Code: Select all

    cat /sys/devices/platform/leds/leds/work-led/trigger

    Only one option can be used at a time.

  • Sorry I missed the previous responses. You can muck around with the device tree and set the LED behavior "none" instead of disabling it entirely. I found in <sdk_loc>/kernel-6.1/arch/arm/boot/dts/rk3506-luckfox-lyra.dtsi, there's a section that says

    Code: Select all

    leds: leds {
    	compatible = "gpio-leds";
    	work_led: work-led {
    		gpios = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>;
    		linux,default-trigger = "heartbeat";
    	};
    };
    

    I'd imagine if you change "heartbeat" to "none" that would solve your problem.

  • PlatimaTinkers wrote: 2025-10-25 0:12

    Thank you. Is there no /etc/luckfox.cfg option or /etc/init.d/ file that can be easily changed so that it does not turn on after reboot?

    I can modify the device tree if need be, but I rather use factory image, hence I thought adding it to `luckfox-config` could be good (which modifies device tree anyway)

    -P

    This isn't perfect, but you can add an executable script with the following content to /etc/init.d/ to mostly turn off the LED on reboot:

    Code: Select all

    #!/bin/bash
    echo 'none' > /sys/devices/platform/leds/leds/work-led/trigger
    

    The LED will still flash during boot depending on the priority of the script. By naming the script as S01led, for example, the LED only flashes once before turning off. Naming it as S99led will let the LED flash for a few seconds during the boot process.