core: monitor replug workaround for nvidia#845
Conversation
|
session lock surface never gets mapped. We do successfully create a new EGLSurface and then proceed to call So it is some egl related issue. I tried to recreate the entire egl context on monitor disconnect, but that also didn't solve it. |
|
|
|
Error is |
|
Hmm didnt manage to solve it. I think its a NVIDIA/egl-wayland issue, but i am not sure. (I found some refcount issue in the eglSwapBuffer implementation there, but might be unrelated) I cant get back to the machine i can reproduced it on for two weeks, so sadly this is all i got for now. |
|
Ok so this PR fixes the issue now. Not sure if I mentioned it: It only happens when the last monitor is disconnected and reconnected. The fix is done by recreating the rendering context when the last monitor gets disconnected. This way we don't get |
|
I mean if it works it works - but the context should absolutely not be lost when all monitors die. If it is, that's a driver bug. You ideally would just reuse your current context to take a screenshot once a new monitor shows up I would make it nvidia exclusive though yes |
caused by this bug hyprwm/hyprlock#845
|
I've continued to have this issue, just haven't had the time to investigate. I'd be happy to test out this patch. |
|
Previously I was experiencing the issue when my monitor would turn off, hyprlock would show the crash screen every time. I have been using the fix in this PR for about a week and have had zero issues since then. |
|
Does this pr only apply to NVIDIA? I’m using an Intel iGPU laptop , and I also run into this issue when plugging and unplugging the monitor. |
075615d to
dfcfe42
Compare
This is a workaround for nvidia that can hopefully be removed at some point.
|
I made this specifically for nvidia. We will find out if it also fixes @w1zpony's issue in #779 hopefully. I will still merge this as is for nvidia only because it is definitely an improvement. But I will try to stay on this issue as I want to get rid of this workaround at some point. Cheers! |
|
I messed something up. |
|
Fixed it for me, thank you so much. |
So I have been investigating #793 (Which has a confusing title, but I think all reports are caused by monitor re-plugging). Edit: wrong issue. I wanted to link this one: #695. They might be the same though. I think both probably have nothing to do with suspend per se.
I was able to reproduce the issue on this system:
I can get back to it tomorrow and hopefully I will find a fix for the issue.
Somehow we are failing to create and render to a new session lock surface after the previous one has been destroyed.
This issue does not occur with swaylock and is reproducible in hyprland and sway.