how can i enable cpuautofreq permanently , i don't want it to be gon on start up , stays…
- User
how can i enable cpuautofreq permanently , i don't want it to be gon on start up , stays permanently on
Assistant
To make your CPU frequency governor persistent across reboots in Linux, you have several options.
One common method is to use the
cpupowerutility and its systemd service.- Install the
cpupowerutility if you haven't already. This package is highly recommended for managing CPU frequency scaling[1][2]. - Edit the
cpupowerconfiguration file, typically located at/etc/default/cpupower[1]. - In this file, you can set the desired governor. For example, to set the governor to
performance, you would add or modify the linegovernor='performance'[3][4][5]. - Enable and start the
cpupower.servicesystemd service to apply the configuration at boot. You can usually do this with commands likesudo systemctl enable cpupower.serviceandsudo systemctl start cpupower.service[1][2][6].
Another approach is to use
cpufrequtils.- Install
cpufrequtils[7][8]. - Edit the
/etc/default/cpufrequtilsfile and set theGOVERNORvariable to your desired governor[3][7]. - Disable the
ondemanddaemon if it's enabled, as it might override your settings after reboot[7][8].
For systems using Linux 5.9 or later, you can set the
cpufreq.default_governorkernel option[1].Other methods include using systemd-tmpfiles or udev rules[1].
If you are using tools like
power-profiles-daemonortuned, be aware that they might conflict with manual governor settings. You may need to disable or mask these services if they are interfering[1][9][4].Some distributions or desktop environments might have their own power management tools or services that could affect the CPU governor[1][10][5].
Alternatively, you could use a systemd service file to set the governor on boot by writing to the appropriate
/sys/devices/system/cpu/cpu*/cpufreq/scaling_governorfile[11].There are also automatic CPU speed and power optimizers available, such as
auto-cpufreq, which can manage the governor based on various factors[1][9].- Install the
- User
chirisha@chirisha-ThinkPad:~$ systemctl status auto-cpufreq ● auto-cpufreq.service - auto-cpufreq - Automatic CPU speed & power optimizer f> Loaded: loaded (/etc/systemd/system/auto-cpufreq.service; enabled; preset:> Active: active (running) since Thu 2025-05-01 17:23:42 CEST; 41min ago Main PID: 813 (python) Tasks: 2 (limit: 17632) Memory: 43.7M (peak: 46.6M) CPU: 1min 10.306s CGroup: /system.slice/auto-cpufreq.service └─813 /opt/auto-cpufreq/venv/bin/python /opt/auto-cpufreq/venv/bin>
May 01 17:23:42 chirisha-ThinkPad systemd[1]: Started auto-cpufreq.service - au>
chirisha@chirisha-ThinkPad:~$
Assistant
Based on the output you provided, the
auto-cpufreq.serviceis currently active and running on your system. The status shows it was loaded from/etc/systemd/system/auto-cpufreq.serviceand is enabled to start automatically at boot.This means that the
auto-cpufreqtool is installed and configured to manage your CPU speed and power settings persistently. Since the service is enabled, it will start automatically every time your system boots, ensuring that it continues to manage your CPU frequency scaling without manual intervention.So, the output confirms that you have successfully implemented a method (
auto-cpufreq) to handle CPU frequency settings and keep them permanent across restarts.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.