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.
wcpufreq CPU Frequency Scaling 1.1
- BarryK
- Puppy Master
- Posts: 9392
- Joined: Mon 09 May 2005, 09:23
- Location: Perth, Western Australia
- Contact:
Checked the PETs, that 0.8.2 is not internationalised, my 0.8.3 is, that is the main difference.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.
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
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]
- BarryK
- Puppy Master
- Posts: 9392
- Joined: Mon 09 May 2005, 09:23
- Location: Perth, Western Australia
- Contact:
Marv,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.
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
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]
- BarryK
- Puppy Master
- Posts: 9392
- Joined: Mon 09 May 2005, 09:23
- Location: Perth, Western Australia
- Contact:
An extra note. This line:
Can be replaced with:
I think all pups, going back quite a while, have the vercmp utility. No need for those braces and backticks either.
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
[url]https://bkhome.org/news/[/url]
Yes, that is correct pre or post 4.13. The 4.14 kernel reverted to the pre-4.13 kernel behavior. It again writes the current CPU speed to /proc/cpuinfo. A warning in wcpufreq that wcpufreq will not work if intel_pstate is enabled in the kernel and not disabled by passing a kernel parameter still might forestall some questions IMO. I am watching the thread but there had been no responses since 22 Sept so I figured it was a dead horse.BarryK wrote:Checked the PETs, that 0.8.2 is not internationalised, my 0.8.3 is, that is the main difference.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.
So, is this the only change required to support 4.13 kernel?:
EDIT: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
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.
Edit: I'll update my posting above with a version with support and warning for intel_pstate only. Again, for testing and comments. CPU_DRIVER is set by the time the relevant function is called, I echoed it initially to check.
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.
- BarryK
- Puppy Master
- Posts: 9392
- Joined: Mon 09 May 2005, 09:23
- Location: Perth, Western Australia
- Contact:
Marv,
Thanks for that info.
My 4.14.1 kernel is configured with:
Kernel source, patches, build scripts here:
http://distro.ibiblio.org/easyos/source/kernel/4.14.1/
So, looks like I don't have to worry about that intel_pstate, in my Quirky and Easy builds. So, my 0.8.3 is ok as-is, but I will put in that patch for 4.13.x.
Thanks for that info.
My 4.14.1 kernel is configured with:
Code: Select all
# CPU Frequency scaling
#
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_GOV_ATTR_SET=y
CONFIG_CPU_FREQ_GOV_COMMON=y
CONFIG_CPU_FREQ_STAT=y
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL is not set
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=m
CONFIG_CPU_FREQ_GOV_USERSPACE=m
CONFIG_CPU_FREQ_GOV_ONDEMAND=m
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
# CONFIG_CPU_FREQ_GOV_SCHEDUTIL is not set
#
# CPU frequency scaling drivers
#
# CONFIG_X86_INTEL_PSTATE is not set
# CONFIG_X86_PCC_CPUFREQ is not set
CONFIG_X86_ACPI_CPUFREQ=m
CONFIG_X86_ACPI_CPUFREQ_CPB=y
CONFIG_X86_POWERNOW_K8=m
# CONFIG_X86_AMD_FREQ_SENSITIVITY is not set
CONFIG_X86_SPEEDSTEP_CENTRINO=m
CONFIG_X86_P4_CLOCKMOD=m
#
# shared options
#
CONFIG_X86_SPEEDSTEP_LIB=m
http://distro.ibiblio.org/easyos/source/kernel/4.14.1/
So, looks like I don't have to worry about that intel_pstate, in my Quirky and Easy builds. So, my 0.8.3 is ok as-is, but I will put in that patch for 4.13.x.
[url]https://bkhome.org/news/[/url]