Page 1 of 4 123 ... LastLast
Results 1 to 10 of 36

Thread: How to make powertop suggestions permanent?

  1. #1
    Join Date
    Feb 2009
    Beans
    16
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    How to make powertop suggestions permanent?

    Dear All,

    In comparison to Windows Vista (average 4 hours) I only get a maximum of 3 hours battery life from my Lenovo Thinkpad R400 laptop when running Ubuntu 9.04.

    As suggested in some other thread, I ran powertop to see, if I can reduce energy consumption. These where the the suggestions given:

    • Enable SATA ALPM link power management via: echo min_power > /sys/class/scsi_host/host0/link_power_management_policy or press the S key.
    • increase the VM dirty writeback time from 5.00 to 15 seconds with: echo 1500 > /proc/sys/vm/dirty_writeback_centisecs
    • Enable laptop-mode by executing the following command: echo 5 > /proc/sys/vm/laptop_mode
    • Enable USB autosuspend by pressing the U key or adding usbcore.autosuspend=1 to the kernel command line in the grub config
    • Disable 'hal' from polling your cdrom with: hal-disable-polling --device /dev/cdrom 'hal' is the component that auto-opens a window if you plug in a CD but disables SATA power saving from kicking in.


    I understand that powertop changes are confined to the active session. Does anyone know how I could make these changes permanent?

    Thanks a lot for your help, mayoban

    ---
    I am using Ubuntu 9.04, 64-bit version
    on a Lenovo Thinkpad R400, Type 7439-A85
    Gnome Desktop with Compiz Window Manager and Cairo-Dock

  2. #2
    Join Date
    Sep 2006
    Beans
    3,165
    Distro
    Ubuntu Karmic Koala (testing)

    Re: How to make powertop suggestions permanent?

    writing those commands to /etc/rc.local MAY do the trick.

  3. #3
    Join Date
    Feb 2009
    Beans
    16
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: How to make powertop suggestions permanent?

    Hi binbash,

    Thanks for your reply. I forgot one important question in the initial post:

    How can I make sure, that the changes are only active, when the computer is in battery / laptop mode?

    If I understand the purpose of rc.local correctly, changes would be enabled for all sessions.

    Cheers, mayoban

  4. #4
    Join Date
    Apr 2009
    Location
    home
    Beans
    88
    Distro
    Kubuntu

    Re: How to make powertop suggestions permanent?

    take a look in /etc/pm/power.d if you have pm-utils installed..

  5. #5
    Join Date
    Nov 2006
    Location
    Germany
    Beans
    244
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: How to make powertop suggestions permanent?


  6. #6
    Join Date
    Feb 2009
    Beans
    16
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: How to make powertop suggestions permanent?

    Thanks for the replies!

    Re djurny: I checked and I do have pm-utils installed.

    Re Axx83: I looked into the post. To me as a Linux beginner, it looks a little bit complicated. Given these instructions, I would not be knowing, what exactly I am doing. Do you know, if there may be a more elaborate explanation out there, or even a GUI for that purpose?

    Cheers, mayoban

  7. #7
    Join Date
    Nov 2006
    Location
    Germany
    Beans
    244
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: How to make powertop suggestions permanent?

    open a terminal
    now copy and past what I say and enter after each row

    Code:
    sudo gedit /etc/default/acpi-support
    enter password and then go to the bottom and in the section where it talks about laptop-mode write true instead of false, close document and save of course

    Code:
    sudo gedit /etc/laptop-mode/laptop-mode.conf
    this file is a bit longer, take my attachment as a reference and change what I changed. I added # before the default line on those line I modified, like this:
    #
    # Should laptop mode tools add the "noatime" option to the mount options when
    # laptop mode is enabled?
    #
    #CONTROL_NOATIME=0
    CONTROL_NOATIME=1
    the default was 0 and I turned it to 1, modify only the lines I modified.
    When you're close and save.

    Code:
    sudo gedit
    now in the text editor click open and go into /etc/laptop-mode/conf.d/ folder, there are various files, you probably are interested in usb autosuspend, hda audio, iwl intel wireless, intel sata and sched mc powersaving. Open these files one by one and read them, they're written in a perfect standard english and explain everything very well. You will know what to do, remember that 0 stands for off and 1 for on most of the time.

    When you're done close and save each file.

    Now restart and admire laptop-mode in action, if you have powertop installed do

    Code:
    sudo powertop
    and examine power consumption, if you've done everything correctly powertop won't have any addition suggestion to make because you've tweaked all there is to tweak (more or less).

    Let me know.
    Attached Files Attached Files

  8. #8
    Join Date
    Apr 2007
    Location
    Belgium
    Beans
    1,528

    Re: How to make powertop suggestions permanent?

    For graphical applications, use gksu or gksudo instead of sudo.
    Disclaimer: I am currently suffering from severe CSD (Compulsive Sarcasm Disorder).
    My Site | Linux User #452328 | Running Arch Linux on Sony Vaio VGN-SZ61XN/C since October 2008

  9. #9
    Join Date
    Nov 2005
    Location
    Leeds, UK
    Beans
    1,634
    Distro
    Ubuntu Development Release

    Re: How to make powertop suggestions permanent?

    Quote Originally Posted by Axx83 View Post
    Thanks!

    mayoban: It is really simple, just read the start of the files and you should get the idea.

  10. #10
    Join Date
    Feb 2009
    Beans
    16
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: How to make powertop suggestions permanent?

    Thanks for all your replies.

    Re Axx83: Thanks a lot for your detailed explanation! I think it worked well for me. When in battery mode now, powertop does not give any more suggestions as how to save more power, now power usage is at around 12 watt.
    Powertop estimates the remaining time to be around 4 hours now on full charge. The gnome battery gui is still only estimating 2.45 hours, but I guess it will take some time for it adjust?

    Re durand: You are right, the config files really are straightforward.

    However, I still think it would still be really great, if all of these features were integrated into the gnome power management GUI, possibly as "advanced settings". What to you think?

Page 1 of 4 123 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •