[18:13] Eickmeyer Hello again. The system has been running for a week now, and patchance shows 8 xruns [18:13] https://imgur.com/a/DDUjh09 [18:14] I opened another application just now and it jumped to 10 [18:15] but CPU usage is quite low at around 16% [18:16] Is there something that can be done to make it 0? [18:18] What I mean is... does anyone have some tips on what to look at or adjust to perhaps improve the system? [18:20] besides increasing the buffer that is... [18:22] StudioUser92: 8 xruns in a week is pretty good as these things go. Generally one is looking for 0 xruns while they are recording/performing. You don't say what your setup is though. [18:23] What kind of sound device? what buffer size are you using now, etc. [18:23] Hi... sorry. I've been having a conversation with Eickmeyer, and yes, I should explain better. [18:24] I'm testing out an FM broadcasting software which we have currently running in production on a Windows system. But the Windows system has the buffer set at 720, which is pretty high. But I wanted to set it up on a Linux system because of stability issues as I just mentioned. [18:25] So this is a desktop/rackmount system? [18:25] On the Windows it's currently set at 720/192000. But normally it should be possible to run at 256/192000 [18:26] 192000? are you going direct RF out? [18:26] So that's what I'm trying to see if Ubuntu Studio can be more stable and handle the broadcasting [18:26] rackmount [18:27] It's required for FM broadcasting... else it is very bad quality. This is normal for FM broadcasting. [18:28] If you are doing audio out 48k is as much as you need, if you are doing internal FM generation you need higher. [18:28] I'm using a Focusrite Scarlett 4i4 that receives the broadcast from the studio console and sends it back to be transmitted via FM [18:29] so the Scarlet is USB? you you have a USB card just for the audio? [18:29] I'm not an audio specialist, so I can't tell you why it is 192000, but this is what is used in general, else the audio sounds very bad [18:30] I use the built-in usb of the motherboard [18:30] Supermicro X12 with Intel Xeon [18:30] start with a PCIe USB card just for the audio. [18:30] What's the difference? [18:31] If you use on card USB the irq will be shared with all other USB ports including keyboard and mouse. [18:31] sorry if you use onboard... [18:31] ohh IC.. .so moving the mouse or typing might affect it [18:31] If you have a PCIe card the irq can be separate. [18:32] yes moving the mouse can create xruns. [18:32] You will also want to turn any automated updates off [18:32] SW updates should be done when "off air" [18:34] PCs are designed to be "low latency" however, when you look at what companies like Intel mean by "low latency" them mean 30ms ... [18:34] real low latency for live work is closer to 5ms [18:35] will switching the audio settings to Pro Audio have any effect? [18:35] The absolute minimum for any USB device is realistically 2ms and probably cloder to 3ms. [18:36] which audio settings? [18:38] I expect you will already be using a jack server from your remarks. [18:40] I'm using the default system [18:40] Ubuntu Studio 23.10 [18:42] That would be pipewire on top of alsa. but pipewire is albe to look like two different audio servers depending on the software accessing it. [18:42] (my typing is really bad to day) [18:43] So it would depend on which broadcasting sw you are using. [18:43] In 23.10, you can go to sound settings and each device you have an option to choose Pro Audio [18:44] That pro audio... all that does is switch the device from fl,fr, to input 1, 2, 3 etc. [18:44] https://imgur.com/a/58fDiM3 [18:45] I see [18:45] it does not change the audio processing except for things like 4 channels and up. [18:46] Most profesional audio devices are designed to be used as all mono inputs and outputs with the sw deciding which pairs to be used for a sterio pair [18:46] It is more a labeling thing. [18:47] Got it [18:48] Setting up a PC for low latency audio is not trivial. There is no recipe that "just works". It is an overall system tuning that varies from system to system even if both use the same cpu. [18:50] Some things to look for: [18:51] CPU governor should be set to performance, Intel Boost should be turned off, Any cron task that does large data transfers via network, like Software updates should be turned off [18:52] The audio device you are using should use it's own irq, That irq driver should have it's priority elevated above other irqs [18:54] This is great. I'm gonna do some research [18:55] I just pulled the motherboard diagram to see how USB is setup [18:55] Audio SW should have the ability to freeze memory (wrong term but the right term escapes my memory just now) so that the kernel will never swap it out. (check the jackd site for some of this) [18:56] https://imgur.com/a/58fDiM3 [18:56] A lot of the USB routing on MB that are within about 10 years old is done by sw. [18:59] I found that no matter which USB plug I use, they all use the same irq. I was able to change a MB setting that at least split it into two by forcing an older driver to be used. But I have an older i5 with 4cores and 4 threads. [18:59] Oh, that reminds me. using two threads per core used to cause xruns. [19:00] I think (but am not sure) the kernel handles that a bit better now. [19:01] As my machine is single thread percore already, I can't test 2 threads per core [19:01] So turning hyperthreading off (if you can) _may_ help. [19:02] The new high speed/lowspeed cpu are not something I have fiddled with personally. [19:04] hello! Just installed 23.04 and excited to see how firewire works with pipewir OTB! [19:04] no! [19:04] i meant 23.10 [19:05] I do not use USB audio cards, excpet some (very) cheap usb mic/headphone dongles for testing. I use either a pci ice1712 based card or a firewire device. [19:05] sakrecoer: at what latency? [19:05] let's find out! [19:05] i also run pci ice1712 based card [19:05] sakrecoer: I mean, is it using the alsa FW stack or does it allow using ffado? [19:06] no wait.. [19:06] my firewire card is pcieSOMFIN [19:06] i used to run with ffado... but i see no ubuntusutdio controls [19:07] The alsa fw stack has worked on and off for me at higher latencies for years but has been pretty solid since before 22.04 [19:07] ah.. i've never managed to run without ffado tbh... [19:07] Yeah controls is back burner in my life right now and does not work right with pipewire. [19:08] oh... does pipewire work with anything else than youtube? [19:08] There are rumours pipewire will support ffado at some point [19:09] pipewire supports a jack graph [19:09] you mean the pretty UI thing? [19:09] pipewire is supposed to be a drop in for pulse and jackd [19:10] :D [19:10] I mean a jackd client like Ardour will see pw as if it was jackd. [19:10] i love the promise of pipewire, but i haven't been able to use it for anything else than playback yet [19:10] patchage qjackctl etc will se all the devices in their graph [19:11] It has worked for me for about a year anyway [19:11] ok... well.. let's see how it goes anyways [19:11] in april i did this: https://ubuntustudio.org/switching-audio-setup/ [19:11] that was fine... [19:14] PW has been improving steadily. I have not really worked with it for lower latencies as this machine still has the LTS... and jack ;) [19:14] what's wrong with jack anyways? [19:14] :D [19:16] Basically my audiofire 12 sounds much better than the Delta 66 and so to get low latency I need to use ffado. I can then set jackd as low as 16/2 [19:16] wihu!! beautiful at 1024 [19:17] moving down to 256 buffer... [19:18] sound is good, but absolutely nothing happend to the MAD latency [19:18] How did you try to switch latency? [19:18] still an improvement over shitty sound + mad latency [19:18] Patchance thing? [19:18] That would not work [19:18] halved the buffer [19:19] OvenWerks: how would the right way be? [19:19] You need to do a pw call to set the bauffer size now. [19:19] a cli command? [19:20] it is a pw-* command [19:20] pw-cli? maybe [19:20] hahhaha [19:20] oh bwoy... i mean i don't mind learning things... [19:21] Yeah... there are some config files too. [19:21] but ehm... what was wrong with jack again? [19:21] (sorry) [19:21] The desktop community did not pick up on it and went for PA [19:22] Even though writing sw for jack is easier :P [19:22] qjackctl is brilliant! just ugly :D [19:23] oh and there is this amazing thing called Ubuntu-studio too! At some point i stopped using qjackctl because it was soooo good [19:23] ugly... you mean like a tesla? [19:23] it had a button to open carla. absolute magic, very unix mindset! [19:24] thge problem is that it is close to a complete rewrite at this point [19:24] (v_v) i feel you. It was beautiful while it lasted though [19:25] It is supposed to be possible to bridge from PW to jack either to show pw ports in jack or to use jackd as the device but I have not yet figured that out [19:27] at some point i will find how to set the buffer in pw... [19:27] but a little sad that this implies such a major set back for me [19:27] 1024 with jack and ffado was totally cool latency [19:28] with pw it's not workable... i have close to a second [19:28] maybe 500ms but that's essentially the same [19:28] by the time I get to 20ms I can't keep time any more [19:29] ye [19:29] i can get used to 20ms [19:29] i don't think my guitarist would... [19:29] that is, if I put a really long cable on my bass and walk away from the stage, by the time I get to 20 to 30 feet away I am off. [19:30] (i wouldn't want them to get used to it, imagine stepping on stage after that :D) [19:30] keyboards seem to be easier [19:30] i don't know what number is good... but i like it when i don't have to mind it [19:31] If you have to mind it, it is interfering with creating [19:31] gosh... has anyone written anywhere how to change pw buffer? [19:31] search engines are going bananas? or maybe i'm getting old... probably both [19:32] this can't be it? [19:32] https://www.reddit.com/r/pipewire/comments/riw1bc/comment/hp0xpsm/ [19:33] oh .. there's a command there too [19:33] * sakrecoer is defo getting old [19:33] There is a whole pw manual [19:34] https://docs.pipewire.org/ [19:34] that had near 0 effect on latency [19:34] i halved it!!! [19:35] thing says "clock.force-quantum"... :D [19:35] https://gitlab.freedesktop.org/pipewire/pipewire/-/wikis/Config-JACK#nodelatency [19:35] Yeah, that [19:36] patchance doesn't seem to care about the frequency set in that command [19:37] 256/9600 only changed the buffer [19:37] (thanks for link OvenWerks) [19:39] ye... well... [19:39] i guess i will have to fetch my portastudio [19:40] i'm at 64 and and the latency is not cool [19:40] sound is ok... let's try 16 :D [19:40] I found, testing with the alsa fw stack, that with jackd I could not even start jackd with less than 256ish [19:41] 16 is still totally off... [19:41] i don't think i am using jack... [19:41] 16 is ok ffado [19:41] can i do that ? [19:42] buffer set at 16 works! sound is good. But latency is through the roof [19:42] I don't know for sure with 32.10. I have it on my laptop but I don't do audio there [19:43] sakrecoer: there is another setting that adds latency by default, I can't remember which one though [19:43] i have not been able to change the framrate [19:43] or whatever it is called... 48000Hz thing [19:44] maybe for that i need to change the config file and systemd it? [19:44] I hadn't get that far [19:45] this works: pw-metadata -n settings 0 clock.force-rate 96000 [19:46] at sixteen it's Xrun paradise [19:46] but ok latency [19:46] at 128 sound is ok, but latency hell [19:46] border line... [19:47] i could work with this. alone. my singers will get mad at me [19:48] let's see what the ubuntu studio installer has in store for me :) [19:48] I don't have to worry about that... I am playing mandolin these days... no amp, mic, pickup because I am load enough without. [19:49] i'm still pushing my way through the xaphoon. but i like to record my shit... [19:50] ubuntu studio installer hung on 100% package refresh [19:50] oh no, it was just waiting for me to acknowledge [19:51] oh... but i can no longer zap pw in favour of the faithfull jack/ffado/ubuntustudio winning recepy [19:51] i guess i am officially no longer part of the target audience.... (v_v) [19:54] no more backports either? [19:54] that was nice, but i imagine it's a lot of work... [19:56] well... guess i'm off to fetch the AW1600 until i find some youthful distrohopping energy! Many thanks for the unbeliveable fish! I will always love you! [20:20] StudioUser92: I am guessing your software encodes stereo as L+R, L-R subcarrier and maybe even SCA subcarrier as well. In that case 192000 makes sense. I am guessing that the same device is used for audio in and encoded audio out. [20:21] I suppose this makes for a simpler system but does require more in the way of system resources.