Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Over heating of CPUs during charging #279

Closed
achintya-7 opened this issue Nov 13, 2021 · 9 comments
Closed

Over heating of CPUs during charging #279

achintya-7 opened this issue Nov 13, 2021 · 9 comments

Comments

@achintya-7
Copy link

achintya-7 commented Nov 13, 2021

It works really good when I'm on battery but everytime I plug my laptop { Acer Nitro 7 } it tends to overheat eventually in 4 to 5 minutes { around 65 to 75°C }. Especially when I'm taking my classes on teams. I removed the daemon and used my laptop with auto-cpufreq with charger plugged on. The unnecessary heating problem is not faced there. I even made a config file from the readme and disabled turbo but it still seems to overheat. Is there any configuration where it will disable auto-cpufreq on charging but re-enable it on discharging.

@AdnanHodzic
Copy link
Owner

AdnanHodzic commented Nov 14, 2021

If that's what you're trying to do you can set configure auto-cpufreq settings file to following be in "powersave" mode while laptop is charging, i.e:

# settings for when connected to a power source
[charger]
# see available governors by running: cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
# preferred governor.
governor = powersave

You didn't include auto-cpufreq --debug so I don't know anything about your environment, there was one similar issue in past and problem was distro related. Also Teams is a CPU resource hungry app, besides on Linux even my (work) Macbook Pro CPU starts throttling during Team calls.

Also please make sure to have the latest 1.7.2 release.

@achintya-7
Copy link
Author

achintya-7 commented Nov 14, 2021

Yes sir, I cloned the latest 1.7.2 release and did a test again

Screenshot from 2021-11-14 19-24-54
This is the config file which auto-cpufreq uses. In your README file on the project. It was mentioned to disable intel_pstate. I also have done that.

Screenshot from 2021-11-14 19-24-22
In this debug output, my laptop has no program running except the desktop environment and the usual stuff.

I have also added a debug output of auto-cpufreq on battery.

Screenshot from 2021-11-14 21-17-00
Here, I am using firefox with 4 to 5 tabs open along with VS Code and various folders. The temperature never really goes over 40 C. Its working amazing when I'm on battery.

That's why, I wanted to make a script with auto-cpufreq only run when its on Battery mode.

@AdnanHodzic
Copy link
Owner

Right, what I was suggesting (to give it a try at least and see how it works) is to use powersave as governor instead of ondemand or performance in [charger] section of auto-cpufreq config file.

That's why, I wanted to make a script with auto-cpufreq only run when its on Battery mode.

If you end up doing this, I'd highly encourage you to extend the existing config file to also have this option. If you do this please contribute to the project, as I think it would be great to have one such feature and you would be mentioned for that release of course :)

@achintya-7
Copy link
Author

achintya-7 commented Nov 19, 2021

Sure I will look into it after my exams in December. Maybe I'll just customize it a bit so it works for me. I'll still make a PR for you to review.

@AdnanHodzic
Copy link
Owner

In meantime, another thing that crossed my mind. Without doing any additional things, can you disable GNOME power profile and see if that will fix it?

@achintya-7
Copy link
Author

achintya-7 commented Nov 20, 2021

I had some time on my hands this weekend so I tried to fix my issue. I re-cloned the code and added a check in the def charging() function to set it as false all the time for ac_state. After this, I was able to disable turbo mode and it removed the overheating. I have also changed some conditions in if statements on set_powersave() function for cpuload. I don't want to include those changes because they are tuned to my system which probably don't need the extra clock speed most of the time.

I have added a PR with the functionality of having ac_state as false all of the time. I have also made some changes to the conf file format and provided a screenshot of it in the PR.

If you want, I can close the issue as it's resolved for me.

@AnonPol
Copy link

AnonPol commented Nov 20, 2021

I had some time on my hands this weekend so I tried to fix my issue. I re-cloned the code and added a check in the def charging() function to set it as false all the time for ac_state. After this, I was able to disable turbo mode and it removed the overheating. I have also changed some conditions in if statements on set_powersave() function for cpuload. I don't want to include those changes because they are tuned to my system which probably don't need the extra clock speed most of the time.

I have added a PR with the functionality of having ac_state as false all of the time. I have also made some changes to the conf file format and provided a screenshot of it in the PR.

If you want, I can close the issue as it's resolved for me.

Want to notify you that the "acpi_cpufreq"/"intel_cpufreq" driver's powersave and performance governors always set the CPU frequency to minimum and maximum frequency respectively that it can run at. The Intel_pstate driver powersave and performance governors are different in that they scale CPU frequency up and down depending on CPU load so if you want similar functionality for "acpi_cpufreq" driver use schedutil (more modern replacement for ondemand/conservative governors)/ondemand/conservative governor.

Source 1,Source 2.

@AdnanHodzic
Copy link
Owner

We can also continue implementation discussion as part of #286 PR now. < @AnonPol

@AdnanHodzic
Copy link
Owner

Just released v1.9.2 which adds ability to change power governor used by default with auto-cpufreq from balanced to performance using power_helper.py script which could also resolve this problem.

In meantime closing the issue due to inactivity, if the problem persist please feel free to re-open the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants