Project

General

Profile

Actions

Feature #14047

closed

Options to control Intel Speed Shift

Added by Steve Wheeler about 1 year ago. Updated 6 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Hardware / Drivers
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
23.09
Release Notes:
Default

Description

pfSense 23.01 and 2.7 supports Intel Speed Shift by default via the hwpstate_intel(4) driver.

This enables hardware CPU P-state control for CPUs that support it. Generally anything Gen 6 or newer.

It's enabled by default and overrides OS P-state control, powerd, so users upgrading experience unexpected CPU clock frequency.

We should add a gui toggle for the loader value: hint.hwpstate_intel.0.disabled
That might want to be selectable instead of powerd.

By default it sets the performance preference to 50 but we should probably allow setting that in the gui via the per core sysctl: dev.hwpstate_intel.%d.epp

In practice higher values like 80 or 90 seem to more accurately reflect what powerd at high-adv does. However Speed Shift is able to switch far faster so it's expected the instantaneous CPU clock speed would be different.


Related issues

Has duplicate Feature #14251: Add option to disable Intel Speed Shift so that Intel Speed Step can kick inDuplicate

Actions
Has duplicate Bug #14700: High CPU Temperature in CE 2.7Duplicate

Actions
Actions #1

Updated by riva geeza about 1 year ago

This affected myself, on my newly built appliance the gui displayed Intel(R) Celeron(R) N5105 @ 2.00GHz
Current: 2608 MHz, Max: 1996 MHz

It was enough to make me question whether or not the hardware was faulty.

I've had to set the values to 98 in my case to stop the CPU frequency from going crazy, and since doing so my CPU temps have dropped by 6 degrees.

Actions #2

Updated by Jim Pingle about 1 year ago

  • Has duplicate Feature #14251: Add option to disable Intel Speed Shift so that Intel Speed Step can kick in added
Actions #3

Updated by Jim Pingle 12 months ago

  • Plus Target Version changed from 23.05 to 23.09
Actions #4

Updated by Jim Pingle 10 months ago

  • Target version changed from 2.7.0 to CE-Next
Actions #5

Updated by Jim Pingle 8 months ago

  • Has duplicate Bug #14700: High CPU Temperature in CE 2.7 added
Actions #6

Updated by Jim Pingle 8 months ago

  • Subject changed from Add webgui control options for Intel Speed Shift to Options to control Intel Speed Shift
  • Category changed from Web Interface to Hardware / Drivers
  • Assignee set to Jim Pingle
  • Target version changed from CE-Next to 2.8.0
Actions #8

Updated by Jim Pingle 8 months ago

  • Status changed from New to In Progress
Actions #9

Updated by Jim Pingle 8 months ago

  • Status changed from In Progress to Feedback
  • % Done changed from 0 to 100
Actions #10

Updated by Danilo Zrenjanin 8 months ago

Tested against:

pfSense release:

 23.09.a.20230907.0600

Processor:

Intel Xeon® 4116 2.1GHz

I had limited access to the device with this processor, so I didn't have an opportunity for extended testing. I will leave it in feedback status for another round of testing.

Based on my observation, it appears to be functioning as intended.

Actions #11

Updated by Jordan G 8 months ago

I didn't see any gui toggle when testing 23.09-DEVELOPMENT-amd64-20230909-1856, I was testing virtualized but it was seeing 9th gen Intel processor. This would be situated close to powerd settings or tunables?

Actions #12

Updated by Ronald Schellberg 8 months ago

Jim Pingle wrote in #note-9:

Applied in changeset 93f8b28797a2b618f96589c916128019231f027e.

Tested since first deployment on a i7-1265u using recommended core level control. Tried the range of the power preference with expected results. Frequency change is responsive without having to reboot. Currently operating at level 30 though acceptable performance is achieved at both ends of the slider with this processor. Only notice a degree change in package temperatures.

Actions #13

Updated by Jim Pingle 8 months ago

  • Status changed from Feedback to Resolved

Jordan G wrote in #note-11:

I didn't see any gui toggle when testing 23.09-DEVELOPMENT-amd64-20230909-1856, I was testing virtualized but it was seeing 9th gen Intel processor. This would be situated close to powerd settings or tunables?

It would show up right above PowerD since, when active, it takes precedence over PowerD. The GUI will only show the options on the page if the driver has attached. Even if you exposed the proper CPU to a guest it doesn't necessarily mean it would expose the hpwstate device. At the moment I would only consider it a valid test when running on bare metal.

And since there are multiple other reports of it working as expected, I'd say we can close this out. If anyone has a problem from here forward we can treat it as a separate issue.

Actions #14

Updated by Andre Brait 7 months ago

riva geeza wrote in #note-1:

This affected myself, on my newly built appliance the gui displayed Intel(R) Celeron(R) N5105 @ 2.00GHz
Current: 2608 MHz, Max: 1996 MHz

Not sure if anyone noticed, but the Max clock speed is wrong. For my N100 it shows up as 800MHz and it should be 3.4GHz (and I've seen the N100 hit 3.4GHz but the Max field kept showing 800MHz).


And I don't mean to hijack the Issue here, but are there any talks on exposing the tunable "hw.acpi.cpu.cx_lowest" in some way as well? It seems to be stable for most (if not all?) hardware configurations and seems to allow up to C3/C6/C8 on most (if not all?) Intel platforms that support C-states above C1 (even though "sysctl" reports C3 as the maximum, using Cmax brings my N100 to C8 just fine, it seems).

EDIT: sorry, I had not noticed this is already marked as "Resolved". I'll move this somewhere else!

Actions #15

Updated by Jim Pingle 6 months ago

  • Target version changed from 2.8.0 to 2.7.1
Actions

Also available in: Atom PDF