-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
GUI startup delay under X11 #451
Comments
I did not notice anything in regards to delay at all, for me it works just like any other gui framework/toolkit. i do not even understand what you mean by delay here... gui opens but first render takes a while? host daw is locked up temporarily while gui opens..? how big of a delay are we talking here that it is noticeable for you? |
I got a screen recording that probably explains the situation better. Basically the DAW becomes unresponsive for around 4 seconds. The delay is definitely not normal compared to the stock plugin from REAPER. rec2.mp4 |
Another observation that the problem can only be reproduced under X11. There is no delay under Wayland. This is the Xorg version I have
|
I've pinpointed that the function that causes the freeze is https://github.com/lv2/pugl/blob/e33b2f6b0cea6d6263990aa9abe6a69fdfba5973/src/x11.c#L651 Still trying to figure out the cause though. |
Some further research indicates that this might be related to NVIDIA driver.
I noticed also that even the #include <stdio.h>
#include <X11/extensions/Xrandr.h>
int main(void)
{
Display* dp;
XRRScreenConfiguration *conf;
dp = XOpenDisplay(NULL);
conf = XRRGetScreenInfo(dp, DefaultRootWindow(dp));
short rate = XRRConfigCurrentRate(conf);
printf("rate: %d\n", rate);
XRRFreeScreenConfigInfo(conf);
XCloseDisplay(dp);
} I'm not sure if it's really necessary to obtain the refresh rate at every window construction though. This property doesn't seem to be used a lot in pugl. I also found another way to compute the refresh rate in GLFW. This might be the way to go to avoid the freeze https://github.com/glfw/glfw/blob/b35641f4a3c62aa86a0b3c983d163bc0fe36026d/src/x11_monitor.c#L48 |
This problem doesn't seem to be NVIDIA specific. Probably just the problem of X11. I checked on another Arch Linux machine with only one integrated graphics card and it still has a delay, just much less. By defining |
The above program works properly and exits in a fraction of a millisecond for me, Manjaro on AMD. |
I notice that any GUI plugin built with DPF seems to have a significant start-up delay on Linux. This problem is especially noticeable in REAPER, where the GUI is deconstructed and reconstructed every time you float/dock the plugin (by double click on the plugin in the chain on the left) or switching between plugins
In Ardour, the GUI is only constructed once so the problem is less problematic.
I can notice the delay in both the example plugins (compiled with
develop
branch) liked_states
and third party plugins like the dragonfly-reverb.The only example plugins that doesn't have this problem is
d_embedextui
, though I don't think I can see the GUI been renderedRight now, what I know is
I'll post more info when I locate the problem, but I want to post the issue in advance in case this is a known problem. Has anyone noticed this problem before?
The text was updated successfully, but these errors were encountered: