Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CPU Governor set to power save not performance Ubuntu studio 22.04
#11
(05-15-2022, 07:05 AM)wavesound Wrote: Hi All
Just done a quick test on this this system and in power save mode MB shows
many xruns when sitting idle, plus DSP is at 90%.
Setting performance, restarting Jack and all is as it should be.

So we need a way to enable performance from boot.

Any ideas on Ubuntu 22.04 Studio?

Cheers all.

Smile

Juust read again post #5 in this thread and add the script in your autostart process wherever they are in your Ubuntu version/variant/mod Wink
Mixbus/32C 5.3.22, 6.2.407, 7.2.0, 8.2.184, 9.2.105  on Manjaro midtower i5-6600K 3.5GHz and Lenovo X250 i5
Mixbus 5.3.22 and 6.2.407 on Win10x64/Lenovo T40 i7 and X250 i5
audiocards: Scarlett 2i4, Tascam US4x4HR
Reply
#12
Hi
If you have a Intel CPU, one thing you can do is turn off CPU hyperthreading. HT is Ok if using eg. MS Word or browsing internet, but have no place in Audio processing.  Audio is number crunching. I have a Intel i7 CPU, it has 8 threads, but two and two threads share one arithmetic unit, this means that before or later you will get constraints on the arithmetic unit and BOOM, you'll get XRUNS. In sessions with high DSP and XRUNs I got 20% less CPU consumption and no XRUNs if I turn HT off.

Steinar ?

Mixbus Pro 10.0, Kubuntu Linux 64 23.10, Stock Low latency kernel, KXstudio repos, i7-3720QM CPU@2.60GHz, 12 Gb RAM, nvidia GeForce GT 650M/PCIe/SSE2, X.org nouveau driver, Zoom L12 Digital mixer/Audio interface
Reply
#13
Hi All
So reading these threads It seems I cannot set performance at boot without using a script. 
Using CPU utils  means I have to remember to change this as in using studio controls.

I'll leave myself a note on the monitor.
Cheers All
Linux for years!
Ubuntu studio 24.04 LTS  Mixbus 32C  V9
Dell Precision  T3600  8 core 64gb ram.
Reply
#14
(06-20-2022, 01:12 PM)wavesound Wrote: Hi All
So reading these threads It seems I cannot set performance at boot without using a script.




Not sure if Ubuntu has cpupower utility but in Debian it's easy:-


Command to put in Autostart:

Code:
/usr/bin/sudo cpupower frequency-set -g performance
And edit sudoers file to allow user to run it:

Code:
#Allow <username> to execute cpupower without password

<username>  ALL=(root) NOPASSWD: /usr/bin/cpupower
Of course replace <username> with your own user name.





I actually have the opposite problem as I use Liquorix kernel which boots to performance by default. Maybe you could try Liquorix kernel.



I have a script called ondemand in ~/bin/ to set ondemand governor when not doing audio:

Code:
#!/bin/bash

/usr/bin/sudo cpupower frequency-set -g ondemand
And a script called performance in ~/bin/ to set performance governor when doing audio:



Code:
#!/bin/bash

/usr/bin/sudo cpupower frequency-set -g performance

And have two .desktop files on the desktop which point to the scripts in ~/bin/ with cute icons to switch between governors like this:

Code:
[Desktop Entry]
Type=Application
Name=ondemand
Comment=Enable ondemand governor
Exec=/home/<username>/bin/ondemand
Icon=/mnt/stash/Pictures/icons/button_headphones.png
Code:
[Desktop Entry]
Type=Application
Name=performance
Comment=Enable performance governor
Exec=/home/<username>/bin/performance
Icon=/mnt/stash/Pictures/icons/button_jetpack.png
Mixbus 32C, Debian Bookworm/KDE, EVE SC205 + ADAM Sub 8 monitors, Soundcraft Compact 4, M-Audio 2496, i5 6500, 16GB RAM, WD Blue SSD 1TB, 48" LG OLED, other stuff.
Work as house engineer at a popular venue in Melbourne AU. On a quest for the holy grail, the perfect amount of cowbell.

Reply
#15
(06-20-2022, 07:05 PM)sunrat Wrote:
(06-20-2022, 01:12 PM)wavesound Wrote: Hi All
So reading these threads It seems I cannot set performance at boot without using a script.




Not sure if Ubuntu has cpupower utility but in Debian it's easy:-


Command to put in Autostart:

Code:
/usr/bin/sudo cpupower frequency-set -g performance
And edit sudoers file to allow user to run it:

...but that's a script. The OP looks for something to click on.
MMM
Linux throughout!
Main PC: XEON, 64GB DDR4, 1x SATA SSD, 1x NVME, MOTU UltraLite AVB
OS: Debian11 with KX atm

Mixbus 32C, Hydrogen, Jack... and Behringer synths
Reply
#16
(06-21-2022, 06:34 AM)madmaxmiller Wrote: ...but that's a script. The OP looks for something to click on.
MMM

I use a script triggered by QJackCtl, but also have two widgets that work fine on my systems.

For those who have Intel CPUs, optional with embedded GPU (which might even work for other processors <i don't know), this KDE Plasma widget is cool, but slightly overkill:
This widget is simple but really great:
  • indicator-cpufreq

    This is the one I normally use when going to Performance Mode manually.
You might or might not have them in your distribution's repo. I'm using Kubuntu 20.04.04 and installed P-state from the source and indicator-cpufreq from the repo.

Enjoy
Mixbus/Mixbus32C on Linux (Kubuntu)/KXStudio repositories.
GUI: KDE and Fluxbox
Reply
#17
(06-21-2022, 07:30 AM)Jostein Wrote:
(06-21-2022, 06:34 AM)madmaxmiller Wrote: ...but that's a script. The OP looks for something to click on.
MMM

I use a script triggered by QJackCtl, but also have two widgets that work fine on my systems.

For those who have Intel CPUs, optional with embedded GPU (which might even work for other processors <i don't know), this KDE Plasma widget is cool, but slightly overkill:
This widget is simple but really great:
  • indicator-cpufreq

    This is the one I normally use when going to Performance Mode manually.
You might or might not have them in your distribution's repo. I'm using Kubuntu 20.04.04 and installed P-state from the source and indicator-cpufreq from the repo.

Enjoy

I once wrote my own clicky-clicky GUI with zenity to switch on/off soundcards (2x Delta 1010LT then), select sample rate and resolution and also CPU power settings. Today I'm lazy and use my add_soundcraft.sh script from the CLI  when I want to add my Soundcraft UI in Jack and I use cpupower-gui in the XFCE panel for the governor as needed. I use the latter far more often to watch 4k movies that I use it for sound production, go figure.
MMM
Linux throughout!
Main PC: XEON, 64GB DDR4, 1x SATA SSD, 1x NVME, MOTU UltraLite AVB
OS: Debian11 with KX atm

Mixbus 32C, Hydrogen, Jack... and Behringer synths
Reply
#18
(06-21-2022, 06:34 AM)madmaxmiller Wrote: [quote pid="60182" dateline="1655769937"]
Command to put in Autostart:

Code:
/usr/bin/sudo cpupower frequency-set -g performance
And edit sudoers file to allow user to run it:

...but that's a script. The OP looks for something to click on.
MMM
[/quote]


It's a command. One can put it in a script if one wishes, or just put it as a command in Autostart. I followed it with a way to put nice clicky icons on the desktop to select governor. Although if I reinstalled the system I'd probably just use cpupower-gui like you. Wink

Edit - can't work out why the quote tags are screwed up in this post. This board is weird sometimes.
Mixbus 32C, Debian Bookworm/KDE, EVE SC205 + ADAM Sub 8 monitors, Soundcraft Compact 4, M-Audio 2496, i5 6500, 16GB RAM, WD Blue SSD 1TB, 48" LG OLED, other stuff.
Work as house engineer at a popular venue in Melbourne AU. On a quest for the holy grail, the perfect amount of cowbell.

Reply
#19
sudo apt install cpufrequtils
sudo vi /etc/init.d/cpufrequtils
and set
ENABLE="true"
GOVERNOR="performance"

That's it - at least for me ;-)
MB 32C 9.1.324 / Ubuntu 22.04 LTS - KDE / Kernel 5.14.0 / AMD Ryzen 7 3700X 8-Core / NVIDIA GP108 Driver 390.147 / Focusrite Scarlett 18i20
Reply
#20
I'm just figuring how esoteric this must sound for a Windows user Big Grin
MMM
Linux throughout!
Main PC: XEON, 64GB DDR4, 1x SATA SSD, 1x NVME, MOTU UltraLite AVB
OS: Debian11 with KX atm

Mixbus 32C, Hydrogen, Jack... and Behringer synths
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)