-
-
Notifications
You must be signed in to change notification settings - Fork 67
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
Revert "core: dispatch on exit instead of roundtrip" #114
Conversation
This reverts commit 2c7027d. Without the roundtrip it was possible that session_lock_surface_destroy gets called before unlock_and_destroy is processed.
I've not been able to reproduce the RSOD with this change, and previously could do so within ~10 attempts. Sometimes hyprlock takes a number of seconds to return on exit now, I suspect that when that occurs it would previously have triggerred the RSOD. |
on the other hand with it some people get freezes. |
For reference this appears to be the related issue: #87 We definitely need to synchronize somehow - hyprlock can never be allowed to destroy the surface before the unlock signal is sent. I don't know enough about wayland etc to be of much use here, but the docs for
The docs for wl_display suggest that "a module that runs using its own proxy queue that needs to do display roundtrip must wrap the wl_display proxy object before sending the wl_display.sync request", which is what The docs for Can we perhaps just call If that's not an option then I suspect what's required here is to continue calling |
I guess I'll merge this. This is called from the main thread so it should be safe |
I wonder if this might be relevant, from the docs for
I see that we're polling the display for events in a thread at hyprlock/src/core/hyprlock.cpp Line 326 in a7ec195
Again though, all of this is quite outside my wheel-house, so maybe this is unrelated and not relevant. |
idk either tbh lol |
I think this is not really relevant, since the event loop is single threaded. The poll thread might get "stray" poll events but that should not matter. The freezes come from an unfortunate ordering where the poll thread waits for the eventLoopMutex. Then the main thread sets m_bTerminate and and then the poll thead polls again, which causes a 5 second freeze. |
This reverts commit 2c7027d. Without the roundtrip it was possible that session_lock_surface_destroy gets called before unlock_and_destroy is processed.
fixes #107