Skip to content

Instantly share code, notes, and snippets.

@MarkWalters-dev
Last active August 27, 2022 17:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MarkWalters-dev/089a6b776a17858c5f869e37788959aa to your computer and use it in GitHub Desktop.
Save MarkWalters-dev/089a6b776a17858c5f869e37788959aa to your computer and use it in GitHub Desktop.
Turn off LEDs on a Lenovo p72
# echo version, requires sudo
echo 0 off > /proc/acpi/ibm/led # power button led
echo 10 off > /proc/acpi/ibm/led # lid led
echo 0 > /sys/devices/platform/thinkpad_acpi/leds/platform::micmute/brightness # mic mute led
echo 0 > /sys/devices/platform/thinkpad_acpi/leds/platform::mute/brightness # mute led
echo 0 > /sys/devices/pci0000:00/0000:00:14.3/leds/phy0-led/brightness # wifi led
# echo version with sudo
sudo bash -c "
echo 0 off > /proc/acpi/ibm/led # power button led
echo 10 off > /proc/acpi/ibm/led # lid led
echo 0 > /sys/devices/platform/thinkpad_acpi/leds/platform::micmute/brightness # mic mute led
echo 0 > /sys/devices/platform/thinkpad_acpi/leds/platform::mute/brightness # mute led
echo 0 > /sys/devices/pci0000:00/0000:00:14.3/leds/phy0-led/brightness # wifi led
"
# herestring cat version, also requires sudo
cat <<<"0 off" > /proc/acpi/ibm/led # power button led
cat <<<"10 off" > /proc/acpi/ibm/led # lid led
cat <<<0 > /sys/devices/platform/thinkpad_acpi/leds/platform::micmute/brightness # mic mute led
cat <<<0 > /sys/devices/platform/thinkpad_acpi/leds/platform::mute/brightness # mute led
cat <<<0 > /sys/devices/pci0000:00/0000:00:14.3/leds/phy0-led/brightness # wifi led
# tee version with sudo
sudo tee /proc/acpi/ibm/led <<<"0 off" # power button led
sudo tee /proc/acpi/ibm/led <<<"10 off" # lid led
sudo tee /sys/devices/platform/thinkpad_acpi/leds/platform::micmute/brightness <<<0 # mic mute led
sudo tee /sys/devices/platform/thinkpad_acpi/leds/platform::mute/brightness <<<0 # mute led
sudo tee /sys/devices/pci0000:00/0000:00:14.3/leds/phy0-led/brightness <<<0 # wifi led
# tee version with output suppressed
sudo bash -c '
tee /proc/acpi/ibm/led <<<"0 off" # power button led
tee /proc/acpi/ibm/led <<<"10 off" # lid led
tee /sys/devices/platform/thinkpad_acpi/leds/platform::micmute/brightness <<<0 # mic mute led
tee /sys/devices/platform/thinkpad_acpi/leds/platform::mute/brightness <<<0 # mute led
tee /sys/devices/pci0000:00/0000:00:14.3/leds/phy0-led/brightness <<<0 # wifi led
' >/dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment