Skip to content

Instantly share code, notes, and snippets.

@fiji-flo
Created August 9, 2017 18:20
Show Gist options
  • Save fiji-flo/b939a83bc6a553e80df6909effe10403 to your computer and use it in GitHub Desktop.
Save fiji-flo/b939a83bc6a553e80df6909effe10403 to your computer and use it in GitHub Desktop.
some power saving settings
#!/bin/bash
for i in `find /sys/bus/usb/devices/*/power/control`; do
echo auto > $i
done
for i in `find /sys/bus/usb/devices/*/power/autosuspend`; do
echo 2 > $i
done
echo 0 > /proc/sys/kernel/nmi_watchdog
echo 1 > /sys/module/snd_hda_intel/parameters/power_save
for DEVICE in /sys/bus/{pci,spi,i2c}/devices/*; do
[ -d "$DEVICE" ] || continue
CONTROL="$DEVICE/power/control"
[ -w "$CONTROL" ] || continue
echo auto > $CONTROL
done
#iw dev wlp4s0 set power_save off
ethtool -s enp0s31f6 wol d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment