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.

    CPU Frequency Scaling

    Discussion in 'Linux Compatibility and Software' started by Incursis, Jul 29, 2007.

  1. Incursis

    Incursis Notebook Evangelist

    Reputations:
    133
    Messages:
    373
    Likes Received:
    0
    Trophy Points:
    30
    I am running Ubuntu 7.04 on my Acer Aspire 5002WLMi. It has an AMD Turion 64 ML-30 processor. I added a GNOME applet to the panel and it shows the frequency that the CPU is operating on (800MHz or 1600MHz).

    Now I was wondering, like in Windows you can choose different power profiles such as Always On, or Max Battery, or Home/Office Desk, is there a way that I can add some sort of option to that applet so that I can choose which speeds I want my processor to run at? I usually use 3 options:

    1) Maximum Battery (800MHz only)
    2) Home/Office Desk (800MHz-1600MHz)
    3) Always On (1600MHz)

    I'd rather not leave the applet the way it is because when on battery power I really need it to stay at 800MHz. So is there a way I can modify the applet so that I can choose the speed or create profiles? or is there another program that I can download via Synaptics that can control CPU scaling?
     
  2. Bog

    Bog Losing it...

    Reputations:
    4,018
    Messages:
    6,046
    Likes Received:
    7
    Trophy Points:
    206
  3. Incursis

    Incursis Notebook Evangelist

    Reputations:
    133
    Messages:
    373
    Likes Received:
    0
    Trophy Points:
    30
    I noticed that they did not list the Turion processor.

    But I would assume my Socket 754 Turion is K8 so does it fit into this classification or would I mess up my system horribly:

    Code:
    AMD Duron/Sempron/Athlon/Opteron 64 ( K8 )
    Socket Types: 754, 939, 940, S1 ( 638 ), AM2 ( 940 ), F ( 1207 )
     
  4. wearetheborg

    wearetheborg Notebook Virtuoso

    Reputations:
    1,282
    Messages:
    3,122
    Likes Received:
    0
    Trophy Points:
    105
    What was the command to find out the current CPU-freq ?
     
  5. Incursis

    Incursis Notebook Evangelist

    Reputations:
    133
    Messages:
    373
    Likes Received:
    0
    Trophy Points:
    30
    Didn't work, now processor is stuck at 1.60GHz and won't go lower. I followed all the steps and it said that CPU does not support frequency scaling. BS.
     
  6. rockharder

    rockharder Notebook Evangelist

    Reputations:
    26
    Messages:
    653
    Likes Received:
    0
    Trophy Points:
    30
    All you have to do is typing the command like this:

    sudo chmod 4755 /opt/gnome/bin/cpufreq-selector

    Then choose what ever you want from the panel
     
  7. whistle

    whistle Notebook Consultant

    Reputations:
    3
    Messages:
    243
    Likes Received:
    1
    Trophy Points:
    31
    I got "chmod: cannot access `/opt/gnome/bin/cpufreq-selector': No such file or directory"...
     
  8. Incursis

    Incursis Notebook Evangelist

    Reputations:
    133
    Messages:
    373
    Likes Received:
    0
    Trophy Points:
    30
    I redid the guide and apparently I missed one command and that really threw it off. It wasn't explained that well anyways. Well I got the thing installed I guess but I still cannot choose the power profiles in the GNOME applet, I checked its preferences and theres still nothing I can use to change it.
     
  9. yin

    yin Notebook Consultant

    Reputations:
    0
    Messages:
    166
    Likes Received:
    0
    Trophy Points:
    30
    Does anyone know if emifreqd supports AMD processors? I installed it and added it to my gnome panel, and i just left-click and select the performance level I want. I get Performance, 1826MHz, 1328MHz, Powersaving, and Automatic. Seems to work well enough for me :)

    Although, I notice that it only scales ONE of my two cores... the other one seems to stay at the lowest speed setting. I'm using an Intel T2400 dual core processor. Is there a way to control the scaling of both processors at once or independently? (Not that it's really an issue with me or anything...)
     
  10. Incursis

    Incursis Notebook Evangelist

    Reputations:
    133
    Messages:
    373
    Likes Received:
    0
    Trophy Points:
    30
    I got it. I found some extra info on another site. I will summarize.

    As bc135 pointed out, in order to set up Ubuntu for CPU frequency scaling you go to this site: http://ubuntuforums.org/showthread.php?t=248867

    Follow the instructions and it will set it up. However it will not modify the GNOME applet to select which power profile or speeds to use.

    To do that you need to follow the guide here: http://www.ubuntugeek.com/howto-change-cpu-frequency-scaling-in-ubuntu.html

    It basically tells you to reconfigure the gnome applets. Once thats done and you reconfigure it exactly, you will then have the ability to choose your power profile or processor speed in the GNOME applet.
     
  11. TwilightVampire

    TwilightVampire Notebook Deity

    Reputations:
    362
    Messages:
    1,376
    Likes Received:
    0
    Trophy Points:
    55
    Theres a different aplet in synaptic that allows you to use power scaling features in a manual mode. All you have to do is click on it and select the speed you want. When I'm in my Ubuntu Install next I'll post its name.

    Edit: The aplet is called EmiFreq
     
  12. wearetheborg

    wearetheborg Notebook Virtuoso

    Reputations:
    1,282
    Messages:
    3,122
    Likes Received:
    0
    Trophy Points:
    105
    I followed the directions on both sites, but my cpufrequency is stuck at max. Even in userspace, I see an option to change it, but clikcing a diff freq has no effect.
     
  13. starling

    starling Notebook Consultant

    Reputations:
    12
    Messages:
    135
    Likes Received:
    0
    Trophy Points:
    30
    You didn't need to do anything as far as I know. This has nothing to do with CPU scaling. Ubuntu already has that installed, plus it also has Power Management installed and operating (which you find in one of the system menus. That's already on. If you want an icon to work with, just click on the appropriate option in the Power Management window. The icon will appear on the top menu bar near the right. Then select whatever options you want, just like in Windows. This is one slight difference of Ubuntu compared to its parent distro, Debian. In Debian (testing), the icon for power management is already enabled after installation (if you chose "Laptop").

    With whatever you did, you now must have uninstalled or disabled CPU frequency scaling.
     
  14. wearetheborg

    wearetheborg Notebook Virtuoso

    Reputations:
    1,282
    Messages:
    3,122
    Likes Received:
    0
    Trophy Points:
    105
    This is on debian etch.

    I tried it again, and now it is switching cpu frequencies. So wierd.

    EDIT: I unpligged the AC adapter, thne plugged it back in. Now once more the cpu freq is stuck at maximum.
     
  15. lemur

    lemur Emperor of Lemurs

    Reputations:
    524
    Messages:
    1,024
    Likes Received:
    0
    Trophy Points:
    55
    wearetheborg, what machine are you running that on? And did you check /var/log/syslog to see if there was anything strange going on there with power management? Did you check the output of cpufreq-info after plugging back in.
     
  16. starling

    starling Notebook Consultant

    Reputations:
    12
    Messages:
    135
    Likes Received:
    0
    Trophy Points:
    30
    Unless you're just using Linux to run a server, you really should install Debian (testing), also referred to as Lenny. Debian Etch is very stable and perfect for mission critical use as a server, but very outdated as far as a desktop system goes. You have to realize that Linux is a monolithic operating system, unlike a more modern OS which uses microkernels. You get what's in the kernel you installed and you're stuck with that. It's not like Windows where you can update any software and driver to the latest version at anytime. In that sense, Linux is kind of obsolete, which is something that the people who have a lot of time, effort and knowledge invested into it don't like to bring up. You might get a successful installation at first, use it for a couple of weeks, and rave about it on internet forums, but wait until you need to update something, either software or hardware.

    People used to complain that Windows was a GUI shell superimposed on DOS. That completely changed with NT and XP. But Linux is still a bunch of different GUI shells on top of what is essentially a DOS-like operating system.
     
  17. wearetheborg

    wearetheborg Notebook Virtuoso

    Reputations:
    1,282
    Messages:
    3,122
    Likes Received:
    0
    Trophy Points:
    105

    I'm running it on thinkpad T42, dothan 2Ghz.
    Now I'm able to switch reasonablly, provided I switcht to "powersave" governor.

    Is it ? The kernel is 2.6.18-4-686, which seems fairly recent.

    My one year old M90 (with core duo, Nvidia quadro fx graphics card), is runing SLED 10 with 2.6.16.21-0.25-smp kernel (which I believe is older ??)
     
  18. lemur

    lemur Emperor of Lemurs

    Reputations:
    524
    Messages:
    1,024
    Likes Received:
    0
    Trophy Points:
    55
    Regarding Debian....

    Because of security issues, running "testing" is not recommended. The reason is that "testing" is really meant for testing. It is not meant to be used in production so the Debian folks are in no hurry to fix security issues in "testing". In fact the rules for including packages in testing make it so that a security hole is very likely to be fixed in "stable" and "unstable" significantly earlier than in "testing".

    "Stable" gets security fixes fairly rapidly because that's what everybody is supposed to be using in production. It is just a priority for the Debian developers to fix security holes in "stable".

    "Unstable" gets security fixes fairly rapidly but for a different reason than "stable". Like "testing" nobody is supposed to be using "unstable" in production. However, upstream sources are integrated in "unstable" fairly rapidly. It is because the upstream developers usually care about security in their own packages but also because "unstable", well, is unstable that security fixes are integrated in unstable fairly rapidly.

    There's also "experimental" but nobody should use that without some really serious reason.

    I'm not pulling that out of my ass by the way. That's what a knowledgeable Debian developer has explained to me.
     
  19. Fittersman

    Fittersman Wanna trade?

    Reputations:
    225
    Messages:
    1,306
    Likes Received:
    0
    Trophy Points:
    55
    just outa curiosity, how did this impact your battery life?
     
  20. wearetheborg

    wearetheborg Notebook Virtuoso

    Reputations:
    1,282
    Messages:
    3,122
    Likes Received:
    0
    Trophy Points:
    105
    I havent tested out how long the battery would last, the battery widget did not show any change
    It runs pretty cool though (at 600Mhz).
     
  21. starling

    starling Notebook Consultant

    Reputations:
    12
    Messages:
    135
    Likes Received:
    0
    Trophy Points:
    30
    Stable Debian is really only of interest to people who are using it to run a production server. I mean, even Ubuntu uses Debian unstable. Debian testing is as stable as any other Linux distro for desktop purposes. If you waited for newer Debian stables all the time, your desktop would always be years behind current software.
     
  22. lemur

    lemur Emperor of Lemurs

    Reputations:
    524
    Messages:
    1,024
    Likes Received:
    0
    Trophy Points:
    55
    Right, "stable" is updated waaaaaaaaaaaaaaaaay too infrequently. When I ran Debian, I was using "unstable", which worked fine most of the time but sometimes an update would break things *very* badly.

    Ubuntu uses unstable but before they release their distribution to the general public, they seriously test it and then freeze it. The only changes allowed after the distribution is released are security fixes and perhaps major bug fixes. Anything beyond that requires you to move to a new release of the distribution.

    At any rate, Ubuntu's release system is much saner than Debian's. That's the main reason I switched.

    Regarding Debian "testing", I'm going to repeat this only once: a Debian developer who knows the Debian procedure for accepting packages in the various Debian distributions told me not to use "testing" because it is insecure. You've been warned.
     
  23. t12ek

    t12ek Notebook Consultant

    Reputations:
    9
    Messages:
    190
    Likes Received:
    0
    Trophy Points:
    30
    It seems you two are arguing two different points...

    Remember:
    stability != security
     
  24. lemur

    lemur Emperor of Lemurs

    Reputations:
    524
    Messages:
    1,024
    Likes Received:
    0
    Trophy Points:
    55
    I thought the broader question was what you should use. I don't care how stable "testing" is. It is insecure.
     
  25. t12ek

    t12ek Notebook Consultant

    Reputations:
    9
    Messages:
    190
    Likes Received:
    0
    Trophy Points:
    30
    I guess I should have clarified, in regards to using 'testing' it seems that you (lemur) and starling are arguing two different points.

    You are arguing against Debian 'testing' for security reasons, whereas starling seems to be arguing for it saying that it's just as stable, and more up to date than other Debian versions.

    You're just not arguing the same thing.
     
  26. wearetheborg

    wearetheborg Notebook Virtuoso

    Reputations:
    1,282
    Messages:
    3,122
    Likes Received:
    0
    Trophy Points:
    105
    Does changing the cpufreq affect battery life ? I know undervolating does, not sure about cpufreq.
     
  27. lemur

    lemur Emperor of Lemurs

    Reputations:
    524
    Messages:
    1,024
    Likes Received:
    0
    Trophy Points:
    55
    Well, if you force cpufreq to keep the CPU at a low frequency, it will help the CPU life. With the problems you've been having, it seems your system setup is a big unusual so I'm not sure how things are configured on your end but in the past I've been able to setup my system to force a slow CPU on battery. (I was using the "userspace" governor and forcing a specific frequency. There's "powersave" also but it did not work well on my CPU at that time. Haven't tried since.)

    I stopped doing that though. Now I use the "ondemand" governor all the time, even on battery. (I think it is the default configuration when Ubuntu is installed on a laptop.) I want the machine to be responsive but I know there are some tasks I should not perform while on battery.