Topic: How to beat cpu throttling in ubuntu 22.04?

I suddenly decided to try installing the new Ubuntu version 22.04 on my old macbook instead of High Sierra. Everything is good and everyone likes it. Everything is working. Pianoteq plays sound with low latency. But the frequency of the processor is constantly jumping and this leads to frequent clicks in the sound. This is very sad. I tried to find out how to solve this problem in various forums. But they usually have a lot of chatter. Most often, the proposed solutions are either designed for other versions of Linux or simply do not work. Or advice to me, as a beginner, is incomprehensible. I tried to change the processor work plan to "performance", increased the lower frequency. But it just doesn't work. Could someone advise efficient and detailed commands (for a beginner in Linux) that would allow you to disable the automatic change in the processor frequency (and would not forget to mark how to return it back ...)? Please!
Thanks a lot!!

Last edited by scherbakov.al (13-07-2022 21:04)

Re: How to beat cpu throttling in ubuntu 22.04?

scherbakov.al wrote:

I suddenly decided to try installing the new Ubuntu version 22.04 on my old macbook instead of High Sierra. Everything is good and everyone likes it. Everything is working. Pianoteq plays sound with low latency. But the frequency of the processor is constantly jumping and this leads to frequent clicks in the sound. This is very sad. I tried to find out how to solve this problem in various forums. But they usually have a lot of chatter. Most often, the proposed solutions are either designed for other versions of Linux or simply do not work. Or advice to me, as a beginner, is incomprehensible. I tried to change the processor work plan to "performance", increased the lower frequency. But it just doesn't work. Could someone advise efficient and detailed commands (for a beginner in Linux) that would allow you to disable the automatic change in the processor frequency (and would not forget to mark how to return it back ...)? Please!
Thanks a lot!!

i run (an older version of) this:

https://codeberg.org/rtcqs/rtcqs

it finds what things need to be reconfigured and tells you how to do it.

Re: How to beat cpu throttling in ubuntu 22.04?

budo wrote:

i run (an older version of) this:

https://codeberg.org/rtcqs/rtcqs

it finds what things need to be reconfigured and tells you how to do it.

Wow! I received several warnings! Each of them has a wiki description. I'll deal with it. Thanks a lot!

Re: How to beat cpu throttling in ubuntu 22.04?

i hope it helps!  another idea, if you haven't customized your new installation too much yet, is to install ubuntu-studio instead

https://ubuntustudio.org/

it is derived from ubuntu and is already set up to deal with a lot of these issues (i.e. real-time kernel, good support for jack, etc).  it's a much more optimized environment for audio production.

Re: How to beat cpu throttling in ubuntu 22.04?

Yesterday the system was installed in parallel with Macos High Sierra. And yesterday I tried to roll the studio. It ended up with some error, but a lot of additional programs were installed. This amount of additional programs is too much for me, but it is possible that the system could be modified for real-time music playing. Although Pianoteq did not work without changing the processor frequency. After that, I got terrible brakes for an external bluetooth track pad. Today I installed only ubuntu cleanly and had some difficulties with the fact that one device was much quieter than the others (smsl m500). But I figured it out .. getting used to the new system is pretty fast. It's possible that the Studio is too redundant for my needs and I'll try to figure out how I can change a few settings by hand. But it will be clear what has changed .. Thank you for your advice!

Last edited by scherbakov.al (14-07-2022 23:12)

Re: How to beat cpu throttling in ubuntu 22.04?

Ubuntu Studio really does come with far too many programs. I know you mentioned people pointing you to resources for different distros already, but just in case it helps, here's a guide I wrote for getting things optimized for audio in Mint/Cinnamon after a lot of struggling (specifically with getting Bitwig to work). But at least in theory it should generally work for any Ubuntu based distro...

https://www.kvraudio.com/forum/viewtopic.php?t=573276

You shouldn't need to do step 'e' at all, and a lot of these steps are for getting JACK running, which might not be necessary for you (though I find its multi-client functionality a basic necessity; using audio in more than one application at the same time).

Last edited by NathanShirley (15-07-2022 01:58)

Re: How to beat cpu throttling in ubuntu 22.04?

it's true that ubuntu-studio piles up a lot of programs, but i'm ok with that   it gives me a way to try out different stuff.

Re: How to beat cpu throttling in ubuntu 22.04?

Ubuntu Studio has been the best Operating System I have ever used. I understand your aversion to the amount of programs, I've also thought like you. However, today, I understand that they are all useful programs for music production, such as Ardor, Carla, ALSA, Qjackctlr. Today, I cannot live without them, as they have greatly increased my productivity. In addition, Pianoteq runs incredibly well, without any problems and a lot of processor left over. I use 48000 Hz and 64 samples in the buffer size, no glitches, even slipping all the keys with the sustain pedal down.

Respeito, Esforço e Sabedoria

Re: How to beat cpu throttling in ubuntu 22.04?

Well yeah, there's certainly a lot of good stuff in there, it just seems like they went a little crazy with it all! I've definitely found Carla to be another of those basic necessities when routing audio via JACK (though the interface took me a while to figure out). I needed Bitwig for its "instrument selector" and general synth capabilities, but having a good free DAW like Ardor otherwise would have been great.

Re: How to beat cpu throttling in ubuntu 22.04?

In principle, the advice from the instructions for installing Pianoteq in Linux worked. I don’t notice any clicks yet, although the processor still changes its frequency. But he manages to change the frequency imperceptibly for the sound thanks to the settings in the file:

/etc/security/limits.conf (as root or with sudo)

     <USERNAME> - rtprio 90
     <USERNAME> - nice -10
     <USERNAME> - memlock 500000

and:

https://iili.io/we1QIa.md.png