[Mesa driver bug] Issues with Libadwaita / GTK4 applications

  1. Pure GTK4 apps like transmission-gtk are broken.

  2. LibAdwaita apps don’t work: Pamac(LibAdwaita version) shows its entry in panel then close itself, EasyEffects launches but stays frozen.

NB: GTK3 apps work fine.

A quick install and it seems to look OK (albeit having a touch of the adwaita coloring)

I wonder what gtk packages are installed?

pacman -Qs gtk

And how have you configured gtk appearance under plasma?

pacman -Qs gtk                                                                                                                                                                 
local/avahi 1:0.8+r189+g35bb1ba-1
    Service Discovery for Linux using mDNS/DNS-SD (compatible with Bonjour)
local/breeze-gtk 5.27.10-1 (plasma)
    Breeze widget theme for GTK 2 and 3
local/colord-gtk 0.3.0-2
    Additional GTK3 support code for colord
local/colord-gtk-common 0.3.0-2
    Additional GTK support code for colord (common files)
local/font-manager 0.8.8-1
    A simple font management application for GTK+ Desktop Environments
local/goocanvas 3.0.0-4
    Cairo canvas widget for GTK
local/granite 6.2.0-2 (pantheon)
    Library that extends Gtk+
local/gspell 1.12.2-2
    Spell-checking library for GTK applications
local/gst-plugin-gtk 1.22.7-1
    Multimedia graph framework - gtk plugin
local/gtk-update-icon-cache 1:4.12.4-1
    GTK icon cache updater
local/gtk2 2.24.33-3
    GObject-based multi-platform GUI toolkit (legacy)
local/gtk3 1:3.24.38-1
    GObject-based multi-platform GUI toolkit
local/gtk4 1:4.12.4-1
    GObject-based multi-platform GUI toolkit
local/gtkhash 1.5-3
    A GTK+ utility for computing message digests or checksums
local/gtkmm-4.0 4.12.0-1
    C++ bindings for GTK 4
local/gtkmm3 3.24.8-1
    C++ bindings for GTK+ 3
local/gtksourceview4 4.8.4-1
    A text widget adding syntax highlighting and more to GNOME
local/gtkspell3 3.0.10-2
    Provides word-processor-style highlighting and replacement of misspelled words in a GtkTextView widget
local/kde-gtk-config 5.27.10-1 (plasma)
    GTK2 and GTK3 Configurator for KDE
local/lib32-gtk3 1:3.24.38-1
    GObject-based multi-platform GUI toolkit
local/lib32-libcanberra 1:0.30+r2+gc0620e4-2
    A small and lightweight implementation of the XDG Sound Theme Specification (32-bit)
local/libappindicator-gtk3 12.10.0.r298-3
    Allow applications to extend a menu via Ayatana indicators in Unity, KDE or Systray (GTK+ 3 library)
local/libcanberra 1:0.30+r2+gc0620e4-3
    A small and lightweight implementation of the XDG Sound Theme Specification
local/libdbusmenu-gtk3 16.04.0.r498-2
    Library for passing menus over DBus (GTK+ 3 library)
local/libhandy 1.8.2-1
    Library full of GTK+ widgets for mobile phones
local/libportal-gtk4 0.7.1-2
    GIO-style async APIs for most Flatpak portals - GTK 4 backend
local/ocrfeeder 0.8.5-2
    GTK document layout analysis and optical character recognition application
local/osm-gps-map 1.2.0-1
    Gtk+ Widget for Displaying OpenStreetMap tiles
local/pamac-gtk3 10.6.0-3
    A Package Manager based on libalpm with AUR and Appstream support (GTK3)
local/pamac-gtk3-debug 10.6.0-3
    Detached debugging symbols for pamac-gtk3
local/perl-gtk3 0.038-4
    Perl interface to the 3.x series of the GTK+ toolkit
local/perl-gtk3-imageview 10-3
    Image viewer widget for Gtk3
local/perl-gtk3-simplelist 0.21-1
    Perl interface to the Gtk3 complex MVC list widget
local/python-gobject 3.46.0-1
    Python bindings for GLib/GObject/GIO/GTK
local/qalculate-gtk 4.9.0-1
    GTK frontend for libqalculate
local/remmina 1:1.4.33-3
    remote desktop client written in GTK+
local/tlpui 1.6.1-1
    A GTK user interface for TLP written in Python
local/transmission-gtk 4.0.5-1
    Fast, easy, and free BitTorrent client (GTK+ GUI)
local/uget 2.2.3-6
    GTK download manager featuring download classification and HTML import
local/vte3 0.74.2-1
    Virtual Terminal Emulator widget (GTK3)
local/webkit2gtk 2.42.4-1
    Web content engine for GTK
local/wxwidgets-gtk3 3.2.4-3
    GTK+3 implementation of wxWidgets API for GUI
local/xdg-desktop-portal-gtk 1.15.1-1
    A backend implementation for xdg-desktop-portal using GTK
local/zbar 0.23.90-3
    Application and library for reading bar codes from various sources

And how have you configured gtk appearance under plasma?

Through Plasma settings, no matter what I choose, Breeze or Adwaita, all my GTK4 apps are broken.

After generating a backtrace for pamac(LibAdwaita version):

Core was generated by `/usr/bin/pamac-manager'.
Program terminated with signal SIGABRT, Aborted.
#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
44            return INTERNAL_SYSCALL_ERROR_P (ret) ? INTERNAL_SYSCALL_ERRNO (ret) : 0;                                                                                                        
[Current thread is 1 (Thread 0x7f2df09ca580 (LWP 17459))]
(gdb) bt full
#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
        tid = <optimized out>
        ret = 0
        pd = <optimized out>
        old_mask = {__val = {94291712016400}}
        ret = <optimized out>
#1  0x00007f2df2fd68a3 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
#2  0x00007f2df2f86668 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
        ret = <optimized out>
#3  0x00007f2df2f6e4b8 in __GI_abort () at abort.c:79
        save_stage = 1
        act = {__sigaction_handler = {sa_handler = 0x20, sa_sigaction = 0x20}, sa_mask = {__val = {139834578298884, 0, 140725573816688, 140725573816624, 9512942639200695040, 3221775552, 94293331548216, 2, 4294967291, 3221775552, 139834578305624, 3221775551, 139834578369047, 5, 9512942639200695040, 0}}, sa_flags = 1619531832, sa_restorer = 0x8}
#4  0x00007f2dc54a0b94 in  () at /usr/lib/dri/crocus_dri.so
#5  0x00007f2dc65ee1dc in  () at /usr/lib/dri/crocus_dri.so
#6  0x00007f2dc5a10aef in  () at /usr/lib/dri/crocus_dri.so
#7  0x00007f2dc558f03f in  () at /usr/lib/dri/crocus_dri.so
#8  0x00007f2dc54b9774 in  () at /usr/lib/dri/crocus_dri.so
#9  0x00007f2ddf4dce18 in  () at /usr/lib/libEGL_mesa.so.0
#10 0x00007f2ddf4cda04 in  () at /usr/lib/libEGL_mesa.so.0
#11 0x00007f2ddf4bd376 in  () at /usr/lib/libEGL_mesa.so.0
#12 0x00007f2df3a413eb in gdk_gl_context_real_end_frame (draw_context=<optimized out>, painted=<optimized out>) at ../gtk/gdk/gdkglcontext.c:679
        heap_rects = 0x0
        i = <optimized out>
        rects = 0x7ffd39d695b0
        stack_rects = {1359, 257, 5, 379, -888, -1, -548647718, 32557, -548648800, 32557, 1617371800, 21954, 1617349328, 21954, -335315165, 32557}
        j = <optimized out>
        n_rects = 1
        surface_height = 734
        scale = <optimized out>
        context = <optimized out>
        priv = 0x55c26100f5f0
        surface = <optimized out>
        display = 0x55c2675a9870 [GdkWaylandDisplay]
        egl_surface = 0x55c26293f9b0
#13 0x00007f2df39ee318 in gdk_wayland_gl_context_end_frame (draw_context=0x55c26100f640 [GdkWaylandGLContext], painted=0x7f2de4007d80) at ../gtk/gdk/wayland/gdkglcontext-wayland.c:81
        surface = 0x55c260668820 [GdkWaylandToplevel]
        impl = 0x55c260668820 [GdkWaylandToplevel]
        dx = <optimized out>
        dy = 0
#14 0x00007f2df3a3092b in gdk_draw_context_end_frame (context=0x55c26100f640 [GdkWaylandGLContext]) at ../gtk/gdk/gdkdrawcontext.c:441
--Type <RET> for more, q to quit, c to continue without paging--c
        priv = <optimized out>
        __func__ = "gdk_draw_context_end_frame"
#15 0x00007f2df3a7bbfc in gsk_gl_renderer_render (renderer=0x55c26066b2a0 [GskGLRenderer], root=0x55c2626dc3f0 [GskContainerNode], update_area=<optimized out>)
    at ../gtk/gsk/gl/gskglrenderer.c:318
        self = 0x55c26066b2a0 [GskGLRenderer]
        render_region = 0x55c26276b950
        viewport = {origin = {x = 0, y = 0}, size = {width = 1366, height = 734}}
        job = 0x55c262798b10
        surface = <optimized out>
        clear_framebuffer = <optimized out>
        scale = <optimized out>
        __func__ = "gsk_gl_renderer_render"
#16 0x00007f2df3a591a5 in gsk_renderer_render (renderer=0x55c26066b2a0 [GskGLRenderer], root=0x55c2626dc3f0 [GskContainerNode], region=<optimized out>) at ../gtk/gsk/gskrenderer.c:460
        priv = <optimized out>
        clip = 0x55c2607b5360
        __func__ = "gsk_renderer_render"
#17 0x00007f2df3874af2 in gtk_widget_render (widget=<optimized out>, surface=<optimized out>, region=0x55c267d76ee0) at ../gtk/gtk/gtkwidget.c:11969
        priv = <optimized out>
        snapshot = <optimized out>
        renderer = 0x55c26066b2a0 [GskGLRenderer]
        root = 0x55c2626dc3f0 [GskContainerNode]
        x = 0
        y = 0
#18 0x00007f2df3875a39 in surface_render () at ../gtk/gtk/gtkwindow.c:4800
Python Exception <class 'gdb.error'>: value has been optimized out

It seems to be a driver problem with latest mesa 23.3.1-1, after downgrading:

mesa (1:23.3.1-1 -> 1:23.1.9-1)
lib32-libva-mesa-driver (1:23.3.1-1 -> 1:23.1.9-1)
lib32-mesa (1:23.3.1-1 -> 1:23.1.9-1)

All pure GTK4 and LibAdwaita apps work again.

Edit 11/01/2024: The latest update mesa 23.3.3-1 pushed yesterday fixed the problem on my laptops (intel CPUs <=gen5), and now all my installed GTK4/LibAdwaita apps work fine without any problem.

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.