deinstapel / cpupower

Manage the frequency scaling driver of your CPU (Intel Core and AMD Ryzen processors supported)
GNU General Public License v3.0
533 stars 71 forks source link

Tell me how to reset? #152

Open kalspzzz opened 3 years ago

kalspzzz commented 3 years ago

It seems permanent change. I uninstall it restart my computer the policy also works, I can see it through cat /proc/cpuinfo | grep "^[c]pu MHz"

so tell me how to reset !!!

fin-ger commented 3 years ago

/proc/cpuinfo is always readable by a normal user, regardless of this extension. If you could successfully uninstall, then everything except the gsettings entries in dconf are gone. You can delete them manually with dconf, but they don't do any harm, they're essentially useless without the extension.

Keep in mind that the extension itself must be uninstalled via the extension website, Gnome Tweaks or Gnome Extensions.

kalspzzz commented 3 years ago

@fin-ger You don't even care what happened

Before uninstalling it, I set min cpu speed to 50% which means 1.8Ghz and disable trubo After I did what I said using watch cat /proc/cpuinfo | grep "^[c]pu MHz" the min still 1.8Ghz and no trubo, it should be 0.8GHz and trubo enabled

Can you give me a reset button?

fin-ger commented 3 years ago

You don't even care what happened

I'm sorry you are under that impression. I'm trying to help you in my free time, please be patient and repeat your problem if we misunderstand your issue.

Before uninstalling it, I set min cpu speed to 50% which means 1.8Ghz and disable trubo After I did what I said using watch cat /proc/cpuinfo | grep "^[c]pu MHz" the min still 1.8Ghz and no trubo, it should be 0.8GHz and trubo enabled

It does not matter what you set before uninstalling the toolkit, policykit rules, and the extension itself. The intel-pstate driver of the kernel is always temporarily and never permanent. A simple reboot will always reset your CPU configuration, unless:

  1. you have another app, service, or program installed which restores your kernel's intel-pstate configuration
  2. The uninstallation was not complete or successful
  3. you or your Distro changed the behavior of the intel-pstate Linux kernel API

The current CPU setting can be checked by reading the following files (as root, e.g. with sudo or su):

The actual frequency read in /proc/cpuinfo may vary as your CPU will adapt the frequency within the min_pct and max_pct setting depending on your systems needs. Even when you do nothing on your PC, the frequency can be much higher than the minimum frequency for e.g. animations of the desktop environment, background jobs such as backups, or file sync, etc.

Can you give me a reset button?

This is not planned as a simple reboot should suffice.

fin-ger commented 3 years ago

Does this problem still persist? If not I will close this issue after 7 days of inactivity.

hkienle commented 3 years ago

I had perhaps a similar problem. At some point, the CPU "got stuck" at .4GHz. Changing the GUI setting did not help. (The GUI settings reflected the pstate queries correctly.)

I did reboot, but this did NOT help, the problem persisted. Doing a shutdown now and then starting up again solved the issue (for now).

fin-ger commented 3 years ago

@hkienle this is definitely not the expected behavior. Maybe your hardware setup requires a full power cycle to reset the pstate configuration to defaults. Thanks for sharing this workaround!

Nevertheless, the kernel does not provide an attribute in the sysfs interface to reset those settings. If setting the max_perf_pct and min_perf_pct is not working anymore, there is nothing cpupower can do about it as this is what cpupower is using to control the cpu power states.

To resolve this issue please answer the following questions:

  1. What Gnome and Linux kernel version are you using? (see the Gnome settings' about page and uname -a)
  2. What is the exact model of your CPU? (see Gnome settings about page for this)
  3. What is the model of your motherboard and the firmware version? (see lshw output)

Also, is it possible to reproduce this issue by directly using the intel_pstate sysfs interface without using the cpupower Gnome shell extension?

I fear this issue is not related to cpupower.

hkienle commented 3 years ago

@fin-ger Thanks a lot for your interest! Indeed, I also think this is not related to cpupower. I never tweaked any CPU settings before, so your tools just happened to be the "conduit" to pstate.

1.

$ uname -a
Linux portopure 5.10.0-7-amd64 #1 SMP Debian 5.10.40-1 (2021-05-28) x86_64 GNU/Linux
$ gnome-shell --version
GNOME Shell 3.38.4
# Via GUI About: GNOME Shell 3.38.5 (!?)
  1. Intel® Core™ i7-7500U CPU @ 2.70GHz × 4
  2. I hope this is what you need:
       description: Motherboard
       product: Librem 13 v4
       vendor: Purism
       physical id: 0
       version: 4.0
       serial: 329085
     *-firmware
          description: BIOS
          vendor: coreboot
          physical id: 0
          version: 4.8.1-Purism-4
          date: 01/20/2019
          size: 1MiB
          capacity: 16MiB
          capabilities: pci pcmcia upgrade bootselect acpi

    I am reluctant to further play around with this (because it kills my productivity and engages the fan on top). I keep running cpupower and report further occurrences if you think this is useful.

I had one other incident: After waking up from a suspend, I had a "lock up" of again 0.4GHz. (Even though I had changed my max_perf_pct (50%) and min_perf_pct (18%) to some other values in the meanwhile. So perhaps 0.4GHz is a magic "lock up" frequency for my CPU!? :confused: I again did a suspend/wake-up and everything was fine. After several suspend/wake-ups everything is still fine...

fin-ger commented 3 years ago

Ah, bugs like these happened in the past. Contact Librem for support on this. It might possibly be a BIOS/mb-firmware bug.

hkienle commented 3 years ago

@fin-ger OK, good to know. I will try the Purism forum for now. https://forums.puri.sm/t/how-to-reduce-annoying-fan-noise/10437/73

hkienle commented 3 years ago

@kalsp Would you mind to share your hardware information?

fin-ger commented 3 years ago

@hkienle Does this issue still persist and is it related to cpupower?

hkienle commented 3 years ago

It persists for me, I get it maybe 1 in 10 times I wake up the computer from suspend. If that happens, I just put it to sleep again and wake it up and typically that helps. I think it is not related to cpupower, but rather to kernel/firmware -- but this is just a guess of mine!

fin-ger commented 3 years ago

Alright, then I'll leave this issue open to give other users the opportunity to give new hints on that issue.

I just skimmed the kernel bug tracker, but only found some stuff regarding AMD CPUs. The gist is that it's most likely a BIOS issue. However, you can report your issue on https://bugzilla.kernel.org and see if anyone there has an idea on your issue.

setuun commented 3 years ago

Maybe, you changed your CPU power_limit with another program. This can limit your frequencies, too. You can check this, if you stress test just one core an see, if it can reach high frequencies like before.

You can watch all your cors like that: watch -n.1 "cat /proc/cpuinfo | grep \"^[c]pu MHz\""