1

I've got a Lenovo Thinkpad, "sometimes" after I wake the laptop from suspend both of its LEDs starts blinking, I can fix the issue by putting the laptop in sleep mode and wake it again (sometimes I have to do it more that of one time).

I know that I can reset their status from "blinking" to "on" using:

echo 0 on | sudo tee /proc/acpi/ibm/led

Is there any specific reason for this? as I can remember a blinking LED was the indicator of something has happened to the system.
And how can I fix the blinking automatically ?

2

Ubuntu 16.04 uses systemd as its init system, we can write a simple script which resets the LED status each time systems wakes from a suspend.

Create a file here:

/lib/systemd/system-sleep/

Name it whatever you want, e.g: led. then make the file executable:

sudo chmod +x /lib/systemd/system-sleep/led

After that write these lines into the file using your desired editor:

#!/bin/bash
if [ "$2" = "suspend" ]; then
    case "$1" in
        pre) /bin/true ;;
        post) /bin/echo 0 on > /proc/acpi/ibm/led ;;
    esac
fi

It says if the event is a "suspend" (e.g: not a "hibernate") and we are in "post" mode (waking from not going into) write the 0 on in /proc/acpi/ibm/led which resets the 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.