Posted on 10/17/2021 8:51:22 AM PDT by ProgressingAmerica
Saving Power on a Linux Laptop using auto-cpufreq
Any of you Linux Mint users have auto-spufreq installed and could lend some pointers on how to work snapd on Mint? I’m not currently using Mint.
Ping to a few others as well, might be some useful information.
This seems straight forward to me, but I can’t test it currently.
https://snapcraft.io/install/auto-cpufreq/mint
I don’t think you will even need to do anything on the command line, you should be able to:
“To install snap from the Software Manager application, search for snapd and click Install.”
After that, auto-cpufreq should appear in the software manager. But let’s wait and see what others have to say about it.
I already have snap installed on my Kubuntu laptop so all I had to do was; sudo snap install auto-cpufreq
More info on the github repo page; https://github.com/AdnanHodzic/auto-cpufreq
Close open stuff
Open terminal
sudo rm /etc/apt/preferences.d/nosnap.pref
sudo apt update
sudo apt install snapd
sudo reboot
sudo snap install auto-cpufreq
Done.
daemon needs this command to be automatic at every boot.
sudo auto-cpufreq - -install
I don’t have either installed. For me I don’t see a need for them.
I do have tuned installed and running.
Yeah - true confession - my laptop is plugged in 99% of the time. My laptop + dock = My desktop.
bookmark
So this program is a hands off type of program you cant adjust anything manually? I watched the video and it seems it just does things for you. What if I want it to run as power save mode even when it’s charging, so it will charge faster? How can I manually set the cpu clock to stay under 900mHz?
OMG, that’s awesome. I didn’t know you could completely block snapd from getting installed just by having this file.
/etc/apt/preferences.d/nosnap.pref
Learn something new every day.
I do think its more automatic than not. You can set power profiles that have their own range but not a specific mhz number. It looks like others had a simple install of it, I’m currently on a desktop.
The doc page says you can set the power profile in the Configuring auto-cpufreq section:
https://github.com/AdnanHodzic/auto-cpufreq
Example config contents
# 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 = performance
# turbo boost setting. possible values: always, auto, never
turbo = auto
# settings for when using battery power
[battery]
# see available governors by running: cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
# preferred governor
governor = powersave
Mint 20.x and above blocks snapd by default. Apparently there is a serious security and back door issue they refuse to send out boxed with newer Mint versions. And I do not blame them, I would not want it if that is the case. But you can edit some lines that will allow snapd and packages to install.
What I need my friend is a good thermald configuration set up. We are in the desert and we get hot here. And I could boost my cooling fan in 18.3 by re-configuring thermald. But in this 20.X they screwed up the ability to reconfigure it. It killed me this last summer because I didn’t want to goof something thermald is using as a default reference.
As for power settings, they all seem to work fine for me on my laptop. Until the battery started to get weak. It will not tell you, but it just starts to run out faster than it should. Mine is way bad, and it will tell me I have an hour and a half left. 15 minutes later it is dead and gone... lol
It is not accurate, and look towards the battery before you go after the settings.
Not sure how to define configuration settings. I’m a Linux novice. Do I just copy and paste the whole configuration contents you posted and run it in terminal for it to give me the choices to pick from?
Turbo boost I want set to OFF
When on battery power I want the most efficient setting as well "powersave"?
How do I make these changes with the configuration using terminal?
It’s a text file.
The file should live at /etc/auto-cpufreq.conf
All you have to do is open it and change the value with a regular text editor. When the program is running it reads the values out of the file when it needs them. You may need to log out and log back in(or reboot) for the program to read an updated version of the file.
I just saw your screenshot in the other thread, it looks like you are mostly there. When you plug in and unplug your laptop as the YouTube video does, do you see the profiles change the same way? In other words, can you duplicate what is happening in the video?
You will probably want your configuration file to look like this: (and you can always change it in the future back to performance settings if needed)
# 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
# turbo boost setting. possible values: always, auto, never
turbo = never
# settings for when using battery power
[battery]
# see available governors by running: cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
# preferred governor
governor = powersave
Two things I didn’t more specifically mention:
The file may have permissions needed to edit it. You may have to issue a sudo command when opening the file. Some text editors are different. Sudo will bring in administrator permissions.
The command in terminal will look something like sudo gedit /etc/auto-cpufreq.conf
If the text editor can increase permissions (or no permissions are required) then nothing about this task requires the terminal. Just open the file make your changes save it and you’re done.
I'm not sure how to open the text file.
I did figure out how to install TLPUI and that seems like what I was expecting this to be with user configurable parameters all within an easy to use GUI. Still determined to figure out the auto-cpufreq configure file though with your help. Thanks.
Disclaimer: Opinions posted on Free Republic are those of the individual posters and do not necessarily represent the opinion of Free Republic or its management. All materials posted herein are protected by copyright law and the exemption for fair use of copyrighted works.