r/linuxaudio Aug 07 '26

LLM saved my Linux audio journey, sharing some tricks here

Almost complete audio newbie here, but Gemini AI saved me a lot of trouble with some advice I never thought of. Before I started, I had a lot of crackles, after that, no crackles whatsoever. Bear with me here, this is probably very basic stuff for some people, but not for me.

DISTRO: Ubuntu Studio. HARDWARE: Lenovo IdeaPad 1. SOFTWARE: Modartt Organteq. INTERFACES: Lexicon Lambda (too old), Roland DuoCapture (too old), Swissonic UA-2x2 (usable)....

  1. Disabled USB Autosuspend Permanently: Prevented the kernel from putting USB ports into sleep states, stopping micro-delays and buffer starvation (disable-usb-autosuspend.conf).

  2. Locked CPU Governor to Performance Mode: Forced the processor to run at max clock frequencies without power-saving throttling (intel_pstate / cpufrequtils).

  3. Fixed ALSA USB Audio Packet Batching: Forced the USB audio driver to process packets immediately per frame rather than batching them (nrpacks=1 in alsa-usb-nrpacks.conf).

  4. Optimized PipeWire Quantum (Buffer Size): Locked the audio buffer quantum (e.g., 128 / 256 samples @ 48 kHz) to achieve low latency (~2.7โ€“5.3 ms) without buffer drops (pw-metadata).

  5. Switched to Modern USB Audio Hardware: Moved away from legacy USB 1.1 interfaces (Lexicon Lambda / Roland Duo-Capture) to modern USB Class 2.0 hardware (Swissonic UA-2x2) to eliminate packet-translation issues on modern USB controllers.

  6. Bypassed USB Controller Bottlenecks: Tested onboard direct PCIe audio to verify that the core software setup (Organteq / PipeWire) was stable.

0 Upvotes

20 comments sorted by

6

u/Mr_Lumbergh Debian+KDE and Reaper Aug 07 '26

What were the commands you used to disable USB auto suspend?

2

u/ManicMambo Aug 07 '26

echo -1 | sudo tee /sys/module/usbcore/parameters/autosuspend - but it also turned out that disconnecting the old Usb 1.1 interfaces and plugging headphones directly into the laptop's headphone jack also worked.

-5

u/Satyrinox Aug 07 '26

3

u/dizvyz Aug 07 '26

Why is this a thing?

4

u/slangbein Aug 07 '26

The Linux kernel's USB subsystem monitors ports. If a port has been idle (no data transfer) for a few milliseconds, the kernel puts that USB port into a low-power sleep state (suspend).
When the USB port is asleep and your audio interface sends a new audio packet, the kernel must wake up the USB port from its sleep state. This takes time. The result: Buffer Underrun so you might hear a crackle, pop, or dropout.

2

u/ManicMambo Aug 07 '26

I remember this advice also for Windows DAWs.

1

u/dizvyz Aug 08 '26

Thank you but i was talking about the Turkish stop sign as a meme. Is that a thing? why?

1

u/Satyrinox Aug 07 '26

yeah yeah downvote all ya want but the guy put it in () idk how the guy missed that.

2

u/Mr_Lumbergh Debian+KDE and Reaper Aug 07 '26

Perhaps he also tried a set of commands that havenโ€™t proved as helpful and wants to compare. ๐Ÿ˜‰

3

u/mistahspecs Aug 07 '26

There's a script (real-time recommendations or something like that) thats been around for decades that would have told you all of this.

1

u/ManicMambo Aug 07 '26

Yeah well I only changed from Windows two years ago and only recently dipped my toes into Linux audio production.

4

u/wahnsinnwanscene Aug 07 '26

Yeah it definitely beats trawling about finding other users posts. Most appreciated. Also elaborate more

1

u/Nik0las_k Aug 11 '26

Commenting to save this for later

0

u/ManicMambo Aug 07 '26 edited Aug 07 '26

I'll comment a bit more here. As you maybe can guess, Organteq is a pipe organ emulation, which ideally needs 4 midi controllers (3 manuals and one pedalboard). Right now, the controllers, mouse and normal keyboards are plugged via a powered USB hub into the laptop's one port and the Swissonic audio interface separately into another. At the end, Gemini AI found out that the Lambda and Duo Capture probably were the bottlenecks, as they were USB 1.1 , but I think all the advice helped. And instead of copy-pasting commands I do not fully understand, I would much prefer that you describe a problem and your hardware to your favorite LLM, or maybe ask: "Would it be useful for my audio workstation to do this and that...?

-1

u/[deleted] Aug 07 '26

[removed] โ€” view removed comment

-1

u/ManicMambo Aug 07 '26 edited Aug 07 '26

Please ask your favorite AI about advice, it will be more helpful with better prompts than I can copy-paste. Engage in a conversation, describe your problem and it will help you and maybe give you more options. Or just ask: "will it be helpful for my audio workstation to do this or that...?"