Pipewire pro audio
Good read on the subject it goes on and on.
https://linuxmusicians.com/viewtopic.php?t=25556
Axios Cheers for that! Good read, indeed. Very opinionated too!
Of course, the problem with that thread and others alike is that it's hard to know which information is still relevant and accurate NOW. Pipewire is evolving. For instance, the last post in that thread links to the Pipewire 1.0 release, and there were big changes made then (something IRQ-related, for example). It seems I don't have much choice but to study, read all I can find, and try to draw my own conclusions. Let's also say that there is a lot of information that is too technical for me to understand, and then there is that outdated advice. There lies the problem—I mean, the challenge!
@qk4-li3 We have a work-in-progress doc on the help center. Maybe this will help?
davidjharder Oh very good there's something coming up, great!!! I will keep an eye there.
Reporting my experiences.
- pipewire-jack: installed.
- configurations, regarding automatic switching to the appropriate sample rate for the project: done.
- pavucontrol: installed, pro-audio profile selected for main USB-audio interface. Other soundcard profiles Off (Intel HDA, HDMI, etc).
- other linux-audio related software installed: QjackCtl, jack-audio-connection-kit, jack-audio-connection-kit-server, pulseaudio-module-jack
With Guitarix, there's *x-runs even at default (1024) buffer size, which is way too large buffer to begin with.
*x-runs are buffer over or under runs which affects sound to stutter.
feel free to suggest something...
- Edited
Have you tried switching your CPU scaling governor to performance prior to running Guitarix?
I switched to PipeWire way before it became default in Solus specifically because I didn't want to bother myself with setting up JACK anymore and honestly it's been smooth sailing since then (so far no real issues or xruns even at buffer size 64, though I've been using 128 lately).
Frankly, I didn't even change any configuration nor do I switch any audio profiles (really just using my Yamaha THR as both audio interface and monitor for guitar playing/practice and stuff). Couple things I do before running any audio app though:
Change my CPU scaling governor to performance.
Run from terminal with PIPEWIRE_LATENCY="128/48000" (which is your desired buffersize/samplerate).
Regarding the CPU governor (personally have aliases for this stuff and the pipewire latency in my .bashrc):
- To check which governor is your CPU set to currently:
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
To actually change the governor use the cpupower
utility which you can get by installing the linux-tools-cpupower package.
Then
sudo cpupower frequency-set --governor performance
to change the governor to performance mode.And
sudo cpupower frequency-set --governor powersave
when you're done to set it back to powersave.
RegularJogger Just quick reply just before I have to go.
Good suggestion otherwise, but my cpu is locked @2,4GHz from BIOS if I recall correctly. It's desktop not laptop. So cat /sys/devices/system/cpu/cpu/cpufreq/scaling_governor gives me cat: '/sys/devices/system/cpu/cpu/cpufreq/scaling_governor': No such file or directory
So It's four physical cores full on @2,4GHz all the time. I think there's no throttling issues then.
With laptop your instructions are very helpful for sure.
- Edited
qk4-li3 You're missing an asterisk from the command to check your CPU scaling governor, that's why you get that No such file or directory error (that asterisk is a substitute for core numbers, that way you check all of them).
My machine's also a desktop and there's noticeable difference when switching the governor. Not sure what my CPU settings in BIOS are right now regarding throttling (altough there's definitely some as HTOP shows my cores starting at around 800MHz under no significant load) etc. though and I'm too lazy to reboot and check now...
- Edited
RegularJogger You're missing an asterisk from the command to check your CPU scaling governor, that's why you get that No such file or directory error (that asterisk is a substitute for core numbers, that way you check all of them).
This time with copy-paste. Same result.
when I copied text here it removed asterisk, but it was there.
No such directory, see:
qk4-li3 Ah, so that's also ruled out... No other idea what may be the culprit to your issues with PipeWire then, sorry.
Hopefully someone more knowledgeable chimes in...
RegularJogger This kind of troubleshooting requires ruling out things and checklists. We just ruled out one thing. Your contribution didn't go to waste and is appreciated. Making sure it's not cpu scaling/throttling will certainly help everyone with "modern" power management on their machine. Your advice wasn't outdated. It's more relevant today more than ever. Cheers!
In the meantime let's see if next Solus update changes anything. There was something concerning linux-audio, didn't inspect them too much, let's see where it goes.
Problem not solved, bad cracking in sound remains.
What would be next thing to check?
I find this strange:
I launch QjackCtl, then I launch Guitarix. I strum guitar strings. Sound is crackling. I stop and quit QjackCtl. Guitarix remains running. Crackling sound stil comes through Guitarix, even if I just stopped and quit QjackCtl. I can't see anything jack related process from System Monitor while Guitarix is still showing appropriate jack ports ticked. Isn't something wrong with that? I would expect to see some jack process in System Monitor. Really confusing!
Do you have realtime checked in qjackctl settings?
You don't see jackd because pipewire is the sound server.
plutuplutu Yes, there's realtime tick box which is ticked in QjackCtl. Also QjackCtl's "display" indicates Active "RT" (flashing) and about 87% - 2000% DSP load.
plutuplutu You don't see jackd because pipewire is the sound server
Ok, I thought pipewire should become jack's client.
I managed to install this analysis software: https://codeberg.org/rtcqs/rtcqs
It gives me this error: Could not find kernel configuration.
What would that mean then? Their Wiki is empty. Anyone familiar with this tool?