[Plugin] CoreFreq


Recommended Posts

Thanks for the reply.

 

Server crashed. then had to unplug it to get back live. As soon as it booted I, I grabbed the first of the attached diagnostics (2022-02-16), then (think I indeed first grabbed the diagnostics) uninstalled corefreq without rebooting.

 

After 24hours it crashed again. I unplugged and plugged it to get back online. I did a clear reboot and as soon it booted and then grabbed the second diagnostics file (2022-02-17).

 

 

 

Edited by Kydonakis
Link to comment
5 hours ago, Kydonakis said:

Server crashed. then had to unplug it to get back live. As soon as it booted I, I grabbed the first of the attached diagnostics (2022-02-16), then (think I indeed first grabbed the diagnostics) uninstalled corefreq without rebooting.

Seems like that in your case i915 is causing the Kernel panic or at least it is crashing right after you've activate it.

 

May I also ask why you unbind the console output from your iGPU?

 

But does your server now also crash if you have to CoreFreq plugin uninstalled?

 

I also would recommend that you remove the statistics.sender.plg from your server, isn't this plugin deprecated?

Link to comment
3 minutes ago, Kydonakis said:

iGPU is used for plex transcoding.

Yes, but what are you doing in the go file after you've enabled the iGPU? Do you disable the display output?

I would recommend that you actually use a HDMI Dummy Plug since those helped already prevent crashes on other 10th gen systems if no monitor is plugged into the iGPU.

 

You can also remove the modprobe and chmod from the go file and enable the iGPU by simply installing the plugin Intel-GPU-TOP.

Link to comment

A very handy plugin! I have two questions though.

 

1) Is it possible to somehow 'persist' any custom configuration between reboots in CoreFreq? For example, if I change the CPU's TDP and register the governor, CPU idle, etc drivers in Corefreq, these changes are forgotten if Unraid is rebooted. I was thinking it might be possible to make these changes by using arguments with corefreq-cli but I can't find arguments which wouild do that either (e.g. could've set these again via a user script on first array startup).

 

2) With CoreFreq's governor etc registered, the only two choices I see for scaling are performance and powersave, I was wondering if it's possible to still have ondemand or conservative as choices or would I need to possibly change back to the governor I originally had with Unraid? At least I assume it's the governor that's responsible for it, but I'm not 100% certain. I also presume these scaling choices have disappeared due to the blacklisting and registering guide (partially) I followed from the Github wiki page.

 

Thanks in advance.

Link to comment
Just now, Ixel said:

1) Is it possible to somehow 'persist' any custom configuration between reboots in CoreFreq? For example, if I change the CPU's TDP and register the governor, CPU idle, etc drivers in Corefreq, these changes are forgotten if Unraid is rebooted. I was thinking it might be possible to make these changes by using arguments with corefreq-cli but I can't find arguments which wouild do that either (e.g. could've set these again via a user script on first array startup).

Will look into this ASAP, maybe I've messed up the configuration... :/

 

1 minute ago, Ixel said:

With CoreFreq's governor etc registered, the only two choices I see for scaling are performance and powersave

This is usually the intel_pstate driver where only powersave and performance are availalbe if you want to use a ondemand governor you have to manually edit your syslinux.conf and add this to get the acpi-cpufreq driver by adding this:

intel_pstate=disable

and reboot.

 

Or you can use the intel_pstate driver in passive mode by adding this to your syslinux.conf:

intel_pstate=passive

and reboot so that it acts more like the acpi-cpufreq driver and get also the ondemand governor.

 

But only add one argument both won't work, hope that makes sense to you.

Here is some documentation on how this is working:

intel_pstate & ARCH CPU frequency scaling WIKI

Link to comment
7 minutes ago, ich777 said:

Will look into this ASAP, maybe I've messed up the configuration... :/

 

This is usually the intel_pstate driver where only powersave and performance are availalbe if you want to use a ondemand governor you have to manually edit your syslinux.conf and add this to get the acpi-cpufreq driver by adding this:

intel_pstate=disable

and reboot.

 

Or you can use the intel_pstate driver in passive mode by adding this to your syslinux.conf:

intel_pstate=passive

and reboot so that it acts more like the acpi-cpufreq driver and get also the ondemand governor.

 

But only add one argument both won't work, hope that makes sense to you.

Here is some documentation on how this is working:

intel_pstate & ARCH CPU frequency scaling WIKI

 

Thanks, hopefully it's not simply user error on my part (regarding the configuration not persisting).

 

As for the governor/scaling matter, I recall using acpi-cpufreq before as I'm AMD (Threadripper 3995WX) so I'm guessing I'd just need to stop blacklisting acpi-cpufreq in order to restore the ondemand and conservative choices and also presumably not register the governor from CoreFreq (only the clock source, cpu idle and cpu freq drivers).

 

I'll play around with it and see where it gets me.

  • Like 1
Link to comment
57 minutes ago, Ixel said:

 

Thanks, hopefully it's not simply user error on my part (regarding the configuration not persisting).

 

As for the governor/scaling matter, I recall using acpi-cpufreq before as I'm AMD (Threadripper 3995WX) so I'm guessing I'd just need to stop blacklisting acpi-cpufreq in order to restore the ondemand and conservative choices and also presumably not register the governor from CoreFreq (only the clock source, cpu idle and cpu freq drivers).

 

I'll play around with it and see where it gets me.

Hello,

 

See Wiki for CoreFreq as the Clock Source, CPU Freq and CPU Idle driver

 

64 settings can be made permanent as the driver arguments.

 

You can list them with:

modinfo corefreqk.ko
parm:           ArchID:Force an architecture (ID) (int)
parm:           AutoClock:Estimate Clock Frequency 0:Spec; 1:Once; 2:Auto (int)
parm:           SleepInterval:Timer interval (ms) (uint)
parm:           TickInterval:System requested interval (ms) (uint)
parm:           Experimental:Enable features under development (int)
parm:           CPU_Count:-1:Kernel(default); 0:Hardware; >0: User value (int)
parm:           Target_Ratio_Unlock:1:Target Ratio Unlock; 0:Lock (short)
parm:           Clock_Ratio_Unlock:1:MinRatio; 2:MaxRatio; 3:Both Unlock (short)
parm:           Turbo_Ratio_Unlock:1:Turbo Ratio Unlock; 0:Lock (short)
parm:           Uncore_Ratio_Unlock:1:Uncore Ratio Unlock; 0:Lock (short)
parm:           ServiceProcessor:Select a CPU to run services with (int)
parm:           RDPMC_Enable:Enable RDPMC bit in CR4 register (ushort)
parm:           NMI_Disable:Disable the NMI Handler (ushort)
parm:           Override_SubCstate:Override Sub C-States (array of ushort)
parm:           PkgCStateLimit:Package C-State Limit (short)
parm:           IOMWAIT_Enable:I/O MWAIT Redirection Enable (short)
parm:           CStateIORedir:Power Mgmt IO Redirection C-State (short)
parm:           Config_TDP_Level:Config TDP Control Level (short)
parm:           Custom_TDP_Offset:TDP Limit Offset (watt) (array of short)
parm:           Activate_TDP_Limit:Activate TDP Limiting (array of short)
parm:           Activate_TDP_Clamp:Activate TDP Clamping (array of short)
parm:           Custom_TDC_Offset:TDC Limit Offset (amp) (short)
parm:           Activate_TDC_Limit:Activate TDC Limiting (short)
parm:           L1_HW_PREFETCH_Disable:Disable L1 HW Prefetcher (short)
parm:           L1_HW_IP_PREFETCH_Disable:Disable L1 HW IP Prefetcher (short)
parm:           L2_HW_PREFETCH_Disable:Disable L2 HW Prefetcher (short)
parm:           L2_HW_CL_PREFETCH_Disable:Disable L2 HW CL Prefetcher (short)
parm:           SpeedStep_Enable:Enable SpeedStep (short)
parm:           C1E_Enable:Enable SpeedStep C1E (short)
parm:           TurboBoost_Enable:Enable Turbo Boost (short)
parm:           C3A_Enable:Enable C3 Auto Demotion (short)
parm:           C1A_Enable:Enable C3 Auto Demotion (short)
parm:           C3U_Enable:Enable C3 UnDemotion (short)
parm:           C1U_Enable:Enable C1 UnDemotion (short)
parm:           CC6_Enable:Enable Core C6 State (short)
parm:           PC6_Enable:Enable Package C6 State (short)
parm:           ODCM_Enable:Enable On-Demand Clock Modulation (short)
parm:           ODCM_DutyCycle:ODCM DutyCycle [0-7] | [0-14] (short)
parm:           PowerMGMT_Unlock:Unlock Power Management (short)
parm:           PowerPolicy:Power Policy Preference [0-15] (short)
parm:           Turbo_Activation_Ratio:Turbo Activation Ratio (short)
parm:           PState_FID:P-State Frequency Id (int)
parm:           PState_VID:P-State Voltage Id (int)
parm:           HWP_Enable:Hardware-Controlled Performance States (short)
parm:           HWP_EPP:Energy Performance Preference (short)
parm:           HDC_Enable:Hardware Duty Cycling (short)
parm:           EEO_Disable:Disable Energy Efficiency Optimization (short)
parm:           R2H_Disable:Disable Race to Halt (short)
parm:           Clear_Events:Clear Thermal and Power Events (uint)
parm:           ThermalScope:[0:None; 1:SMT; 2:Core; 3:Package] (int)
parm:           VoltageScope:[0:None; 1:SMT; 2:Core; 3:Package] (int)
parm:           PowerScope:[0:None; 1:SMT; 2:Core; 3:Package] (int)
parm:           Register_CPU_Idle:Register the Kernel cpuidle driver (short)
parm:           Register_CPU_Freq:Register the Kernel cpufreq driver (short)
parm:           Register_Governor:Register the Kernel governor (short)
parm:           Register_ClockSource:Register Clock Source driver (short)
parm:           Idle_Route:[0:Default; 1:I/O; 2:HALT; 3:MWAIT] (short)
parm:           Mech_IBRS:Mitigation Mechanism IBRS (short)
parm:           Mech_STIBP:Mitigation Mechanism STIBP (short)
parm:           Mech_SSBD:Mitigation Mechanism SSBD (short)
parm:           Mech_IBPB:Mitigation Mechanism IBPB (short)
parm:           Mech_L1D_FLUSH:Mitigation Mechanism Cache L1D Flush (short)
parm:           Mech_PSFD:Mitigation Mechanism PSFD (short)
parm:           WDT_Enable:Watchdog Hardware Timer (short)

 

  • Like 1
Link to comment
1 hour ago, CyrIng said:

Hello,

 

See Wiki for CoreFreq as the Clock Source, CPU Freq and CPU Idle driver

 

64 settings can be made permanent as the driver arguments.

 

 

Thanks. Regarding the modinfo command, that's very helpful. For Unraid it appears to just be modinfo corefreqk (without the .ko). I guess the same may apply to insmod but I haven't tested that yet.

 

EDIT: For insmod corefreqk.ko and corefreqk aren't found, so I guess it's named differently on Unraid.

Edited by Ixel
Link to comment
4 minutes ago, Ixel said:

modinfo corefreqk (without the .ko). I guess the same may apply to insmod but I haven't tested that yet.

Exactly because it's loaded through the plugin if you've enabled Autostart.

modprobe corefreqk

will do the job just fine but keep in mind that is what the plugin does if you've enabled Autostart.

  • Like 1
Link to comment
  • 1 month later...
8 minutes ago, sittingmongoose said:

fix common problems saying its not supported too

@Squid why is it reported as not supported?

 

9 minutes ago, sittingmongoose said:

Daemon connection error code 2
corefreq-ro-shm: 'No such file or directory' @ line 19075

I will look into this ASAP, give me a few hours please.

Link to comment
17 minutes ago, sittingmongoose said:

Sorry i was wrong about fix common prolems.  It was a handful of other plugins.

Do you have Autostart on the plugin page enabled? Seems like it's disabled and that's why it's not working...

 

Have you seen this:

image.png.030a733f1ec74f45aab2e603196dc436.png

 

EDIT: Had to do this since it crashed some servers and with this method you first have to do a test on the plugin page before you can actually use it.

Link to comment
26 minutes ago, Squid said:

Still something wrong with corefreq.  CA won't install it from the sidebar, and installing from the card there's nothing in "Settings" for me

Installation works just fine for me, on 6.9.2

 

EDIT: @Squid when you uninstall the plugin and reinstall it it doesn't installs the package for the webgui.

Is this option wrong for installing the plugin: upgradepkg --install-new ?

 

EDIT2: @Squid Ah wait now I see it, I've forgot to implement the deinstallation from the package on deinstallation, added the webui on February and missed that probably.

Everything fixed.

Link to comment
1 hour ago, ich777 said:

Do you have Autostart on the plugin page enabled? Seems like it's disabled and that's why it's not working...

 

Have you seen this:

image.png.030a733f1ec74f45aab2e603196dc436.png

 

EDIT: Had to do this since it crashed some servers and with this method you first have to do a test on the plugin page before you can actually use it.

I didnt realize I had to start the plugin, it must have been autostart before.  I got it working, thank you!

  • Like 2
Link to comment

Hi there,

 

I wanted to use CoreFreq again after a hardware upgrade, but I can't start it.

Terminal returns 

bash: corefreq-cli: command not found

When I go to Plugins->CoreFreq->Test, the only note I get is "---Something went horribly wrong, can't load moduel for Corefreq!---"

 

Diagnostics are attached. Maybe the CPU is too obscure or something?

 

Best,

Rick

camerarick-diagnostics-20220406-2259.zip

Link to comment
7 hours ago, CameraRick said:

When I go to Plugins->CoreFreq->Test, the only note I get is "---Something went horribly wrong, can't load moduel for Corefreq!---"

Can you try to uninstall the plugin once, reboot and install it again?

Have you waited until the Done button appeared while installing the plugin?

 

Do you have any AdBlocking software somewhere on your network installed?

  • Like 1
Link to comment
On 4/7/2022 at 6:50 AM, ich777 said:

Can you try to uninstall the plugin once, reboot and install it again?

Have you waited until the Done button appeared while installing the plugin?

 

Do you have any AdBlocking software somewhere on your network installed?

I didn't know you could skip the "done" button, I always wait for that one, haha :)

 

However I did as you say, uninstall-restart-install, and now it works fine. Thanks man! :)

  • Like 1
Link to comment
  • 1 month later...

soooooo.... me again. I recently had some issues with CoreFreq crashing my machine (see here: https://forums.unraid.net/topic/123171-solved-unraid-crashes-randomly-cant-find-cause/), so I uninstalled it.

 

Today my server crashed again, I had a look at the log and it was the same entry -

May  9 20:43:51 LuNAS kernel: ? Sys_DumpTask+0xe9/0xf1 [corefreqk]
May  9 20:43:51 LuNAS kernel: Cycle_AMD_Family_17h+0x31b/0xb37 [corefreqk]

 

Only that CoreFreq is not installed anymore. Under "plugins", I can't find anything regarding CoreFreq.

 

Is it hiding somewhere? And where do I look for it?

 

As it's said on the download page that it crashes in rare instaces, I also want to supply the hardware info, in case it's interesting.

ASUS ROG STRIX B550-A GAMING

AMD Ryzen 5 PRO 5650GE

Mushkin Redline 16 GB DDR4-3200 ECC memory (two modules)

no GPU

one LSI 9201-8i HBA

 

Best,

Rick

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.