Skip to content

Fix Weston crash on mouse move on Raspberry Pi - #13

Open
rahul-thakoor wants to merge 1 commit into
mainfrom
fix-pi-mouse-crash
Open

rahul-thakoor wants to merge 1 commit into
mainfrom
fix-pi-mouse-crash

Conversation

@rahul-thakoor

Copy link
Copy Markdown
Contributor

Fixes #9.

On Raspberry Pi, moving a USB mouse crashes Weston 14 with Assertion 'fb' failed in
drm_output_find_plane_for_view (state-propose.c). The assert was removed upstream in
d3ead778,
which first shipped after 14.x; Debian trixie only has 14.0.2.

This builds Weston 16.0.1 from source in a separate build stage. Only what the block uses is
built: the DRM backend, GL renderer, kiosk and desktop shells, and weston-debug. Runtime
libraries (glibc, Mesa, libdrm, libinput, ...) are still trixie packages.

Tested

Each device ran the display block from this branch with the browser block's latest release.
A USB mouse was plugged in after Weston started and moved across the screen, including over
the browser. Weston kept running with no assertion (restarts=0).

Raspberry Pi 4 (DSI touchscreen + USB mouse)

Raspberry Pi 4 Model B Rev 1.1
PRETTY_NAME="balenaOS 8.0.9+rev2"
6.12.94-v8
[09:04:06.044] weston 16.0.1
[09:04:06.118] using /dev/dri/card1
[09:04:08.502] GL version: OpenGL ES 3.1 Mesa 25.0.7-2+deb13u1
[09:04:08.502] GL renderer: V3D 4.2.14.0
[09:04:08.866] event4  - 10-0038 generic ft5x06 (79): is tagged by udev as: Touchscreen
[09:04:09.114] Output DSI-1 (crtc 90) video modes:
               800x480@60.0, preferred, current, 30.0 MHz
[09:04:09.114] associating input device event4 with output DSI-1 (none by udev)
[09:05:08.009] event5  - Telink Wireless Receiver Mouse: is tagged by udev as: Mouse
[09:05:08.009] event5  - Telink Wireless Receiver Mouse: device is a pointer
[09:05:08.011] associating input device event5 with output DSI-1 (none by udev)

Raspberry Pi 5 (HDMI + USB mouse)

Raspberry Pi 5 Model B Rev 1.0
PRETTY_NAME="balenaOS 8.0.9+rev1"
6.12.94-v8-16k
/display_17692551_4428177_644160b115a6234021e9df147d43f28f started 2026-10-21T06:43:12.144834124Z restarts=0
[06:43:12.820] weston 16.0.1
[06:43:12.931] Using rendering device: /dev/dri/renderD128
[06:43:12.931] EGL vendor: Mesa Project
               cursor planes: yes
[06:43:13.065] Loading module '/usr/local/lib/weston/kiosk-shell.so'
[06:44:19.012] event5  - Telink Wireless Receiver Mouse: is tagged by udev as: Mouse
[06:44:19.012] event5  - Telink Wireless Receiver Mouse: device is a pointer
[06:44:19.012] associating input device event5 with output HDMI-A-1 (none by udev)

Intel NUC (generic-amd64, DisplayPort + USB mouse)

Intel(R) Client Systems NUC7i3BNHXF
PRETTY_NAME="balenaOS 8.0.9+rev2"
SLUG="generic-amd64"
6.18.48-yocto-standard x86_64
/display_17693250_4428294_bfef7799507a387b6e4470c3f385e901 started 2026-10-21T07:11:49.804801215Z restarts=0
[07:11:50.691] weston 16.0.1
[07:11:50.875] Using rendering device: /dev/dri/renderD128
[07:11:50.875] EGL vendor: Mesa Project
               cursor planes: yes
[07:11:51.030] Loading module '/usr/local/lib/weston/kiosk-shell.so'
[07:14:01.118] event10 - Telink Wireless Receiver Mouse: is tagged by udev as: Mouse
[07:14:01.120] event10 - Telink Wireless Receiver Mouse: device is a pointer
[07:14:01.125] associating input device event10 with output DP-1 (none by udev)

Debian trixie's Weston 14.0.2 aborts with assert(fb) in
drm_output_find_plane_for_view (state-propose.c) when the mouse moves on
a Raspberry Pi. The assert was removed upstream after 14.x. Trixie has
no newer Weston, so build 16.0.1 from source in a separate stage.

- Build only the DRM backend, GL renderer, kiosk and desktop shells and
  weston-debug, install them under /usr/local and copy them into the
  runtime image.
- Take wayland-protocols >= 1.46 from trixie-backports; it is only
  needed at build time.
- Keep runtime libraries (glibc, Mesa, libdrm, libinput, ...) as trixie
  packages, and fail the build if a Weston binary has an unresolved
  library.
- Pass dpkg-buildflags to meson with
  DEB_BUILD_MAINT_OPTIONS=hardening=+all.

Fixes #9

Change-type: minor
Signed-off-by: rahul-thakoor <13220877+rahul-thakoor@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Weston mouse-move crash on Raspberry Pi

1 participant