Announcement

Collapse
No announcement yet.

Linux 3.1 Kernel Draws More Power With Another Regression

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

  • Cyborg16
    replied
    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.

    Leave a comment:


  • Shining Arcanine
    replied
    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; 08-23-2011, 12:01 PM.

    Leave a comment:


  • danwood76
    replied
    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.

    Leave a comment:


  • Cyborg16
    replied
    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.)

    Leave a comment:


  • Nille_kungen
    replied
    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

    Leave a comment:


  • Shining Arcanine
    replied
    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.

    Leave a comment:


  • liam
    replied
    Originally posted by Med_ View Post
    It is a Dell Latitude E6420. Core [email protected] GHz. Intel graphics card. 1600x900 screen. 97 Wh battery. Standard 7200RPM hard drive. To see the consumption i just use powertop2. When the AC is not plugged it gives the power drawn from the battery and the estimated lifetime (the latter is a bit exaggerated though for some reason). When it is completely idle it is under 9 W. With some standard browsing more like 10 W. As long as you do not visit a flash infested website that sucks your cpu of course. Note that i activated all possible power saving options i could reasonably find (powertop2 helps a lot in that too). I had some freezes once every few days but they seem to be gone with 3.0 (crossing fingers).
    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

    Leave a comment:


  • Med_
    replied
    Originally posted by liam View Post
    What are your system specifics and how are you determing draw?
    It is a Dell Latitude E6420. Core [email protected] GHz. Intel graphics card. 1600x900 screen. 97 Wh battery. Standard 7200RPM hard drive. To see the consumption i just use powertop2. When the AC is not plugged it gives the power drawn from the battery and the estimated lifetime (the latter is a bit exaggerated though for some reason). When it is completely idle it is under 9 W. With some standard browsing more like 10 W. As long as you do not visit a flash infested website that sucks your cpu of course. Note that i activated all possible power saving options i could reasonably find (powertop2 helps a lot in that too). I had some freezes once every few days but they seem to be gone with 3.0 (crossing fingers).

    Leave a comment:


  • Shining Arcanine
    replied
    Originally posted by netrage View Post
    Stop calling this a regression. Seriously it is retarded. As you found out by bisecting earlier the "regression" was introduced with a patch that sets values _according to what hardware says_. I would hardly call that a regression. If hardware is faulty it's not the software's responsibility to second guess that. So until hardware has been tested and white flagged this is the way it will stay, and that's how it should be - if you think otherwise, like Michael, you are a fool. So stop spewing garbage about regressions when you have no clue what you are talking about.
    A regression happens when things were working and then they break. In the case of the other issue, things were working because they were broken and then fixing them broke them. Regardless of whether or not the behavior is correct, it is still a regression.

    It is just like the situation with the WINE project where the WINE developers fix stuff to match Microsoft's documentation and everything breaks because the quirks that Windows programs depended upon having are no longer there. Those are regressions too.
    Last edited by Shining Arcanine; 08-22-2011, 10:56 PM.

    Leave a comment:


  • netrage
    replied
    Stop calling this a regression. Seriously it is retarded. As you found out by bisecting earlier the "regression" was introduced with a patch that sets values _according to what hardware says_. I would hardly call that a regression. If hardware is faulty it's not the software's responsibility to second guess that. So until hardware has been tested and white flagged this is the way it will stay, and that's how it should be - if you think otherwise, like Michael, you are a fool. So stop spewing garbage about regressions when you have no clue what you are talking about.

    Leave a comment:

Working...
X