wcpufreq CPU Frequency Scaling 1.1

Miscellaneous tools
Message
Author
User avatar
playdayz
Posts: 3799
Joined: Fri 25 Apr 2008, 18:57

#31 Post by playdayz »

Hey tazoc, I am about to add wcpufreq 0.8 to Instant Update 002 for Lucid 5.2.8. Please let me know if you see any issues with that. I had already added it to Three-Headed Dog with no apparent problems. Thank you.

User avatar
playdayz
Posts: 3799
Joined: Fri 25 Apr 2008, 18:57

#32 Post by playdayz »

http://www.murga-linux.com/puppy/viewto ... 210#682210
Hello again tazoc. wcpufreq does not seem to be working correctly in Lxpup. Best, Larry

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#33 Post by BarryK »

linuxcbon posted a bug report for wcpufreq, in Precise Puppy:
http://murga-linux.com/puppy/viewtopic. ... &start=255

I fixed it, bumped the version to 0.8.1 (40K):
http://distro.ibiblio.org/quirky/pet_pa ... -0.8.1.pet
[url]https://bkhome.org/news/[/url]

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

wcpufreq-1.0 released

#34 Post by tazoc »

Hi Playdayz and BarryK,
Thank you for your feedback. New Pet is updated for recent kernels.

Changelog
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.

-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:

wcpufreq CPU Frequency Scaling 1.1 released

#35 Post by tazoc »

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

-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]

sindi
Posts: 1087
Joined: Sun 16 Aug 2009, 13:30
Location: Ann Arbor MI USA

wcpufreq in wary 5.5 won't let me change minimum cpu freq

#36 Post by sindi »

DELL D600 max cpu freq 1.6GHz min 600Mhz which because of a broken wire on the board runs at minimum all the time unless you use acpi-cpufreq to set it to min 1.6GHz. In puppy 4.1.2 and 4.3.1 and 4.3.2 I can modprobe acpi-cpufreq and echo the correct minimum frequency to a file created by acpi-cpufreq (which is what the scripts do) and it changes the minimum to 1.6GHz and the computer runs at at full speed all the time. (No point in running it slowly since the same broken wire keeps it from charging the battery - Dell's way of forcing you to buy their OEM power supply with the matching wire). In wary 5.5 with wcpufreq the file does not change value - I cannot change either min or max frequencies using the wizard (it tells me I have a fixed frequency 600MHz) or with echo 1600 > /..... (on a different computer right now, don't have the file).

The BIOS is somehow involved. Maybe wcpufreq consults it and refuses to go above 600MHz?

What do I need to replace to get cpufreq working as in 4.3.1?

User avatar
peebee
Posts: 4370
Joined: Sun 21 Sep 2008, 12:31
Location: Worcestershire, UK
Contact:

#37 Post by peebee »

CPU frequency determination changes in kernel 4.13

The attached .pets include a fix developed by @radky for PupSysInfo.

The woof-ce noarch-official repo currently has version 0.8.1 and has been updated to 0.8.2

Version 1.1 never seems to have got out into the wider world - version 1.2 is attached for testing and possible inclusion in the woof-ce repo and builds.
Attachments
wcpufreq-0.8.2.pet
(39.17 KiB) Downloaded 182 times
wcpufreq-1.2-noarch.pet
(41.01 KiB) Downloaded 207 times
ImageLxPup = Puppy + LXDE
Main version used daily: LxPupSc; Assembler of UPups, ScPup & ScPup64, LxPup, LxPupSc & LxPupSc64

sheldonisaac
Posts: 902
Joined: Mon 22 Jun 2009, 01:36
Location: Philadelphia, PA

version 1.2 question

#38 Post by sheldonisaac »

peebee (in part) wrote:CPU frequency determination changes in kernel 4.13
peebee or others, will this work correctly with tahr 6.0.6? I usually use that 32-bit tahr.
Version 1.1 never seems to have got out into the wider world - version 1.2 is attached for testing and possible inclusion in the woof-ce repo and builds.
I installed the 1.2 no-arch. Its help says 1.1.
Seems to work; how could I tell whether it's working correctly?

Thanks a lot,
Sheldon
Dell E6410: BusterPup, BionicPup64, Xenial, etc
Intel DQ35JOE, Dell Vostro 430
Dell Inspiron, Acer Aspire One, EeePC 1018P

User avatar
Marv
Posts: 1264
Joined: Wed 04 May 2005, 13:47
Location: SW Wisconsin

#39 Post by Marv »

Installed the 1.2 no-arch. As sheldonisaac said its help says 1.1.
Switched governors back and forth and checked CPU speeds with my cpuwatch script, wcpufreq itself, and PupSysInfo while running glxgears on my i5 based laptop. Operation seems normal, as did the patched 0.8.1. It would be nice to get a test by someone with LOTS of cores.

@sheldonisaac The changes in the patched versions just (in bash) test for the kernel version and read the cpu speed from a different location if a kernel newer than 4.13.x is detected. Since the information at both those locations is kernel written it should work on all the pups that the unpatched versions worked on. All :?:
Pups currently in kennel :D Older LxPupSc and X-slacko-4.4 for my users; LxPupSc, LxPupSc64 and upupEF for me. All good pups indeed, and all running savefiles for look'n'feel only. Browsers, etc. solely from SFS.

User avatar
ally
Posts: 1957
Joined: Sat 19 May 2012, 19:29
Location: lincoln, uk
Contact:

#40 Post by ally »

lenovo x230 running xenialpup64, unable to set scaling using either 0.8x or 1.2

:)

User avatar
Marv
Posts: 1264
Joined: Wed 04 May 2005, 13:47
Location: SW Wisconsin

#41 Post by Marv »

ally wrote:lenovo x230 running xenialpup64, unable to set scaling using either 0.8x or 1.2

:)
Hi ally, What is packaged with xenialPup64 wrt setting cpu freq? I don't have a copy downloaded to check. Were you able to set with that? When the versions above failed what did you see... were any governors displayed etc?

Update: I just downloaded and installed Battleshooters XFCE_XenialPup64 r2 and booted into it. The stock version of wcpufreq in /usr/sbin is the same as the unpatched 0.8 version above. I set several governors with it on my i5 laptop and then manually copied in the patched 0.8.1. Able to install and change governors with that as well. The patch for the 4.13 and newer kernels is invoked as the kernel is 4.13.0 on this install and my core speeds are correctly displayed. Crosschecked that with the unpatched PupSysInfo in this install and indeed it displays the cpu speed incorrectly. Could it be a hardware issue? If so we need to pursue it.

:idea: Do you see Intel_Pstate as your governor? If so, to use the acpi_cpufreq governors you need to pass intel_pstate=disable as a kernel parameter to disable the intel governor. Otherwise it takes precedence.
Pups currently in kennel :D Older LxPupSc and X-slacko-4.4 for my users; LxPupSc, LxPupSc64 and upupEF for me. All good pups indeed, and all running savefiles for look'n'feel only. Browsers, etc. solely from SFS.

User avatar
ally
Posts: 1957
Joined: Sat 19 May 2012, 19:29
Location: lincoln, uk
Contact:

#42 Post by ally »

hi marv

yes to Intel_Pstate, set to performance and unable to modify I will try the kernel switch and report back

:)

edit: kernel parameter added to menu.1st, now able to run cpu scaling...nice!

thank you

:)

User avatar
Marv
Posts: 1264
Joined: Wed 04 May 2005, 13:47
Location: SW Wisconsin

#43 Post by Marv »

Great.

Maybe we can test for the Intel_Pstate governor in wcpufreq 1.2 and put a note in to that effect.

I cobbled in an explicit intel_pstate warning to 1.2. Tain't especially pretty yet but I think it is fairly clear. I've tested it in Battleshooters XFCE_XenialPup64 r2 by toggling the kernel parameter and both cases seem ok. I also added support for the cpu current frequency when in intel_pstate. It writes to a different file in the sysfs. I'll attach the script labelled as 1.2a and a diff from 1.2 below. Try it and pretty it up please. Both files are true gzips.

Update: 1.2b does two things. One is (as 1.2a) to support the reading of current speeds from the intel_pstate driver and the other is to clean up a bit (I think) the warning/instructions wrt that driver. I'll replace the 1.2a with it below and pull the diff since there were 0 downloads.

Edit on 5 December 2017: Based on comments and kernel changes 4.13 support pulled and only intel_pstate support added.
Attachments
wcpufreq.gz
updated 1.2b. intel_pstate support added. Speed and a warning. Kernel 4.13 support pulled.
(7.83 KiB) Downloaded 159 times
Last edited by Marv on Wed 06 Dec 2017, 04:00, edited 1 time in total.
Pups currently in kennel :D Older LxPupSc and X-slacko-4.4 for my users; LxPupSc, LxPupSc64 and upupEF for me. All good pups indeed, and all running savefiles for look'n'feel only. Browsers, etc. solely from SFS.

User avatar
Anniekin
Posts: 246
Joined: Wed 25 Feb 2009, 00:15

intel core iX

#44 Post by Anniekin »

Hi
Last edited by Anniekin on Tue 05 Dec 2017, 23:27, edited 1 time in total.

User avatar
Anniekin
Posts: 246
Joined: Wed 25 Feb 2009, 00:15

intel core iX

#45 Post by Anniekin »

I'm stupid
Last edited by Anniekin on Tue 05 Dec 2017, 23:27, edited 1 time in total.

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#46 Post by BarryK »

Um, I have wcpufreq 0.8.3, dated 2015:

http://distro.ibiblio.org/easyos/noarch ... -0.8.3.pet

I found my blog post about it:

http://bkhome.org/news/201511/wcpufreq-083.html

So, it looks like I have to patch it for the 4.13.x kernel, and probably bump the version to 0.8.4.
[url]https://bkhome.org/news/[/url]

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#47 Post by BarryK »

BarryK wrote:Um, I have wcpufreq 0.8.3, dated 2015:

http://distro.ibiblio.org/easyos/noarch ... -0.8.3.pet

I found my blog post about it:

http://bkhome.org/news/201511/wcpufreq-083.html

So, it looks like I have to patch it for the 4.13.x kernel, and probably bump the version to 0.8.4.
Checked the PETs, that 0.8.2 is not internationalised, my 0.8.3 is, that is the main difference.

So, is this the only change required to support 4.13 kernel?:

Code: Select all

KERNEL_VER=$(uname -r | cut -f1,2 -d'.')  #170921
	if ((`bc <<< "$KERNEL_VER>=4.13"`)); then
	 CPU_INFO_SPEED=$(sed 's/...$//' /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_cur_freq)
	else
     CPU_INFO_SPEED="`cat /proc/cpuinfo | grep 'MHz' | awk '{print $4}' | cut -f 1 -d '.'`"
    fi
EDIT:

Huh?! :?

I am running with the 4.14.1 kernel, and both of those above methods work. In other words, there is no need for the patch.
[url]https://bkhome.org/news/[/url]

User avatar
Anniekin
Posts: 246
Joined: Wed 25 Feb 2009, 00:15

#48 Post by Anniekin »

so, like this?

kernel /xenialpup647.5frugal/vmlinuz psubdir=xenialpup647.5frugal pmedia=atahd pfix=fsck intel_pstate=disable

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#49 Post by BarryK »

Marv wrote:Great.

Maybe we can test for the Intel_Pstate governor in wcpufreq 1.2 and put a note in to that effect.

I cobbled in an explicit intel_pstate warning to 1.2. Tain't especially pretty yet but I think it is fairly clear. I've tested it in Battleshooters XFCE_XenialPup64 r2 by toggling the kernel parameter and both cases seem ok. I also added support for the cpu current frequency when in intel_pstate. It writes to a different file in the sysfs. I'll attach the script labelled as 1.2a and a diff from 1.2 below. Try it and pretty it up please. Both files are true gzips.

Update: 1.2b does two things. One is (as 1.2a) to support the reading of current speeds from the intel_pstate driver and the other is to clean up a bit (I think) the warning/instructions wrt that driver. I'll replace the 1.2a with it below and pull the diff since there were 0 downloads.
Marv,
This code seems to be broken:

Code: Select all

KERNEL_VER=$(uname -r | cut -f1,2 -d'.')  #170921
	if ((`bc <<< "$KERNEL_VER>=4.13"`)); then
	 if [ $CPU_DRIVER = "intel_pstate" ]; then
	    CPU_INFO_SPEED=$(sed 's/...$//' /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq)
	  else 
	   CPU_INFO_SPEED=$(sed 's/...$//' /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_cur_freq)
	 fi
	else
     CPU_INFO_SPEED="`cat /proc/cpuinfo | grep 'MHz' | awk '{print $4}' | cut -f 1 -d '.'`"
    fi
...as CPU_DRIVER is not set that early in the script.

Not that it matters, as the two lines computing CPU_INFO_SPEED seem to be the same.

I will put updating to 0.8.4 on hold for now, give you guys time to look at it.
Last edited by BarryK on Tue 05 Dec 2017, 23:51, edited 1 time in total.
[url]https://bkhome.org/news/[/url]

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#50 Post by BarryK »

An extra note. This line:

Code: Select all

if ((`bc <<< "$KERNEL_VER>=4.13"`)); then


Can be replaced with:

Code: Select all

if vercmp $KERNEL_VER ge 4.13; then
I think all pups, going back quite a while, have the vercmp utility. No need for those braces and backticks either.
[url]https://bkhome.org/news/[/url]

Post Reply