Repository navigation
Keep the Apple speaker DSP graph running between streams - #616
oliverlukschander wants to merge 1 commit into
Conversation
|
Note on the test environment, for completeness: the listening test and CPU measurements ran on a non-stock setup: a |
The WirePlumber no-suspend policy keeps the speaker PCM open, but the asahi-audio filter chain still pauses when idle. The omacom#351 report traced the clicks that remain on playback start and browser seeks to the chain restarting (see also AsahiLinux/asahi-audio#84). Ship a PipeWire node.rules drop-in that keeps each model's *-convolver chain processing. These nodes come from module-filter-chain, so the WirePlumber ALSA rules cannot reach them. Mic chains still suspend. Tested by ear on a J416 (Mac14,10): clicks when starting a fresh video were unchanged with the WirePlumber half alone and gone with this drop-in added. Idle CPU of the audio stack went from about 0.1% to 1.8-2.0% of one core (three alternating 30 s runs), almost all of it in wireplumber, which hosts the filter chain. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3649453 to
e308d7a
Compare
|
Thanks, this is still wanted. This week the Mac code moved into the omarchy-mac package ( |
|
Thanks, happy to hear, rebase is done. |
|
Confirming this on J293 (MacBook Pro 13" M1 2020, MacBookPro17,1), which I don't think was in the test matrix — so the Setup (stock): Symptom: default sink Applied both halves as user drop-ins (the exact files from the report) and restarted the user audio services. Result matches yours — the crackle is gone and the convolver node stops suspending: Both properties took: Two things worth noting for the test matrix:
Happy to re-test on stock after a rebase if useful. |
|
Closing in favour of omacom/omarchy-mac-pkgs#2, where @maralcbr ported this and the review continues. |
Summary
packages/omarchy-mac/share/pipewire/pipewire.conf.d/asahi-audio-no-suspend.conf: a PipeWirenode.rulesdrop-in that setsnode.always-process = trueandsession.suspend-timeout-seconds = 0on each model's speaker DSP chain (audio_effect.*-convolver,effect_output.*-convolver).asahi-audio-no-suspend.conf. The Internal speakers pop on playback start and click when seeking YouTube (J414/M2 Pro) — two WirePlumber/PipeWire drop-ins fix it #351 report traced the clicks that remain on playback start and browser seeks to the filter chain restarting when idle, and fixed them with these two properties.module-filter-chain, not the ALSA monitor, so WirePlumber'smonitor.alsa.rulescan't match them; PipeWire's server-sidenode.rulescan.*-mic) are not matched and still suspend, in line with 0bda972.Closes #351
Testing
The match patterns were checked against every speaker and mic chain name in the installed
asahi-audio 4.1-1(/usr/share/asahi-audio): all speaker chains are named<model>-convolver, all mic chains<model>-mic.Parsed offline with
pw-config --name pipewire.conf merge node.rulesagainst a temporaryXDG_CONFIG_HOMEcontaining only this file; it returns the rule unchanged. PipeWire 1.6.9.New case in
packages/omarchy-mac/test/setup-test.sh: the file ships, setsnode.always-process, matchesaudio_effect.j416-convolver,effect_output.j416-convolver,audio_effect.mini-convolverandeffect_output.j274-convolver, and does not matchaudio_effect.j413-mic,effect_output.j413-mic, the headphone sink oreffect_output.rnnoise.packages/omarchy-mac/test/allpasses.Tested live on a J416 (Mac14,10, M2 Pro 16";
asahi-audio 4.1-1, PipeWire 1.6.9, WirePlumber 0.5.17). Each half was installed as a user drop-in and the user audio services restarted. Then I listened (starting fresh YouTube videos in Chromium, seeking) and checked node state after 12 s of silence:*-convolverafter 12 s idlesuspended/idlesuspended/idlerunning,node.always-process = trueThe mic chains (
*-mic) stayedsuspendedwith both halves active.rtkit0.14 was installed andrtkit-daemonactive throughout, so missing realtime scheduling (the crackling cause noted ininstall/hardware/apple/audio.sh) doesn't explain the difference. One tester and one model; on this J416 a test tone started from idle did not pop even at baseline.Cost: idle CPU time of pipewire, pipewire-pulse and wireplumber, from
/proc/<pid>/statover 30 s of silence, three alternating runs per setup: neither half 0.13%, 0.93%, 0.07% of one core; both halves 2.00%, 1.93%, 1.83%. The difference is almost all inwireplumber(1.63–1.77% with both halves), which hosts the filter chain. That's higher than the 0.3% in the Internal speakers pop on playback start and click when seeking YouTube (J414/M2 Pro) — two WirePlumber/PipeWire drop-ins fix it #351 report (J414).Investigated, fixed and tested with Claude Code; the listening test and hardware checks were done by me on the Mac. Happy to walk through any of it in review.
🤖 Generated with Claude Code