Resizing some windows causes SEGFAULT when using Wayland and nvidia proprietary drivers
Here's the original issue https://gitlab.gnome.org/GNOME/mutter/-/issues/1336
Bug summary
Resizing windows running on the XWayland compatibility layer causes a segfault and a full crash of gnome-shell. Notably >Chromium based applications (chromium, VSCode, and Brave Browser) are affected. Any window created with the >
GDK_BACKEND=x11
environment variable set also cannot be resized without crashing.
Steps to reproduce
- On a system with an Nvidia graphics card, install nvidia proprietary drivers (nvidia and nvidia-utils packages on Arch).
- Ensure kernel modesetting is enabled (add a file in /usr/lib/modprobe.d/ containing
options nvidia-drm modeset=1
). Gnome will run with X11 backend if modesetting is not available.- Resize a Chromium window or any window created with the
GDK_BACKEND=x11
env var set.
My Setup
Arch Linux kernel 5.8.0
Gnome Shell version 3.36.4
Nvidia Driver 450.57
Backtrace
(gdb) bt full
#0 0x00007f4b3c24a355 in raise () from /usr/lib/libc.so.6
No symbol table info available.
#1 0x00007f4b3c233853 in abort () from /usr/lib/libc.so.6
No symbol table info available.
#2 0x000055daa12be28b in OsAbort () at ../xorg-server-1.20.8/os/utils.c:1351
No locals.
#3 0x000055daa12c78c7 in AbortServer () at ../xorg-server-1.20.8/os/log.c:879
No locals.
#4 0x000055daa12c7df4 in FatalError (f=0x55daa131f160 "Caught signal %d (%s). Server aborting\n") at ../xorg-server-1.20.8/os/log.c:1017
args = {{gp_offset = 24, fp_offset = 48, overflow_arg_area = 0x7ffed837d080, reg_save_area = 0x7ffed837cfc0}}
args2 = {{gp_offset = 8, fp_offset = 48, overflow_arg_area = 0x7ffed837d080, reg_save_area = 0x7ffed837cfc0}}
beenhere = 1
#5 0x000055daa12ba461 in OsSigHandler (signo=11, sip=0x7ffed837d1f0, unused=0x7ffed837d0c0) at ../xorg-server-1.20.8/os/osinit.c:156
No locals.
#6 <signal handler called>
No symbol table info available.
#7 xwl_eglstream_set_window_pixmap (window=0x55daa200af10, pixmap=0x55daa2020b40) at ../xorg-server-1.20.8/hw/xwayland/xwayland-glamor-eglstream.c:344
xwl_screen = 0x55daa1bcc9f0
xwl_eglstream = 0x55daa1c05410
pending = 0x55daa1d67d60
#8 0x000055daa10e4f0a in xwl_set_window_pixmap (window=0x55daa200af10, pixmap=0x55daa2020b40) at ../xorg-server-1.20.8/hw/xwayland/xwayland.c:736
screen = 0x55daa1bcc4b0
xwl_screen = 0x55daa1bcc9f0
#9 0x000055daa11f363c in damageSetWindowPixmap (pWindow=0x55daa200af10, pPixmap=0x55daa2020b40) at ../xorg-server-1.20.8/miext/damage/damage.c:1565
pDamage = 0x0
pScreen = 0x55daa1bcc4b0
pScrPriv = 0x55daa1d03bf0
#10 0x000055daa11cb91e in compSetPixmapVisitWindow (pWindow=0x55daa200af10, data=0x7ffed837d8d0) at ../xorg-server-1.20.8/composite/compwindow.c:122
pVisit = 0x7ffed837d8d0
pScreen = 0x55daa1bcc4b0
#11 0x000055daa11bc04c in TraverseTree (pWin=0x55daa200af10, func=0x55daa11cb8b5 <compSetPixmapVisitWindow>, data=0x7ffed837d8d0)
at ../xorg-server-1.20.8/dix/window.c:441
result = 32766
pChild = 0x55daa200af10
#12 0x000055daa11cb9b9 in compSetPixmap (pWindow=0x55daa200af10, pPixmap=0x55daa2020b40, bw=0) at ../xorg-server-1.20.8/composite/compwindow.c:144
visitRec = {pWindow = 0x55daa200af10, pPixmap = 0x55daa2020b40, bw = 0}
#13 0x000055daa11c7cb8 in compReallocPixmap (pWin=0x55daa200af10, draw_x=42, draw_y=43, w=1201, h=796, bw=0) at ../xorg-server-1.20.8/composite/compalloc.c:684
pScreen = 0x55daa1bcc4b0
pOld = 0x55daa200abc0
pNew = 0x55daa2020b40
cw = 0x55daa2016e30
pix_x = 42
pix_y = 43
pix_w = 1201
pix_h = 796
__PRETTY_FUNCTION__ = "compReallocPixmap"
#14 0x000055daa11cd5bf in compConfigNotify (pWin=0x55daa200af10, x=42, y=43, w=1201, h=796, bw=0, pSib=0x55daa2022ab0)
at ../xorg-server-1.20.8/composite/compwindow.c:810
pScreen = 0x55daa1bcc4b0
cs = 0x55daa1d67dc0
ret = 0
pParent = 0x55daa1c0f8b0
draw_x = 42
draw_y = 43
alloc_ret = 21978
#15 0x000055daa120916b in present_config_notify (window=0x55daa200af10, x=42, y=43, w=1201, h=796, bw=0, sibling=0x55daa2022ab0)
at ../xorg-server-1.20.8/present/present_screen.c:186
ret = 21978
screen = 0x55daa1bcc4b0
screen_priv = 0x55daa1d066e0
#16 0x000055daa11c17b9 in ConfigureWindow (pWin=0x55daa200af10, mask=12, vlist=0x55daa1fe9618, client=0x55daa1bca510) at ../xorg-server-1.20.8/dix/window.c:2375
ret = 0
pSib = 0x55daa2022ab0
pParent = 0x55daa1c0f8b0
sibwid = 0
index2 = 2717953808
tmask = 0
pVlist = 0x55daa1fe9620
x = 42
y = 43
beforeX = 42
beforeY = 43
w = 1201
h = 796
bw = 0
rc = 21978
action = 2
smode = 0
#17 0x000055daa117469b in ProcConfigureWindow (client=0x55daa1bca510) at ../xorg-server-1.20.8/dix/dispatch.c:916
pWin = 0x55daa200af10
stuff = 0x55daa1fe960c
len = 2
rc = 0
#18 0x000055daa11733b4 in Dispatch () at ../xorg-server-1.20.8/dix/dispatch.c:479
result = 0
client = 0x55daa1bca510
start_tick = 800
#19 0x000055daa11825e0 in dix_main (argc=16, argv=0x7ffed837dcd8, envp=0x7ffed837dd60) at ../xorg-server-1.20.8/dix/main.c:276
i = 1
alwaysCheckForInput = {0, 1}
#20 0x000055daa10f7f07 in main (argc=16, argv=0x7ffed837dcd8, envp=0x7ffed837dd60) at ../xorg-server-1.20.8/dix/stubmain.c:34
No locals.