1

I have an Intel NUC, and I've compiled a kernel extension to control the LED. It has created a .ko file at /lib/modules/4.15.0-38-generic/updates/dkms/nuc_led.ko (which matches uname -r). Manually loading the extension works great:

sudo modprobe wmi
sudo insmod /lib/modules/4.15.0-38-generic/updates/dkms/nuc_led.ko
echo 'ring,80,blink_medium,green' | sudo tee /proc/acpi/nuc_led > /dev/null

This works.

However the extension is not currently loaded at boot. I would like to put commands to turn the LED on and off in rc.local and rc6.d/ but these are not working, I have to run the modprobe commands manually, and even then my file in rc6.d/ (shown below) is not working - the LED remains on.

What am I doing wrong?

$ cat /etc/rc6.d/zz_led_off.sh
#! /bin/bash

echo 'ring,0,none,off' | sudo tee /proc/acpi/nuc_led > /dev/null

$ ls -la /etc/rc6.d/zz_led_off.sh | grep zz
-rwxr-xr-x   1 root root   79 Nov  9 10:07 zz_led_off.sh
  • why not compile directly into the kernel, instead of being a module? – Doug Smythies Nov 9 '18 at 16:18
  • @DougSmythies I'm not sure what that means, how would I compile it directly into the kernel? – user31415629 Nov 12 '18 at 15:32
  • Sorry, I think I was wrong. If I understand correctly, because it isn't part of the kernel code, but rather an extension to it, I don't think direct compile into the kernel is an option. – Doug Smythies Nov 12 '18 at 15:51
1

Add the module to /etc/modules, in this case, add the following two lines:

wmi
nuc_led

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.