Linux Kernel Driver for NUC LED Control

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:

cat /proc/acpi/nuc_led

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?

12 Responses

  1. Techster says:

    This is fantastic news. I know the community has been asking for Linux control of the ring since they came out. I shared this high and low. Thanks Olli!

  2. dinos says:

    Let me understand: out of the box and on Linux Ubuntu the bright ring, though well set by BIOS, does not work?

    • nucblognet says:

      Out of the box, the LED works the same way as it does in Windows. However, if you’d like to customise the LED behaviour, you can do so using this driver. Maybe you want to make it blink in yellow when you have new email and in red when there’s a new Facebook message for you… This driver enables that kind of thing.

  3. A follower says:

    Interesting. One could use the led to display the fan speed, the processor temperature, or the system’s activity (idle/running), among many others…

  4. Daniel says:

    Super cool project! Works like a charm with CentOS 7.4

    One Question: does anyone know how to make LED status NOT persistent after power-off/reset? In my usecase LED should always be off after a restart of my NUC.

  5. Christian Krause says:

    Perfect! Works like a charm.
    I had a very old “Iomega Home Media Network” with a red/white led and a blue/yellow led.
    I used that thing for 6 years now to watch the torrent download status.

    A small fixed point of reference in the fast spinning world.

  6. Alex says:

    Just corrupted my encrypted EXT4 filesystem while working with docker. Could not even boot after that. I wonder if the untested led driver could cause this…

  7. John says:

    I’d love to see this for the NUC8i3 and I’m sure there are people that would like the NUC8i5 as well.

  8. +1 for the NUC8 Bean Canyon!

  9. Jess J says:

    Unfortunately the NUC8 doesn’t *have* a ring LED, so this wouldn’t work. You might still be able to control the power button LED though.

    There is an RGB header on the NUC8, so you might be able to connect something to that, and control it with this driver, but the same driver should work.

  10. I have updated this kernel module to also work with NUC10, maybe others. https://github.com/uboslinux/intel-nuc-led/

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.