After installing Arch only the orange system-led is lit.
Both buttons have no use. Dead.
Also, both HDD leds are triggered at the same time.
USB Led doesn't work either.
I tried tweaking a bit using systemd.
Didn't get very far:
I got all the leds to blink when booting, and go off when booted.
[EDIT] I added a small animation when booting is done. Pretty cool. [/EDIT]
The green system-led is green after booting, and flashes orange when cpu is used.
I use /etc/tmpfile.d/leds.conf to start the blinking on boot.
That was the earliest time during boot I could find to do this...
$this->bbcode_second_pass_code('', 'w /sys/class/leds/nsa325\:orange\:sys/trigger - - - - heartbeat
w /sys/class/leds/nsa325\:red\:hdd1/trigger - - - - heartbeat
w /sys/class/leds/nsa325\:red\:hdd2/trigger - - - - heartbeat
w /sys/class/leds/nsa325\:green\:usb/trigger - - - - heartbeat
w /sys/class/leds/nsa325\:green\:copy/trigger - - - - heartbeat
')
Then I use /usr/lib/systemd/system/leds.service to stop the blinking when booted.
[EDIT] This script runs when booting is totally completed. [/EDIT]
This also re-starts the blinking when I reboot/shutdown (in a much cooler way)
$this->bbcode_second_pass_code('', '[Unit]
Description=Set LEDs
After=multi-user.target
[Service]
Type=oneshot
RemainAfterExit=true
ExecStartPre=/usr/bin/bash -c '/usr/bin/echo none > /sys/class/leds/nsa325\:green\:copy/trigger'
ExecStartPre=/usr/bin/bash -c '/usr/bin/echo none > /sys/class/leds/nsa325\:green\:usb/trigger'
ExecStartPre=/usr/bin/bash -c '/usr/bin/echo none > /sys/class/leds/nsa325\:red\:hdd2/trigger'
ExecStartPre=/usr/bin/bash -c '/usr/bin/echo none > /sys/class/leds/nsa325\:red\:hdd1/trigger'
ExecStartPre=/usr/bin/bash -c '/usr/bin/echo none > /sys/class/leds/nsa325\:orange\:sys/trigger'
ExecStartPre=/usr/bin/bash -c '/usr/bin/echo default-on > /sys/class/leds/nsa325\:green\:sys/trigger'
ExecStartPre=/usr/bin/bash -c '/usr/bin/echo default-on > /sys/class/leds/nsa325\:green\:hdd1/trigger'
ExecStartPre=/usr/bin/bash -c '/usr/bin/echo default-on > /sys/class/leds/nsa325\:green\:hdd2/trigger'
ExecStartPre=/usr/bin/bash -c '/usr/bin/echo default-on > /sys/class/leds/nsa325\:green\:usb/trigger'
ExecStartPre=/usr/bin/bash -c '/usr/bin/echo default-on > /sys/class/leds/nsa325\:green\:copy/trigger'
ExecStartPre=/usr/bin/bash -c '/usr/bin/echo none > /sys/class/leds/nsa325\:green\:sys/trigger'
ExecStartPre=/usr/bin/bash -c '/usr/bin/echo none > /sys/class/leds/nsa325\:green\:hdd1/trigger'
ExecStartPre=/usr/bin/bash -c '/usr/bin/echo none > /sys/class/leds/nsa325\:green\:hdd2/trigger'
ExecStartPre=/usr/bin/bash -c '/usr/bin/echo none > /sys/class/leds/nsa325\:green\:usb/trigger'
ExecStartPre=/usr/bin/bash -c '/usr/bin/echo none > /sys/class/leds/nsa325\:green\:copy/trigger'
ExecStartPre=/usr/bin/bash -c '/usr/bin/echo default-on > /sys/class/leds/nsa325\:green\:copy/trigger'
ExecStartPre=/usr/bin/bash -c '/usr/bin/echo default-on > /sys/class/leds/nsa325\:green\:usb/trigger'
ExecStartPre=/usr/bin/bash -c '/usr/bin/echo default-on > /sys/class/leds/nsa325\:green\:hdd2/trigger'
ExecStartPre=/usr/bin/bash -c '/usr/bin/echo default-on > /sys/class/leds/nsa325\:green\:hdd1/trigger'
ExecStartPre=/usr/bin/bash -c '/usr/bin/echo default-on > /sys/class/leds/nsa325\:green\:sys/trigger'
ExecStartPre=/usr/bin/bash -c '/usr/bin/echo none > /sys/class/leds/nsa325\:green\:copy/trigger'
ExecStartPre=/usr/bin/bash -c '/usr/bin/echo none > /sys/class/leds/nsa325\:green\:usb/trigger'
ExecStartPre=/usr/bin/bash -c '/usr/bin/echo none > /sys/class/leds/nsa325\:green\:hdd2/trigger'
ExecStartPre=/usr/bin/bash -c '/usr/bin/echo none > /sys/class/leds/nsa325\:green\:hdd1/trigger'
ExecStartPre=/usr/bin/bash -c '/usr/bin/echo ide-disk > /sys/class/leds/nsa325\:green\:hdd1/trigger'
ExecStartPre=/usr/bin/bash -c '/usr/bin/echo ide-disk > /sys/class/leds/nsa325\:green\:hdd2/trigger'
ExecStartPre=/usr/bin/bash -c '/usr/bin/echo default-on > /sys/class/leds/nsa325\:green\:sys/trigger'
ExecStart=/usr/bin/bash -c '/usr/bin/echo cpu0 > /sys/class/leds/nsa325\:orange\:sys/trigger'
ExecStop=/usr/bin/bash -c '/usr/bin/echo none > /sys/class/leds/nsa325\:green\:sys/trigger'
ExecStopPost=/usr/bin/bash -c '/usr/bin/echo heartbeat > /sys/class/leds/nsa325\:orange\:sys/trigger'
ExecStopPost=/usr/bin/bash -c '/usr/bin/echo heartbeat > /sys/class/leds/nsa325\:red\:hdd1/trigger'
ExecStopPost=/usr/bin/bash -c '/usr/bin/echo heartbeat > /sys/class/leds/nsa325\:red\:hdd2/trigger'
ExecStopPost=/usr/bin/bash -c '/usr/bin/echo heartbeat > /sys/class/leds/nsa325\:green\:usb/trigger'
ExecStopPost=/usr/bin/bash -c '/usr/bin/echo heartbeat > /sys/class/leds/nsa325\:green\:copy/trigger'
[Install]
WantedBy=multi-user.target
')
This last file is a service that has to be enabled:
$this->bbcode_second_pass_code('', 'systemctl enable leds')
The files above are easily edited to your liking.
Check the folder /sys/class/leds for available leds:
$this->bbcode_second_pass_code('', 'ls /sys/class/leds')
Each led can be sent one of the following options:
none, nand-disk, timer, ide-disk, heartbeat, cpu0, default-on
For the leds.service, the ExecStartPre entries are run before running ExecStart. Then it stops.
When shutting down or rebooting, the ExecStop entry is run, then all the ExecStopPost entries.
If you're just looking to change the led's behaviour after booting, you're best off with just setting the led's options as you want them in the /etc/tmpfiles.d/leds.conf file. No need to run an extra service in such a case.
The service is mainly to stop the flashing (and while it's there, restart flashing on reboot/shutdown).
[EDIT] Also, the service shows when the system is completely done booting. The tmpfile kicks in earlier. [/EDIT]
I guess there should also be a way to get the Buttons and USB led working this way...?