CPU power management

Hello,
I just want to thank the ARCH and Garuda community for this beautiful system. Yesterday I was streaming linux "gaming" on Twitch and got convinced to get rid of Ubuntu (dont judge me, linux noob here). So I got Garuda and now I have some issues. I am using 6 years old laptop and have some hardware issues: the laptop screen flickers and shows vertical lines when the CPU freq is too high. In windows, i just had to use the power management tool and switch the CPU to about 94% to fix the problem. In ubuntu it was much harder to achieve and eventually I just switched the Turbo Boost off on all cores. In ARCH... im to weak to do it myself. I scanned the forum but nothing really helps me or clearly explains how to manage the CPU freq. Here is the inxi -Fxz:

Please help me!

PS: My Twitch if anyone is interested: Twitch
I am new to streaming and I'm experimenting with linux and tryuing to learn how to use it. Possibly I will convinvce some good souls to get rid of Windows and maybe entertain a bit.
The content of my channel is not clear yet but I jsut want to get started! I am 4th year Software Engineering student and planing to do some online coding lessons in the future. I also am willing to start working on ARCH Linux and contribute to the community so all tips from you are more than welcome!
PS2: If its agains the rules then please let me know and I will remove the link to my Twich.
Regards,
Kamil

1 Like

Ditching Ubuntu was a great move. I think a lot of people started like this (me included). Once you get the hang of Arch you will love it. Given you want to learn how to use it its the start of a great journey :wink:

CPU freq is changed dependant on load and power situation thanks to auto-cpufreq. You might want to turn it off to have the same settings all the time.

sudo systemctl disable --now auto-cpufreq

Im also using a Haswell intel (dualcore tho) and I had to uninstall the package xf86-video-intel since that caused horrible screen flickering when recording stuff. Not sure if this applies when using NVIDIA graphics as well but its something to give a try.
And finally, welcome to the forum :hugs:

4 Likes

Read

please :slight_smile: (no pic from terminal/konsole)

and

:slight_smile:

2 Likes

Am I the only one here who never started with Ubuntu?

Never could tolerate using Ubuntu myself, (that was what I installed when my kids were very young to teach them Linux).

Once I discovered Arch I’ve never wanted to use a distro based on anything else. It ruins you for life for sure. :smiley:

7 Likes

Hey guys thanks for help!

So I kind of fixed the problem:
I used cpupower frequency-set -u 2500000 to set it to 2.5GHz and the flickering disappears but im wondering if there is another way to just turn the turbo boost off completely or something like that?
Also, I am trying to create a shell script so it runs when I start the system but somehow the following just doesnt load:

#!/usr/bin/sh
sudo cpupower frequency-set -u 2650000

Also, I had some real weird issue with the Terminal - it was on fullscreen and i couldnt change it with F11 at all (other programs did minimise). So I just created a new account and all was fine. Then i tried to log in to the old account once again but all I got was a black screen and the Garuda Welcome, nothing else

There is a plasmoid with lets you do this, search for pstate in the repo :thinking:

2 Likes

Ubuntu was almost the go-to distro after KDE initially released a not-ready-for-primetime Plasma and blew too many minds. Ubuntu (Warty Warthog) was new and easily available, since they’d shipped nearly as many coffee table coaster CDs as AOL. It took a bit of getting used too–the sparse, icon-less UI, etc.–but it sure beat the hell out of what had happened to KDE. And the names were kinda intriguing. :wink:

That’s my story and I’m sticking to it.

3 Likes

sudo systemctl enable cpupower && sudo systemctl start cpupower
sudo cpupower frequency-set -g performance

The above is what works with my 2014 Haswell laptop…and 2019 Coffeelake desktop.

No xf86-video-intel, of course.

2 Likes

I do not think Ubuntu was available when I started with Linux in 1997. My first Linux OS was Mandrake. Yes, KDE had some troubles but the reason for those issues is that they realized that the code was not good. So they started with a blank page and re-coded their entire code base.The gnomes had a field day trying to destroy KDE. And then about a year and half later, they had to do the same with their code base.

gary

3 Likes

Bow wow, @zoner!

Mandrake was the first one I enjoyed after my Slackware mentor/captor/pseudo-friend allowed me the freedom to choose another distribution. You know what kinda fiends those Naz… people are! :frowning:

Mandrake was a joy, but then I got hooked on the Debian breed until PCLOS (PCLinuxOS) hooked me with their weird combination of both. :slight_smile:

regards

2 Likes

Even I've jumped straight into the arch base( manjaro first then garuda). I freaking hate the fact that i have to add ppas for installing literally anything on apt based distros and i gave up on that shit even in a vm.

3 Likes

Thank you all for your interest and sharing you stories! I roselved the issue with the following steps:

created a file: /usr/sbin/turbo.sh
content:

#!/usr/bin/fish
cpupower frequency-set -u 2.6GHz

created a file: /etc/systemd/turbo.service
content:

[Unit]
Description=example systemd service unit file.

[Service]
ExecStart=/usr/bin/fish /usr/sbin/turbo.sh

[Install]
WantedBy=multi-user.target

sudo micro ExecStart=/usr/bin/fish /usr/sbin/turbo.service

sudo systemctl enable --now /usr/sbin/turbo.service

sudo systemctl start turbo

reboot

This allowed me to automatically run this script after booting the Garuda. Somehow I couldn’t make it work with the Autostart application and my own sh script. It did work in the begining but I guess I messed something up (maybe with pacman -Syu).

If you spotted any issues with what I wrote please let me know. I hope this will help other linux newbies!
Regards and keep this beautiful system alive!

1 Like

You could have skipped the script (step 1), using the command in the service.
And possibly using an alternate setting for when the service is stopped, if you think it can help.
Example:

[Unit]
Description=Lower CPU Freq to 2.6GHz

[Service]
Type=oneshot
ExecStart=/usr/bin/cpupower frequency-set -u 2.6GHz
# Use what freq you want if you manually stop the service
ExecStop=/usr/bin/cpupower frequency-set -u 2.8GHz
RemainAfterExit=yes
Restart=on-failure
RestartSec=10

[Install]
WantedBy=multi-user.target
4 Likes

I had already fallen in love with Garuda (i3) ever since I installed it a couple of weeks ago. It has successfully dethroned EndeavourOS as my #1 distro of choice. And now I'm in love with the community since I got the answer to a question I had without even having to make a post. You guys are the freaking BEST!!!

The problem I had was, I couldn't manually set the cpu governors for my cpus and the intel turbo boost. Some process was constantly writing to the cpu files in /sys at fixed intervals. My main motive was to stop the governor from automatically getting switched to performance whenever I plugged in my charger, and also prevent intel turbo from being enabled. What resulted was 40+ browser tabs in my quest to find out what process was constantly updating the files. I tried various applications like cpupower to change stuff, tried monitoring the udev monitor and hunting for a udev rule that was maybe running some script to change those files every time a battery event was fired, etc.

Turns out all I had to do was disable auto-cpufreq. I feel super stupid but super relieved at the same time. Coming here was a good call! Thanks guys!

4 Likes

:slight_smile: @vspecky

5 Likes