Public bug reported:

Upstream GTK report:
https://gitlab.gnome.org/GNOME/gtk/-/work_items/8260

## Summary

Ptyxis displays transient pixel and glyph corruption when GTK uses
either of its hardware-accelerated GPU renderers on an AMD Raphael
integrated GPU.

Small groups of pixels or glyph fragments become temporarily corrupted
or omitted. A subsequent redraw repairs them. Cursor blinking and
terminal input make the problem much more frequent, although it can also
occur when the cursor is not visible.

Disabling only GTK's GPU occlusion optimization eliminates the problem:

```sh
GSK_GPU_DISABLE=occlusion ptyxis --standalone
```

This workaround is effective with both GTK's Vulkan and OpenGL
renderers.

## Environment

* Ubuntu 26.04 LTS
* Kernel: 7.0.0-22-generic
* Session: GNOME Classic on Wayland
* Ptyxis: 50.1
* GTK runtime: 4.22.4
* Ptyxis compiled against GTK: 4.22.2
* VTE: 0.84.0
* Mesa: 26.0.3
* GPU: AMD Raphael integrated GPU, PCI ID 1002:164e
* Kernel driver: amdgpu
* OpenGL driver: RadeonSI
* Vulkan driver: RADV

Complete package, OpenGL, Vulkan, kernel, and hardware information is
attached as `gtk-occlusion-system-info.txt`.

## Expected result

Terminal text, backgrounds, and glyph pixels should remain stable during
cursor blinking, input, and other redraw activity.

## Actual result

Small groups of pixels or glyph fragments become temporarily corrupted
or omitted. A later redraw, often approximately one second later,
restores the correct image.

## Basic reproduction

Start Ptyxis normally:

```sh
ptyxis --standalone
```

Leave the terminal at a shell prompt and type normally. Cursor blinking
and input-related redraws make the corruption especially noticeable.

The default renderer is Vulkan:

```text
Using renderer 'GskVulkanRenderer' for surface 'GdkWaylandToplevel'
```

The issue also occurs when OpenGL is explicitly selected:

```sh
GSK_RENDERER=opengl ptyxis --standalone
```

## Test results

Affected:

* Native Wayland with Vulkan hardware rendering
* Native Wayland with OpenGL hardware rendering
* X11/XWayland with OpenGL hardware rendering
* OpenGL with `GDK_GL_DISABLE=buffer-storage`
* OpenGL with `GSK_GPU_DISABLE=mipmap,to-image`
* OpenGL with `GSK_GPU_DISABLE=repeat`

Not affected:

* Cairo rendering
* OpenGL forced through Mesa software rendering with `LIBGL_ALWAYS_SOFTWARE=1`
* OpenGL with `GSK_GPU_DISABLE=all`
* OpenGL with `GSK_GPU_DISABLE=occlusion,repeat`
* OpenGL with `GSK_GPU_DISABLE=occlusion`
* Vulkan with `GSK_GPU_DISABLE=occlusion`

## Minimal workaround

The minimal workaround preserves the default Vulkan renderer and
disables only occlusion culling:

```sh
GSK_GPU_DISABLE=occlusion ptyxis --standalone
```

OpenGL is also clean when only occlusion is disabled:

```sh
GSK_RENDERER=opengl \
GSK_GPU_DISABLE=occlusion \
ptyxis --standalone
```

Disabling `repeat` alone does not fix the problem:

```sh
GSK_RENDERER=opengl \
GSK_GPU_DISABLE=repeat \
ptyxis --standalone
```

## Diagnostic conclusion

The issue:

* is not specific to Wayland, because it also occurs through XWayland;
* is not specific to Vulkan, because hardware OpenGL is also affected;
* does not occur with Cairo;
* does not occur with Mesa software OpenGL;
* is eliminated by disabling all GSK GPU optimizations;
* is specifically eliminated by disabling only GSK occlusion;
* is not eliminated by disabling `repeat`, `mipmap`, `to-image`, or OpenGL 
buffer storage.

This isolates the corruption to GTK's GPU occlusion-culling path or its
interaction with the AMD Mesa hardware drivers.

## Screen capture

I was unable to capture the transient corruption reliably. The affected
pixels are small and are frequently repaired by the next redraw before
they can be captured.

The issue is nevertheless consistently reproducible visually, and the
controlled renderer tests produce repeatable results. Disabling only
`GSK_GPU_DISABLE=occlusion` eliminates the corruption with both the
Vulkan and OpenGL renderers.

ProblemType: Bug
DistroRelease: Ubuntu 26.04
Package: libgtk-4-1 4.22.4+ds-0ubuntu0.1
ProcVersionSignature: Ubuntu 7.0.0-22.22-generic 7.0.0
Uname: Linux 7.0.0-22-generic x86_64
ApportVersion: 2.34.0-0ubuntu2
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: GNOME-Classic:GNOME
Date: Mon Jun 15 23:03:40 2026
InstallationDate: Installed on 2025-05-15 (397 days ago)
InstallationMedia: Ubuntu 25.04 "Plucky Puffin" - Release amd64 (20250415.3)
ProcEnviron:
 LANG=en_US.UTF-8
 PATH=(custom, no user)
 SHELL=/bin/bash
 TERM=xterm-256color
 XDG_RUNTIME_DIR=<set>
SourcePackage: gtk4
UpgradeStatus: Upgraded to resolute on 2026-05-22 (24 days ago)

** Affects: gtk4 (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd gpu-renderer gsk gtk4 occlusion opengl rendering-corruption vulkan

** Attachment added: "gtk-occlusion-test-matrix.txt"
   
https://bugs.launchpad.net/bugs/2156834/+attachment/5977644/+files/gtk-occlusion-test-matrix.txt

-- 
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to gtk4 in Ubuntu.
https://bugs.launchpad.net/bugs/2156834

Title:
  Transient GTK4 GPU pixel corruption on AMD Raphael; disabling GSK
  occlusion fixes it

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gtk4/+bug/2156834/+subscriptions


-- 
desktop-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs

Reply via email to