[Kernel] LED Trigger for block devices

I would just like to make you aware of a cool patchset:

https://lkml.org/lkml/2021/9/9/1849

You can also grab it from my kernel: Files · torvic-5.14-ledtrig · torvic9 / Linux Stable · GitLab

This is super useful for computers that do not have a dedicated hard drive activity LED:
I've just tested this by putting the activity LED to my CapsLock LED, and it works! And, dare I say, it's freakin' awesome :slight_smile:
(blinking intervals and duration can be configured)

EDIT:
And you can add any block device to any recognized LED on your computer.
If I were talented I would try to build a microcontroller having LEDs for every device including swap. Avis aux amateurs!

5 Likes

Really nice :star_struck:

Though I won't need it because my pc doesn't boot if my hard drive is not working :sweat_smile:
(Even though I have separate ssd for os files.)

2 Likes

I have been so annoyed with the absence of 'feedback'.
This is perfect for me :slight_smile:
(can be annoying itself though, don't exagerate :slight_smile:

1 Like

Btw, can it be modified so that it can be used for webcam or mic devices too?

Will be actually helpful, as for privacy purposes.

1 Like

Check our output of /sys/class/led to see which devices can configured.

EDIT: it is leds, plural!

2 Likes

It shows me LEDs not devices

ls /sys/class/leds
input3::capslock  input3::numlock  input3::scrolllock

:sweat_smile:

Wait, did you mean

/sys/block

?

2 Likes

Three possibilities :slight_smile:

No seriously, I think it depends on the BIOS.
I have all my keyboard LEDs available (scrol/caps/num), and the gamepad. YMMV.

2 Likes

I would like to test numlock for hard drive and scrolllock for ssd. I never use these led anyway.
Let me see!
And thanks for your awesome work.

2 Likes

It is not my work.
But it is useful work.

Long may if continue! Maybe something to considered in the future of Garuda.
(simply folllow the thread above))

2 Likes