Mathieu Baudier
2012-Aug-03 07:05 UTC
[CentOS] CentOS 6 : Tip for significantly increasing battery life / reducing power consumption (Thinkpad X220 Tablet)
Hello, I was not happy with the power consumption of CentOS 6 x86_64 on a new Lenovo Thinkpad x220 Tablet and I worked on reducing it. I just wanted to share with the list one of the changes which gave me the most significant improvement. As per http://www.williambrownstreet.net/blog/?p=387, add the following kernel arguments to the GRUB boot configuration: pcie_aspm=force i915.i915_enable_rc6=1 i915.lvds_downclock=1 i915.i915_enable_fbc=1 (in /boot/efi/EFI/redhat/grub.conf since I use EFI, /boot/grub/grub.conf otherwise) As measured using PowerTop, this made the power consumption decrease from 20W to 11W ! (I had already decreased it from 25W to 20W with the usual tips of disabling hardware, shutting down services, switching tuned profiles, etc.) All in all, battery time was more than multiplied by two, and the computer is now much more silent since the fan is not always running like mad in order to cool the processor. The bottom of the laptop is not anymore hot as hell. I don't know whether this would have an impact on other hardware, but it may be worth looking at it (even on servers?), since the above link points to descriptions of a regression in the kernel which seems more general. As a side note, the Power Management Guide of Red Hat is a good resource (analysis tools + tuned profiles): http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html-single/Power_Management_Guide/ Cheers, Mathieu PS: Do you think I should book a bug in the upstream bug tracker?
Fajar Priyanto
2012-Aug-03 08:08 UTC
[CentOS] CentOS 6 : Tip for significantly increasing battery life / reducing power consumption (Thinkpad X220 Tablet)
On Fri, Aug 3, 2012 at 3:05 PM, Mathieu Baudier <mbaudier at argeo.org> wrote:> pcie_aspm=force i915.i915_enable_rc6=1 i915.lvds_downclock=1 > i915.i915_enable_fbc=1Interesting as now I'm using RHEL 6.3 on T400. Would that make the notebook slower? -- http://linux3.arinet.org
Ned Slider
2012-Aug-03 10:05 UTC
[CentOS] CentOS 6 : Tip for significantly increasing battery life / reducing power consumption (Thinkpad X220 Tablet)
On 03/08/12 08:05, Mathieu Baudier wrote:> Hello, > > I was not happy with the power consumption of CentOS 6 x86_64 on a new > Lenovo Thinkpad x220 Tablet and I worked on reducing it. I just wanted > to share with the list one of the changes which gave me the most > significant improvement. > > As per http://www.williambrownstreet.net/blog/?p=387, add the > following kernel arguments to the GRUB boot configuration: > > pcie_aspm=force i915.i915_enable_rc6=1 i915.lvds_downclock=1 > i915.i915_enable_fbc=1 > > (in /boot/efi/EFI/redhat/grub.conf since I use EFI, > /boot/grub/grub.conf otherwise) > > As measured using PowerTop, this made the power consumption decrease > from 20W to 11W ! > (I had already decreased it from 25W to 20W with the usual tips of > disabling hardware, shutting down services, switching tuned profiles, > etc.) > > All in all, battery time was more than multiplied by two, and the > computer is now much more silent since the fan is not always running > like mad in order to cool the processor. The bottom of the laptop is > not anymore hot as hell. > > I don't know whether this would have an impact on other hardware, but > it may be worth looking at it (even on servers?), since the above link > points to descriptions of a regression in the kernel which seems more > general. > > As a side note, the Power Management Guide of Red Hat is a good > resource (analysis tools + tuned profiles): > http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html-single/Power_Management_Guide/ > > Cheers, > > Mathieu > > PS: Do you think I should book a bug in the upstream bug tracker?Rather than filing a bug upstream, I would think it more appropriate to document the various settings on the CentOS Wiki in the laptops section: http://wiki.centos.org/HowTos/Laptops
James A. Peltier
2012-Aug-04 03:23 UTC
[CentOS] CentOS 6 : Tip for significantly increasing battery life / reducing power consumption (Thinkpad X220 Tablet)
----- Original Message ----- | Hello, | | I was not happy with the power consumption of CentOS 6 x86_64 on a | new | Lenovo Thinkpad x220 Tablet and I worked on reducing it. I just | wanted | to share with the list one of the changes which gave me the most | significant improvement. | | As per http://www.williambrownstreet.net/blog/?p=387, add the | following kernel arguments to the GRUB boot configuration: | | pcie_aspm=force i915.i915_enable_rc6=1 i915.lvds_downclock=1 | i915.i915_enable_fbc=1 | | (in /boot/efi/EFI/redhat/grub.conf since I use EFI, | /boot/grub/grub.conf otherwise) | | As measured using PowerTop, this made the power consumption decrease | from 20W to 11W ! | (I had already decreased it from 25W to 20W with the usual tips of | disabling hardware, shutting down services, switching tuned profiles, | etc.) | | All in all, battery time was more than multiplied by two, and the | computer is now much more silent since the fan is not always running | like mad in order to cool the processor. The bottom of the laptop is | not anymore hot as hell. | | I don't know whether this would have an impact on other hardware, but | it may be worth looking at it (even on servers?), since the above | link | points to descriptions of a regression in the kernel which seems more | general. | | As a side note, the Power Management Guide of Red Hat is a good | resource (analysis tools + tuned profiles): | http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html-single/Power_Management_Guide/ | | Cheers, | | Mathieu | | PS: Do you think I should book a bug in the upstream bug tracker? | _______________________________________________ | CentOS mailing list | CentOS at centos.org | http://lists.centos.org/mailman/listinfo/centos | You could also consider just sticking to tuned and then having a look at the power management options as provided there. tuned-adm list will show you some predefined power management options which *can* be tweaked. Do you know what those options due to your machine in order to make the battery last longer? I mean really, do you know what they do? These could be bad options for a number of users and since it's set at kernel boot time how can you override it once the OS has booted? Can you disable this without altering boot parameters and rebooting? If the answer is yes than a tuned configuration should be created or altered to set them dynamically. Setting of these at boot time are likely just wrong. You likely only want these to be turned on when the laptop is not attached to power, which you can create hooks for. This is not a bug, it's a feature/workaround on specific hardware, that tweaks specific settings to get around a specific issue with the driver. Create a profile and submit it upstream. -- James A. Peltier Manager, IT Services - Research Computing Group Simon Fraser University - Burnaby Campus Phone : 778-782-6573 Fax : 778-782-3045 E-Mail : jpeltier at sfu.ca Website : http://www.sfu.ca/itservices http://blogs.sfu.ca/people/jpeltier Success is to be measured not so much by the position that one has reached in life but as by the obstacles they have overcome. - Booker T. Washington
Kahlil Hodgson
2012-Aug-05 04:03 UTC
[CentOS] CentOS 6 : Tip for significantly increasing battery life / reducing power consumption (Thinkpad X220 Tablet)
On 03/08/12 17:05, Mathieu Baudier wrote:> As per http://www.williambrownstreet.net/blog/?p=387, add the > following kernel arguments to the GRUB boot configuration: > > pcie_aspm=force i915.i915_enable_rc6=1 i915.lvds_downclock=1 > i915.i915_enable_fbc=1 > > As measured using PowerTop, this made the power consumption decrease > from 20W to 11W ! > (I had already decreased it from 25W to 20W with the usual tips of > disabling hardware, shutting down services, switching tuned profiles, > etc.)Thanks for the tips. I've got a X220 and power consumption is typically less than 10W, with various powertop tweaks on Fedora 17, giving me 8-9hrs of battery life. The biggest win was setting i915.i915_enable_rc6=1 on the kernel command line, although I've read that this can cause some instability, depending on you kernel and usage -- had a couple of crashes/freezes a 6 months ago, but it seems pretty stable now. The benefits for a laptop definitely out-weigh the inconvenience or a few rare freezes, but it would be different for a server. Might try out the other kernel line options and see if I can do better :-) Here's my /etc/rc.d/rc.local file in case you are interested: ------------------------------------- #!/bin/bash echo 5 > /proc/sys/vm/laptop_mode echo 0 > /proc/sys/kernel/nmi_watchdog echo 1 > /sys/devices/system/cpu/sched_mc_power_savings echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor echo 1500 > /proc/sys/vm/dirty_writeback_centisecs for i in /sys/bus/usb/devices/*/power/autosuspend; do echo 1 > $i; done for i in /sys/bus/usb/devices/*/power/level; do echo auto > $i; done echo min_power > /sys/class/scsi_host/host0/link_power_management_policy echo min_power > /sys/class/scsi_host/host1/link_power_management_policy echo Y > /sys/module/snd_hda_intel/parameters/power_save_controller echo 1 > /sys/module/snd_hda_intel/parameters/power_save for i in /sys/bus/{pci,i2c}/devices/*/power/control; do echo auto > $i; done iwconfig wlan0 power on ------------------------------------- Cheers, Kal -- Kahlil (Kal) Hodgson GPG: C9A02289 Head of Technology (m) +61 (0) 4 2573 0382 DealMax Pty Ltd (w) +61 (0) 3 9008 5281 Suite 1415 401 Docklands Drive Docklands VIC 3008 Australia "All parts should go together without forcing. You must remember that the parts you are reassembling were disassembled by you. Therefore, if you can't get them together again, there must be a reason. By all means, do not use a hammer." -- IBM maintenance manual, 1925
Mathieu Baudier
2013-Mar-24 21:39 UTC
[CentOS] CentOS 6 : Tip for significantly increasing battery life / reducing power consumption (Thinkpad X220 Tablet)
> I was not happy with the power consumption of CentOS 6 x86_64 on a new > Lenovo Thinkpad x220 Tablet and I worked on reducing it. I just wanted > to share with the list one of the changes which gave me the most > significant improvement. > > As per http://www.williambrownstreet.net/blog/?p=387, add the > following kernel arguments to the GRUB boot configuration: > > pcie_aspm=force i915.i915_enable_rc6=1 i915.lvds_downclock=1 > i915.i915_enable_fbc=1As a follow-up: since the update to 6.4, these kernel arguments are *no longer required* in order to have a reasonable power consumption on a Thinkpad X220. With tuned profile 'laptop-battery-powersave', the idle laptop consumes a bit more than 10W (with display turned of: 8W)