forge icon indicating copy to clipboard operation
forge copied to clipboard

bug: gnome 44, alacritty, wayland => crash

Open crepererum opened this issue 2 years ago • 7 comments

Description

I don't know exactly where to file this bug, so I'm filing it here for visibility but we may wanna link Mutter/Gnome and Alacritty issues here.

When forge is enabled, I'm having trouble starting Alacritty. It fails with:

Buffer size (10x685) must be an integer multiple of the buffer_scale (2).

Starting Alacritty w/o forge works.

Problem Explanation

Some googling shows that this seems to be a common Wayland issue, but I'm not entirely sure if the compositor (=Mutter) or the client (=Alacritty) is too blame. Fact is that forge seems to trigger this issue.

Expected Behavior

Alacritty just works.

Reprodution

Steps To Reproduce

Steps to reproduce, if applicable:

  1. Get Gnome 44.1 and alacritty 0.12.0 and forge 68
  2. Start alacritty

Details

Mark with [ ] all that applies:

It happens with any application?

  • [ ] Yes, it applies to any application.
  • [x] No. Only with the following applications:
    • Aalacritty
  • [x] It works with the following applications that I have tried:
    • Basically all other apps

It happens only on one computer?

  • [x] I don't know.
  • [ ] No. I have tried it on more than one computer.

It happens only with some specific gnome configuration?

  • [x] I don't think that the configuration matters.
  • [ ] Yes. Only if the following config is set up:
    • Fill in a list with any configuration tha applies.

It happens only with some specific extension installed?

  • [x] I don't think that the installed extensions affect the bug/behavior.
  • [ ] Yes. Only if the following gnome extension is installed:
    • Fill in a list with any extension tha applies.
    • Fill in also any detail about the extensions that applies.

Diagnostics

Under what conditions does it happen?

Fill in all information that applies:

Environment

  • Distro version : Linux falconframe 6.3.2-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 11 May 2023 16:40:42 +0000 x86_64 GNU/Linux (uname -a)
  • GNOME Shell version: GNOME Shell 44.1 (gnome-shell --version)
  • Forge source : extensions.gnome.org (e.g: git branch or extensions.gnome.org)
  • Forge version : 68 (gnome-extensions show [email protected])

Display Setup

Displays:

  1. Notebook 2256x1504, 60Hz, Gnome Scale 200%

Output and Logs

Also if possible, please provide latest logs like:

May 17 20:20:10 falconframe systemd[1507]: Started Application launched by gnome-shell.
May 17 20:20:10 falconframe gnome-shell[1660]: Invalid window geometry for xdg_surface@45. Ignoring for now, but this will result in client termination in the future.
May 17 20:20:10 falconframe Alacritty.desktop[9922]: wl_surface@41: error 2: Buffer size (10x685) must be an integer multiple of the buffer_scale (2).
May 17 20:20:10 falconframe Alacritty.desktop[9922]: thread 'main' panicked at 'failed to dispatch wayland event queue: Os { code: 71, kind: Uncategorized, message: "Protocol error" }', alacritty/src/event.rs:1560:30
May 17 20:20:10 falconframe gnome-shell[1660]: WL: error in client communication (pid 9922)
May 17 20:20:10 falconframe Alacritty.desktop[9922]: note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
May 17 20:20:10 falconframe Alacritty.desktop[9922]: warning: queue 0x7f6ae0000ca0 destroyed while proxies still attached:
May 17 20:20:10 falconframe Alacritty.desktop[9922]:   zwp_primary_selection_offer_v1@4278190081 still attached
May 17 20:20:10 falconframe Alacritty.desktop[9922]:   wl_data_offer@4278190080 still attached
May 17 20:20:10 falconframe Alacritty.desktop[9922]:   zwp_primary_selection_device_v1@24 still attached
May 17 20:20:10 falconframe Alacritty.desktop[9922]:   zwp_primary_selection_device_manager_v1@20 still attached
May 17 20:20:10 falconframe Alacritty.desktop[9922]:   wl_data_device@23 still attached
May 17 20:20:10 falconframe Alacritty.desktop[9922]:   wl_seat@22 still attached
May 17 20:20:10 falconframe Alacritty.desktop[9922]:   wl_data_device_manager@21 still attached
May 17 20:20:10 falconframe Alacritty.desktop[9922]:   wl_registry@19 still attached
May 17 20:20:10 falconframe Alacritty.desktop[9922]: warning: queue 0x562068bbe1b0 destroyed while proxies still attached:
May 17 20:20:10 falconframe Alacritty.desktop[9922]:   wl_buffer@64 still attached
May 17 20:20:10 falconframe Alacritty.desktop[9922]:   wl_buffer@60 still attached
May 17 20:20:10 falconframe Alacritty.desktop[9922]:   wl_buffer@49 still attached
May 17 20:20:10 falconframe Alacritty.desktop[9922]:   wl_buffer@61 still attached
May 17 20:20:10 falconframe Alacritty.desktop[9922]:   wl_buffer@52 still attached
May 17 20:20:10 falconframe Alacritty.desktop[9922]:   wl_shm_pool@53 still attached
May 17 20:20:10 falconframe Alacritty.desktop[9922]:   wl_buffer@58 still attached
May 17 20:20:10 falconframe Alacritty.desktop[9922]:   wl_shm_pool@51 still attached
May 17 20:20:10 falconframe Alacritty.desktop[9922]:   wl_subsurface@44 still attached
May 17 20:20:10 falconframe Alacritty.desktop[9922]:   wl_surface@43 still attached
May 17 20:20:10 falconframe Alacritty.desktop[9922]:   wl_subsurface@42 still attached
May 17 20:20:10 falconframe Alacritty.desktop[9922]:   wl_surface@41 still attached
May 17 20:20:10 falconframe Alacritty.desktop[9922]:   wl_subsurface@40 still attached
May 17 20:20:10 falconframe Alacritty.desktop[9922]:   wl_surface@39 still attached
May 17 20:20:10 falconframe Alacritty.desktop[9922]:   wl_subsurface@38 still attached
May 17 20:20:10 falconframe Alacritty.desktop[9922]:   wl_surface@37 still attached
May 17 20:20:10 falconframe Alacritty.desktop[9922]:   wl_subsurface@36 still attached
May 17 20:20:10 falconframe Alacritty.desktop[9922]:   wl_surface@35 still attached
May 17 20:20:10 falconframe Alacritty.desktop[9922]:   xdg_wm_base@33 still attached
May 17 20:20:10 falconframe Alacritty.desktop[9922]:   xdg_activation_v1@14 still attached
May 17 20:20:10 falconframe Alacritty.desktop[9922]:   zwp_text_input_manager_v3@13 still attached
May 17 20:20:10 falconframe Alacritty.desktop[9922]:   zwp_pointer_constraints_v1@12 still attached
May 17 20:20:10 falconframe Alacritty.desktop[9922]:   zwp_relative_pointer_manager_v1@11 still attached
May 17 20:20:10 falconframe Alacritty.desktop[9922]:   wl_seat@10 still attached
May 17 20:20:10 falconframe Alacritty.desktop[9922]:   wp_fractional_scale_manager_v1@9 still attached
May 17 20:20:10 falconframe Alacritty.desktop[9922]:   wp_viewporter@8 still attached
May 17 20:20:10 falconframe Alacritty.desktop[9922]:   wl_subcompositor@7 still attached
May 17 20:20:10 falconframe Alacritty.desktop[9922]:   wl_output@6 still attached
May 17 20:20:10 falconframe Alacritty.desktop[9922]:   wl_shm@5 still attached
May 17 20:20:10 falconframe Alacritty.desktop[9922]:   wl_compositor@4 still attached
May 17 20:20:10 falconframe Alacritty.desktop[9922]:   wl_registry@2 still attached
May 17 20:20:10 falconframe Alacritty.desktop[9922]: warning: queue 0x562068bcbe80 destroyed while proxies still attached:
May 17 20:20:10 falconframe Alacritty.desktop[9922]:   wl_callback@63 still attached
May 17 20:20:10 falconframe Alacritty.desktop[9922]:   wl_surface@30 still attached

Extension Configuration

Command: dconf dump /org/gnome/shell/extensions/forge/

$ dconf dump /org/gnome/shell/extensions/forge/
[/]
css-last-update=uint32 37
tiling-mode-enabled=true
window-gap-size=uint32 0

Enabled Extensions

Command: gnome-extensions list --enabled --details

$ gnome-extensions list --enabled --details
[email protected]
  Name: Lock Keys
  Description: Numlock & Capslock status on the panel. Gnome version 3.30 and earlier users please install 44 version of the extension https://extensions.gnome.org/download-extension/lockkeys%40vaina.lt.shell-extension.zip?version_tag=26229 
  Path: /home/tom/.local/share/gnome-shell/extensions/[email protected]
  URL: https://github.com/kazysmaster/gnome-shell-extension-lockkeys
  Version: 52
  State: ENABLED

dock-from-dash@fthx
  Name: Dock from Dash
  Description: Dock for GNOME Shell 40+. Does use native GNOME Shell Dash. Very light extension.

 Hover the bottom of your screen and GNOME Shell dash will appear without overview and will hide when you leave the dash. Native GNOME Shell click behavior is modified: minimize if one window is open, overview if many windows are open. Scroll on the dock to change workspace. Some preferences in UI (thanks @rastersoft).

 I'm not notified of messages here, please report bugs only through GitHub.
  Path: /home/tom/.local/share/gnome-shell/extensions/dock-from-dash@fthx
  URL: https://github.com/fthx/dock-from-dash
  Version: 63
  State: ENABLED

[email protected]
  Name: Forge
  Description: Tiling and window manager for GNOME

Please report bugs/issues on https://github.com/jmmaranan/forge/issues
  Path: /home/tom/.local/share/gnome-shell/extensions/[email protected]
  URL: https://github.com/jmmaranan/forge
  Version: 68
  State: ENABLED

[email protected]
  Name: Impatience
  Description: Speed up the gnome-shell animation speed
  Path: /home/tom/.local/share/gnome-shell/extensions/[email protected]
  URL: http://gfxmonk.net/dist/0install/gnome-shell-impatience.xml
  Version: 22
  State: ENABLED

Graphics information

Command: lshw -C display

$ lshw -C display
  *-display
       description: VGA compatible controller
       product: Alder Lake-P Integrated Graphics Controller
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 0c
       width: 64 bits
       clock: 33MHz
       capabilities: vga_controller bus_master cap_list rom
       configuration: driver=i915 latency=0
       resources: iomemory:600-5ff iomemory:400-3ff irq:147 memory:605c000000-605cffffff memory:4000000000-400fffffff ioport:3000(size=64) memory:c0000-dffff memory:4010000000-4016ffffff memory:4020000000-40ffffffff

Monitor information

See above, no X, it's Wayland.

crepererum avatar May 17 '23 18:05 crepererum

The problem also does NOT occur under gnome 42, it just appeared after the upgrade to version 44.

crepererum avatar May 17 '23 18:05 crepererum

Hi @crepererum, to confirm, Alacritty crashes in Wayland and not Gnome 44? Also, did you try to restart gnome-shell? This happens to me sometimes on Blackbox flatpak but usually after updating the app. Restarting the OS fixes it.

jmmaranan avatar May 17 '23 21:05 jmmaranan

I ran Alacritty 0.12.0 in GNOME 44.0 but not GNOME 44.1 - it is working and not crashing. I am using Boxes though to test (slight flicker in that VM).

Screencast from 2023-05-19 21-54-35.webm

jmmaranan avatar May 20 '23 01:05 jmmaranan

to confirm, Alacritty crashes in Wayland and not Gnome 44?

I don't understand that question. Alacritty crashes, when Gnome 44 runs in "Wayland" mode (not the old-style X11 mode). But Gnome 44 / Wayland itself (i.e. the display server and shell) don't crash.

Also, did you try to restart gnome-shell? This happens to me sometimes on Blackbox flatpak but usually after updating the app. Restarting the OS fixes it.

It's pretty much independent of restarts / updates. Also I used a non-sandboxed version of Alacritty (i.e. no flatpak involved).

I ran Alacritty 0.12.0 in GNOME 44.0 but not GNOME 44.1 - it is working and not crashing. I am using Boxes though to test (slight flicker in that VM).

Can you try to set the Gnome display scale to 200%? (Settings > Display > select your monitor > scale: 200%).

crepererum avatar May 22 '23 08:05 crepererum

Was asking if Gnome or the Alacritty crashes. I will try to see if display scale 200% reproduces it

jmmaranan avatar May 23 '23 21:05 jmmaranan

OK, so the assertion might be part of mutter actually, but the effect is that Alacritty gets killed. This is new in Gnome 44 probably due to https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2815

I'm somewhat surprised that an extension can trigger that. Maybe the positioning code in forge should round the window sizes based on the display scale?

crepererum avatar Jun 15 '23 09:06 crepererum

I had a similar issue recently where alacritty crashes with a similar error message. I did not trace the issue back to forge and I fixed it by building and running alacritty from the master branch. This might help: https://github.com/alacritty/alacritty/issues/7241

chen-ky avatar Oct 29 '23 21:10 chen-ky