From 045d76eadd078b7cd9247fdc27ee00242d3782ac Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Tue, 20 Aug 2024 21:01:18 -0300 Subject: Initial import --- powersaving | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 powersaving (limited to 'powersaving') diff --git a/powersaving b/powersaving new file mode 100755 index 0000000..75c5605 --- /dev/null +++ b/powersaving @@ -0,0 +1,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 -- cgit v1.2.3