View previous topic :: View next topic |
Author |
Message |
Jackalope n00b
Joined: 24 Sep 2018 Posts: 31
|
Posted: Wed May 13, 2020 12:22 am Post subject: Something is changing max frequency on userspace governor |
|
|
After updating gentoo world and rebooting I cant use laptop anymore - I have 400000hz frequency no matter what.
Actually, if I set maximum frequency than I can use 20000000hz. But after 1-2 seconds max is set to 400000hz again.
I can't find reason why /sys/devices/system/cpu/cpu*/cpufreq/scaling_max_freq is set to 400hz randomly, sometimes it changes 10 times per second, sometimes 1 time in 10 seconds.
Some output from cpupower to help you to help me:
Code: |
cpupower frequency-set -u 2000000
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
Setting cpu: 4
Setting cpu: 5
Setting cpu: 6
Setting cpu: 7
root@small /home/larry # cpupower frequency-info
analyzing CPU 0:
driver: acpi-cpufreq
CPUs which run at the same hardware frequency: 0
CPUs which need to have their frequency coordinated by software: 0
maximum transition latency: 10.0 us
hardware limits: 400 MHz - 2.00 GHz
available frequency steps: 2.00 GHz, 2.00 GHz, 1.90 GHz, 1.80 GHz, 1.70 GHz, 1.50 GHz, 1.40 GHz, 1.30 GHz, 1.20 GHz, 1.10 GHz, 1000 MHz, 800 MHz, 700 MHz, 600 MHz, 500 MHz, 400 MHz
available cpufreq governors: conservative ondemand powersave userspace performance schedutil
current policy: frequency should be within 400 MHz and 400 MHz.
The governor "userspace" may decide which speed to use
within this range.
current CPU frequency: 400 MHz (asserted by call to hardware)
boost state support:
Supported: yes
Active: yes
|
My kernel is 5.5.3. I am not changed kernel when issue is happened. I am updated kernel to 5.6.12 and nothing is changed.
Please help me, I need my laptop fast instead of corrupted slowpoke. |
|
Back to top |
|
|
mike155 Advocate
Joined: 17 Sep 2010 Posts: 4438 Location: Frankfurt, Germany
|
Posted: Wed May 13, 2020 12:26 am Post subject: |
|
|
Quote: | I have 400,000hz frequency no matter what. Actually, if I set maximum frequency than I can use 20,000,000hz. But after 1-2 seconds max is set to 400,000hz again. |
400 MHz is 400,000,000 Hz, not 400,000 Hz.
It seems that you set the maximum frequency to 2 MHz, not to 2 GHz. Since 400 MHz seems to be the lowest valid value, frequency-info tells you:
Code: | current policy: frequency should be within 400 MHz and 400 MHz. |
Please try one of the commands below:
Code: | cpupower frequency-set -u 2000MHz
cpupower frequency-set -u 2GHz |
Last edited by mike155 on Wed May 13, 2020 12:43 am; edited 1 time in total |
|
Back to top |
|
|
Jackalope n00b
Joined: 24 Sep 2018 Posts: 31
|
Posted: Wed May 13, 2020 12:41 am Post subject: |
|
|
mike155 wrote: | Your command
Code: | cpupower frequency-set -u 2000000 |
seems to set the maximum frequency to 2 MHz. Since 400 MHz seems to be the lowest valid value, frequency-info tells you:
Code: | current policy: frequency should be within 400 MHz and 400 MHz. |
Please try one of the commands below:
Code: | cpupower frequency-set -u 2000MHz
cpupower frequency-set -u 2GHz |
|
Not, it is 2000000 is 2 Ghz. (I can't trust myself to count zeroes, but cpupower sets max to 2Ghz).
I can see sometimes
Code: | current policy: frequency should be within 400 MHz and 2.00 GHz. |
It is jumping to 400Hz and back to my custom value, faster and faster, slowly decreasing from ~10 seconds period untill it stops at constant 400Mhz.
If I login only to root user, I can't see any process in htop program that can change cpufrequency, not sure about thermald. Is this a hardware problem?
Maybe something is happened with BIOS hardware state at high cpu load. Throttling is usual on my laptop, even single processor at 100% can go throttling.
I have an ugly temporary solution:
Code: | watch -tn 0.02 cpupower frequency-set -u 2000000 |
|
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Wed May 13, 2020 1:36 am Post subject: |
|
|
Probably some userspace software is setting it, since there's no other reason to use the userspace governor. |
|
Back to top |
|
|
Jackalope n00b
Joined: 24 Sep 2018 Posts: 31
|
Posted: Wed May 13, 2020 3:00 am Post subject: |
|
|
Ant P. wrote: | Probably some userspace software is setting it, since there's no other reason to use the userspace governor. |
The only software I know that can change frequency on my laptop is my own acpi default.sh program to change frequency with acpi event button |
|
Back to top |
|
|
dmpogo Advocate
Joined: 02 Sep 2004 Posts: 3468 Location: Canada
|
Posted: Wed May 13, 2020 3:13 am Post subject: |
|
|
I thought Intel processors go down in frequency by themselves when idle, if corresponding idling options are set ? |
|
Back to top |
|
|
Jackalope n00b
Joined: 24 Sep 2018 Posts: 31
|
Posted: Wed May 13, 2020 5:44 am Post subject: |
|
|
dmpogo wrote: | I thought Intel processors go down in frequency by themselves when idle, if corresponding idling options are set ? |
But I am not changed anything except "emerge update all new uses deep underground @world".
The only thing I need to notice: while emerging firefox root fs was out of free space and emerging failed. |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
Back to top |
|
|
Jackalope n00b
Joined: 24 Sep 2018 Posts: 31
|
Posted: Wed May 13, 2020 9:41 am Post subject: |
|
|
I have checked ondemand right now and this mode have same problem as userspace.
Jaglover wrote: | If this is an Intel then pstates driver should be used instead of acpi. |
As far as I know, pstates driver does not support userspace governor.
It has only 2 modes: max frequency and low frequency on idle, max freqency on load.
I need mode with limit in max frequency so I will not damage my body with laptop-heater and damn noisy fan.
From https://www.kernel.org/doc/html/v4.12/admin-guide/pm/intel_pstate.html
Quote: | HWP + powersave
In this configuration intel_pstate will set the processor’s Energy-Performance Preference (EPP) knob (if supported) or its Energy-Performance Bias (EPB) knob (otherwise) to whatever value it was previously set to via sysfs (or whatever default value it was set to by the platform firmware). This usually causes the processor’s internal P-state selection logic to be less performance-focused.
|
Less performance-focused is anything but always at max frequency. Pretty terible for laptop, isn't it? |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
Posted: Wed May 13, 2020 10:24 am Post subject: |
|
|
You can limit the max frequency with pstates driver. For userspace governor you need to install and set it up, but from your posts it appears you haven't done it. Userspace is exactly what it means - userspace - kernel will not use in-kernel governors and some application from userspace must take care of it. For instance in-kernel pstates driver using powersave mode will dynamically adjust the frequency as needed and you can set the upper limit by yourself. This is how it works for me. See below, I just limited the max frequency to 4 GHz, the max my CPU can do is 4.5 GHz.
Code: | ~ # cpupower frequency-info
analyzing CPU 0:
driver: intel_pstate
CPUs which run at the same hardware frequency: 0
CPUs which need to have their frequency coordinated by software: 0
maximum transition latency: Cannot determine or is not supported.
hardware limits: 800 MHz - 4.50 GHz
available cpufreq governors: performance powersave
current policy: frequency should be within 800 MHz and 4.00 GHz.
The governor "powersave" may decide which speed to use
within this range.
current CPU frequency: Unable to call hardware
current CPU frequency: 800 MHz (asserted by call to kernel)
boost state support:
Supported: yes
Active: yes
|
_________________ My Gentoo installation notes.
Please learn how to denote units correctly! |
|
Back to top |
|
|
Jackalope n00b
Joined: 24 Sep 2018 Posts: 31
|
Posted: Wed May 13, 2020 7:40 pm Post subject: |
|
|
Jaglover wrote: | You can limit the max frequency with pstates driver.
[/code] |
Thank you, this is a right solusion. Frequency works correctly now with pstates. |
|
Back to top |
|
|
|