Last active
October 26, 2019 00:19
-
-
Save colerd24/9b760b25915a836a4bcfc587d6456953 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
User modifiable LEDs Linux Path: | |
/sys/class/leds/ | |
Linux Drivers Source Files: | |
https://github.com/torvalds/linux/tree/master/drivers/leds | |
Turn on/off (where x is 1 or 0): | |
echo x | sudo tee "/sys/class/leds/led_name/brightness" # or "brightness" if relative | |
Triggers: | |
Disable LED trigger: echo "none" | sudo tee "/path/to/led/trigger" | |
Change trigger: echo "kbd-capslock" | sudo tee "/path/to/led/trigger" | |
Heartbeat LED Kernel Module: | |
modprobe ledtrig_heartbeat | |
echo "heartbeat" | sudo tee "/path/to/led/trigger" | |
Allowing Persistent Access from Userspace (no sudo): | |
ToDo - should be able to use a udev rule like other drivers (alternatives are script or systemd service) | |
Raspberry Pi Network LEDs: | |
Controllable through USB commands to Ethernet controller - https://github.com/dumpsite/lan951x-led-ctl | |
Other Linux devices probably use "phy0tpt" trigger | |
https://github.com/torvalds/linux/blob/master/drivers/leds/led-class.c |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment