Skip to content

Instantly share code, notes, and snippets.

@yuri1969
Last active February 24, 2020 22:33
Show Gist options
  • Save yuri1969/da49ca3d78c77bd20d461e1fd0df088b to your computer and use it in GitHub Desktop.
Save yuri1969/da49ca3d78c77bd20d461e1fd0df088b to your computer and use it in GitHub Desktop.
#!/bin/sh
###################################################
#
# ThinkPad T430
#
# i5-3320M, 3rd Gen Intel GFX, SSD Intel 240G
#
# https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-devices-power
#
###################################################
# Sound system
sudo echo '1' > '/sys/module/snd_hda_intel/parameters/power_save'
# Virt mem
sudo echo '1500' > '/proc/sys/vm/dirty_writeback_centisecs'
# I2C devices
#sudo echo 'auto' > '/sys/bus/i2c/devices/i2c-5/device/power/control'
#sudo echo 'auto' > '/sys/bus/i2c/devices/i2c-9/device/power/control'
# PCI devices
#sudo echo 'auto' > '/sys/bus/pci/devices/0000:00:00.0/power/control'
#sudo echo 'auto' > '/sys/bus/pci/devices/0000:00:1c.1/power/control'
#sudo echo 'auto' > '/sys/bus/pci/devices/0000:00:1f.0/power/control'
#sudo echo 'auto' > '/sys/bus/pci/devices/0000:02:00.0/power/control'
#sudo echo 'auto' > '/sys/bus/pci/devices/0000:00:1d.0/power/control'
#sudo echo 'auto' > '/sys/bus/pci/devices/0000:00:14.0/power/control'
#sudo echo 'auto' > '/sys/bus/pci/devices/0000:00:1f.2/power/control'
#sudo echo 'auto' > '/sys/bus/pci/devices/0000:00:1c.2/power/control'
#sudo echo 'auto' > '/sys/bus/pci/devices/0000:00:1c.0/power/control'
#sudo echo 'auto' > '/sys/bus/pci/devices/0000:00:1a.0/power/control'
#sudo echo 'auto' > '/sys/bus/pci/devices/0000:00:16.0/power/control'
#sudo echo 'auto' > '/sys/bus/pci/devices/0000:00:1b.0/power/control'
# TODO: Try to fix issue Gigabit Ethernet preventing sleep
sudo echo 'on' > '/sys/bus/pci/devices/0000:00:19.0/power/control'
#sudo echo 'auto' > '/sys/bus/pci/devices/0000:03:00.0/power/control'
# SCSI interfaces
#sudo echo 'min_power' > '/sys/class/scsi_host/host0/link_power_management_policy'
#sudo echo 'min_power' > '/sys/class/scsi_host/host1/link_power_management_policy'
#sudo echo 'min_power' > '/sys/class/scsi_host/host2/link_power_management_policy'
#sudo echo 'min_power' > '/sys/class/scsi_host/host3/link_power_management_policy'
#sudo echo 'min_power' > '/sys/class/scsi_host/host4/link_power_management_policy'
#sudo echo 'min_power' > '/sys/class/scsi_host/host5/link_power_management_policy'
# USB devices
sudo echo 'auto' > '/sys/bus/usb/devices/1-1.4/power/control'
sudo echo 'auto' > '/sys/bus/usb/devices/1-1.6/power/control'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment