Howto get CPU frequency scaling to work in 2.xx

How to do things, solutions, recipes, tutorials
Message
Author
User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

#21 Post by HairyWill »

Nice idea. I'm amazed that no one has done it before it seems so obvious.

You might want to consider offering --performance as an option as well, this doesn't require a module to be loaded.

Localization too. :-)
The \n in your localization string doesn't create a newline on the terminal. This seems to work for me
*) echo $l_usage | sed 's/\\n/\n/g';;

It would also be nice to get a message at the end confirming that something had been done. Maybe something like

cpu scaling set
scaling govenor: ondemand
CPU frequency: 800MHz

excellent
Will
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]

Kazm
Posts: 29
Joined: Mon 14 Jan 2008, 21:53
Location: Russia, Ufa
Contact:

#22 Post by Kazm »

Very much thank you Will!!! :D
I do it.
And I want made GUI...

User avatar
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#23 Post by Dougal »

I use the "powersave" governor by default, but created a script that switches between powersave and "ondemand" (and vice versa), then set up a keyboard shortcut to run it...
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

Th3_uN1Qu3
Posts: 141
Joined: Sun 27 May 2007, 17:31
Location: Bucharest, Romania

#24 Post by Th3_uN1Qu3 »

I use powernowd, no need for anything else. ;)
[b]Toshi Portege 4010[/b] | PIII Tualatin 933MHz | 512MB RAM | Cyberblade 16MB | 30GB | WiFi, IrDA | ~5 hrs runtime | WinMe :( |

[img]http://img230.imageshack.us/img230/8125/userbar654682fy5.gif[/img]

Kazm
Posts: 29
Joined: Mon 14 Jan 2008, 21:53
Location: Russia, Ufa
Contact:

#25 Post by Kazm »

Th3_uN1Qu3 wrote:I use powernowd, no need for anything else. ;)
And where you can find pet ? :)

User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

#26 Post by HairyWill »

Kazm wrote:And I want made GUI...
Why ruin a commandline program with a GUI. ;-)

The package manager includes a pet for gtkdialog-DOC which has examples for many of the widgets available. These can be written using a simple shell script.
Will
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]

Kazm
Posts: 29
Joined: Mon 14 Jan 2008, 21:53
Location: Russia, Ufa
Contact:

#27 Post by Kazm »

Yess... :lol: I made GUI-script.
And its contain script cpu_power_save_eee directly for ASUS eeePC, that use module p4-clockmod...

This script use some script from Xubuntu that auto find needed cpu module, but it not find anymore for ASUS eeePC CPU :cry:
Maybe I use old version?

And don't work switching to perfomance mode (from another mode).
Because don't work this command:
echo perfomance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
Attachments
cpu_power_save_loc.pet
(4.81 KiB) Downloaded 539 times
Last edited by Kazm on Fri 25 Apr 2008, 22:20, edited 2 times in total.

User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

#28 Post by HairyWill »

Well done, works well for me

Processor : Mobile Intel(R) Pentium(R) III CPU - M 1200MHz
Will
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]

User avatar
erikson
Posts: 735
Joined: Wed 27 Feb 2008, 09:22
Location: Ghent, Belgium
Contact:

#29 Post by erikson »

Good idea to make an autodetect script, Kazm.
Kazm wrote:Because don't work this command:
echo perfomance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
Correct spelling is performance (with two r), and it does work on my laptop. It's also the default mode in Puppy, as one can verify (e.g. after fresh live-CD boot with pfix=ram) with

Code: Select all

cd /sys/devices/system/cpu/cpu0/cpufreq/
cat scaling_governor
.
Anyway I much prefer the ondemand mode, for reasons explained in [url=ttp://www.murga-linux.com/puppy/viewtopic.php?t=28443]how to keep your cpu cool and you fan quiet[/url]
[size=84][i]If it ain't broke, don't fix it.[/i] --- erikson
hp/compaq nx9030 (1.6GHz/480MB/37.2GB), ADSL, Linksys wireless router
[url]http://www.desonville.net/[/url]
Puppy page: [url]http://www.desonville.net/en/joere.puppy.htm[/url][/size]

Post Reply