Ubuntu On Sony Vaio FW Series

Tips & Tricks related to Sony Vaio FW series laptops

Powersave while AC adapter unplugged

with 8 comments

By default, when you unplug your AC adapter, cpu scaling governor is not changing to powersave. It’s because Ubuntu using powernowd cpu frequency manager. And to fix this we need to install cpufreqd. Then open /etc/cpufreqd.conf for editing with root privileges (e.g. Alt+F2 gksu gedit /etc/cpufreqd.conf) and put this lines (it’s configured for my P8400 cpu):


# this is a comment
# see CPUFREQD.CONF(5) manpage for a complete reference
#
# Note: ondemand/conservative Profiles are disabled because
#       they are not available on many platforms.

[General]
pidfile=/var/run/cpufreqd.pid
poll_interval=2
verbosity=4
#enable_remote=1
#remote_group=root
[/General]

[Profile]
name=Performance High
minfreq=800000
maxfreq=2267000
policy=ondemand
[/Profile]

[Profile]
name=Performance Low
minfreq=800000
maxfreq=1600000
policy=ondemand
[/Profile]

[Profile]
name=Powersave High
minfreq=800000
maxfreq=1600000
policy=powersave
[/Profile]

[Profile]
name=Powersave Low
minfreq=800000
maxfreq=800000
policy=powersave
[/Profile]

##
# Basic states
##
# when AC use performance mode
[Rule]
name=AC Rule
ac=on                    # (on/off)
profile=Performance High
[/Rule]

# stay in performance mode for the first minutes
[Rule]
name=AC Off - High Power
ac=off                   # (on/off)
battery_interval=70-100
profile=Performance Low
[/Rule]

# conservative mode when not AC
[Rule]
name=AC Off - Medium Battery
ac=off                   # (on/off)
battery_interval=30-70
profile=Powersave High
[/Rule]

# conservative mode when not AC
[Rule]
name=AC Off - Low Battery
ac=off                   # (on/off)
battery_interval=0-30
profile=Powersave Low
[/Rule]

Now, when you unplug your AC adapter, cpu will work in powersave mode with frequencies from 800MHz to 1.6GHz and when battery is below 30% it will stay at lowest frequency value of 800Mhz.

And if you plug adpater back, frequencies will be from 800Mhz to 2.27GHz.

P.S. If you have found some decrease in performance or gui response, just reinstall powernowd.

Advertisements

Written by egaistek

October 15, 2008 at 02:05

Posted in Vaio

Tagged with , , ,

8 Responses

Subscribe to comments with RSS.

  1. Thank you for this wonderful fw guide. I have a fw11e and check site almost everyday. There are only a few problems that you mentioned before. So i am looking for their solution. Thank you for brilliant job.

    Savas Sen

    October 16, 2008 at 05:00

  2. Hi again. I tried this method but when i restarted my computer there is a warning. “CPU frequency scaling unsupported You will not be able to modify the frequency of your machine. Your machine may be misconfigured or not have hardware support for CPU frequency scaling.”
    And the cpu frequency scaling monitor shows 2.26 all time.

    Savas Sen

    October 16, 2008 at 08:06

  3. Hello Savas Sen, sorry for long response.

    How you got this message? does it shown after login?
    I’ll try to figure this out.

    egaistek

    October 24, 2008 at 00:43

  4. I installed cpufreqd (and removed powernowd). When i rebooted my pc and log in, a pop up window appears with a warning;
    “CPU frequency scaling unsupported You will not be able to modify the frequency of your machine. Your machine may be misconfigured or not have hardware support for CPU frequency scaling.”
    Cpu frequency scaling monitor applet shows 2.26 all time.
    I use 2.6.24-21-generic. İt was the same with 2.6.24-19-generic kernel.

    Savas Sen

    October 24, 2008 at 22:19

  5. Have tried today to get this error, but all works ok.
    Can you post here output of this commands lsmod | grep -i cpufreq and lsmod | grep -i speed. I think your system loading wrong module for freq scaling.

    egaistek

    October 30, 2008 at 06:53

  6. I reinstalled cpufreqd (with synaptic) after i rebooted;
    the screenshot:http://img249.imageshack.us/my.php?image=screenshotzd2.png
    and the outputs are ;
    savas@savasinki:~$ lsmod | grep -i speed
    savas@savasinki:~$ lsmod | grep -i cpufreq
    cpufreq_powersave 2688 0
    cpufreq_ondemand 9740 0
    freq_table 5536 1 cpufreq_ondemand
    savas@savasinki:~$

    after i reinstalled powernowd the outputs;
    savas@savasinki:~$ lsmod | grep -i cpufreq
    acpi_cpufreq 10796 2
    cpufreq_userspace 5284 0
    cpufreq_conservative 8712 0
    cpufreq_stats 7104 0
    cpufreq_powersave 2688 0
    cpufreq_ondemand 9740 1
    freq_table 5536 3 acpi_cpufreq,cpufreq_stats,cpufreq_ondemand
    processor 37384 4 acpi_cpufreq,thermal
    savas@savasinki:~$ lsmod | grep -i speed
    savas@savasinki:~$

    Savas Sen

    October 30, 2008 at 07:47

  7. Yea, acpi_cpufreq module is not loaded, that’s strange.
    Try to load it manualy sudo modprobe acpi_cpufreq or you can add it in /etc/modules file. And the same for cpufreq_userspace cpufreq_powersave cpufreq_ondemand.

    egaistek

    October 30, 2008 at 18:14

  8. Thank you egaistek this solved the problem.. 🙂
    Now it’s in powersafe mode!

    Savas Sen

    October 30, 2008 at 19:52


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: