Ubuntu Studio powersave default governor

Ubuntu Version:
Ubuntu Studio 24.04.3 LTS, Ubuntu Studio 25.10

Desktop Environment (if applicable):
KDE Plasma

Problem Description:
HI, had been searching what was happening because those distros weren’t usable for music because even the clock signal was delying, as to say you can’t mantain a rythm on a song. I have discovered, but I don’t know if this is the issue because i am not very good at linux, is that kubuntu sets as default the governor to powersave, that it is the lowest cpu speed processing, and leaves the music production till unusable. In the other handI haven’t found how change to ondemand or performance (need speed to process music) in kubuntu. I had to look for it several weeks to make a simple script that doesn’t works in all the cores but in most of them to change it. (echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor). it would look as a pitty to someone that has technical knoledge, but i’m just like making music, and i think it would be superkind make this accesible to all legos. Thank you.

What I’ve Tried:

Didn’t know what was wrong with Ubuntu Studio 24.04.3 and after several weeks I abandoned that to 25.10 looking for making music. I was wrong, the problem persisted. After installing milisencond app found that governor where at powersave, revised all configuration to find nothing at all. Then I make a script that I found, that works partialy, cause it only modifies four of the 8 cores.

echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

4 months after i have reach the goal of making music with this “patch”

But this is bitter.
How can users modify the gobernor on Ubuntu Studio or Kubuntu or kde plasma?

You can use sysfsutils for that:

sudo apt install sysfsutils

Then you create a file config file in /etc/sysfs.d, e.g. cpufreq-governor.conf (it must have the .conf suffix!), with the following content:

devices/system/cpu/cpu*/cpufreq/scaling_governor = schedutil

Do not put /sys in front, because that’s already implied. Save the file and then run:

sudo systemctl reload sysfsutils

That takes immediate effect and will do the same on every boot.

That should set the governor for all cores, not just half of them.

Also, performance seems to be the goto response, which I find too heavy-handed. schedutil is the better alternative, for it doesn’t waste your power and cooling budget by needlessly spinning cores at full speed most of the time.

You went through way too much work. cpupower-gui is installed by default for this very reason.

Thanks for reminding me; I totally forgot about that. But I also like non-GUI solutions better.

Right, but I’m the project leader of Ubuntu Studio and cpupower-gui is the recommended solution.

We’re trying to keep people away from the terminal and config files and make things gui driven by default. Without that, adoption for newcomers will always be scary. So, in the world of Ubuntu Studio, we want people to use GUI solutions by default and only use the terminal when all else fails.

2 Likes

But the curious choice of the default cpufreq governor is what necessitates such a tool to begin with. :wink: Why not schedutil, which has been the default for a while and for good reason, too?

Every desktop flavor of Ubuntu uses powersave by default, and we cannot deviate from that. We don’t change the default governor. Furthermore, schedutil isn’t available on all desktop processors. It’s available on my server which has an Intel Xeon, but none of my other machines.

Also, contrary to popular belief, Ubuntu Studio isn’t just for Audio Production. There are so many more things that it has, including photography, graphics, and desktop publishing, where the performance governor wouldn’t have an advantage as it would simply keep the CPU cores pushed at full most of the time. That isn’t really a great idea on laptop computers, and, while it does lower the latency since the CPU clock doesn’t need to dip, it does have other side effects such as power usage.

Therefore, sticking to sane defaults of a powersave governor is incredibly useful.

Wait, what? Since when?

Don’t need a Xeon for that; what gave you that idea?

Hence my hint at schedutil, because the other side of the powersave coin is that it keeps the cores at their lowest frequency, which is rather counterintuitive for a Ubuntu flavor that targets content production, which will, more often than not, require the full CPU power, on demand. Speaking of which: if you can’t make schedutil work, for whatever reason, ondemand is still there and was a very good predecessor to the former. But I still fail to see why schedutil wouldn’t work with just any CPU:

This governor makes decisions based on the utilization data provided
by the scheduler. It sets the CPU frequency to be proportional to
the utilization/capacity ratio coming from the scheduler.

That doesn’t read like it depends on any special CPU features, and I haven’t heard of this before.

$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
performance powersave

:person_shrugging:

Oh, now I see, or at least I think I do. This must be the cpufreq scaling driver that doesn’t provide it. Also, Intel’s powersave is not the same as powersave on an AMD processor, which uses the acpi-cpufreq driver, IIRC, because the former does allow the CPU to use higher frequencies, whereas the latter just forcibly keeps the core at min_freq, which may well be the source of the OP’s troubles.

P.S.:
$ grep CONFIG_CPU_FREQ_DEFAULT_GOV /boot/config-6.17.0-23-generic

# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL=y

I guess that settles the matter of the default governor. I think what you are seeing is an Intel processor that uses a different driver and has traditionally used powersave as the default governor. And on Intel hardware there is nothing bad I can say about it.

1 Like