I want to be able to control the two dual (orange/white) LEDs on my HP Probook 4540s laptop. However, I don't see them in the list:


The last three items are obviously referring to the Ralink WiFi/BT card, but changing the brightness for any of them doesn't affect the LEDs (works fine for others).

My question is where do those entries in /sys/ come from? Is it possible to add my own? Any (HP specific?) system drivers that enable this?

The only way I've seen the LED change colors is when activating both Wifi and Bluetooth, but that only worked on a specific set of drivers and/or under specific ACPI setting (can't remember which, but it caused some of the key features not to work, so I gave up on using Bluetooth at all).

Not sure if it has to do something with the generic drivers I'm using:

GENERAL.PRODUCT:  RT3290 Wireless 802.11n 1T/1R PCIe (Ralink RT3290LE 802.11bgn 1x1 Wi-Fi and Bluetooth 4.0 Combo Adapter)
GENERAL.DRIVER:   rt2800pci
  • You should add the purpose of the dual-color LEDs you're describing. – Byte Commander Mar 19 '16 at 13:17
  • 2
    /sys is an interface to the kernel. You'll probably have to do kernel module programming to add to it, which would be too broad and off-topic for us. – muru Mar 19 '16 at 13:21
  • @ByteCommander I'm not sure about it, they are next to Open Browser and WLAN Switch buttons and the only time I've seen the right one switch to white is when I had both the Wifi and Bluetooth working (gave up on BT afterwards as stated in the question). – Shomz Mar 19 '16 at 13:22
  • @muru that's helpful, thank you. Do you know if there's a way to get the full LED list by changing certain system drivers? – Shomz Mar 19 '16 at 13:24
  • Dunno. Maybe you can make some sense of derekmolloy.ie/kernel-gpio-programming-buttons-and-leds and kernel.org/doc/Documentation/leds/leds-class.txt – muru Mar 19 '16 at 13:34

These commands worked for my HP Pavilion g7 2269wm running elementary OS freya (based on Ubuntu 14.04).

Make LED orange

echo 1 | sudo tee /sys/class/leds/hp::hddprotect/brightness

Make LED white (default)

echo 0 | sudo tee /sys/class/leds/hp::hddprotect/brightness

After running the first command your LED should turn orange even when there is no disk activity and becomes a mix of white and orange with disk activity.

The second command will make it white again and turn off when no disk activty like default.

This file is used by the lis3lv02d kernel driver to change the color when the laptop is dropped while also parking the hard drive.

| improve this answer | |
  • That one works fine - I wrote: "The last three items are obviously referring to the Ralink WiFi/BT card, but changing the brightness for any of them doesn't affect the LEDs (works fine for others)." I'm curious about getting the WiFi LED working. It's also a dual-color LED. Using HP Probook 4540s. This is the LED: withsteps.com/wp-content/uploads/2013/11/… – Shomz Jul 15 '16 at 12:37
  • I can't test that one since recently the WiFi LED on my keyboard burned.And yours isn't on the keyboard so I think it is different – Suici Doga Jul 15 '16 at 12:39
  • Yeah, I'm not sure what's controlling it. I've seen it change the color with specific drivers and BT/WiFi setup, so it's doable, but I have no idea why it's not responding to the standard brightness parameters. – Shomz Jul 15 '16 at 12:44
  • Thank you, by skimming through the code I've seen the wifi handler only managing/setting up the rfkill states, nothing related to controlling the LEDs. I'll give it a better look later. – Shomz Jul 15 '16 at 12:58

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.