New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please add a way to limit GUI refresh rate #369
Comments
Hello! The refresh rate of GUI is limited to 25 FPS. |
I did some more tests and the video card may be a problem indeed, I'll definitely do more testing. My video card is MSI Radeon RX 5600 XT OC with the open-source amdgpu driver (v23.0.0, 20230210-5 firmware). There were some problems with it in the past (random black screens/system reboots) but with the 6.5.10 kernel it finally seems stable. It also caused sound stuttering with my old sound card (PCI MIA Echo), which may or may not be related, but those were gone since I swapped the sound card. In general LSP plugins are now the only piece of software which definitely has some weird issues, Kdenlive (which also uses Cairo), for example, works fine. |
Now I think the video card is not a problem, it's more to do with process/thread prioritization. The thing is that not the whole system becomes sluggish but only the Ardour GUI: the LSP plugin GUI is updated fine, I can run any other program and it works perfectly but the Ardour GUI is hardly redrawn at all while playback/processing is happening. My CPU is AMD Ryzen 7 2700, it's 8-core but has 16 virtual cores and internal dynamic overclocking. If I set in the Ardour preferences the number of signal processing threads to 7 or 8 and the CPU DMA latency setting to 400 usec it all becomes much less laggy. Too bad only the LSP plugins suffer from this, is there a way to lower their process priority? |
The host sets the process and thread priority to plugins. LSP Plugins do nothing with this. All created threads are of default priority. If you use LV2 versions, the UI is handled by the host UI thread, see lv2:IdleInterface. |
REMOVED |
I think now I see, it's really something with libcairo and my system because Calf does not use Cairo to draw anything, as well as any other plugin I use. Somehow it overloads the system. Not sure how to fix it. |
I see the |
I have Ryzen 4800H CPU with embedded graphics and all works very well. Many other people reported that UI works pretty well. You're the only one who has such problem. I have no idea how to help you at this moment. |
Solved it:
Thank you again! |
@Efenstor |
Not quite: first I tried to deal with the swapper problem, here is the discussion on how to lower swappiness when there is enough of memory: https://unix.stackexchange.com/questions/265713/how-to-configure-swappiness-in-linux-memory-management. The second problem was the Ardour's clumsy integrated system of preventing modern CPUs (e.g. Ryzen) from going into the lowered power states (C-states), which also overloaded the swapper by continuously "pumping" the CPU; therefore I've deducted that it's much better to disable it in the BIOS completely. |
I sorta reopen this issue, because a related problem still remains: when working on a complex project with lots and lots of processing and more than 10 tracks, and if an LSP plugin with analysis display is shown the refresh rate of the Ardour interface drops to about 1 fps (although it is not completely frozen for me anymore after the swapper tweaking). I mean, is the analyzer so important to be displayed with perfect frame rate, while the whole interface in the background becomes sluggish? The interface itself is pretty heavy and I see that it loads the GPU quite a bit when displayed (especially if scaled to 200%). Of course I can turn off the analyzer completely but it's a useful thing after all. My suggestion is to add:
|
I know this is the opposite of the problem described, but in general some option to adjust the frame rate would indeed be nice. Sometimes I feel like a higher refresh rate (in the analyzer plugins, for example) just makes sense, especially on high refresh rate displays. |
The main problem with |
Hi, |
I dont know If you use already, but cairo_push and cairo_pop makes a huge Differenz. |
@brummer10 how should it help? Do you mean that |
I've just updated cairo surfaces to use |
It minimize the calls to th Graphik Server. |
I've built it now (v1.2.16); may be there is an improvement but it's obviously not too drastic, the main Ardour canvas is still quite visibly lagging when the analyzers are on and is redrawn smoothly when they are off. The idea with cairo_push_group and cairo_pop_group is definitely worth a try, may be different drivers behave differently when it comes to initialization/uninitialization of hardware resources. |
I tried building from
|
@derkrasseleo you need root privileges to run |
I've built them successfully but haven't noticed any change in framerate so far. |
Thank you for the amazing plugin set! I use Debian stable (bookworm) with the latest Ardour. My problem is that GUI overloads the CPU, so I can barely use any plugin at all. If I disable vsync (TearFree) in the xorg settings and turn off the analysis then the responsiveness becomes better but still far from perfect. The responsiveness of the plugin GUI itself is good but Ardour at the background becomes very slow. I use the hi-dpi monitor, so the interface is scaled to 200%, and I guess it makes things even worse. I have this problem on both of my machines with any LSP plugin. Sometimes it takes 20-30 seconds for Ardour just to respond to me pressing the "stop" button (or the space key) if the analyzer is on, if it's off then it's useable but obviously could be better (for example none of the Calf plugins has such problems). I think the solution is to limit the GUI refresh rate, may be as a manual option.
The text was updated successfully, but these errors were encountered: