Search This Blog

Monday, January 7, 2013

Powersaving for Lenovo x220i

Tunes for power saving on my Lenovo x220i

You can find something usefull here: thinkwiki

Tunes from lesswatts.org

nmi_watchdog=0
pcie_aspm=force

echo 1 > /sys/devices/system/cpu/sched_mc_power_savings
echo 1 > /sys/devices/system/cpu/sched_smt_power_savings

echo 5 > /proc/sys/vm/laptop_mode
# default 0

echo 1500 > /proc/sys/vm/dirty_writeback_centisecs
# default 500

hdparm -B 1 -S 12 /dev/sda
# default -B 128

echo 10 > /sys/module/snd_hda_intel/parameters/power_save
# default 0

if your requirements for syslog are less strict than described above, you can
edit the /etc/syslog.conf file and add a "-" in front of this line:
   *.info;mail.none;authpriv.none;cron.none        /var/log/messages
like this:
   *.info;mail.none;authpriv.none;cron.none        -/var/log/messages

/sys/class/scsi_host/

echo auto > /sys/bus/pci/devices/0000:00:00.0/power/control
echo auto > /sys/bus/pci/devices/0000:00:02.0/power/control
echo auto > /sys/bus/pci/devices/0000:00:16.0/power/control
echo auto > /sys/bus/pci/devices/0000:00:19.0/power/control
echo auto > /sys/bus/pci/devices/0000:00:1a.0/power/control
echo auto > /sys/bus/pci/devices/0000:00:1b.0/power/control
echo auto > /sys/bus/pci/devices/0000:00:1c.0/power/control
echo auto > /sys/bus/pci/devices/0000:00:1c.1/power/control
echo auto > /sys/bus/pci/devices/0000:00:1c.3/power/control
echo auto > /sys/bus/pci/devices/0000:00:1c.4/power/control
echo auto > /sys/bus/pci/devices/0000:00:1d.0/power/control
echo auto > /sys/bus/pci/devices/0000:00:1f.0/power/control
echo auto > /sys/bus/pci/devices/0000:00:1f.2/power/control
echo auto > /sys/bus/pci/devices/0000:00:1f.3/power/control
echo auto > /sys/bus/pci/devices/0000:00:1f.5/power/control
echo auto > /sys/bus/pci/devices/0000:03:00.0/power/control
echo auto > /sys/bus/pci/devices/0000:0d:00.0/power/control
# default on

echo 'min_power' > /sys/class/scsi_host/host0/link_power_management_policy
# default max_performance

#echo SATA_ALPM_ENABLE=true >> /etc/pm/config.d/sata_alpm


And from amarao-san livejournal
most important:

  pcie_aspm=force
  # in grub config
  # GRUB_CMDLINE_LINUX_DEFAULT add 'pcie_aspm=force' (delimiter space)
  # update-grub
  #
  # in sysfs
  # echo powersave > /sys/module/pcie_aspm/parameters/policy
  # default performance powersave

  i915_enable_rc6=true
  # to grub config same as pcie_aspm
  # check 'i915.lvds_downclock=1 i915.semaphores=1'

  SATA link power management
  # echo SATA_ALPM_ENABLE=true >> /etc/pm/config.d/sata_alpm


  xset +dpms
  xset dpms 0 0 300

  # dpms options to .xinitrc for screen powersave


source
= Tricks and Tips to Reduce Power Consumption =

Enable ALPM:
 echo SATA_ALPM_ENABLE=true | sudo tee /etc/pm/config.d/sata_alpm

 can save ~1-2W, may cause data corruption on some hardware

Change background to a lighter colour on laptop LCD
 can save ~1%

Enable i915 rc6:
 kernel parameter: i915.i915_enable_rc6=1
 can save 25-40% on Sandybridge
 known to lockup on some machines

Enable i915 Framebuffer Compression:
 kernel parameter: i915.i915_enable_fbc=1
 LessWatts believes it can save 0.6 Watts

DRM vblank off delay:
 kernel parameter: drm.vblankoffdelay=1
 Reduces wakeup events, possibly saves power

Disable any wireless you don't need (e.g. from desktop or blacklist bluetooth)
 E.g. bluetooth, saves ~1-2W

Disable webcam
 add "blacklist uvcvideo" to /etc/modprobe.d/blacklist.conf
 can save ~1-2W
 
Use PowerTop to put the following devices into a "Good" power saving state:
 * Webcam
 * Audio
 * DRAM
 * Ethernet
 * Wifi
 * Bluetooth
 * SATA link
 * MMC/SD

PCIe ASPM
 Use Ubuntu Precise kernel - has PCIe ASPM fix in.
 Or force to powersave using kernel parameter: pcie_aspm=powersave

Laptop Backlight
 Don't use at full brightness.
 Drop to 2/3 brightness level - will save ~1W

Disable flashing cursor on gnome-terminal:
 gconftool-2 --type string --set /apps/gnome-terminal/profiles/Default/cursor_blink_mode off
 can save a few wakeups/second

No comments:

Post a Comment