Announcement

Collapse
No announcement yet.

The Linux Kernel Power Problems On Older Desktop Hardware

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

  • #46
    NMI Watchdog! That rings a bell, gotta test that tonight!

    Comment


    • #47
      Originally posted by fewt View Post
      I haven't tested Ubuntu 10.10 vs 11.04, as I haven't been involved with that distribution for some time. I wouldn't be surprised though that 11.04 was power hungry, as Unity is still in active development and is most likely not optimized for low power use.
      Fair enough. As for Unity, if you check that article, you'll see that Unity is not the culprit, since the 'classic' Gnome desktop is even worse.

      Comment


      • #48
        Originally posted by ioannis View Post
        Fair enough. As for Unity, if you check that article, you'll see that Unity is not the culprit, since the 'classic' Gnome desktop is even worse.
        The best way to figure it out would be to use powertop and let it collect statistics over around 15 minutes of idle time (no apps open, no mouse or keyboard input). Then do the same for 10.10 and compare the list of applications to see if one is chattier in 11.04. It could also be something kernel related, that powertop would notify you of (as I indicated there is no dynamic tuning in the kernel so if you shift to battery it won't change the kernel to be battery friendly without a helper application).

        Comment


        • #49
          Originally posted by Scullder View Post
          I'm just a noob, and can't reproduce the problem (I'm using 2.6.39-ck2), but why not give a try to a non smp kernel, other processes scheduler, kernel parameters (disabling all power management capabilities), etc.

          Is it really impossible to reproduce the same power consumption between a pre- and post- bug kernel ?

          It could exclude a lot of tracks, and help to fill a useful bug report.

          In example, there's a scheduler parameter for power management on an smp system :
          http://www.kernel.org/doc/Documentat...ces-system-cpu
          That is a valid point, that parameter is used in Laptop-mode for those that have laptop-mode-tools enabled to conserve power on battery.

          something to point out though, the -ck2 source kernel version is Con Colivas' creation, and does not use most of the scheduler pieces that the CFS scheduler does. I tried out that kernel as an option - I patched BFS into the Natty kernel, I didn't really find any benefits to the power consumption at low/idle, but the IPI process that really generates a lot of interrupts in the kernel in 2.6.37-3.0.0 (I think it handles the softirq 'kicks' to wake up cores in C states) isn't in the -ck code.

          I have been comparing kernels a lot lately and checking them out for how they fare on power, I'm a bit surprised that no one has mentioned the main changes of power usage post 2.6.34.

          Linux Devs were working out a way to implement the power management stuff that google was trying to put back into the kernel from the development of Android. It really didn't work out, they yanked it all out in 2.6.34 or 35 - I forget which..

          but right after the PM- features got put in, it tells devices to turn off, (think stuff OTHER than the CPU) like USB, PCI cards, etc. if they are not in use, and adds a power save mode API for the drivers to hook into.

          You can see this for yourself if you boot up a lucid kernel (2.6.34) in Natty, then reboot into the natty kernel (or maverick - 2.6.35) and run powertop 1.98.

          the lucid kernel will only have 5-6 devices listed in powertop, in the maverick and natty kernels, you should see almost all hardware in your PC. This allows the kernel to put unused usb ports into power save, sata links to the hard drive and cdrom and more.

          You would think that this would result in lower power usage, and it does on some hardware in the Maverick kernel - but in Natty, it takes a huge nosedive.

          This is just speculation on my part, but what I see suggests that something they did made a dramatic change in interrupt usage in the scheduler, on 2.6.38 - 3.0.0, if you look at the powertop results (easier to see in 1.13) and note the line that says "extra kernel interrupt" and look at the number of them, then compare that to the total other interrupts on all the other processes combined, they run very close to even on my Core2 duo.

          On the other hand, 2.6.35 stock, usage is lower, the extra kernel interrupts are still there, but they are about 1/3 of the total of the other processes combined instead of even.

          As this all concerns the sleep states of the processors (interrupt handling) and the other high running process in the later kernels is the load balance or IPI process, it looks like a standard Interrupt to the kernel is causing additional interrupts in the scheduler, as it 'kicks' the other cores to wake up. the less time the cores can run in a low sleep state - more power usage..

          Comment


          • #50
            Well just installed gentoo on my brand new laptop
            ( i7-2630QM, 8gb of ram, 7200rpm 640 gb, amd 6770m 1gb gddr5 )

            with every power management option I can think of, on idle I get 2.6 wakeups pre second in intervals of 45 seconds.

            kernel is 2.6.39-pf2.

            I really can't see the problem ( at least not on my system ).

            Comment


            • #51
              Originally posted by sLinkAge View Post
              Well just installed gentoo on my brand new laptop
              ( i7-2630QM, 8gb of ram, 7200rpm 640 gb, amd 6770m 1gb gddr5 )

              with every power management option I can think of, on idle I get 2.6 wakeups pre second in intervals of 45 seconds.

              kernel is 2.6.39-pf2.

              I really can't see the problem ( at least not on my system ).
              what power management options do you use? can you list them for us?

              I have an nvidia chip and the driver itself causes more wakeups than your entire system (even with the on-demand vblank)

              Comment


              • #52
                Originally posted by ioannis View Post
                what power management options do you use? can you list them for us?

                I have an nvidia chip and the driver itself causes more wakeups than your entire system (even with the on-demand vblank)
                Well,

                first of all, on boot I call acpi_call and turn off the radeon card , on linux the intel 3000 is more than I need.

                also on startup I have this script which I run :

                Code:
                for x in $(ls /sys/class/scsi_host/ )
                 do
                	echo min_power > /sys/class/scsi_host/${x}/link_power_management_policy
                 done
                echo 1500 > /proc/sys/vm/dirty_writeback_centisecs
                echo 1 > /sys/devices/system/cpu/sched_smt_power_savings
                after that I use a script I found on the net ( this mimics the powertop behavior )

                Code:
                cd /sys/devices
                find pci* -name "control" -exec /etc/local.d/help_script.sh {} \;
                When the help_script.sh is this :
                Code:
                #!/bin/bash
                
                file=$1
                
                if [[ "$file" =~ 'power' ]]
                then
                  echo "$file"
                  echo "auto" > "$file"
                  echo "Done."
                fi
                The thing is, after this script runs, everything works fine except my lan card, so I set it back to on with this command :

                Code:
                echo on > /sys/devices/pci0000\:00/0000\:00\:1c.0/power/control
                If you want I can post my .config file so you can see how I've built the kernel.

                Comment


                • #53
                  2.6.38 reg: http://www.phoronix.com/vr.php?view=16181
                  Michael Larabel
                  http://www.michaellarabel.com/

                  Comment


                  • #54
                    Originally posted by sLinkAge View Post
                    Well,

                    first of all, on boot I call acpi_call and turn off the radeon card , on linux the intel 3000 is more than I need.

                    also on startup I have this script which I run :

                    Code:
                    for x in $(ls /sys/class/scsi_host/ )
                     do
                    	echo min_power > /sys/class/scsi_host/${x}/link_power_management_policy
                     done
                    echo 1500 > /proc/sys/vm/dirty_writeback_centisecs
                    echo 1 > /sys/devices/system/cpu/sched_smt_power_savings
                    after that I use a script I found on the net ( this mimics the powertop behavior )

                    Code:
                    cd /sys/devices
                    find pci* -name "control" -exec /etc/local.d/help_script.sh {} \;
                    When the help_script.sh is this :
                    Code:
                    #!/bin/bash
                    
                    file=$1
                    
                    if [[ "$file" =~ 'power' ]]
                    then
                      echo "$file"
                      echo "auto" > "$file"
                      echo "Done."
                    fi
                    The thing is, after this script runs, everything works fine except my lan card, so I set it back to on with this command :

                    Code:
                    echo on > /sys/devices/pci0000\:00/0000\:00\:1c.0/power/control
                    If you want I can post my .config file so you can see how I've built the kernel.

                    Thanks sLinkAge. I'll give those a try

                    Comment

                    Working...
                    X