Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- if on_ac_power; then
- # Reset back to normal settings
- #Wireless Power Saving for interface wlan0
- iw dev wlan0 set power_save off
- #Enable SATA link power management for /dev/sda
- echo 'min_power' > '/sys/class/scsi_host/host0/link_power_management_policy'
- #VM writeback timeout
- echo '1500' > '/proc/sys/vm/dirty_writeback_centisecs'
- #Enable Audio codec power management
- echo '1' > '/sys/module/snd_hda_intel/parameters/power_save'
- #Autosuspend for USB device DW375 Bluetooth Module [Dell Computer Corp]
- echo 'auto' > '/sys/bus/usb/devices/1-1.4/power/control'
- #Runtime PM for PCI Device NVIDIA Corporation GF108 High Definition Audio Controller
- echo 'auto' > '/sys/bus/pci/devices/0000:01:00.1/power/control'
- #Runtime PM for PCI Device O2 Micro, Inc. OZ600 1394a-2000 Controller
- echo 'auto' > '/sys/bus/pci/devices/0000:0b:00.0/power/control'
- #Runtime PM for PCI Device Intel Corporation 2nd Generation Core Processor Family DRAM Controller
- echo 'auto' > '/sys/bus/pci/devices/0000:00:00.0/power/control'
- #Runtime PM for PCI Device Intel Corporation 82579LM Gigabit Network Connection
- echo 'auto' > '/sys/bus/pci/devices/0000:00:19.0/power/control'
- #Runtime PM for PCI Device Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller
- echo 'auto' > '/sys/bus/pci/devices/0000:00:1b.0/power/control'
- #Runtime PM for PCI Device Intel Corporation Centrino Ultimate-N 6300
- echo 'auto' > '/sys/bus/pci/devices/0000:03:00.0/power/control'
- #Wake-on-lan status for device eth0
- ethtool -s eth0 wol d
- else
- # Turn on aggressive power savings
- #NMI watchdog should be turned off
- echo '0' > '/proc/sys/kernel/nmi_watchdog'
- #VM writeback timeout
- echo '1500' > '/proc/sys/vm/dirty_writeback_centisecs'
- #Enable SATA link power management for /dev/sda
- echo 'min_power' > '/sys/class/scsi_host/host0/link_power_management_policy'
- #Autosuspend for USB device DW5550 [Dell]
- echo 'auto' > '/sys/bus/usb/devices/2-1.6/power/control'
- #Autosuspend for USB device Extreme [SanDisk]
- echo 'auto' > '/sys/bus/usb/devices/2-1.1/power/control'
- #Autosuspend for USB device 5880 [Broadcom Corp]
- echo 'auto' > '/sys/bus/usb/devices/2-1.8/power/control'
- #Runtime PM for PCI Device NEC Corporation uPD720200 USB 3.0 Host Controller
- echo 'auto' > '/sys/bus/pci/devices/0000:0a:00.0/power/control'
- #Runtime PM for PCI Device NVIDIA Corporation GF108GLM [Quadro 1000M]
- echo 'auto' > '/sys/bus/pci/devices/0000:01:00.0/power/control'
- #Runtime PM for PCI Device O2 Micro, Inc. OZ600 MMC/SD Controller
- echo 'auto' > '/sys/bus/pci/devices/0000:0b:00.1/power/control'
- #Runtime PM for PCI Device O2 Micro, Inc. OZ600 MS/xD Controller
- echo 'auto' > '/sys/bus/pci/devices/0000:0b:00.2/power/control'
- #Runtime PM for PCI Device Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller
- echo 'auto' > '/sys/bus/pci/devices/0000:00:1f.3/power/control'
- #Runtime PM for PCI Device Intel Corporation 6 Series/C200 Series Chipset Family 6 port SATA AHCI Controller
- echo 'auto' > '/sys/bus/pci/devices/0000:00:1f.2/power/control'
- #Runtime PM for PCI Device Intel Corporation Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port
- echo 'auto' > '/sys/bus/pci/devices/0000:00:01.0/power/control'
- #Runtime PM for PCI Device Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1
- echo 'auto' > '/sys/bus/pci/devices/0000:00:16.0/power/control'
- #Runtime PM for PCI Device Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1
- echo 'auto' > '/sys/bus/pci/devices/0000:00:1d.0/power/control'
- #Runtime PM for PCI Device Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2
- echo 'auto' > '/sys/bus/pci/devices/0000:00:1a.0/power/control'
- #Runtime PM for PCI Device Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1
- echo 'auto' > '/sys/bus/pci/devices/0000:00:1c.0/power/control'
- #Runtime PM for PCI Device Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 2
- echo 'auto' > '/sys/bus/pci/devices/0000:00:1c.1/power/control'
- #Runtime PM for PCI Device Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 3
- echo 'auto' > '/sys/bus/pci/devices/0000:00:1c.2/power/control'
- #Runtime PM for PCI Device Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 4
- echo 'auto' > '/sys/bus/pci/devices/0000:00:1c.3/power/control'
- #Runtime PM for PCI Device Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 8
- echo 'auto' > '/sys/bus/pci/devices/0000:00:1c.7/power/control'
- #Runtime PM for PCI Device Intel Corporation QM67 Express Chipset Family LPC Controller
- echo 'auto' > '/sys/bus/pci/devices/0000:00:1f.0/power/control'
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement