[Plugin] CoreFreq


Recommended Posts

3 hours ago, Pillendreher said:

Quick question: What do the colours concerning the CPU's features at the bottom of the screen signify? E.g. @kdwg's screen shows "CPPC" as "green", yet mine shows it as "blue". What gives? Is "blue" better than "green"?

Indeed blue means capable, and green, enabled.

 

In your case CPPC is capable but not in function.

You can enable it in window "Performance Monitoring", item "Collaborative Processor Performance Control"

 

Remarks:

CPPC appears to be a firmware implementation, I can't tell what BIOS is going to do when enablement bit is set.

  • Like 1
  • Thanks 1
Link to comment
  • 3 weeks later...

Hi, I spend over 5 days trying to properly configure and run CoreFreq and now I've decided to ask for some help.

Issue:  After the installation of plugin there is no data in CoreFreq and almost always there is no way to register any driver.

 

I wonder if this is caused by CPU inconpatibility or BIOS config maybe?

 

CPU: i5 12500

MOBO: MAG B66M MORTAT WIFI DDR 4

 

I've used in CLI:

modprobe corefreqk Register_ClockSource=1 Register_CPU_Freq=1 Register_Governor=1 Register_CPU_Idle=1

 

echo "corefreq" > /sys/devices/system/clocksource/clocksource0/current_clocksource

 

syslinux.cfg:

default menu.c32
menu title Lime Technology, Inc.
prompt 0
timeout 50
label Unraid OS
  menu default
  kernel /bzimage 
  append initrd=/bzroot nmi_watchdog=0 modprobe.blacklist=i5500_temp,coretemp,intel_idle,intel_cstate,intel_uncore,acpi_cpufreq,pcc_cpufreq,intel_powerclamp,i7core_edac,intel_rapl_msr,intel_rapl_common,intel_pmc_bxt idle=halt intel_pstate=disable intel_idle.max_cstate=0 cpufreq.off=0 tsc=unstable nowatchdog make MSR_CORE_PERF_UCC=MSR_IA32_APERF MSR_CORE_PERF_URC=MSR_IA32_MPERF device=/dev/dri:/dev/dri
label Unraid OS GUI Mode
  kernel /bzimage 
  append initrd=/bzroot,/bzroot-gui nmi_watchdog=0 modprobe.blacklist=i5500_temp,coretemp,intel_idle,intel_cstate,intel_uncore,acpi_cpufreq,pcc_cpufreq,intel_powerclamp,i7core_edac,intel_rapl_msr,intel_rapl_common,intel_pmc_bxt idle=halt intel_pstate=disable intel_idle.max_cstate=0 cpufreq.off=0 tsc=unstable nowatchdog make MSR_CORE_PERF_UCC=MSR_IA32_APERF MSR_CORE_PERF_URC=MSR_IA32_MPERF device=/dev/dri:/dev/dri
label Unraid OS Safe Mode (no plugins, no GUI)
  kernel /bzimage
  append initrd=/bzroot unraidsafemode
label Unraid OS GUI Safe Mode (no plugins)
  kernel /bzimage
  append initrd=/bzroot,/bzroot-gui unraidsafemode
label Memtest86+
  kernel /memtest

 

tower-diagnostics-20220824-1736.zip

Link to comment
2 hours ago, chchiyan said:
make MSR_CORE_PERF_UCC=MSR_IA32_APERF MSR_CORE_PERF_URC=MSR_IA32_MPERF device=/dev/dri:/dev/dri

What is this?

This shouldn't be there!

 

It should be however be possible to pass commands in the syslinux.conf through like this:

corefreqk.Register_ClockSource=1

 

Or even better you create a corefreqk.conf in the directory /boot/config/modprobe.d and enter the things that you want to add to the module from above there like:

Register_ClockSource=1 Register_CPU_Freq=1 Register_Governor=1 Register_CPU_Idle=1

 

However it is also necessary that you've upgrade to unRAID 6.11.0-rc4 to get this working because with this release the plugin packages are installed really early in the boot process which was in the previous releases not the case and with this CoreFreq should be now able to register as clock source.

 

@CyrIng I hope I've explained nothing wrong here.

  • Thanks 1
Link to comment
Quote

What is this?

This shouldn't be there!

Removed

 

Quote

Or even better you create a corefreqk.conf in the directory /boot/config/modprobe.d and enter the things that you want to add to the module from above there like:

Done, but corefreqk.conf caused error during reboot. I've renamed it to corefreqk.cfg and now there is no error.

File and its content

STbUcVY.jpeg

 

Register_ClockSource=1 Register_CPU_Freq=1 Register_Governor=1 Register_CPU_Idle=1 nmi_watchdog=0 modprobe.blacklist=i5500_temp,coretemp,intel_idle,intel_cstate,intel_uncore,acpi_cpufreq,pcc_cpufreq,intel_powerclamp,i7core_edac,intel_rapl_msr,intel_rapl_common,intel_pmc_bxt idle=halt intel_pstate=disable intel_idle.max_cstate=0 cpufreq.off=0 tsc=unstable nowatchdog

 

Quote

However it is also necessary that you've upgrade to unRAID 6.11.0-rc4

Done

 

Unfortunately still nothing changed regarding CoreFreq.

Still no data monitored: peNw9Mg.jpeg

 

Also, when I'm trying to register Clock Source another error appears (same as before):

wRiFfOs.jpeg

 

Could you give me some clues what else can i do?

tower-diagnostics-20220824-2122.zip

Link to comment
Just now, chchiyan said:

OK, the error below

How did you create that file? Through Windows?

I think I've forgot to write the options in front of the line it should look like this:

options Register_ClockSource=1 Register_CPU_Freq=1 Register_Governor=1 Register_CPU_Idle=1

 

Please wait for an answer from @CyrIng.

  • Thanks 1
Link to comment
15 hours ago, chchiyan said:

Removed

 

Done, but corefreqk.conf caused error during reboot. I've renamed it to corefreqk.cfg and now there is no error.

File and its content

STbUcVY.jpeg

 

Register_ClockSource=1 Register_CPU_Freq=1 Register_Governor=1 Register_CPU_Idle=1 nmi_watchdog=0 modprobe.blacklist=i5500_temp,coretemp,intel_idle,intel_cstate,intel_uncore,acpi_cpufreq,pcc_cpufreq,intel_powerclamp,i7core_edac,intel_rapl_msr,intel_rapl_common,intel_pmc_bxt idle=halt intel_pstate=disable intel_idle.max_cstate=0 cpufreq.off=0 tsc=unstable nowatchdog

 

Done

 

Unfortunately still nothing changed regarding CoreFreq.

Still no data monitored: peNw9Mg.jpeg

 

Also, when I'm trying to register Clock Source another error appears (same as before):

wRiFfOs.jpeg

 

Could you give me some clues what else can i do?

tower-diagnostics-20220824-2122.zip 73.91 kB · 0 downloads

 

Hello,

 

I have checked your logs/syslog.txt for a possible driver crash, but don't find any.

 

Do you mind to try my ISO ?

https://github.com/cyring/CoreFreq/wiki/Live-CD

  • Like 1
  • Thanks 1
Link to comment
22 minutes ago, chchiyan said:

I've tried ISO flash and there are many errors during boot time.

Both in regular version and Bare-Metal

IMG_20220825_160719.jpg

Messages seems linked to file system errors : is the USB key of good quality ? Or the downloaded image corrupted ? 

 

You can also boot any other Linux with kernel development kit and build/try CoreFreq from it. 

 

I have preliminary reports of Alder lake, most "k" models have been tested/enhanced. 

See CPU Support page within the CoreFreq Github repo. 

  • Thanks 1
Link to comment
4 minutes ago, chchiyan said:

OK, after reformat USB drive is working fine.

Anyway CoreFreq is behaving the same as in Unraid - no data 

IMG_20220825_190638.jpg

Please exit CLI to go back to shell then check for any driver crash using "dmesg" 

 

CoreFreq is in directory /opt

You can "make" and just "insmod corefreq.ko" from it. 

Then read "dmesg" immediately for any crash. 

  • Thanks 1
Link to comment
28 minutes ago, chchiyan said:

OK, after reformat USB drive is working fine.

Anyway CoreFreq is behaving the same as in Unraid - no data 

IMG_20220825_190638.jpg

Please exit CLI to go back to shell then check for any driver crash using "dmesg" 

 

CoreFreq is in directory /opt

You can "make" and just "insmod corefreq.ko" from it. 

Then read "dmesg" immediately for any crash. 

  • Thanks 1
Link to comment

@chchiyan

What's new for CoreFreq is that i5-12500 has no E-core

I think the early CPU topology built by driver is messed up. 

You may a chance to start driver by binding the Service Processor to a P-core. 

 

Let's try to bind to first CPU :

 

"insmod corefreq.ko ServiceProcessor=0"

 

Then starts Daemon and CLI. 

  • Thanks 1
Link to comment
5 hours ago, chchiyan said:

@CyrIng

Probably i'm doing something wrong

 

EDIT

Also i can't scroll up after "dmesg" - shift + up / page up, ctrl + shift up / page up doesn't work 🙃

 

 

IMG_20220825_204425.jpg

 

Check syntax of driver name. Try again with:
 

insmod corefreqk.ko ServiceProcessor=0

 

Next starts Daemon in background mode:

 

./corefreqd -q &

 

And dump Processor information using CLI:

 

./corefreq-cli -s -n -m

 

EDIT:

Before entering the above commands, it would be easier to boot from a plain shell. This will avoid the messed terminal you have encountered.

While the ISO is loading, when you are asked to abort, press [Ctrl]+[c] to go straight to the shell.

Change then to /opt/CoreFreq and do a "make"

And continue with CoreFreq starts commands

Edited by CyrIng
  • Thanks 1
Link to comment
nano corefreqk.c

## go to function Start_Alderlake at lines 16751
## in the switch statement you will find 3 case which starts Pcore monitoring
## you will add a default condition below these cases, like:

    case Hybrid_Core:
    case Hybrid_RSVD1:
    case Hybrid_RSVD2:
    default:
	    SMT_Counters_Alderlake_Pcore(Core, 0);

## You will do the same in function InitTimer_Alderlake at lines 16737
    case Hybrid_Core:
    case Hybrid_RSVD1:
    case Hybrid_RSVD2:
    default:
	    smp_call_function_single(cpu, InitTimer, Cycle_Alderlake_Pcore, 1);

 

Save changes pressing [F3] and exit nano with [2]

 

Then you rebuild CoreFreq

make clean all

 

Stop the Daemon if it's still running with "kill %1" and unload driver with "rmmod corefreqk.ko"

 

Now you start CoreFreq from this fresh build.

  • Thanks 1
Link to comment
2 hours ago, chchiyan said:

You mean in the place where I'm now?

 

16614660761094948790722293289590.jpg

Now CoreFreq is stuck

Please reboot from USB key; abort auto compilation

Go to /opt/CoreFreq

And apply the source code changes in corefreqk.c (see above)

Make and Run

  • Thanks 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.