wcpufreq CPU Frequency Scaling 1.1

Miscellaneous tools
Message
Author
User avatar
tazoc
Posts: 1157
Joined: Mon 11 Dec 2006, 08:07
Location: Lower Columbia Basin WA US
Contact:

wcpufreq CPU Frequency Scaling 1.1

#1 Post by tazoc »

• Supports as many cores as kernel--typically 4 or 8 (thanks to Iguleder)

• Gleans available modules and governors from active kernel. (thanks to Iguleder)

• Displays current core speeds, scaling driver and governor

• For ondemand governor, select frequency range and from 4 up_threshold modes:
95% Powersave, less responsive
80% Default
50% Balanced, more responsive
30% Performance, very responsive
(My personal preference is 50% with AC power, 80% with battery)

• Remove driver option
• Feedback / status panels
• Help dialog
• New icons
• Works from root or 'fido' user in Wary
• Activates during boot up
• Displays $DISTRO_NAME in title bar

Displays active cpufreq driver module and scaling governor, even if loaded by script in /etc/init.d, other pets or in rc.local.

Tested on Slacko 5.4.0.5, Lucid 5.25, Wary 5.1.1.53, Fatdog 64 611 and Lighthouse 64 6.00

Changelog
2013.03.02 1.1 Bugfixed pinstall.sh for Woof build, thanks to 01micko.
gtkdialog icon tweak.

wcpufreq--1.0 130210
Precise bugfix: Expand driver search to new kernel module locations.
More info on the first panel. Support Woof in pinstall.sh.

wcpufreq-0.8 110910
Updated for Fatdog 64-520; account for scaling drivers built-in to kernel instead of compiled modules.

wcpufreq-0.7 110508
Activate at boot up from /etc/init.d/wcpufreq instead of script in ~/Startup.
Removed /home/spot and /etc/skel directories from wcpufreq.
Updated for fido user compatibility in Wary.
Woof/Wary: earlier versions of wcpufreq sometimes failed to activate on reboot--fixed.

wcpufreq-0.6 110424
Bugfix: Jim1911 and taca0 reported that prior scaling module was removed after reboot or second run of wcpufreq. Removed mperf module from driver selection dialog and improved detection of current driver by scanning /proc/modules.

wcpufreq-0.4 101027
Name changed to wcpufreq. Account for /etc/init.d/start_cpu_freq (recent Woof script) when detecting driver. Display current core speeds. up_threshold selection for ondemand governor. Suggest to avoid using p4-clockmod driver. Advise if no acpi or BIOS was released before 2007. Updated help dialogs.

pcpufreq-0.3 Initial release 101023

Credits
Based on pcpufreq 002 by Iguleder 2010-10-15.
Some content from Archlinux cpufrequtils Wiki.
A portion from cpu_freq GUI by Trio Tjandradjaja.
Attachments
wcpufreq-1.1-noarch.pet
CPU Frequency Scaling Tool 1.1
(40.52 KiB) Downloaded 1230 times
wcpufreq-0.8.pet
CPU Frequency Scaling Tool 0.8
(38.96 KiB) Downloaded 1326 times
luci-cpufreq-0.3-II.jpg
CPU Frequency Scaling on Luci-232
(148.62 KiB) Downloaded 1676 times
Last edited by tazoc on Fri 08 Mar 2013, 20:49, edited 17 times in total.
[url=http://www.lhpup.org/][b][size=100]lhpup.org[/size][/b] [img]http://www.lhpup.org/gallery/images/favicon.png[/img][/url] [url=http://www.lhpup.org/release-lhp.htm#602]Lighthouse 64 6.02[/url]
Jim1911
Posts: 2460
Joined: Mon 19 May 2008, 20:39
Location: Texas, USA

#2 Post by Jim1911 »

On the off-chance this fails, (current driver is indicated 'unknown') the user is prompted to click 'Remove' in the GUI, reboot and driver setup via the GUI should work with no other intervention required. The help dialog also suggests checking /etc/rc.d/rc.local before rebooting, in case a driver was loaded there manually, e.g., 'modprobe acpi-cpufreq'.
Tried it on Lucid-232 & 233, on both, clicking "Remove" and rebooting did nothing. The original cpu scaling tool is still in control. Apparently, yours does not overwrite the original installation so it needs to be removed for yours to be used. It worked fine on LH 5.00 F.

Thanks,
Jim
User avatar
tazoc
Posts: 1157
Joined: Mon 11 Dec 2006, 08:07
Location: Lower Columbia Basin WA US
Contact:

#3 Post by tazoc »

Thanks for testing, Jim. Can you post your processor type (Menu | System | Hardinfo | Processor.) And the contents of any scripts in /root/Startup with 'cpu' in their name. It sounds like a scaling driver module is loading somewhere I haven't checked, or maybe our tool doesn't work with certain CPUs.
Thanks,
TazOC
[url=http://www.lhpup.org/][b][size=100]lhpup.org[/size][/b] [img]http://www.lhpup.org/gallery/images/favicon.png[/img][/url] [url=http://www.lhpup.org/release-lhp.htm#602]Lighthouse 64 6.02[/url]
User avatar
tazoc
Posts: 1157
Joined: Mon 11 Dec 2006, 08:07
Location: Lower Columbia Basin WA US
Contact:

/etc/init.d/start_cpu_freq

#4 Post by tazoc »

Jim,
Disregard my previous post. I found a script, /etc/init.d/start_cpu_freq dated 3 June 2010 in Woof-based pups that I hadn't seen before. I will update my pet to account for that and do some testing.
Thanks,
TazOC

[Edit] Some Woof history on CPU Scaling in Barry's Blog. Jemimah wrote that p4-clockmod is not desirable for at least EeePCs.
[url=http://www.lhpup.org/][b][size=100]lhpup.org[/size][/b] [img]http://www.lhpup.org/gallery/images/favicon.png[/img][/url] [url=http://www.lhpup.org/release-lhp.htm#602]Lighthouse 64 6.02[/url]
User avatar
tazoc
Posts: 1157
Joined: Mon 11 Dec 2006, 08:07
Location: Lower Columbia Basin WA US
Contact:

wcpufreq-0.4 released

#5 Post by tazoc »

wcpufreq-0.4 released

Should always detect current driver now, or work from scratch. Please test.

Name changed to wcpufreq.
Accounts for /etc/init.d/start_cpu_freq (recent Woof script) when detecting driver.
Display current core speeds.
'up_threshold' selection for ondemand governor.
Suggest to avoid using p4-clockmod driver.
Advise if no acpi or BIOS was released before 2007.
Updated help dialogs.

Thanks,
TazOC
[url=http://www.lhpup.org/][b][size=100]lhpup.org[/size][/b] [img]http://www.lhpup.org/gallery/images/favicon.png[/img][/url] [url=http://www.lhpup.org/release-lhp.htm#602]Lighthouse 64 6.02[/url]
Jim1911
Posts: 2460
Joined: Mon 19 May 2008, 20:39
Location: Texas, USA

#6 Post by Jim1911 »

Hi TazOC,

Just happened to see this while testing the new Wary 0.9.4. Installed it and it seems to be working fine.

Incidently, printing with LibreOffice and other applications works fine on this Wary.

Cheers,
Jim
User avatar
tazoc
Posts: 1157
Joined: Mon 11 Dec 2006, 08:07
Location: Lower Columbia Basin WA US
Contact:

#7 Post by tazoc »

Hi Jim,
Thanks for testing. :D You have 8 cores? That is sweet!

Please PM me preferred user/passwd if you'd like to post the LibreOffice SFS at lhpup.org; or if its already up somewhere.
Thanks,
TazOC
[url=http://www.lhpup.org/][b][size=100]lhpup.org[/size][/b] [img]http://www.lhpup.org/gallery/images/favicon.png[/img][/url] [url=http://www.lhpup.org/release-lhp.htm#602]Lighthouse 64 6.02[/url]
Jim1911
Posts: 2460
Joined: Mon 19 May 2008, 20:39
Location: Texas, USA

#8 Post by Jim1911 »

tazoc wrote:Thanks for testing. :D You have 8 cores? That is sweet!
Yes, I have 8 cores, however on Luci 233, and LHP 5.00F, only 4 show up, unlike all 8 that showed up in Wary and dpup zen 4. :(

Cheers,
Jim

PS: Note the difference in size between the attached picts. The smaller one was made with radky's new PupSnap-1.0 which he should be releasing soon. It allows you to snap pictures of individual windows or just segments of a desktop.
Attachments
cpuscalingtool.jpg
(43.09 KiB) Downloaded 3009 times
User avatar
tazoc
Posts: 1157
Joined: Mon 11 Dec 2006, 08:07
Location: Lower Columbia Basin WA US
Contact:

Maybe some kernels detect only 4 cores?

#9 Post by tazoc »

Jim1911 wrote:Yes, I have 8 cores, however on Luci 233, and LHP 5.00F, only 4 show up, unlike all 8 that showed up in Wary and dpup zen 4. :(
Hmm, I'm curious. Can you post the o/p of

Code: Select all

cat /var/log/messages|grep cores
in Luci 233 or Lighthouse? If the kernel detects 8 cores, then try

Code: Select all

cat /proc/cpuinfo|grep MHz
Thanks,
TazOC
[url=http://www.lhpup.org/][b][size=100]lhpup.org[/size][/b] [img]http://www.lhpup.org/gallery/images/favicon.png[/img][/url] [url=http://www.lhpup.org/release-lhp.htm#602]Lighthouse 64 6.02[/url]
Jim1911
Posts: 2460
Joined: Mon 19 May 2008, 20:39
Location: Texas, USA

#10 Post by Jim1911 »

Hi TazOC,

Sorry that it's taken so long to respond. This is output from Lighthouse 5.00 F, not good.

Code: Select all

bash-4.1# cat /var/log/messages|grep cores

<root> ~

bash-4.1# 

<root> ~

bash-4.1# cat /proc/cpuinfo|grep MHz

cpu MHz		: 1600.000

cpu MHz		: 1600.000

cpu MHz		: 1600.000

cpu MHz		: 1600.000

<root> ~

bash-4.1# 
Hope this helps,
Jim
User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

#11 Post by Iguleder »

The kernel has no Hyperthreading support, that means you see only half of the number of cores. I know the Lupu kernel (which is also the Lighthouse kernel) has no Hyperthreading, that's one of the reasons why I chose to go for our own kernel in Squeeze :wink:

That kernel also lacks rfkill and other important things ... but that's just my opinion :roll:
Last edited by Iguleder on Sun 31 Oct 2010, 17:35, edited 1 time in total.
[url=http://dimakrasner.com/]My homepage[/url]
[url=https://github.com/dimkr]My GitHub profile[/url]
User avatar
tazoc
Posts: 1157
Joined: Mon 11 Dec 2006, 08:07
Location: Lower Columbia Basin WA US
Contact:

#12 Post by tazoc »

Thanks, Jim. Yeah, Iguleder's on to something there. I was just going to say the kernel in LHP 2.6.33.2 (from Quirky 1.2 I think) probably wasn't compiled to support 8 cores.
This should clarify:

Code: Select all

cat /var/log/messages|grep processors
I have 2 cores and that gives this o/p:
# cat /var/log/messages|grep processors
Nov 1 15:55:30 Mariner user.info kernel: Total of 2 processors activated (10844.22 BogoMIPS).
Nov 1 15:55:47 Mariner user.info kernel: powernow-k8: Found 1 AMD Athlon(tm) 7750 Dual-Core Processor processors (2 cpu cores) (version 2.20.00)
I'm thinking about moving toward the next Squeeze or FatDog64 for a future release, if it can support 8 cores.-TazOC
[url=http://www.lhpup.org/][b][size=100]lhpup.org[/size][/b] [img]http://www.lhpup.org/gallery/images/favicon.png[/img][/url] [url=http://www.lhpup.org/release-lhp.htm#602]Lighthouse 64 6.02[/url]
Jim1911
Posts: 2460
Joined: Mon 19 May 2008, 20:39
Location: Texas, USA

#13 Post by Jim1911 »

tazoc wrote:I'm thinking about moving toward the next Squeeze or FatDog64 for a future release, if it can support 8 cores.-TazOC
I'll try this code on FatDog64 and post results here.

Code: Select all

# cat /var/log/messages|grep cores
# cat /proc/cpuinfo|grep MHz
cpu MHz		: 2672.756
cpu MHz		: 2672.756
cpu MHz		: 2672.756
cpu MHz		: 2672.756
cpu MHz		: 2672.756
cpu MHz		: 2672.756
cpu MHz		: 2672.756
cpu MHz		: 2672.756
# 
Last edited by Jim1911 on Sun 31 Oct 2010, 17:42, edited 1 time in total.
User avatar
tazoc
Posts: 1157
Joined: Mon 11 Dec 2006, 08:07
Location: Lower Columbia Basin WA US
Contact:

LHP kernel only supports 4 cores

#14 Post by tazoc »

I found these entries in Lighthouse 5.00 F
/etc/modules/DOTconfig-K2.6.33.2-5APR2010-SMP-TICKLESS:

CONFIG_X86_HT=y
CONFIG_NR_CPUS=4

[Edit:]
FD64-500: /etc/modules/2.6.34.config

CONFIG_X86_HT=y
CONFIG_NR_CPUS=8
-TazOC
Last edited by tazoc on Sun 31 Oct 2010, 17:45, edited 1 time in total.
[url=http://www.lhpup.org/][b][size=100]lhpup.org[/size][/b] [img]http://www.lhpup.org/gallery/images/favicon.png[/img][/url] [url=http://www.lhpup.org/release-lhp.htm#602]Lighthouse 64 6.02[/url]
User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

#15 Post by Iguleder »

Look at the kernel configuration. Here's an example from the latest Squeeze kernel. It has SMP, Hyperthreading and support for up to 8 cores, since most people don't need more than that and also because more than 8 cores need BIGSMP which results in extra size, while each core doesn't add much when it's up to 8 cores.
CONFIG_SCHED_MC=y
That's SMP.
CONFIG_SCHED_SMT=y
That's Hyperthreading.
CONFIG_NR_CPUS=8
That's the maximum number of cores supported by the kernel.
# CONFIG_X86_BIGSMP is not set
This is something you need if you want support for more than 8 cores (a CONFIG_NR_CPUS that is higher than 8).

This kernel sees 2 cores on my Core 2 Duo (2 physical cores) and 2 cores on my Atom (one physical, but it has Hyperthreading).

EDIT: tazoc, do you want me to upload the kernel PET I made so you can replace the Lighthouse kernel (someone wrote a guide for that), to make development easier?
[url=http://dimakrasner.com/]My homepage[/url]
[url=https://github.com/dimkr]My GitHub profile[/url]
User avatar
tazoc
Posts: 1157
Joined: Mon 11 Dec 2006, 08:07
Location: Lower Columbia Basin WA US
Contact:

#16 Post by tazoc »

Iguleder wrote:tazoc, do you want me to upload the kernel PET I made so you can replace the Lighthouse kernel (someone wrote a guide for that), to make development easier?
That's very kind of you! :D In fact I was just browsing http://brainwavedesigncentral.net/dima/ ... p_ht-dpup/

From Barry's Blog or somewhere I read that OpenOffice won't work on 2.6.35, have you tried OO on it?
Thanks,
TazOC
[Edit:]Make that LibreOffice
Last edited by tazoc on Sun 31 Oct 2010, 18:42, edited 1 time in total.
[url=http://www.lhpup.org/][b][size=100]lhpup.org[/size][/b] [img]http://www.lhpup.org/gallery/images/favicon.png[/img][/url] [url=http://www.lhpup.org/release-lhp.htm#602]Lighthouse 64 6.02[/url]
User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

#17 Post by Iguleder »

2.6.35.x and 2.6.36 proved to be total crap, we're staying with the good 2.6.32.x. I patch it to appear as 2.6.32 so I can replace it with later 2.6.32.x version to enjoy bug fixes (after all, what's the point in using a LTS kernel if you don't upgrade it?) without breaking third-party drivers. Hardware support is very good and there's nothing vital in 2.6.33.x or 2.6.34.x. 35 has just multiple GPUs support but user-land stuff still suck in this area, so why bother? :lol:

It's this one, but in my first build I forgot to compile Aufs as a module, maybe it's this one - I just don't remember if I uploaded the fixed sources. If you want to roll your own just compile this kernel (the sources are patched, cleaned and configured), just make sure Aufs is a module. I think I uploaded the new sources, but don't trust me :)

And no, haven't tried OO on any kernel, the last time I used it was maybe a year ago.

EDIT: dang, it seems I uploaded the fixed sources but had a typo in the file name, so now I don't know which one is the right sources SFS. You can take the sources from the sources directory, patch with the stuff in the patches directory and copy in the .config file.
[url=http://dimakrasner.com/]My homepage[/url]
[url=https://github.com/dimkr]My GitHub profile[/url]
Jim1911
Posts: 2460
Joined: Mon 19 May 2008, 20:39
Location: Texas, USA

#18 Post by Jim1911 »

Tried on luci-238, frugal and full installations.

I activated the CPU Frequency Scaling Tool with these settings, powersave, Min-1600000, Max-1867000. Applied the settings, then later recheck and find that it has gone back to the default start condition running at max speed of 2673000. This was repeated several times on both installations.
Attachments
cpufreq.jpg
(40.88 KiB) Downloaded 2164 times
User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

#19 Post by Iguleder »

tazoc, do you need any help with this? Testing maybe? I just compiled a new kernel and I want to try it out on various machines so maybe I can contribute more to this :)

Oh, and by the way ... do you intend to upload this to the Lucid repo? :D

(And regarding the kernel, it's my new linux_kernel-2.6.32.26-pentium2-bfs for the upcoming Insidious Puppy)
[url=http://dimakrasner.com/]My homepage[/url]
[url=https://github.com/dimkr]My GitHub profile[/url]
User avatar
tazoc
Posts: 1157
Joined: Mon 11 Dec 2006, 08:07
Location: Lower Columbia Basin WA US
Contact:

#20 Post by tazoc »

Jim1911 wrote:Tried on luci-238, frugal and full installations.
Thanks for the bug report Jim. I haven't tried Luci-238 yet. I wonder if it has a new kernel. Your screen shot shows that wcpufreq removed the previous driver, something I added into wcpufreq 0.4 but never thought would work. So we're breaking new ground here.

I will d/l 238 and do some testing tomorrow.

Hi Iguleder, wcpufreq is already in Luci-237/8, I haven't uploaded anything myself to the lucid repo--maybe you're joshin me? :wink:

Feel free to test and hack as needed. If my hunch is right, something new about Luci-238 or Jim's hardware is allowing the driver to be removed when wcpufreq starts, which is good because that allows changing the driver without having to reboot. What I need to figure out is whether the driver got removed earlier than it should have. May need a new panel that detects the possibility of removal without rebooting and offers to remove before it actually does.
Thanks,
TazOC
[url=http://www.lhpup.org/][b][size=100]lhpup.org[/size][/b] [img]http://www.lhpup.org/gallery/images/favicon.png[/img][/url] [url=http://www.lhpup.org/release-lhp.htm#602]Lighthouse 64 6.02[/url]
Post Reply