The Notebook Review forums were hosted by TechTarget, who shut down them down on January 31, 2022. This static read-only archive was pulled by NBR forum users between January 20 and January 31, 2022, in an effort to make sure that the valuable technical information that had been posted on the forums is preserved. For current discussions, many NBR forum users moved over to NotebookTalk.net after the shutdown.
Problems? See this thread at archive.org.

    Power management with xubuntu

    Discussion in 'Linux Compatibility and Software' started by amazing-boy, Oct 2, 2008.

  1. amazing-boy

    amazing-boy Notebook Evangelist

    Reputations:
    18
    Messages:
    663
    Likes Received:
    1
    Trophy Points:
    31
    Hi, which is the best application and packages for power-management under xubuntu ?

    At the time I'm using powernowd and kpowersave but the fun is always active and the battery has a short life.

    Can You help me ?
     
  2. amazing-boy

    amazing-boy Notebook Evangelist

    Reputations:
    18
    Messages:
    663
    Likes Received:
    1
    Trophy Points:
    31
  3. Hagbard Celine

    Hagbard Celine Notebook Consultant

    Reputations:
    9
    Messages:
    114
    Likes Received:
    0
    Trophy Points:
    30
    Does KPowerSave (weird choice on a GTK based system, but well...) show you a low frequency around 1 GHz or is the CPU always staying on 2 GHz? It would be nice to know if at least the frequency scaling works like it should. Then we can go on trouble-shooting...

    The fans always running, however, doesn't always have to be an indicator of excessive heat produced. Fan management is sometimes critical under Linux when there's a problem with BIOS interaction - I had a notebook where the fan was constantly on with one distro and constantly off with another. On Windows, the fan kicked in when at 100% CPU load, which was the only scenario where you could hear it.
     
  4. amazing-boy

    amazing-boy Notebook Evangelist

    Reputations:
    18
    Messages:
    663
    Likes Received:
    1
    Trophy Points:
    31
    In some case the cpu frequency is at 1200 mhz while yesterday was at 2000 ghz (The maximum).

    I have installed the last bios version for my notebook (Released in august 2008).
     
  5. Hagbard Celine

    Hagbard Celine Notebook Consultant

    Reputations:
    9
    Messages:
    114
    Likes Received:
    0
    Trophy Points:
    30
    Hmmm...I have an idea...

    Can you install powertop, run it when your notebook is on battery, and then post the output? When you say "in some cases it is at 1200 mhz while yesterday it was at 2000 mhz" it would be nice to check if there is something keeping the CPU very busy...
     
  6. amazing-boy

    amazing-boy Notebook Evangelist

    Reputations:
    18
    Messages:
    663
    Likes Received:
    1
    Trophy Points:
    31
    For example in this moment (Running on battery) the kpowersave tell me that cpu is at 800 mhz for each core.
     
  7. amazing-boy

    amazing-boy Notebook Evangelist

    Reputations:
    18
    Messages:
    663
    Likes Received:
    1
    Trophy Points:
    31
    Code:
    Cn                Avg residency       P-states (frequencies)
    C0 (cpu running)        ( 5,6%)         2,00 Ghz     0,0%
    C1                0,0ms ( 0,0%)         1,60 Ghz     0,0%
    C2                0,1ms ( 0,0%)         1200 Mhz     0,0%
    C3                3,8ms (94,4%)          800 Mhz   100,0%
    
    
    Wakeups-from-idle per second : 253,5    interval: 7,1s
    Power usage (ACPI estimate): 17,9W (2,9 hours)
    
    Top causes for wakeups:
      39,4% (131,0)      <kernel IPI> : Rescheduling interrupts
      27,1% ( 90,1)           firefox : schedule_timeout (process_timeout)
       8,3% ( 27,7)       <interrupt> : extra timer interrupt
       4,8% ( 15,9)   USB device  6-2 : USB Optical Mouse (Darfon)
       4,7% ( 15,6)       <interrupt> : ehci_hcd:usb1, uhci_hcd:usb6
       4,1% ( 13,6)           firefox : futex_wait (hrtimer_wakeup)
    
     
  8. Hagbard Celine

    Hagbard Celine Notebook Consultant

    Reputations:
    9
    Messages:
    114
    Likes Received:
    0
    Trophy Points:
    30
    What you got now is what it should look like. There is optimization possible, but 18W is OK for stock Xubuntu. Should be enough for 3 hours with the 6-cell standard battery.

    Try to figure out what's different to the present situation when you have the CPU running at 2 GHz. The output in the top left (C0/C1/C2/C3) is the current state of CPU activity - if it's not C2 or C3 for most of the time when your PC is idling, you know that something is going wrong and you have to go trouble-shooting.

    The biggest problem with your problem seems to be that your notebook's behaviour is hardly predictable, I fear ;)
     
  9. amazing-boy

    amazing-boy Notebook Evangelist

    Reputations:
    18
    Messages:
    663
    Likes Received:
    1
    Trophy Points:
    31
    So do You think that the current behaviour is ok ?

    I've newly run powertop and this is the output (In the meaning while I've launched netbeans)

    Code:
    Cn                Avg residency       P-states (frequencies)
    C0 (cpu running)        (54,6%)         2,00 Ghz     9,5%
    C1                0,0ms ( 0,0%)         1,60 Ghz     0,0%
    C2                0,8ms (45,4%)         1200 Mhz     1,9%
                                             800 Mhz    88,5%
    
    
    Wakeups-from-idle per second : 570,0    interval: 10,0s
    no ACPI power usage estimate available
    
    Top causes for wakeups:
      66,1% (744,3)      <kernel IPI> : Rescheduling interrupts
       5,3% ( 59,1)             amule : schedule_timeout (process_timeout)
       5,2% ( 58,3)   USB device  5-2 : USB Optical Mouse (Darfon)
       4,8% ( 54,3)           firefox : futex_wait (hrtimer_wakeup)
       4,6% ( 51,8)       <interrupt> : uhci_hcd:usb5, ehci_hcd:usb6
       4,3% ( 48,1)           firefox : schedule_timeout (process_timeout)
    
    Suggestion: Enable SATA ALPM link power management via:
      echo min_power > /sys/class/scsi_host/host0/link_power_management_policy
    or press the S key.
    
     
  10. Hagbard Celine

    Hagbard Celine Notebook Consultant

    Reputations:
    9
    Messages:
    114
    Likes Received:
    0
    Trophy Points:
    30
    When it's running Netbeans and some other stuff (amule is easily recognizable :D) ATM, there is nothing that's really striking. Looks quite ok. As your running it on AC, you can't read out how much power is consumed in this mode of use.

    The only major issue is "rescheduling interrupts", but that is either an issue in kernel behaviour or in kernel-BIOS-interaction - nothing that's easy to sort out for anyone but kernel experts...
     
  11. Ethyriel

    Ethyriel Notebook Deity

    Reputations:
    207
    Messages:
    1,531
    Likes Received:
    0
    Trophy Points:
    55
    The thing which comes to mind first is, I think Xubuntu uses gnome-power-manager. Whenever I use an *buntu I'll disable the power daemon and just set gnome-power manager (through gconf-editor) to the ondemand governor on AC power, and the conservative governor on battery. Judging from your powertop stats, it's not going to get you much, maybe 5-15 minutes.

    What I do on my Arch machine, is run the performance governor from init, then run a simple script from my X session to sleep and let things load and settle before loading gnome-power-manager which will throttle my CPU. It's a nice balance between boot speed and battery savings.

    I like ondemand on AC because it works under the assumption that if the CPU is being used heavily, it's likely to be used heavily again soon. It gives me more perceived performance out of my CPU, but keeps heat under control. But when I'm on battery, I prefer conservative because it throttles down as soon as the work is done.

    The second thing that comes to mind is going through http://www.lesswatts.org/ and seeing what you can do without breaking Xubuntu.
     
  12. amazing-boy

    amazing-boy Notebook Evangelist

    Reputations:
    18
    Messages:
    663
    Likes Received:
    1
    Trophy Points:
    31
    Ok.
    And what is the exact meaning of "suggestions" by powertop at the end of the output ?
     
  13. Hagbard Celine

    Hagbard Celine Notebook Consultant

    Reputations:
    9
    Messages:
    114
    Likes Received:
    0
    Trophy Points:
    30
    The suggestions are commands which can be executed to save power. However, you will have to make sure they are activated each time when rebooting. There are many ways to do this, one can be found here:

    http://ubuntuforums.org/showthread.php?t=729644
     
  14. amazing-boy

    amazing-boy Notebook Evangelist

    Reputations:
    18
    Messages:
    663
    Likes Received:
    1
    Trophy Points:
    31
    Very interesting link.
    But the installation of the script result in an effective improvement of the battery life or not ?
    Which are the aspects that it can manage and the kpowersave is unable to "touch" ?
     
  15. Hagbard Celine

    Hagbard Celine Notebook Consultant

    Reputations:
    9
    Messages:
    114
    Likes Received:
    0
    Trophy Points:
    30
    The Powertop options deal with settings which are known to be keeping the CPU or something else more active than needed. While Powertop scans your configuration and determines which settings could be applicable, there is no other tool that can do the same. Kpowersave and also the gnome-power-manager are only able to deal directly with ACPI power management settings.

    It might be a good idea to also ask in an Ubuntu-related forum, because I think more people can help you over there. It's rather an Ubuntu issue than an hardware issue, I'm sure. The international forum is http://www.ubuntuforums.org/, while there is also an Italian one at http://forum.ubuntu-it.org/.
     
  16. amazing-boy

    amazing-boy Notebook Evangelist

    Reputations:
    18
    Messages:
    663
    Likes Received:
    1
    Trophy Points:
    31
    Many thanks.
    However I think I'll try the linked script... with the hope of increasing the battery life.