Drastically reducing xruns occurences by offering an option to start in "performance mode"

Hi

Here’s an idea for Ardour on linux distro, that probably can be done in other OS too : optionally add an interaction in the startup of Ardour (Session Setup) to activate “performance mode” if not already enabled.

Explanation:
When I use Ardour (on Debian), sometimes there no particular xruns, but sometimes (just after upgrading kernel for instance or any other reasons), xruns go wild
To prevent this, I launch a script before starting ardour ( I think I’m not the only one to use this kinda script)

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

I think it would be nice if Ardour detect at startup in which “performance mode” it is, and provide an option to set it in performance mode if it is not.

I know that it will imply to sudo as root, and a little interaction with the passwd :wink:

What do you think about the idea?

Regards

2 Likes

Not much, tbh.

a) As you’ve shown, this can be easily accomplished by a script. IMHO it is part of the philosophy of Linux, that you can customise your workflows by combining tools, which is what scripting does. I don’t see much advantage in having a way to set CPU modes via Ardour and it will just place an additional maintenance burden on the Ardour team.
b) There are graphical tools, e.g. system tray apps, that allow you to easily change CPU performance modes on the fly.
c) Performance mode might cause your CPU fan to run at a higher speed, making more noise and you might not want that for a recording session.
d) Performance profiles are not always just an on-off switch between CPU “performance” and “economy” mode and there are other things that might affect DAW performance, e.g. the wireless network might interfere with IRQs handling the audio hardware etc… Therefore it’s best to use specialised tools to handle these settings, imho.

2 Likes

Hi @SpotlightKid

I clearly understand your arguments, nevertheless end users aren’t always aware about performance settings or even about linux or about RTFM :wink:

I think it’s important to try to reduce xruns occurrences for new users, when they start to use Ardour : if the first time you try to use it you have too many xruns, you can think it will never work on your device, and think Ardour is too complicated and decide to try other DAWs…

The knowledge of how they can customize with more details can come in a second time.

And, if there is less xruns occurences, there will be less xruns topics in the Ardour discourse :wink:

I wouldn’t be against Ardour detecting the current mode and issuing a pop-up warning (with an option “don’t show me this again”) but, for all the reasons @SpotlightKid mentioned, I don’t think Ardour should be changing this.

Cheers,

Keith

1 Like

It does when installing from the official binaries, just not at runtime. Anyone installing from a distribution package also would not see the warning.

Yes, I was thinking on launch.

Cheers,

Keith

I love the idea, and I was looking at doing this when I launch QjackCtl. That’s my pre-Ardour launch point, so it seemed like a good space. Hadn’t thought to put that on the Ardour team, mainly for the reasons already mentioned.

If you launch Jack, that would be a good pre-start script to run.

Yes, it does with official binaries, only when you install :

System failed the quick sanity check… Looking for the cause

!!! WARNING !!! - Your system seems to use frequency scaling.
This can have a serious impact on audio latency.
For best results turn it off, e.g. by choosing the ‘performance’ governor.

I think this warning should preferably be done each time you start Ardour and not while the installation ( the maintenance burden on the Ardour team will be moved, not increased :slight_smile: )

I don’t find explanation about scaling_governor in https://manual.ardour.org/, maybe it should exist (and if it exists, a link to this explanation can be done :slight_smile: )