Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 11 Dec 2017, 18:59
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
wcpufreq CPU Frequency Scaling 1.1
Post new topic   Reply to topic View previous topic :: View next topic
Page 4 of 4 [52 Posts]   Goto page: Previous 1, 2, 3, 4
Author Message
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 8345
Location: Perth, Western Australia

PostPosted: Tue 05 Dec 2017, 18:59    Post subject:  

Um, I have wcpufreq 0.8.3, dated 2015:

http://distro.ibiblio.org/easyos/noarch/packages/pet/pet_packages-noarch/wcpufreq-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.

_________________
http://barryk.org/news/
Back to top
View user's profile Send private message Visit poster's website 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 8345
Location: Perth, Western Australia

PostPosted: Tue 05 Dec 2017, 19:19    Post subject:  

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

http://distro.ibiblio.org/easyos/noarch/packages/pet/pet_packages-noarch/wcpufreq-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:
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?! Confused

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.

_________________
http://barryk.org/news/
Back to top
View user's profile Send private message Visit poster's website 
Anniekin


Joined: 24 Feb 2009
Posts: 219

PostPosted: Tue 05 Dec 2017, 19:41    Post subject:  

so, like this?

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

_________________
Google first page

https://oahutraveler.com
https://www.google.com/search?q=Oahu+tour+guide

http://peterbfoodsafety.com/
https://www.google.com/search?q=Oahu+food+audits
Back to top
View user's profile Send private message Visit poster's website 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 8345
Location: Perth, Western Australia

PostPosted: Tue 05 Dec 2017, 19:42    Post subject:  

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

_________________
http://barryk.org/news/

Last edited by BarryK on Tue 05 Dec 2017, 19:51; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 8345
Location: Perth, Western Australia

PostPosted: Tue 05 Dec 2017, 19:47    Post subject:  

An extra note. This line:

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


Can be replaced with:

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

_________________
http://barryk.org/news/
Back to top
View user's profile Send private message Visit poster's website 
Marv


Joined: 04 May 2005
Posts: 918
Location: SW Wisconsin

PostPosted: Tue 05 Dec 2017, 21:34    Post subject:  

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

http://distro.ibiblio.org/easyos/noarch/packages/pet/pet_packages-noarch/wcpufreq-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:
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?! Confused

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.


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.

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 Very Happy LxPupSc, X-slacko 4.4 and X-tahr 2.0 for my users; LxPupSc, LxPupArtful, ArtfulPup & XFCE_XenialPup64 for me. All good pups indeed, and all running savefiles for look'n'feel only. Browsers, etc. solely from SFS.
Back to top
View user's profile Send private message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 8345
Location: Perth, Western Australia

PostPosted: Wed 06 Dec 2017, 05:44    Post subject:  

Marv,
Thanks for that info.

My 4.14.1 kernel is configured with:

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


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.

_________________
http://barryk.org/news/
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 4 of 4 [52 Posts]   Goto page: Previous 1, 2, 3, 4
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0498s ][ Queries: 13 (0.0085s) ][ GZIP on ]