aboutsummaryrefslogtreecommitdiff
path: root/powersaving
blob: 75c5605ef5d818c2945ffe266145cd6cc3c2d27e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/sh
# from https://geoff.greer.fm/2017/07/16/thinkpad-x62/

# Disable the NMI watchdog
echo '0' > '/proc/sys/kernel/nmi_watchdog';

# Runtime power management for I2C devices
for i in /sys/bus/i2c/devices/*/device/power/control ; do
  echo auto > ${i}
done

# Runtime power-management for PCI devices
for i in /sys/bus/pci/devices/*/power/control ; do
  echo auto > ${i}
done

# Runtime power-management for USB devices
for i in /sys/bus/usb/devices/*/power/control ; do
  echo auto > ${i}
done

# Low power SATA
for i in /sys/class/scsi_host/*/link_power_management_policy ; do
  echo min_power > ${i}
done

# Disable Wake-on-LAN on ethernet port
#ethtool -s wlan0 wol d;
#ethtool -s eth0 wol d

#Enable Audio codec power management
echo '1' > '/sys/module/snd_hda_intel/parameters/power_save';

# Low power wireless
iw dev wlan0 set power_save on