Public paste
Undefined
By: Guest | Date: Dec 26 2009 20:34 | Format: None | Expires: never | Size: 810 B | Hits: 482

  1. #!/bin/sh
  2. #rc.local
  3.  
  4. /home/blake/Power_Saving
  5. cd /home/blake
  6. su blake /home/blake/Power_Saving
  7. exit 0
  8.  
  9.  
  10.  
  11. /////////////////////////////////
  12.  
  13. This is the Power_Saving file!
  14.  
  15. #!/bin/bash
  16. if on_ac_power; then
  17. # Reset back to normal settings
  18.   echo 0 > /proc/sys/vm/laptop_mode
  19.   echo 10 > /proc/sys/vm/dirty_ratio
  20.   echo 5 > /proc/sys/vm/dirty_background_ratio
  21.   echo 500 > /proc/sys/vm/dirty_writeback_centisecs
  22.   echo max_performance > /sys/class/scsi_host/host0/link_power_management_policy
  23. else
  24. # Turn on aggressive power savings
  25.   echo 5 > /proc/sys/vm/laptop_mode
  26.   echo 40 > /proc/sys/vm/dirty_ratio
  27.   echo 10 > /proc/sys/vm/dirty_background_ratio
  28.   echo 1500 > /proc/sys/vm/dirty_writeback_centisecs
  29.   echo min_power > /sys/class/scsi_host/host0/link_power_management_policy
  30. fi
Latest pastes
3 days ago
15 days ago
20 days ago
22 days ago
23 days ago