Skip to content

Wayland clients crash with Broken pipe when switching between displays on ChromeOS Crostini #56079

Backlog

Description

@rafalchojnacki

Preflight Checklist

Electron Version

45.4.1

What operating system(s) are you using?

Other (specify below)

Operating System Version

ChromeOS 158.0.8127.65 (Official Build) (64-bit)

What arch are you using?

x64

Last Known Working Electron version

No response

Does the issue also appear in Chromium / Google Chrome?

I don't know how to test

Expected Behavior

Electron applications running on ChromeOS with the native Wayland backend should handle display configuration changes (connecting, disconnecting, or switching between internal and external monitors) without crashing or terminating their Wayland connection.

Windows should remain functional and correctly update their display configuration when Wayland outputs are removed, added, or reconfigured.

Actual Behavior

Overview

Signal Desktop and Visual Studio Code are installed as native amd64 Linux Electron applications in a Debian 12 Crostini (LXC) container hosted on ChromeOS. This is the standard way of running these applications on ChromeOS (they don't have native ChromeOS counterparts).

The reported failure is a Wayland-connection failure during a display topology change, not evidence by itself of a GPU failure:

  • Signal crashes during display switching with Fatal Wayland communication error: Broken pipe.
  • VS Code also exhibits the issue.
  • Other Wayland applications remain operational.
  • Signal reproduces with --disable-gpu.
  • A previously obtained Signal Wayland trace reportedly shows output removal and output re-announcement before the connection failure.

Test Scenarios

Scenario 1

Test steps:

  • start application when laptop lid is closed and the laptop is connected to an external monitor connected
  • then the lid opened and the external monitor disconnected

Both applications were launched with --ozone-platform=wayland and then failed during the same display-topology transition.

  • At 09:33:02.816, both apps saw one 2560x1440 output; 11 ms later they saw a second 1920x1080 output. At 09:33:05.159-.163, the topology was updated and reduced to one output.
  • At 09:33:05.171, Signal logged Fatal Wayland communication error: Broken pipe from wayland_event_watcher.cc:358.
  • At 09:33:05.171, VS Code logged the same error from wayland_event_watcher.cc:78.
  • Thus both clients failed approximately 8 ms after the final output update.

The display logs identify resolutions and layout transitions but do not reliably label the physical internal versus external display.

Scenario 2

Test steps:

  • start application when laptop lid is open and the laptop is disconnected from an external monitor
  • then connect to the external monitor and close the lid

Both applications were alive after launch and both exited with the same fatal Wayland error at 09:38:00.902-.906 (VS Code first, Signal 4 ms later). This confirms the failure for that sequence, but the absence of a snapshot between connect and lid-close means it does not yet isolate which of those two actions triggers it.

Before the sequence, the process snapshot confirmed native Wayland launch:

  • Signal PID 812: /opt/Signal/signal-desktop --ozone-platform=wayland.
  • VS Code PID 813: /usr/share/code/code --new-window --ozone-platform=wayland.
  • Both created GPU processes with --render-node-override=/dev/dri/renderD128
    and Sommelier Wayland peers through the wayland-0 parent instance.

Versions information

Application and runtime versions

Application Application package version Installed executable Electron runtime Bundled Chromium/Chrome Bundled Node.js Evidence
Signal Desktop 8.36.0 /opt/Signal/signal-desktop (via /usr/bin/signal-desktop) 45.4.1 156.0.8078.100 24.22.3 dpkg-query; binary strings include Chrome/156.0.8078.100 Electron/45.4.1; embedded Node download/build strings identify node.js/v24.22.3.
Visual Studio Code 1.148.0-1795526052 /usr/share/code/code (launcher /usr/bin/code) 43.8.10 150.0.7871.250 24.22.1 dpkg-query; binary strings include Chrome/150.0.7871.250 Electron/43.8.10; ELECTRON_RUN_AS_NODE=1 /usr/share/code/code -p 'JSON.stringify(process.versions)' returned Node 24.22.1, Electron 43.8.10, and Chrome 150.0.7871.250.

Operating system and architecture

Item Observed value Evidence
Linux distribution Debian GNU/Linux 12 (bookworm) /etc/os-release
Kernel 6.6.147-09723-g76038b445ba2 uname -a
CPU architecture x86_64 uname -m
Debian package architecture amd64 dpkg --print-architecture
Containerization LXC systemd-detect-virt returned lxc; root mount is an LXC container rootfs
Crostini/Termina evidence Yes ChromeOS-built kernel (/proc/version) and ChromeOS 9p mount at /mnt/chromeos; Linux apps run in the container, not directly on the ChromeOS host

Wayland environment

Item Observed value
WAYLAND_DISPLAY wayland-0
XDG_SESSION_TYPE wayland
XDG_RUNTIME_DIR /run/user/1000
DISPLAY :0
Wayland sockets /run/user/1000/wayland-0 and wayland-1, both Unix-domain sockets; corresponding lock files exist
Launcher flags Signal desktop entry launches /opt/Signal/signal-desktop %U; Code launches /usr/share/code/code %F; neither entry contains an ozone flag
Relevant Sommelier process/command line Captured after reproduction: parent Sommelier instances PID 488 on --socket=wayland-1 and PID 491 on --socket=wayland-0, both with --stable-scaling --enable-linux-dmabuf; Xwayland-facing instances PID 471 (--x-display=1) and PID 478 (--x-display=0) also use --stable-scaling --enable-linux-dmabuf.
Other Wayland apps survive Reported observation; not independently reproduced in this collection

Graphics and displays

The Crostini-visible DRM device is virtualized, so it is not sufficient to
identify the ChromeOS host physical GPU or displays:

  • /sys/class/drm/card0/device/uevent: DRIVER=virtio-pci, PCI ID
    1AF4:1050; /sys/class/drm/card0/device/driver resolves to
    virtio-pci.
  • /sys/class/drm exposes card0, renderD128, and virtual connectors
    Virtual-1 through Virtual-16; no connector reported a mode and each
    reported enabled=disabled at collection time.
  • /dev/dri is not available in the diagnostic shell. xrandr could not
    open :0, and wayland-info is not installed.

Testcase Gist URL

No response

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    • Status
      👀 Unsorted Items

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions