cog icon indicating copy to clipboard operation
cog copied to clipboard

wl: Compoments glitching on some pages with Vivante GPU

Open sedlalu2 opened this issue 3 years ago • 12 comments

Hi,

im using cog on stmp32mp1 device with vivante GPU.

  • cog 0.14.1
  • WPE WebKit 2.38.2
  • kernel 5.15.67
  • mesa 22.0.3
cog -P wl <url>

We have a problem that on some pages components are glitching. I would say mostly during animations. For example when I open solar system example, performance is really good but componets (planets, texts,...) are glitching... Also detected this problem on another pages as well.

Same behaviour happens on my another stm32mp1 device:

  • cog 0.11.1
  • WPE WebKit 2.32.3
  • kernel 5.10.10
  • mesa 21.1.6

sedlalu2 avatar Mar 09 '23 07:03 sedlalu2

Not sure if related, but we have also glitches reported with the drm plug-in on STM32MP1, on issue #543 🤔

aperezdc avatar Mar 09 '23 09:03 aperezdc

@sedlalu2 Good report, with versions of involved components 👌🏼. For the same of completeness, which Wayland compositor are you using, and which version?

aperezdc avatar Mar 09 '23 09:03 aperezdc

  • weston 10.0.2
  • wayland 1.20.0

And on the older device:

  • weston 9.0.0
  • wayland 1.19.0

Not sure if related, but we have also glitches reported with the drm plug-in on STM32MP1, on issue #543 thinking

Not sure. Could this problem be Vivante GPU related? Drivers, mesa, etc,..?

sedlalu2 avatar Mar 09 '23 09:03 sedlalu2

@sedlalu2 Thanks for the additional info. I've had Cog working well on Weston 9.x + Wayland 1.19.x on an iMX.8 based board a while ago with the Vivante proprietary driver available in the meta-freescale, but that layer adds some customizations on top of Weston 9 🤔

BTW, are you using the proprietary Vivante driver or Etnaviv? How are you building your images, Yocto?

aperezdc avatar Mar 09 '23 14:03 aperezdc

@aperezdc

I have tried Yocto and even a buildroot. Proprietary driver on newer setup (meta-st) , etnaviv on older. Still resulting the same glitches. Happens mostly during the CSS animations I think.

sedlalu2 avatar Mar 09 '23 15:03 sedlalu2

@sedlalu2 We are suspecting there might be a DRM/KMS driver bug, so it could be a good idea to try and run something simpler than WPE to confirm (or discard) this hypothesis. Could you try and run kmscube on your board? There is a Yocto recipe for it so I hope it shouldn't be too hard.

aperezdc avatar Mar 16 '23 09:03 aperezdc

@aperezdc kmscube works.

Anyway, I've found out that some GL tests (glmark2-es2-drm) are not rendered correctly on my device when I use Vivante driver. I've tried to switch drivers from Vivante to Etnaviv while using the latest kernel available (5.15.67). Now the same GL tests that were previously glitching with Vivante driver are working without further problems.

I'll try to add cog to this image and hope to see it renders pages correctly. I will let you know.

sedlalu2 avatar Mar 30 '23 12:03 sedlalu2

@sedlalu2 Those are very interesting findings, thanks for letting us all know!

It looks like there is definitely some driver issue with the proprietary driver (or which gets triggered only with it), but maybe kmscube is too simple to trigger the bug or it manages to workaround it somehow (not very likely, but cannot discard that with the info we have).

We might try to make the OpenGL ES renderer of the DRM plug-in (cog -P drm -O renderer=gles) behave in a way that is more similar to what kmscube does, but with the issue happening on Wayland as well there are little chances that doing that would help much, and would anyway not solve the issue under Wayland 🤔

aperezdc avatar Mar 30 '23 13:03 aperezdc

@aperezdc

I have tried to build image:

cog 0.14.1
WPE WebKit 2.38.2
kernel 5.15.67
mesa 22.0.3

based on Etnaviv GPU driver instead of Vivante GPU. It is still the same behavior, so cog is glitching on some pages (using still the same reference page as before. I've noticed this issue on another page as well, mostly during css animations.

It doesn't matter if I use cog via wl or drm platform, it glitches still the same. I don't suppose there are any issues with cog or mesa rendering. So it looks like driver or kernel issue as you suggested.

sedlalu2 avatar Apr 04 '23 06:04 sedlalu2

Oh, the solar system animation is glitching also on WebKitGTK, I just took a screenshot where the issue can be seen:

Screenshot of the glitching animation taken with Epiphany using WebKitGTK 2.40.0

So this is a cross-port issue related to composition of CSS-animated elements, not specific to WPE. I will be reporting the issue in the WebKit Bugzilla.

aperezdc avatar Apr 11 '23 14:04 aperezdc

Reported in WebKit Bugzilla, the issue is also present in the main WebKit branch: https://bugs.webkit.org/show_bug.cgi?id=255328

aperezdc avatar Apr 12 '23 08:04 aperezdc

@aperezdc Hi, do you know if the glitching problem will be solved any soon? Thank you.

sedlalu2 avatar Nov 01 '23 11:11 sedlalu2