Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NanoPi R5S | Fix Ethernet LED triggers #5679

Closed
3735943886 opened this issue Aug 9, 2022 · 2 comments
Closed

NanoPi R5S | Fix Ethernet LED triggers #5679

3735943886 opened this issue Aug 9, 2022 · 2 comments

Comments

@3735943886
Copy link

3735943886 commented Aug 9, 2022

Creating a bug report/issue

Required Information

  • DietPi version | cat /boot/dietpi/.version
G_DIETPI_VERSION_CORE=8
G_DIETPI_VERSION_SUB=7
G_DIETPI_VERSION_RC=1
G_GITBRANCH='master'
G_GITOWNER='MichaIng'
  • Distro version | echo $G_DISTRO_NAME $G_RASPBIAN
    bullseye
  • Kernel version | uname -a
    Linux DietPi 5.10.110 #81 SMP Mon Jul 4 15:26:21 CST 2022 aarch64 GNU/Linux
  • SBC model | echo $G_HW_MODEL_NAME or (EG: RPi3)
    NanoPi R5S (aarch64)
  • Power supply used | (EG: 5V 1A RAVpower)
    5V 2A
  • SD card used | (EG: SanDisk ultra)
    None

Additional Information (if applicable)

  • Software title | (EG: Nextcloud)
    dietpi-config
  • Was the software title installed freshly or updated/migrated?
    Installed freshly
  • Can this issue be replicated on a fresh installation of DietPi?
    Yes

Steps to reproduce

  1. sudo dietpi-config
  2. select 14: LED Control
  3. set [netdev] for LEDs

Expected behaviour

  • LEDs should be turn on when ethernet works.

Actual behaviour

  • LEDs not turn on at all.

Extra details

  • Refering from NanoPi R5S wiki, trigger device_name link files must be set properly.
echo netdev > /sys/class/leds/wan_led/trigger
echo eth0 > /sys/class/leds/wan_led/device_name
echo 1 > /sys/class/leds/wan_led/link
 
echo netdev > /sys/class/leds/lan1_led/trigger
echo eth1 > /sys/class/leds/lan1_led/device_name
echo 1 > /sys/class/leds/lan1_led/link
 
echo netdev > /sys/class/leds/lan2_led/trigger
echo eth2 > /sys/class/leds/lan2_led/device_name
echo 1 > /sys/class/leds/lan2_led/link
  • However, dietpi-config set trigger file only and LEDs do not work properly.
dietpi@DietPi:~$ cd /sys/class/leds/wan_led
dietpi@DietPi:/sys/class/leds/wan_led$ cat trigger
none rc-feedback rfkill-any rfkill-none kbd-scrolllock kbd-numlock kbd-capslock kbd-kanalock kbd-shiftlock kbd-altgrlock kbd-ctrllock kbd-altlock kbd-shiftllock kbd-shiftrlock kbd-ctrlllock kbd-ctrlrlock test_ac-online test_battery-charging-or-full test_battery-charging test_battery-full test_battery-charging-blink-full-solid test_usb-online mmc0 timer oneshot heartbeat gpio cpu cpu0 cpu1 cpu2 cpu3 default-on panic mmc2 [netdev]
dietpi@DietPi:/sys/class/leds/wan_led$ cat device_name

dietpi@DietPi:/sys/class/leds/wan_led$ cat link
0
dietpi@DietPi:/sys/class/leds/wan_led$
  • If I set other files (device_name and link) manually, LEDs work.
@MichaIng
Copy link
Owner

Many thanks for your report.

/sys/class/leds/*_led/trigger is set to something functional by default, isn't it? So we can add a udev rule to our R5S image which sets device_name and link OOTB, and leave the trigger to be set by dietpi-led_control, just to cover the rare case that users want to have them blinking on something different then netdev.

@MichaIng MichaIng modified the milestones: v8.8, v8.9 Aug 29, 2022
@MichaIng MichaIng changed the title LEDs do not work properly. NanoPi R5S | Fix Ethernet LED triggers Aug 29, 2022
MichaIng added a commit that referenced this issue Sep 24, 2022
- NanoPi R5S | The Ethernet LEDs have been enabled. Many thanks to @3735943886 for providing the related sysfs triggers: #5679
@MichaIng MichaIng added the Solution available 🥂 Definite solution has been done label Sep 24, 2022
@MichaIng
Copy link
Owner

Added with: ce358db
Image will be rebuild after release within the next two hours.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants