Embedded browser display corruption under Wayland on Pi desktop

Bug #1924251 reported by Dave Jones
60
This bug affects 8 people
Affects Status Importance Assigned to Milestone
gtk+3.0 (Ubuntu)
Invalid
Undecided
Unassigned
webkit2gtk (Ubuntu)
Fix Released
Undecided
Unassigned
yelp (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

On the jammy Pi desktop, under a wayland session, the body of a window containing an HTML renderer (e.g. help text or a login page) displays corruption.

These reproduction cases may not be entirely reliable given that *some* pages appear to render correctly, but I'll include a couple in the hopes of making it reliably reproducible:

1. Open the Lights Off game
2. Select "Help" from the menu
3. In the help window that appears, select any link

"Basics", "Rules", and "Strategy" all reliably reproduce the issue for me, but "Help Translate" doesn't so you may need to click around some links until the corruption appears -- however, once it does even navigating back to the prior page which rendered happily now displays the same corruption.

Another reproduction case:

1. Open the Settings application
2. Select the Online Applications option from the left
3. Select the Google entry in the list
4. The login window that appears always displays corruption for me

The Microsoft option always reliably corrupts for me, but the Facebook one doesn't so again I wonder how reproducible this may be for others (might be worth trying several options if the first doesn't display corruption).

The corruption appears in the form of "shredded" content as if a horizontal stride is set incorrectly somewhere, but only appears in the body of the window; the window decorations are unaffected. I'll attach a screenshot of the corrupted help window to illustrate.

Revision history for this message
Dave Jones (waveform) wrote :
Changed in mutter (Ubuntu):
assignee: nobody → Daniel van Vugt (vanvugt)
tags: added: hirsute raspi raspi-gfx
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

The console output mentions WebKit and GL so it seems this is no normal GTK app.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

The same bug occurs in weston so that's some good news that it's not a mutter bug.

The console output mentions GDK is unable to create a GL context and is falling back to glReadPixels. And that's exactly what the corruption looks like -- an incorrect stride or pixel format with glReadPixels. That makes it a GDK bug.

affects: mutter (Ubuntu) → gtk+3.0 (Ubuntu)
Changed in gtk+3.0 (Ubuntu):
assignee: Daniel van Vugt (vanvugt) → nobody
tags: added: wayland wayland-session
no longer affects: mesa (Ubuntu)
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gtk+3.0 (Ubuntu):
status: New → Confirmed
Changed in webkit2gtk (Ubuntu):
status: New → Confirmed
Changed in yelp (Ubuntu):
status: New → Confirmed
Revision history for this message
Dave Jones (waveform) wrote :

This still seems to be an issue on the current Ubuntu Pi Jammy images although it presents in a different manner: instead of an incorrect-stride corruption, the embedded browser (in the same places: help windows, or the login entries for online accounts) simply appears blank white.

However, if the mouse cursor is moved across the blank white content of the window, the cursor shape changes to indicate text entry fields or clickable links indicating that the browser is likely operating correctly but failing to render correctly.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Yes the yelp->gtk->opengl backend has probably changed over the past year.

tags: added: jammy
removed: hirsute
Revision history for this message
Sebastien Bacher (seb128) wrote :

@Dave, we believe that webkitgtk is broken on arm64 at the moment, at least the surf autopkgtest are failing
https://autopkgtest.ubuntu.com/packages/s/surf/jammy/arm64

and the webkitgtk demo browser segfault when started on a canonistack instance which I reported upstream as https://bugs.webkit.org/show_bug.cgi?id=237636

do you see similar issues on the pi?

Revision history for this message
Dave Jones (waveform) wrote :

@seb128 interesting, I've just tried this on a fully updated jammy image on a Pi 400 and /usr/lib/aarch64-linux-gnu/webkit2gtk-4.0/MiniBrowser starts quite happily; browser window opens and ... nothing but blank white space within the body of the window. All the controls in the toolbar are fine and it's definitely able to navigate to pages, and after a bit of experimentation I'm reasonably convinced it's all "working correctly" with the one exception that nothing actually shows up (but the mouse cursor changes shape in all the right places, etc).

@vanvugt: in case it's of any use, MiniBrowser produced the following console output:

** (MiniBrowser:149058): WARNING **: 21:30:51.512: GDK is not able to create a GL context, falling back to glReadPixels (slow!): Unable to create a GL context
Cannot create EGL context: invalid display (last error: EGL_SUCCESS)

Revision history for this message
Dave Jones (waveform) wrote :

Another quick update: in recent days we've gone from "blank white space" back to "incorrect stride corruption" in all documented cases (embedded browsers, help windows, MiniBrowser, etc).

I note in the dpkg logs, libglx-mesa0 got updated a few days ago, but unfortunately I'm unsure exactly when the change occurred so this is speculation on my part.

Revision history for this message
Sebastien Bacher (seb128) wrote :

the recent update suggests the white rendering was indeed bug #1966418 which is resolved now

Revision history for this message
bob (bob12345-67890) wrote :

This issue is still existing after the fresh installation on raspberry pi 4 8GB desktop.

Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/1924251

tags: added: iso-testing
Dave Jones (waveform)
description: updated
Revision history for this message
Dominic Parry (nothingconspicuous) wrote (last edit ):

I think this is to do with the hardware (probably 3D) acceleration under OpenGL and KMS since the effect is reproducable by installing virt-manager, setting the type to SPICE instead of VNC and then enabling OpenGL hadware accelerated rendering (3d acceleration as it might be called.)

Thus, I believe that this is not limited to just webkit. You may also need to make sure that your MESA_GL_VERSION_OVERRIDE environment variable is set to 3.2 of you are experiancing issues related to "failed to create a GL context" as totem and other apps will experiance this issue.

Revision history for this message
Dominic Parry (nothingconspicuous) wrote :

I bare good news, On 22.10 current build for desktop, this issue no longer is valid as it will be resolved! No more garbled mess. I have been looking about but perhaps the fixes there can be applied to jammy.

Been testing 22.10 :D

Revision history for this message
Sebastien Bacher (seb128) wrote :

One thing we changed in 22.10 is that we enabled the wpe backend, which is the better maintained rendered and what upstream is testing. The non-wpe codepath was even hitting errors on arm64 on recent versions as described in https://bugs.webkit.org/show_bug.cgi?id=237636

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Which package should be marked as Fix Released for 22.10?

Revision history for this message
Luis Augusto Xavier Cruz (laugustocruz) wrote : Re: [Bug 1924251] Re: Embedded browser display corruption under Wayland on Pi desktop

Unfortunately I do not know the answer. It's been a while since I stopped
using ubuntu on raspberrypi and i went back to using the official system
for the device and since then I haven't changed system anymore. Also, for
other personal interests I haven't used raspberrypi so often lately.

Em qua., 12 de out. de 2022 às 22:45, Daniel van Vugt <
<email address hidden>> escreveu:

> Which package should be marked as Fix Released for 22.10?
>
> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (1946664).
> https://bugs.launchpad.net/bugs/1924251
>
> Title:
> Embedded browser display corruption under Wayland on Pi desktop
>
> Status in gtk+3.0 package in Ubuntu:
> Confirmed
> Status in webkit2gtk package in Ubuntu:
> Confirmed
> Status in yelp package in Ubuntu:
> Confirmed
>
> Bug description:
> On the jammy Pi desktop, under a wayland session, the body of a window
> containing an HTML renderer (e.g. help text or a login page) displays
> corruption.
>
> These reproduction cases may not be entirely reliable given that
> *some* pages appear to render correctly, but I'll include a couple in
> the hopes of making it reliably reproducible:
>
> 1. Open the Lights Off game
> 2. Select "Help" from the menu
> 3. In the help window that appears, select any link
>
> "Basics", "Rules", and "Strategy" all reliably reproduce the issue for
> me, but "Help Translate" doesn't so you may need to click around some
> links until the corruption appears -- however, once it does even
> navigating back to the prior page which rendered happily now displays
> the same corruption.
>
> Another reproduction case:
>
> 1. Open the Settings application
> 2. Select the Online Applications option from the left
> 3. Select the Google entry in the list
> 4. The login window that appears always displays corruption for me
>
> The Microsoft option always reliably corrupts for me, but the Facebook
> one doesn't so again I wonder how reproducible this may be for others
> (might be worth trying several options if the first doesn't display
> corruption).
>
> The corruption appears in the form of "shredded" content as if a
> horizontal stride is set incorrectly somewhere, but only appears in
> the body of the window; the window decorations are unaffected. I'll
> attach a screenshot of the corrupted help window to illustrate.
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/gtk+3.0/+bug/1924251/+subscriptions
>
>

Changed in gtk+3.0 (Ubuntu):
status: Confirmed → Incomplete
Changed in webkit2gtk (Ubuntu):
status: Confirmed → Incomplete
Changed in yelp (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Dave Jones (waveform) wrote :

This has been fixed for a couple of releases now (since lunar I believe), and if I recall correctly the issue was indeed the wpe backend mentioned in comment 17. That would suggest this should be "invalid" for gtk and yelp, and "fix released" for webkit2gtk.

Revision history for this message
Sebastien Bacher (seb128) wrote :

thanks!

Changed in gtk+3.0 (Ubuntu):
status: Incomplete → Invalid
Changed in webkit2gtk (Ubuntu):
status: Incomplete → Fix Released
Changed in yelp (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.