wayfire icon indicating copy to clipboard operation
wayfire copied to clipboard

Playing video on second display shows garbage when full screen.

Open k9spud opened this issue 3 years ago • 10 comments

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.

mpv-garbled

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.

k9spud avatar Oct 25 '23 19:10 k9spud

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?

ammen99 avatar Oct 26 '23 06:10 ammen99

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.

k9spud avatar Oct 26 '23 09:10 k9spud

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.

ammen99 avatar Oct 26 '23 15:10 ammen99

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)

ammen99 avatar Oct 29 '23 20:10 ammen99

YES! That patch totally fixed it.

Wasn't having much luck with track-wlroots branch. Couldn't even get it to compile for me.

k9spud avatar Oct 29 '23 22:10 k9spud

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.

ammen99 avatar Oct 29 '23 22:10 ammen99

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.

k9spud avatar Oct 29 '23 22:10 k9spud

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.

ammen99 avatar Oct 29 '23 22:10 ammen99

Okay, I just tried gui-wm/sway-1.8.1 and it had the same bug.

k9spud avatar Oct 29 '23 23:10 k9spud

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).

ammen99 avatar Nov 26 '23 20:11 ammen99