dragonfly-reverb icon indicating copy to clipboard operation
dragonfly-reverb copied to clipboard

xruns in Linux with dragonfly-reverb going from Ardour 5.x to Ardour 6.3

Open bengan opened this issue 3 years ago • 15 comments

I've got some projects in Ardour with DragonFly as plugin. When I upgraded to Ardour 6.3 my sessions started to give massive xruns. It turned out to be DragonFly Reverb that was the culprit. I tested this on two Linux distros, UbuntuStudio 20.10 and Opensuse Tumbleweed. Both newly updated.

Workaround is uncheck and check every strip where DragonFly is active. After that xruns goes away.

bengan avatar Oct 23 '20 19:10 bengan

Hi @bengan! I'm busily working on a major overhaul that I plan to eventually release as Dragonfly Reverb 4. It should hopefully address the CPU usage issues that some people have reported.

michaelwillis avatar Oct 23 '20 20:10 michaelwillis

I have the exact same behavior on Ardour 5.12 (on Fedora 32) Very often (but not systematically) when I open a session, it immediately starts producing XRuns (without doing anything, not recording, not playing ... transport is stopped) If I disable (bypass) the DragonFly reverb plugin, the XRuns stop. When re-enabling the plugin, it no longer produces XRuns and can be used normally.

If I have multiple instances of the plugin in my session, not all of them show this behavior ... Most times a single instance causes the XRuns.

tassyv avatar Nov 01 '20 09:11 tassyv

I think this is related to #57, on Jack Audio I get xruns with about three or four instances, fixing it is just about setting a high enough jack_bufsize (I usually go with 4096 for old projects I sadly used dragonfly reverb).

Just recently tested it under PipeWire and it xrun-ed immediately with a single instance at 256 bufsize, something that works ok under native Jack.

These xruns are worse when you open a session after it was closed, about half a second of no audio at all every second or so with old projects using about 10 or more instances of it.

I liked dragonfly, looking forward to using it whenever this major overhaul is finished!!

Tremeschin avatar Nov 20 '20 01:11 Tremeschin

I am observing similar behaviour since upgrading the computer. At a short latency of 64 frames/period (prevously not possible), I can run reliably without xruns unless I enable Dragonfly Room Reverb in a session. The DSP load goes up only a little (from about 20% to maybe 22%), but xruns occur every few seconds. Only with at least 256 frames/period the xruns seem to stop.

Is there some estimated time when the re-worked reverbs are planned to be available?

ghost avatar Dec 04 '20 13:12 ghost

Is there some estimated time when the re-worked reverbs are planned to be available?

@sirius-c Hopefully I'll have an alpha release available soon. I have implemented the early reflections and plate algorithms, and I'm part way through building the room algorithm.

michaelwillis avatar Dec 05 '20 15:12 michaelwillis

Please try the new version 3.2.2: https://github.com/michaelwillis/dragonfly-reverb/releases/tag/3.2.2, this fixes a long-standing bug in which sliders or dials that were set to zero would not be initialized properly upon loading the plugins. It may have resulted in all sorts of havoc, including higher CPU usage.

michaelwillis avatar Dec 07 '20 21:12 michaelwillis

Please try the new version 3.2.2: https://github.com/michaelwillis/dragonfly-reverb/releases/tag/3.2.2, this fixes a long-standing bug in which sliders or dials that were set to zero would not be initialized properly upon loading the plugins. It may have resulted in all sorts of havoc, including higher CPU usage.

I tested this version (actually 3.2.3). I can't say anything about the sliders or dials but unfortunately there's no change in the xruns/cpu usage for me. Same Ardour version as before (6.3).

bengan avatar Dec 08 '20 11:12 bengan

No change in the xrun behaviour with version 3.2.3 for me either.

ghost avatar Dec 09 '20 11:12 ghost

Understood. Please stay tuned for the alpha releases of v4. I'm hoping that it will address these issues with CPU usage.

michaelwillis avatar Dec 09 '20 14:12 michaelwillis

Thanks, looking forward to it. Apart from these quirks, the reverb quality is excellent, miles ahead of all other reverb plugs I use on Linux.

To clarify for the current issue: I really do not see any substantial CPU increase as far as the DSP load indicated in Ardour is concerned (some increase is of course expected for reverb). Symptomatically, it seem rather that the plugin occasionally blocks processing for too long, without affecting the average load.

ghost avatar Dec 09 '20 15:12 ghost

Just reporting that xruns are still occurring for me as well upon session opening with the 3.2.3 (and I'm still on Ardour 5.12)

tassyv avatar Dec 11 '20 09:12 tassyv

I got the same issue still going on with Ardour 6.6 and Dragonfly 3.2.3, after loading a session with three instances of the Room-Reverb I have to manually deactivate/reactivate them to get the DSP load from crazy-high xrun-producing to normal (30%-ish). Interestingly only one of them is a culprit, and it's not the one that has the dry parameter set to 0. Is there any way I can try to help pinpoint the problem as it's completely reproducable - at least with this session it occurs every startup?

brainstar avatar Mar 18 '21 11:03 brainstar

I'm also encountering this problem here on Arch. Sadly this makes the reverbs pretty much unusable since it is too annoying to disable/re-enable a bunch of plugin instances after every project open. Really hope to see a fix since this is a great reverb otherwise! How is it going about the fix / v4?

Bleuzen avatar Mar 19 '21 19:03 Bleuzen

v4 has diverged enough from the original project that I'm considering naming it something else and considering it a new reverb plugin. If people are interested, I can kick out a new alpha release for some early testing.

michaelwillis avatar Mar 19 '21 20:03 michaelwillis

Don't know where we are with this issue but in the meantime, I'm personally using a little LUA script that disables/enables all the reverb instances in my project. I launch it when opening a session and at least that gets me going rapidly ...

` ardour { ["type"] = "EditorAction", name = "Reset DragonFly Reverbs", license = "MIT", author = "Vincent Tassy", description = [[Switches OFF then ON the DragonFly plugins]] }

function factory () return function ()

for r in Session:get_routes ():iter () do -- iterate over all tracks in the session
        local i = 0;
        repeat -- iterate over all plugins/processors
	local proc = r:nth_processor (i)
	if not proc:isnil () then
               if (string.match (proc:name(), "Dragonfly")) then
	     	  print(r:name(), " -> Deactivating ", proc:name())
		  proc:deactivate()
                end
	end
	i = i + 1
        until proc:isnil ()
    end
    ARDOUR.LuaAPI.usleep(1000000)
for r in Session:get_routes ():iter () do -- iterate over all tracks in the session
        local i = 0;
        repeat -- iterate over all plugins/processors
	local proc = r:nth_processor (i)
	if not proc:isnil () then
               if (string.match (proc:name(), "Dragonfly")) then
	     	  print(r:name(), " -> Activating ", proc:name())
		  proc:activate()
		  ARDOUR.LuaAPI.usleep(500000)
                end
	end
	i = i + 1
        until proc:isnil ()
    end

end end

`

tassyv avatar May 22 '22 08:05 tassyv