You are not logged in.

#1 2022-10-09 17:17:35

james-h-arch
Member
Registered: 2022-04-13
Posts: 29

[Solved] How do I control CPU frequency scaling on a Dell laptop?

I've recently installed Arch with KDE to a Dell laptop. I see CPU frequencies between 0.8 and 2.9 GHz, using:

watch -n.1 "grep '^[c]pu MHz' /proc/cpuinfo"

I'm exploring CPU frequency control. I want to limit upper CPU frequency to 2.0 GHz.

Checking CPU governor and driver shows intel_pstate & powersave:

> cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_driver

intel_pstate
intel_pstate
intel_pstate
intel_pstate
intel_pstate
intel_pstate
intel_pstate
intel_pstate

> cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

powersave
powersave
powersave
powersave
powersave
powersave
powersave
powersave

I tried setting scaling_max_freq:

echo 2000000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq

/proc/cpuinfo showed the same range, 0.8 - 2.9 GHz.

Next, I tried setting using the cpupower utility:

sudo cpupower frequency-set -u 2000mhz

This also had no effect.

I changed intel_pstate mode from active to passive. I started seeing higher frequencies between 0.8 and 3.5 GHz:

echo passive > /sys/devices/system/cpu/intel_pstate/status

Changing back to active showed 0.8 - 2.9 GHz again.

How do I limit upper CPU frequency?

Last edited by james-h-arch (2022-10-10 11:57:17)

Offline

#2 2022-10-09 18:58:57

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,076

Re: [Solved] How do I control CPU frequency scaling on a Dell laptop?

You can't with the active pstate driver, either set that to passive or simply don't.

Why would you want to do that? The pstate driver usually does the correct thing to ensure best battery life bugs non-withstanding

Offline

#3 2022-10-09 22:16:12

james-h-arch
Member
Registered: 2022-04-13
Posts: 29

Re: [Solved] How do I control CPU frequency scaling on a Dell laptop?

There's a few reasons:

- partly for fun
- partly to understand more how these things work
- mostly to run the CPU cooler. The Dell firmware causes fans to kick in frequently, and I'd prefer a quieter life.

I tried switching the driver from active to passive mode. I was unable to change CPU max frequency in either mode.

Offline

#4 2022-10-09 23:33:13

cL2N05
Member
Registered: 2021-02-19
Posts: 6

Re: [Solved] How do I control CPU frequency scaling on a Dell laptop?

Offline

#5 2022-10-10 09:48:58

james-h-arch
Member
Registered: 2022-04-13
Posts: 29

Re: [Solved] How do I control CPU frequency scaling on a Dell laptop?

Thanks for the link. I've been through the fan speed control wiki.

This particular laptop has BIOS fan control, which overrides the various utilities referenced.

The given fallback for disabling BIOS control is dell-bios-fan-control-git.

I had a look at the source code for dell-bios-fan-control-git and for its ancestor project.

I'm a tad uncomfortable using this utility, as it appears to has been arrived at by trial and error, through poking away at addresses in SMBIOS.

It's unclear exactly what writing to the addresses used by dell-bios-fan-control-git does, as documents are unavailable from Dell. Dell also seem to have added their own extensions beyond SMBIOS standard.

My worry is that poking to a loosely-understood SMBIOS address may have unwanted side effects and could lead to a damaged device.

Are there any other options for limiting max CPU frequency?

Offline

#6 2022-10-10 11:10:11

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,076

Re: [Solved] How do I control CPU frequency scaling on a Dell laptop?

You can disable pstate entirely by passing intel_pstate=disable to your kernel cmdline should enable acpi_cpufreq which should give you frequency control

Last edited by V1del (2022-10-10 11:12:02)

Offline

#7 2022-10-10 11:11:52

james-h-arch
Member
Registered: 2022-04-13
Posts: 29

Re: [Solved] How do I control CPU frequency scaling on a Dell laptop?

Thanks, I'll take a look into this.

Offline

#8 2022-10-10 11:56:17

james-h-arch
Member
Registered: 2022-04-13
Posts: 29

Re: [Solved] How do I control CPU frequency scaling on a Dell laptop?

intel_pstate=disable in my  kernel cmdline worked.

On reboot, "cat /sys/devices/system/cpu/cpufreq/policy0/scaling_driver" showed acpi-cpufreq instead of intel_pstate.

"cpupower frequency-set -u 2000mhz" now works as expected.

Thanks again for the tip; problem solved.

Last edited by james-h-arch (2022-10-10 12:14:19)

Offline

Board footer

Powered by FluxBB