Is it possible to disable a notebook's LEDs temporarily? (HDD, Power, Charging)

Some of the LEDs are hardware-only and there's no way to change their status programmatically.

The ones which can be controlled can be accessed via the sysfs virtual filesystem at /sys/class/leds/.

Whether a particular LED can be controlled programmatically or not depends on the particular hardware. For example, my desktop machine has a few LEDs but none of them seem to be controllable. I've also experimented on a couple of laptops, and, while there were a few entries under /sys/class/leds/, I wasn't able to control the status of LEDs, which means, I think, that the particular kernel driver does not allow manually controlling the LEDs, providing a read-only interface. Here's what I tried, without effect:

# cd /sys/class/leds/
# ls
ath9k-phy0
# cd ./ath9k-phy0
# ls
brightness  device  max_brightness  power  subsystem  trigger  uevent
# cat ./trigger 
[none] AC-online BAT0-charging-or-full BAT0-charging BAT0-full BAT0-charging-blink-full-solid usb-gadget usb-host cpu0 cpu1 rfkill1 phy0rx phy0tx phy0assoc phy0radio phy0tpt rfkill4 
# echo 'AC-online' > ./trigger 
# cat ./trigger 
none [AC-online] BAT0-charging-or-full BAT0-charging BAT0-full BAT0-charging-blink-full-solid usb-gadget usb-host cpu0 cpu1 rfkill1 phy0rx phy0tx phy0assoc phy0radio phy0tpt rfkill4 
# echo 'none' > ./trigger 
# echo 'phy0rx' > ./trigger 
# echo 'none' > ./trigger 
# cat ./trigger 
[none] AC-online BAT0-charging-or-full BAT0-charging BAT0-full BAT0-charging-blink-full-solid usb-gadget usb-host cpu0 cpu1 rfkill1 phy0rx phy0tx phy0assoc phy0radio phy0tpt rfkill4 
# cat ./brightness 
0
# cat ./max_brightness 
255
# echo 255 > ./brightness 

Something like the above should, in theory, allow you to control those LEDs which are supported by the kernel drivers for the particular hardware. If there's no support for controlling a particular LED in the kernel, then, short of writing a kernel module, there's not much you can do.

Here's more information on the subject at superuser.

Here's the ultimate source: kernel documentation