fix: dpms cycle causes blurred wallpaper#176
fix: dpms cycle causes blurred wallpaper#176Anaethelion wants to merge 2 commits intodanyspin97:mainfrom
Conversation
|
Hello @Anaethelion and thank you for the PR! I now get the bug on NVIDIA drivers, but I am not sure about some changes, I'll comment more on the actual code. On a sidenote, there is also #177 that attempt to fix the same thing. Can you please give it a try and let me know if it works the same? |
| }; | ||
|
|
||
| if display_info.is_configured() { | ||
| renderer |
There was a problem hiding this comment.
Why are we resizing after creating a surface with the correct size?
| // callback here to avoid a tight error loop when the surface is | ||
| // temporarily invalid (e.g. after DPMS off/on). | ||
| self.context = None; | ||
| self.wl_surface.frame(qh, self.wl_surface.clone()); |
There was a problem hiding this comment.
This only schedule the compositor to call frame callback on this surface the next time it needs to be drawn. So calling it here shouldn't lead to a loop, I guess.
| } | ||
|
|
||
| self.context = match EglContext::new( | ||
| match EglContext::new( |
There was a problem hiding this comment.
This is a cosmetic change, not needed, imho.
|
I think we need both this PR and #177, as they fix different things. |
When DPMS turns off and back on, the EGL context is recreated via
check_contextbut no configure event follows.EglContext::newalways created a10x10placeholder surface, so the wallpaper rendered at that size and was stretched — appearing blurred.Fix: Use real display dimensions in
EglContext::newwhen known. Assign the context before drawing and remove frame callback requests from error paths to prevent a tight error loop.For context, here is the backtrace triggered by cycling dpms off/on:
Tested on
Hyprland 0.54.1 built from branch v0.54.1 at commit 4b07770b9ef1cceb2e6f56d33538aaffb9186b9cThis fix was developed with AI assistance (Claude), feel free to disregard and close.