-
Notifications
You must be signed in to change notification settings - Fork 180
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
Display loss recovery attempt for track-wlroots 0.18 branch #2458
Comments
If you're doing this, you need to make every plugin which has GL state (textures, framebuffers, programs) reload its state as well. |
May as well reload them all, then. To provoke a reset, at least on amdgpu:
|
Unloading a plugin might cause losing a lot of temporary state, which is not what we want in the ideal case .. Not to mention some plugins cannot be unloaded safely. |
I can't really think of an 'unloadable' plugin that also does GL stuff. Are there any? |
I'd prefer to not make assumptions, maybe such a plugin will come in the future. |
Sure, but I was thinking more along the lines of having no plugins loaded when testing, and if that works, then maybe hinge on unloadable flag for now until it works, then consider adding a new flag. |
Maybe instead a notification should be plumbed to plugins that need it, to notify them that they need to free and reallocate their GPU resources? Would be better than forcing a full unload. |
Yes that's the best solution. |
New attempt without any plugins that would have GL, new backtrace:
|
Some wild guesses based on the stacktrace - Wayfire keeps a reference of the surface's texture/buffer: wayfire/src/view/wlr-surface-node.cpp Line 61 in 6796b08
Depending on how wlroots has implemented GPU reset handling, maybe they change the texture/buffer pointer? So after the reset, we still hold on to the old texture until a new buffer is committed, but the old texture isn't valid anymore because of the gpu reset? |
That sounds about right to me. After a GPU reset, old textures are useless, whether the pointers are valid or not. |
After discussing a bit with emersion on IRC, it seems wlroots is emitting the signal to early, before the gpu is ready. According to the spec:
Since wlroots just queries once for |
New backtrace for you:
|
This appears to be part of a working implementation for sway. |
Here is my attempt at display loss recovery implementation for wlroots 0.18:
https://gist.github.com/kode54/58b9e30ed73f82e1cfb040fe84f36c66
It doesn't work so well.
Last attempt crashes with this backtrace:
And then it drops to a terminal and fails to restart cage as my login manager, and hangs the GPU completely.
The text was updated successfully, but these errors were encountered: