FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 08-03-2012, 07:05 AM
Mathieu Baudier
 
Default 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?
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 08-03-2012, 08:08 AM
Fajar Priyanto
 
Default 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@argeo.org> wrote:
> pcie_aspm=force i915.i915_enable_rc6=1 i915.lvds_downclock=1
> i915.i915_enable_fbc=1

Interesting as now I'm using RHEL 6.3 on T400.
Would that make the notebook slower?

--
http://linux3.arinet.org
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 08-03-2012, 08:16 AM
Mathieu Baudier
 
Default CentOS 6 : Tip for significantly increasing battery life / reducing power consumption (Thinkpad X220 Tablet)

>> pcie_aspm=force i915.i915_enable_rc6=1 i915.lvds_downclock=1
>> i915.i915_enable_fbc=1
>
> Interesting as now I'm using RHEL 6.3 on T400.
> Would that make the notebook slower?

I did not notice any change in performance so far.
(Tested with parallelized, offline, Java build and unit tests)
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 08-03-2012, 10:05 AM
Ned Slider
 
Default 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

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 08-04-2012, 03:23 AM
"James A. Peltier"
 
Default 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@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@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
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 08-04-2012, 10:16 AM
Mathieu Baudier
 
Default CentOS 6 : Tip for significantly increasing battery life / reducing power consumption (Thinkpad X220 Tablet)

> 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.

I have made many tests with tuned and written small scripts to switch
from one profile to the other (laptop-battery-powersave on battery,
default on AC).
Gains where in the 1W to 2W range vs. 9W gain with the kernel
arguments (which is nice now that I'm around 12W, but it was 25W at
the beginning!)

> 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?

They are related to Intel graphic drivers (follow links in OP):
http://www.williambrownstreet.net/blog/?p=387
http://askubuntu.com/questions/38117/battery-life-decreased-after-upgrade-to-11-04

I don't know much more, but what I know is that this single change
increased battery life on my laptop by a factor of two, that the fan
is not running at full speed all the time (it also was on AC), and
that nothing was broken for the last two days I have been working with
it.

> 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.

Definitely, these could be bad options for some users (or, more
likely, irrelevant ones). I posted to the list, so that when somebody
will search for 'centos 6 thinkpad power consumption too high' he will
bump into the Ubuntu related post I linked to (which provides
additional links to the root cause) but also that this person will see
that it worked pretty well in my particular case.

> 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.

The above links rather point to a regression.

I assume that CentOS users are experienced enough to do their own
risks/benefits analysis before applying such tweaks. We can probably
agree that we disagree on that point.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 08-05-2012, 04:03 AM
Kahlil Hodgson
 
Default 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

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 08-09-2012, 04:21 PM
Mathieu Baudier
 
Default CentOS 6 : Tip for significantly increasing battery life / reducing power consumption (Thinkpad X220 Tablet)

>> 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.
>
> Definitely, these could be bad options for some users (or, more
> likely, irrelevant ones). I posted to the list, so that when somebody
> will search for 'centos 6 thinkpad power consumption too high' he will
> bump into the Ubuntu related post I linked to (which provides
> additional links to the root cause) but also that this person will see
> that it worked pretty well in my particular case.

Just a quick note to say that I'm indeed experiencing stability issues.
The X server sometimes freezes and I have to reboot.
Also Firefox crashes more often than not.

I'm slowly trying to find out if this is due to these kernel arguments
or to the combination with Compiz and docking etc. I'll post it here,
if I gather more information.

As James pointed out, caution is required before applying these kernel
arguments.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 01:50 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org