Fullscreen broken after BO handle table #3185
Comments
Are you using the latest commit? |
I was when I submitted the report. The revert did need manual merging after recent changes, but it was minor and still fixed the behaviour. |
Just to add to this, I am having the same problems but firefox also doesn't work for me. I get green artifacts all over the screen when fullscreening any firefox video (e.g. youtube video) |
@alexarice Did it look something like the following? I did encounter that bug as of last weekend when trying out kwinft-git with wlroots-git. At first I thought it was an LLVM14-related bug in mesa, but this could be very well the same bug as mentioned here. The bug only showed in OpenGL apps (that screenshot is from Chrome with --use-gl=desktop), RADV-games were working fine though. But also other OpenGL apps were broken, even the KDE Plasma menues flickered with that pattern when navigating in the menue. |
That looks similar to what I get. The issue goes away if I e.g. open a layer-shell instance like rofi on top of the fullscreen surface, then returns when rofi closes. It also doesn't happen for all apps, so maybe it's related to direct scanout? waves hands vigorously Note that I'm not able to screenshot the issue; it appears fine in screenshots. |
My error looked a lot more colourful than that. I also cannot screenshot it. I observed it happening on firefox, alacritty, and emacs, but think it happened on everything for me. I also bisected it down to the commit in the original post of this issue. |
@alexarice Mine was also more colourful. I think firefox possibly isn't corrupting for me because I'm using the webrender compositor and a nightly build. Menus aren't working though, but that's another bug! ;-) |
I'm also encountering this on an AMD RX570. Like what Xyene experienced, it also disappears when a layer surface is present. However, I've only had it happen with xwayland apps. Specifically discord and (rarely)alacritty (I have alacritty set to run under xwayland due to a minuscule bug). Firefox doesn't have this issue for me though; but I'm using |
Can you share Sway debug logs? It seems like I'm only able to reproduce when modifiers aren't supported. With modifiers enabled the bug doesn't appear. |
This can help debugging direct scan-out issues, such as [1]. [1]: swaywm/wlroots#3185
This amdgpu patch fixes it for me: https://lore.kernel.org/amd-gfx/20210920103133.3573-1-contact@emersion.fr/T/#u |
This can help debugging direct scan-out issues, such as [1]. [1]: swaywm/wlroots#3185
With a fresh wlroots- and kwinft-build as of the past weekend, I can no longer reproduce my issue (on my Vega 56). |
Vega 56 should be recent enough to support modifiers. |
I still get issues with sway master and wlroots master on an RX 5600 xt. How would I get the debug logs you want? |
|
https://gist.github.com/alexarice/320449c24a70c638937495e63c87fc2a |
How can I build your branch and run it? I use |
There's no Sway branch to test, just a kernel patch. If you can grab debug logs, please grab them from Sway master. Just want to check the bug doesn't happen when modifiers are supported. |
I grabbed some logs yesterday using sway master-- but I hadn't tried that patch yet. Should I upload those? Or should I wait until I've figured out how to install the kernel patch? If the former, I'll have till wait until ~4PM EDT because I forgot to |
Took a bit longer than expected, but heres the log without the kernel patch: https://hastebin.com/itenuxenoz.yaml |
OK, matches my setup. |
So is the fix just to wait for driver updates? |
Yes. |
You can also use the |
In the meantime, you can start Sway (needs latest commit) with |
On GFX9+, format modifiers are always enabled and ensure the frame-buffers can be scanned out at ADDFB2 time. On GFX8-, format modifiers are not supported and no other check is performed. This means ADDFB2 IOCTLs will succeed even if the tiling isn't supported for scan-out, and will result in garbage displayed on screen [1]. Fix this by adding a check for tiling flags for GFX8 and older. The check is taken from radeonsi in Mesa (see how is_displayable is populated in gfx6_compute_surface). Changes in v2: use drm_WARN_ONCE instead of drm_WARN (Michel) [1]: swaywm/wlroots#3185 Signed-off-by: Simon Ser <contact@emersion.fr> Acked-by: Michel Dänzer <mdaenzer@redhat.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Harry Wentland <hwentlan@amd.com> Cc: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com> Cc: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
On GFX9+, format modifiers are always enabled and ensure the frame-buffers can be scanned out at ADDFB2 time. On GFX8-, format modifiers are not supported and no other check is performed. This means ADDFB2 IOCTLs will succeed even if the tiling isn't supported for scan-out, and will result in garbage displayed on screen [1]. Fix this by adding a check for tiling flags for GFX8 and older. The check is taken from radeonsi in Mesa (see how is_displayable is populated in gfx6_compute_surface). Changes in v2: use drm_WARN_ONCE instead of drm_WARN (Michel) [1]: swaywm/wlroots#3185 Signed-off-by: Simon Ser <contact@emersion.fr> Acked-by: Michel Dänzer <mdaenzer@redhat.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Harry Wentland <hwentlan@amd.com> Cc: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com> Cc: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Closing because the fix has been merged upstream. |
On GFX9+, format modifiers are always enabled and ensure the frame-buffers can be scanned out at ADDFB2 time. On GFX8-, format modifiers are not supported and no other check is performed. This means ADDFB2 IOCTLs will succeed even if the tiling isn't supported for scan-out, and will result in garbage displayed on screen [1]. Fix this by adding a check for tiling flags for GFX8 and older. The check is taken from radeonsi in Mesa (see how is_displayable is populated in gfx6_compute_surface). Changes in v2: use drm_WARN_ONCE instead of drm_WARN (Michel) [1]: swaywm/wlroots#3185 Signed-off-by: Simon Ser <contact@emersion.fr> Acked-by: Michel Dänzer <mdaenzer@redhat.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Harry Wentland <hwentlan@amd.com> Cc: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com> Cc: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
commit 98122e6 upstream. On GFX9+, format modifiers are always enabled and ensure the frame-buffers can be scanned out at ADDFB2 time. On GFX8-, format modifiers are not supported and no other check is performed. This means ADDFB2 IOCTLs will succeed even if the tiling isn't supported for scan-out, and will result in garbage displayed on screen [1]. Fix this by adding a check for tiling flags for GFX8 and older. The check is taken from radeonsi in Mesa (see how is_displayable is populated in gfx6_compute_surface). Changes in v2: use drm_WARN_ONCE instead of drm_WARN (Michel) [1]: swaywm/wlroots#3185 Signed-off-by: Simon Ser <contact@emersion.fr> Acked-by: Michel Dänzer <mdaenzer@redhat.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Harry Wentland <hwentlan@amd.com> Cc: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com> Cc: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 98122e6 upstream. On GFX9+, format modifiers are always enabled and ensure the frame-buffers can be scanned out at ADDFB2 time. On GFX8-, format modifiers are not supported and no other check is performed. This means ADDFB2 IOCTLs will succeed even if the tiling isn't supported for scan-out, and will result in garbage displayed on screen [1]. Fix this by adding a check for tiling flags for GFX8 and older. The check is taken from radeonsi in Mesa (see how is_displayable is populated in gfx6_compute_surface). Changes in v2: use drm_WARN_ONCE instead of drm_WARN (Michel) [1]: swaywm/wlroots#3185 Signed-off-by: Simon Ser <contact@emersion.fr> Acked-by: Michel Dänzer <mdaenzer@redhat.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Harry Wentland <hwentlan@amd.com> Cc: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com> Cc: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 98122e6 upstream. On GFX9+, format modifiers are always enabled and ensure the frame-buffers can be scanned out at ADDFB2 time. On GFX8-, format modifiers are not supported and no other check is performed. This means ADDFB2 IOCTLs will succeed even if the tiling isn't supported for scan-out, and will result in garbage displayed on screen [1]. Fix this by adding a check for tiling flags for GFX8 and older. The check is taken from radeonsi in Mesa (see how is_displayable is populated in gfx6_compute_surface). Changes in v2: use drm_WARN_ONCE instead of drm_WARN (Michel) [1]: swaywm/wlroots#3185 Signed-off-by: Simon Ser <contact@emersion.fr> Acked-by: Michel Dänzer <mdaenzer@redhat.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Harry Wentland <hwentlan@amd.com> Cc: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com> Cc: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 98122e6 upstream. On GFX9+, format modifiers are always enabled and ensure the frame-buffers can be scanned out at ADDFB2 time. On GFX8-, format modifiers are not supported and no other check is performed. This means ADDFB2 IOCTLs will succeed even if the tiling isn't supported for scan-out, and will result in garbage displayed on screen [1]. Fix this by adding a check for tiling flags for GFX8 and older. The check is taken from radeonsi in Mesa (see how is_displayable is populated in gfx6_compute_surface). Changes in v2: use drm_WARN_ONCE instead of drm_WARN (Michel) [1]: swaywm/wlroots#3185 Signed-off-by: Simon Ser <contact@emersion.fr> Acked-by: Michel Dänzer <mdaenzer@redhat.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Harry Wentland <hwentlan@amd.com> Cc: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com> Cc: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Since 5dfaf5e fullscreen (super-f) is broken for fullscreen (OpenGL?) surfaces.
AMD POLARIS10 current git mesa/wlroots/sway etc
For example Alacritty appears to display the wrong area of memory
glmark2-wayland is severely corrupted but the tests are kind of visible
Having wdisplays running makes fullscreen work (perhaps due to the overview thumbnail)
Firefox just works though
Proton DXVK and gallium-nine games show corruption when switching to fullscreen, but after creating a vulkan/nine buffer work okay.
Reverting 5dfaf5e makes everything work again.
The text was updated successfully, but these errors were encountered: