Skip to content

Stop ports of hidden type in jack from creating churn in pipewire graph recomputation#227

Closed
aivelon wants to merge 2 commits intoPipeWire:masterfrom
aivelon:handle-hidden-port-types-in-jack
Closed

Stop ports of hidden type in jack from creating churn in pipewire graph recomputation#227
aivelon wants to merge 2 commits intoPipeWire:masterfrom
aivelon:handle-hidden-port-types-in-jack

Conversation

@aivelon
Copy link
Copy Markdown

@aivelon aivelon commented Apr 16, 2026

I have created this PR due to an issue with Ardour DAW on KDE plasma. There are serious playback interruptions and sound crackling when cursor is moved on the taskbar icons in KDE during ardour playback.

Issue on ardour: https://tracker.ardour.org/view.php?id=9447

I have looked at this issue on pipewire: https://gitlab.freedesktop.org/pipewire/pipewire/-/work_items/3512
It does not fix the issue as I have tested in pipewire 1.6.2 and dev build from master.

On ardour side I have done some digging and expanded on this PR: Ardour/ardour#1091
With this PR and some more changes, Ardour now ignores the callbacks for jack port events of type 'other'. Even with that, the issue is not resolved, which leads to this PR.
With these changes along with the changes on Ardour made in the PR mentioned above, this particular issue is resolved.

Although, I believe this PR does does not solve the heart of the problem, which is that when new ports connect/disconnect, there is a lot of churn happening causing interruptions on existing connected ports in pipewire jack. Here we are only filtering out the "other" port type from causing that churn.

@Hi-Angel
Copy link
Copy Markdown
Contributor

Thanks! Pls note you created a PR on a mirror though. The correct place to send PR/MR is the Gitlab that you referred to 😊

@wtay
Copy link
Copy Markdown
Member

wtay commented Apr 16, 2026

Although, I believe this PR does does not solve the heart of the problem, which is that when new ports connect/disconnect, there is a lot of churn happening causing interruptions on existing connected ports in pipewire jack.

I doubt it, the processing is running in another real-time thread, nothing on the main thread is blocking the rt threads from the pipewire jack side AFAIK. I think ardour is the one that blocks the rt threads when these events are emitted, which should fix things now that they are silenced.

@wtay
Copy link
Copy Markdown
Member

wtay commented Apr 16, 2026

There are actually more cases. Also new ports of hidden types produce a portregistration callback.

@wtay
Copy link
Copy Markdown
Member

wtay commented Apr 16, 2026

I think this is now obsoleted by 9454c71

@aivelon
Copy link
Copy Markdown
Author

aivelon commented Apr 16, 2026

Yes, I tested with your changes and it does not crackle anymore when hovering over taskbar icons in KDE. So, that is great!!!

I think ardour is the one that blocks the rt threads when these events are emitted

As for the core issue, I will look further into ardour and whether ardour is blocking the threads as you have mentioned. That is still an issue because there are other types of ports (in addition to the "other" type) which cause playback interruptions in Ardour.

@aivelon aivelon closed this Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants