Playing video on second display shows garbage when full screen.
Playing a video in full screen mode using mpv on the second display of a dual head system outputs a pile of garbage instead of the intended video. VLC has the same problem in full screen, but you have to hide the on-screen control panel before it'll occur.
Interestingly, while garbage is being displayed on the second display, if you pick up any window and move it around, even a window entirely on the first display, the garbage output goes away and you can see the proper video playing.
This bug seems to be newly introduced by Wayfire 0.8.0. Previously using Wayfire 0.7.5 and below I never had this problem.
I would guess this is a problem with direct scanout (which would indicate wlroots/driver bug). Can you try setting WLR_DRM_NO_MODIFIERS=1 before running Wayfire?
Okay, I try that, but alas the problem persists.
I forgot to mention in the original write up that full screen video playback works perfect on the primary display.
Could you test the track-wlroots branch of Wayfire? If you install to /usr, keep in mind that track-wlroots needs wlroots-git so it may overwrite the already existing wlroots installation in /usr. Alternatively, do you happen to have sway installed? If yes, please test with it too.
Alternatively, just try this patch: http://ix.io/4KhG If my guess is correct, this should fix the issue (edit: but it would not be the real fix)
YES! That patch totally fixed it.
Wasn't having much luck with track-wlroots branch. Couldn't even get it to compile for me.
Alright, I think this might be a wlroots or a driver bug. I researched a bit, can you also check whether WLR_EGL_NO_MODIFIERS=1 fixes the issue as well (note this is not the same env var as I suggested before). If this does not help (but make sure to not use my patch for this test!) I will add a workaround option for Wayfire to disable direct scanout until we get a proper fix.
I can report WLR_EGL_NO_MODIFIERS=1 does not fix the issue.
FYI, I am using gentoo's gui-libs/wlroots-0.16.2-r1, x11-libs/libdrm-2.4.116, and media-libs/mesa-23.1.8. I have two discrete AMD Radeon RX550 video cards that I am using to achieve dual monitor displays, both running at 1920x1080 60Hz.
I would recommend trying the same setup with Sway, and if you get the same issue, to report a wlroots issue with what you have tried so far (without success). Regardless, I'll add the workaround option I was speaking about, since the bug may not be easy to resolve.
Okay, I just tried gui-wm/sway-1.8.1 and it had the same bug.
In the latest wayfire master version, I added the WAYFIRE_DISABLE_DIRECT_SCANOUT environment variable. If you set it to 1, no direct scanout will be attempted and this bug should then not be happening (even if it still persists with wlroots 0.17 with this workaround).