As you might remember the latest Intel NUC models have a multi-colour ring LED and a power LED. You can set the colour of the LEDs in the BIOS settings and choose if they work as a power or HDD LED. What’s more interesting is the option to configure the LEDs as software controlled. This means that an application could totally customize the behaviour of the LED. However, until this day there hasn’t been really an easy way to actually use these in your own applications.
Miles Peterson has recently published a Linux kernel driver that facilitates easy control of the ring LED and the power LED of the Apollo Lake (NUC6CAYH) and the Kaby Lake (NUC7ixBNH) NUCs. The usage of the driver is well documented on its Github page.
The driver consists of a single source file that has to be compiled before use. On an Ubuntu 16.04 system you’d do the following to download and compile the driver:
git clone https://github.com/milesp20/intel_nuc_led.git cd intel_nuc_led make
If any of the above fails, you probably don’t have some of the necessary software packages installed. Conjure the following in that case and try again:
sudo apt-get install build-essential git linux-headers-$(uname -r)
After a successful compilation you have a nuc_led.ko file in the current directory that you can manually load. If you haven’t loaded the WMI module yet, do that before.
sudo modprobe wmi sudo insmod nuc_led.ko
Now, as long as you have set the LEDs to be software controlled in the BIOS and you have ACPI/WMI support in your kernel you can quite easily read the status of the LEDs:
And equally easily change the status of the LEDs:
echo 'ring,80,blink_medium,green' | sudo tee /proc/acpi/nuc_led > /dev/null
Read the included README.md file for more information on the different options available.
I can already see someone someone writing a Kodi plugin for the ring LED control! If you’ve got a cluster of NUCs you could also nicely express the health or the resource usage level of your NUC using this. Can you think of more cool applications for the LEDs?