Announcement

Collapse
No announcement yet.

Linux 3.1 Kernel Draws More Power With Another Regression

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #31
    Originally posted by btux View Post
    Luckily the power regression on sandybridge hardware can be worked around easily by adding i915.i915_enable_rc6=1 to the kernel command line.
    See bug report for fedora 15: https://bugzilla.redhat.com/show_bug.cgi?id=727579
    Thanks for that reference. I noticed a spike in power consumption with Linux 3.0. Applying that workaround brought it back to sane levels.

    Comment


    • #32
      I read that these might help, but some system won't boot with them.
      i915.i915_enable_rc6=1
      pcie_aspm=force
      i915.i915_enable_fbc=1
      i915.lvds_downclock=1

      Comment


      • #33
        Originally posted by liam View Post
        Cool, thanks.
        I use powertop as well, and my system is pretty similiar to yours (you didn't mention the screen size, but I'll assume 14"-15").
        Mine is T510 with M620 (i7 2.66GHz) 15" screen @ 1600x900, intel HD graphics and I'm generally in the 18-20W range while IDLE (with FF/Xchat/evince/etc open). Really odd that I'm running through so much more power.
        What configuration did you do?

        Best/Liam
        I have a T410 and I don't think this generation of lenovo machines have brilliant run-times; the lowest wattage I've got out of my machine is about 10W, but usually it's more like 13W. First tip: use powertop and close high-usage applications. In some cases KDE seems to suck a lot of power (though not always); a simpler DE like LXDE or even gnome 2 may save power. Firefox may not be the best web-browser for power-usage.

        Second, here's some notes for driver tuning:

        Code:
        #!/bin/bash
        
        # This is a collection of notes about various laptop power-tuning I've found on
        # the internet and tested on a lenovo T410.
        
        # Booting with the pcie_aspm=force kernel option helps:
        # Force ASPM:
        # 13.4W idle, 34W glxgears
        # Without:
        # 14.6W idle, 35W glxgears
        
        # Wifi appears to use about 1.8W
        # Wifi power saving (enabled by powertop) saves perhaps half a watt
        
        # Screen uses perhaps 4.5W more on full brightness than on minimum
        
        # These tweaks can only be done by root
        if [ "$(id -u)" != "0" ]; then
           echo "This script must be run as root" 1>&2
           exit 1
        fi
        
        # Setting power control of all devices to auto possibly saves about 0.8W (need
        # to do a better test):
        # (Note that this appears to disable external mice until you re-plug them in.)
        setauto() {
            file=$1
            
            if [[ "$file" =~ 'power' ]]
            then
                if [[ "$(cat $file)" != "auto" ]]
                then
                    echo -n $file: 
                    cat $file
                    echo "auto" > $file
                fi
            fi
        }
        for f in $(find /sys/devices/pci* -name "control")
        do
            setauto $f
        done
        
        # Disabling nmi_watchdog has no obvious effect:
        # echo 0 > /proc/sys/kernel/nmi_watchdog
        
        # Turning off USB (instead of leaving auto) appears to have no effect:
        # (I seem to have lost the commands to do this. Never mind.)

        Comment


        • #34
          Face-Palm!
          Michael this is a known bug with the intel power management for sandy balls.
          Obviously you forget the fact that the latest drivers for the latest hardware are generally unstable in this world and options are chosen to improve the stability.

          Comment


          • #35
            Originally posted by lgstoian View Post
            So since this regresions have been discovered no developer noticed them even if they have been higly present in the media.
            I would love to solve the bugs myself but I'm an arhitect I have no idea about brograming. This is a problem too comon present in the linux world. Noone cares about users that are jsut users we aren't programers. And these bugs usually afect us the most.
            You can still contribute if you learn to build your own kernel and bisect regressions. It doesn't require programming knowledge and those of us with the knowledge, but not the time to bisect, could look at it.

            I have the inverse problem. I know C, but not how to bisect and I have little time to learn. :/

            Originally posted by F.Ultra View Post
            Why would they care about laptops? IBM only sells servers, Google only uses servers or mobile phones (platforms where this power regression doesn't come into play) and Red Hat mainly focuses on servers. I think the big question is where Ubuntu is, they should be the ones that has most customers targeted by this issue right now.
            Power consumption is an important consideration for datacenters. It does come into play.

            Originally posted by liam View Post
            Y

            Yeah. Sitting at a terminal with most hardware not having drivers would make for a pretty efficient system j/k
            I tried doing that last night and saw a 5-6 watt increase in power consumption in powertop. I assume it is because of the LCD backlight.


            Originally posted by Cyborg16 View Post
            I have a T410 and I don't think this generation of lenovo machines have brilliant run-times; the lowest wattage I've got out of my machine is about 10W, but usually it's more like 13W. First tip: use powertop and close high-usage applications. In some cases KDE seems to suck a lot of power (though not always); a simpler DE like LXDE or even gnome 2 may save power. Firefox may not be the best web-browser for power-usage.

            Second, here's some notes for driver tuning:

            Code:
            #!/bin/bash
            
            # This is a collection of notes about various laptop power-tuning I've found on
            # the internet and tested on a lenovo T410.
            
            # Booting with the pcie_aspm=force kernel option helps:
            # Force ASPM:
            # 13.4W idle, 34W glxgears
            # Without:
            # 14.6W idle, 35W glxgears
            
            # Wifi appears to use about 1.8W
            # Wifi power saving (enabled by powertop) saves perhaps half a watt
            
            # Screen uses perhaps 4.5W more on full brightness than on minimum
            
            # These tweaks can only be done by root
            if [ "$(id -u)" != "0" ]; then
               echo "This script must be run as root" 1>&2
               exit 1
            fi
            
            # Setting power control of all devices to auto possibly saves about 0.8W (need
            # to do a better test):
            # (Note that this appears to disable external mice until you re-plug them in.)
            setauto() {
                file=$1
                
                if [[ "$file" =~ 'power' ]]
                then
                    if [[ "$(cat $file)" != "auto" ]]
                    then
                        echo -n $file: 
                        cat $file
                        echo "auto" > $file
                    fi
                fi
            }
            for f in $(find /sys/devices/pci* -name "control")
            do
                setauto $f
            done
            
            # Disabling nmi_watchdog has no obvious effect:
            # echo 0 > /proc/sys/kernel/nmi_watchdog
            
            # Turning off USB (instead of leaving auto) appears to have no effect:
            # (I seem to have lost the commands to do this. Never mind.)
            I was looking into these things last night. You can make that command a one liner:

            Code:
            for i in $(find /sys/devices/pci* -wholename "/sys/devices/pci*/power/control"); do if [[ "$(cat $i)" == "on" ]]; then echo "auto" > $i; fi; done;
            I did something like this on my laptop, but it was simplier. After looking through yours, I made it a bit longer to check more things, but the effect appears to be the same. This is what I did on my laptop:

            Code:
            for i in $(find /sys/devices/pci* -name "control"); do if [[ $(cat $i) == "on" ]]; then echo "auto" > $i; fi; done;
            I am still testing this to find out if it is safe on my laptop. This appears to affect all devices listed under lspci, plus some attached usb devices.
            Last edited by Shining Arcanine; 23 August 2011, 12:01 PM.

            Comment


            • #36
              Originally posted by Shining Arcanine View Post
              You can still contribute if you learn to build your own kernel and bisect regressions. It doesn't require programming knowledge and those of us with the knowledge, but not the time to bisect, could look at it.

              I have the inverse problem. I know C, but not how to bisect and I have little time to learn. :/
              Bisecting isn't difficult, but it still takes time... lots of time considering there are probably a few thousand commits to go through and half an hour or so per commit with building a kernel and testing.

              I was looking into these things last night. You can make that command a one liner:

              Code:
              for i in $(find /sys/devices/pci* -wholename "/sys/devices/pci*/power/control"); do if [[ "$(cat $i)" == "on" ]]; then echo "auto" > $i; fi; done;
              As you can see, I never bothered to learn bash/sh very well. Thanks for that (but I still prefer indentation ;D ).

              I am still testing this to find out if it is safe on my laptop. This appears to affect all devices listed under lspci, plus some attached usb devices.
              I never tried enabling this script at boot (I just run it when I need long(er) battery life). Other than powering down of USB mice I've not noticed side-effects, though I haven't tested much.

              Comment


              • #37
                Originally posted by liam View Post
                Cool, thanks.
                I use powertop as well, and my system is pretty similiar to yours (you didn't mention the screen size, but I'll assume 14"-15").
                Mine is T510 with M620 (i7 2.66GHz) 15" screen @ 1600x900, intel HD graphics and I'm generally in the 18-20W range while IDLE (with FF/Xchat/evince/etc open). Really odd that I'm running through so much more power.
                What configuration did you do?

                Best/Liam
                Well, Cyborg16 already gave all the useful hints. All i did was adding the following to my rc.local:
                Code:
                echo 1 > /sys/module/snd_hda_intel/parameters/power_save
                
                for i in /sys/class/scsi_host/host?/link_power_management_policy; do
                    echo min_power > $i
                done
                
                for i in /sys/bus/usb/devices/*/power/autosuspend; do
                    echo 1 > $i
                done
                
                for i in /sys/bus/{pci,i2c}/devices/*/power/control; do
                    echo auto > $i
                done
                In addition i pass pcie_aspm=force i915.i915_enable_rc6=1 to the kernel at boot. Of course laptop-mode is activated. That was enough to drop to 9W when idle and for powertop2 not to find anything extra to save power.

                Comment


                • #38
                  Originally posted by Cyborg16 View Post
                  I have a T410 and I don't think this generation of lenovo machines have brilliant run-times; the lowest wattage I've got out of my machine is about 10W, but usually it's more like 13W. First tip: use powertop and close high-usage applications. In some cases KDE seems to suck a lot of power (though not always); a simpler DE like LXDE or even gnome 2 may save power. Firefox may not be the best web-browser for power-usage.

                  Second, here's some notes for driver tuning:

                  Code:
                  #!/bin/bash
                  
                  # This is a collection of notes about various laptop power-tuning I've found on
                  # the internet and tested on a lenovo T410.
                  
                  # Booting with the pcie_aspm=force kernel option helps:
                  # Force ASPM:
                  # 13.4W idle, 34W glxgears
                  # Without:
                  # 14.6W idle, 35W glxgears
                  
                  # Wifi appears to use about 1.8W
                  # Wifi power saving (enabled by powertop) saves perhaps half a watt
                  
                  # Screen uses perhaps 4.5W more on full brightness than on minimum
                  
                  # These tweaks can only be done by root
                  if [ "$(id -u)" != "0" ]; then
                     echo "This script must be run as root" 1>&2
                     exit 1
                  fi
                  
                  # Setting power control of all devices to auto possibly saves about 0.8W (need
                  # to do a better test):
                  # (Note that this appears to disable external mice until you re-plug them in.)
                  setauto() {
                      file=$1
                      
                      if [[ "$file" =~ 'power' ]]
                      then
                          if [[ "$(cat $file)" != "auto" ]]
                          then
                              echo -n $file: 
                              cat $file
                              echo "auto" > $file
                          fi
                      fi
                  }
                  for f in $(find /sys/devices/pci* -name "control")
                  do
                      setauto $f
                  done
                  
                  # Disabling nmi_watchdog has no obvious effect:
                  # echo 0 > /proc/sys/kernel/nmi_watchdog
                  
                  # Turning off USB (instead of leaving auto) appears to have no effect:
                  # (I seem to have lost the commands to do this. Never mind.)
                  Check out Jupiter, I'm not sure what's in the T410, but my old T400 is good for about 7 watts with it on battery. If you run Ubuntu, there is a package available from Webupd8.

                  Comment


                  • #39
                    Originally posted by Jonimus View Post
                    Wow, all you people are retarded, this was an intel issue and the reason that they disabled that by default is because it was still buggy. Blaming linus for something that was clearly a smart decision by the Intel DRM devs. They chose stability over power consumption, its as easy as that. Its the same thing with the ASPM power regression by defaulting to it being enabled they had issues arise so they had to fix the issues. Yes it sucks for those who didn't have those stability issues with it enabled but at least it has a better chance of it working for those who did.

                    Also I know for a fact that Michael has said he doesn't report bugs of bisect things because it would take time from writing articles and gathering the data within them. He rarely digs deeper into the issues by doing things like bisecting or finding an linking to relevant upstream bugs, in fact he rarely even links to where to find more info, though once in a while he'll include a link to the relevant ML. The articles only "links" are just links to his older articles, which is fine, but he spams them so much without linking offsite or to sources it seems he is just trying to get more page views and thus more ad revenue rather than trying to actually inform the reader better.
                    +1 - This is just more Phoronix the sky is falling nonsense.

                    Comment


                    • #40
                      Originally posted by Med_ View Post
                      Well, Cyborg16 already gave all the useful hints. All i did was adding the following to my rc.local:
                      Code:
                      echo 1 > /sys/module/snd_hda_intel/parameters/power_save
                      
                      for i in /sys/class/scsi_host/host?/link_power_management_policy; do
                          echo min_power > $i
                      done
                      
                      for i in /sys/bus/usb/devices/*/power/autosuspend; do
                          echo 1 > $i
                      done
                      
                      for i in /sys/bus/{pci,i2c}/devices/*/power/control; do
                          echo auto > $i
                      done
                      In addition i pass pcie_aspm=force i915.i915_enable_rc6=1 to the kernel at boot. Of course laptop-mode is activated. That was enough to drop to 9W when idle and for powertop2 not to find anything extra to save power.
                      You guys missed the suggestion to add power_save=3 to your kernel parameters. That turns off the audio device after 3 seconds of inactivity.

                      There are lists of tips and tricks online:

                      This website is for sale! lesswatts.org is your first and best source for all of the information you’re looking for. From general topics to more of what you would expect to find here, lesswatts.org has it all. We hope you find what you are searching for!

                      Comment

                      Working...
                      X