Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Playing video on second display shows garbage when full screen. #1979

Closed
k9spud opened this issue Oct 25, 2023 · 10 comments
Closed

Playing video on second display shows garbage when full screen. #1979

k9spud opened this issue Oct 25, 2023 · 10 comments
Labels
Milestone

Comments

@k9spud
Copy link

k9spud commented Oct 25, 2023

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 k9spud added the bug label Oct 25, 2023
@ammen99 ammen99 added this to the 0.8.1 milestone Oct 25, 2023
@ammen99
Copy link
Member

ammen99 commented Oct 26, 2023

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?

@k9spud
Copy link
Author

k9spud commented Oct 26, 2023

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.

@ammen99
Copy link
Member

ammen99 commented Oct 26, 2023

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
Copy link
Member

ammen99 commented Oct 29, 2023

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)

@k9spud
Copy link
Author

k9spud commented Oct 29, 2023

YES! That patch totally fixed it.

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

@ammen99
Copy link
Member

ammen99 commented Oct 29, 2023

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.

@k9spud
Copy link
Author

k9spud commented Oct 29, 2023

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.

@ammen99
Copy link
Member

ammen99 commented Oct 29, 2023

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.

@k9spud
Copy link
Author

k9spud commented Oct 29, 2023

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

@ammen99
Copy link
Member

ammen99 commented Nov 26, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants