# Skylake Power Management on 10.3



## mnd999 (Apr 16, 2016)

Hi,

I've been trying to figure out whether or not powerd is actually doing anything on my Skylake desktop, and I'm starting to think maybe it isn't.

I did:

`sysctl debug.cpufreq.verbose=0`

And the result was a system log full of


```
cpufreq: get returning known freq 4001
```

To be honest I'm not sure if all this logging is causing it to throttle up to 100% cpu, or if the CPU is just deciding to spend all its time in its turbo boost state (which i think is what 4001 means).

Can anyone shed any light on whether this is normal? Is there a better way to track P states?


----------



## wblock@ (Apr 17, 2016)

`service powerd onestop`

Then `powerd -v`, adding the same options that you use in /etc/rc.conf.  It will print the current state to the terminal.


----------



## mnd999 (Apr 17, 2016)

Thanks, yes that's a much better way of doing it.

The short of it is with the default settings, it doesn't work:


```
powerd: unable to determine AC line status
load  17%, current freq 4001 MHz ( 0), wanted freq 3875 MHz
changing clock speed from 4001 MHz to 4000 MHz
load  3%, current freq 4000 MHz ( 1), wanted freq 3753 MHz
changing clock speed from 4000 MHz to 3800 MHz
load  88%, current freq 3800 MHz ( 2), wanted freq 8002 MHz
changing clock speed from 3800 MHz to 4001 MHz
load  11%, current freq 4001 MHz ( 0), wanted freq 7751 MHz
load  6%, current freq 4001 MHz ( 0), wanted freq 7508 MHz
load  0%, current freq 4001 MHz ( 0), wanted freq 7273 MHz
load  10%, current freq 4001 MHz ( 0), wanted freq 7045 MHz
load  0%, current freq 4001 MHz ( 0), wanted freq 6824 MHz
load  87%, current freq 4001 MHz ( 0), wanted freq 8002 MHz
load  0%, current freq 4001 MHz ( 0), wanted freq 7751 MHz
load  0%, current freq 4001 MHz ( 0), wanted freq 7508 MHz
load  6%, current freq 4001 MHz ( 0), wanted freq 7273 MHz
load  6%, current freq 4001 MHz ( 0), wanted freq 7045 MHz
load  0%, current freq 4001 MHz ( 0), wanted freq 6824 MHz
load  0%, current freq 4001 MHz ( 0), wanted freq 6610 MHz
load  7%, current freq 4001 MHz ( 0), wanted freq 6403 MHz
load  53%, current freq 4001 MHz ( 0), wanted freq 8002 MHz
load  25%, current freq 4001 MHz ( 0), wanted freq 8002 MHz
load  0%, current freq 4001 MHz ( 0), wanted freq 7751 MHz
load  3%, current freq 4001 MHz ( 0), wanted freq 7508 MHz
load  4%, current freq 4001 MHz ( 0), wanted freq 7273 MHz
load  3%, current freq 4001 MHz ( 0), wanted freq 7045 MHz
```

Something (probably X) is blipping the CPU to keep it jammed at max. I changed the default interval to 1 second with better results. I'll see how this affects responsiveness.


----------



## wblock@ (Apr 17, 2016)

A Haswell system here seems to do okay with these settings.  Even in X, it drops to 754MHz when idle.
/boot/loader.conf

```
aesni_load="YES"
coretemp_load="YES"
drm.i915.enable_rc6=7
hwpmc_load="YES"
hint.p4tcc.0.disabled="1"
hint.acpi_throttle.0.disabled="1"
hw.acpi.cpu.cx_lowest="cmax"
```
/etc/rc.conf

```
powerd_enable="YES"
powerd_flags="-a hadp -n hadp -p50"
```


----------

