Jambox distortion #92
Replies: 2 comments 3 replies
-
Questions:
In general:
My sense is that you have taken the NPERIODS setting down to the point of instability for your interface, and the fix is to increase it until the system is stable. I haven't seen this issue in recent testing, but then I don't try to crank NPERIODS down to find its lower limit. If you are connecting via X11, then you are a technically sophisticated user, so the following info might be useful: I suppose it's possible that there is a bug somewhere (in Jamulus, jack, jambox) that, if fixed, would allow lower NPERIODS settings. I do my own builds of latest versions of jack audio and some alsa-related things, to pick up some bug fixes (Raspberry Pi distro versions are older). Also, jambox uses my PREEMPT_RT kernel build - if you want to try the standard kernel, in /boot/config.txt, change [pi4] to [none] above the Pi4 kernel section at the bottom, and reboot. But my A/B testing indicates that PREEMPT_RT kernel provides slight performance improvement in i.e. window dragging. In /etc/jackdrc.conf, there are settings for JACK_PRIORITY and JAMULUS_PRIORITY. These were tuned by trial and error to minimize xruns. You can try experimenting with them, as they could affect audio timing. I don't think your problem is video-related, but FYI there is also a video driver that I have disabled because I believe it adds overhead and in rare cases can cause system to hang. If you want to try it, change [pi400] to [pi4] above the VC4 driver section at the bottom of /boot/config.txt. -Kevin |
Beta Was this translation helpful? Give feedback.
-
@jazzjohn27 I ran some tests on v1.3.0 on Pi4 with 8 different interfaces, restarting Jamulus maybe 50-60 times. In general I was quite pleased the results, I could set NPERIODS down to 2 with almost all of the interfaces. I could drag windows around without problems. However, on a few restarts with 2 of the interfaces, I did get it into the "distortion" state. Restarting Jamulus kicked it out of that state. I have a theory. Jambox starts jack with the "-s" (softmode) switch - note lower case "s", NOT upper case. This is supposed to make jack ignore xruns from ALSA. (see: https://jack-devel.jackaudio.narkive.com/AWQVU91F/what-does-soft-mode-do). My theory is that an xrun with softmode can get the jack ring buffer into a state where samples can get played out of order (which would be a bug in jack). So I tried removing "-s" from /etc/jackdrc, and I was not able to get it into the distortion mode. This is not definitive, because I had trouble getting it into distortion mode even with softmode enabled. But please give that a try and let me know if it helps. The following commands should do it:
|
Beta Was this translation helpful? Give feedback.
-
I think there's an issue with Jamulus on Jambox. If a window (like the Connections or Settings window for example) using either NoVnc or Vnc is moved on my Win10 computer, distortion starts. Interestingly if the window is moved again slightly, the distortion disappears.
It seems like the Pi can't process rewriting the graphics and handling the audio at the same time. Increasing the buffer size to fix the problem adds delay so I'd rather not.
A friend with a Mac sees the same issue. However, he eliminated the problem by running X11 (aka X Windows) instead of NoVnc or Vnc. The theory is that by doing so, the Pi has less graphics processing to handle, since X11 does that on the connected computer instead of on the Pi.
Beta Was this translation helpful? Give feedback.
All reactions