|
|
Log in / Subscribe / Register

Juggling software interrupts and realtime tasks

Juggling software interrupts and realtime tasks

Posted Dec 2, 2022 17:58 UTC (Fri) by jhoblitt (subscriber, #77733)
Parent article: Juggling software interrupts and realtime tasks

It sure would be nice if my fedora desktops/laptops had as smooth audio playback as my android phones... It seems like every fedora kernel update is a gamble on this front (although, the source of the glitches is no doubt a broad number of subsystems).


to post comments

Juggling software interrupts and realtime tasks

Posted Dec 3, 2022 0:45 UTC (Sat) by kaali1 (guest, #144803) [Link]

Are the hardware buffer so small on laptop/desktop that the kernel has deadlines missed (underrun) due to software interrupt?
While Android has low latency audio with 2/4ms deadlines, for music playback (especially on a laptop) a much deeper buffer should be used (for both power and performance reason).
I don't know much about the x86 audio subsystem, is the audio ring buffer between north bridge and the ADSP in the south bridge not shared memory? Which would allow for a big enough buffer size (100ms+) to not be impacted by the kernel scheduling (at least for non latency sensitive use case).

Juggling software interrupts and realtime tasks

Posted Dec 3, 2022 14:33 UTC (Sat) by mss (subscriber, #138799) [Link]

I don't remember ever having a problem with smooth audio playback on Linux desktop or laptop in the last decade.
Even though most of these systems have (had) "spinning rust" HDDs, which are known for their high latency.
But I only use raw ALSA, not stuff like PulseAudio.

Something has to be seriously broken in Fedora then.
Or your system is running out of memory, has crazy high CPU load or is forced to run at a very low power state for some reason.

Juggling software interrupts and realtime tasks

Posted Dec 4, 2022 4:21 UTC (Sun) by roc (subscriber, #30627) [Link]

For many years I've had glitch-free audio playback on Fedora except when the system is under very heavy load.

Juggling software interrupts and realtime tasks

Posted Dec 5, 2022 4:21 UTC (Mon) by error27 (guest, #8346) [Link]

For my workload it was the IO scheduler which lead to skips. Switching to BFQ solved the problem.

It might not fix your problem but it's at least easy to try:
sudo echo bfq > /sys/block/sda/queue/scheduler

Juggling software interrupts and realtime tasks

Posted Dec 5, 2022 7:55 UTC (Mon) by pabs (subscriber, #43278) [Link] (2 responses)

I wonder if this Linux patchset would help with the PipeWire issue I had on Debian; choppy audio under high CPU load. I never had this with PulseAudio though.

https://wiki.debian.org/PipeWire#choppy_audio_on_systems_...

Juggling software interrupts and realtime tasks

Posted Jan 8, 2023 15:40 UTC (Sun) by rep_movsd (guest, #100040) [Link] (1 responses)

Speaking about Android and audio latency, BlueTooth, which most people are opting for now, completey screws latency.

Try using some Piano/Keyboard app with a bluetooth headphone - literally unusable

I dont see why Bluetooth has to be so bad

Juggling software interrupts and realtime tasks

Posted Jan 8, 2023 23:40 UTC (Sun) by Cyberax (✭ supporter ✭, #52523) [Link]

Bluetooth can be low-latency. Just check the gamer-oriented peripherals.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds