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

Raspberry Pi 4: Garbled output to monitor with drm #197

Closed
WebReflection opened this issue Apr 1, 2020 · 4 comments
Closed

Raspberry Pi 4: Garbled output to monitor with drm #197

WebReflection opened this issue Apr 1, 2020 · 4 comments
Labels
bug Something isn't working needs investigation Needs some investigation to find the cause of the issue

Comments

@WebReflection
Copy link

The issue/visual result is pretty identical to the one described in #156, basically even if I force the Pi 4 to start at 1280x720, when I use cog -P drm $PAGE the output switches to Full HD (my TV resolution) and I see stripes:

stripes

Current cog version is 0.6, I am using cairo-glesv2, and I have zero issues via fdo, but I was hoping I could get rid of weston entirely and simply use the DRM version of cog.

Am I missing some flag to force current screen resolution or to limit width and height? 'cause I couldn't find any flag in the drm.c related file, so I am not sure there's a workaround for this.

Thanks.

@aperezdc aperezdc added bug Something isn't working needs investigation Needs some investigation to find the cause of the issue labels Apr 1, 2020
@aperezdc
Copy link
Member

aperezdc commented Apr 1, 2020

The issue/visual result is pretty identical to the one described in #156, basically even if I force the Pi 4 to start at 1280x720, when I use cog -P drm $PAGE the output switches to Full HD (my TV resolution) and I see stripes:

There could be similar issue related to the RPi4 pixel format. We are passing the buffer pixel format directly to drmModeAddFB2WithModifiers() or drmModeAddFB2() so I suppose there can be some issue in libdrm, or in how Cog is doing this. I do not have a RPi4 myself to debug this myself, though 😑️

Am I missing some flag to force current screen resolution or to limit width and height? 'cause I couldn't find any flag in the drm.c related file, so I am not sure there's a workaround for this.

Currently the DRM platform plug-in will pick the resolution reported by the screen as preferred (typically the one with highest resolution which is not interlaced), or if the screen does not report a preferred resolution the code chooses the one with the most area (width × height). I have created #198 to track adding support to manually specify an output resolution.

@WebReflection
Copy link
Author

Actually, the flag works as intended, but I haven't tried in full HD. Will do in few minutes and report back, but I suspect the PI at full HD has issues in general

@clopez
Copy link
Contributor

clopez commented Feb 15, 2023

Try passing -O renderer=gles to cog.

Example:

cog -P drm -O renderer=gles https://wpewebkit.org

@WebReflection
Copy link
Author

my bad, I should've closed this ages ago ... as I've had no issues in a long time. Sorry for keeping it open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs investigation Needs some investigation to find the cause of the issue
Projects
None yet
Development

No branches or pull requests

3 participants