Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DRM] - Constant input events during wlserver_init() at startup cause a crashloop on a wlserver_is_lock_held() assert #1746

Open
3 of 6 tasks
matte-schwartz opened this issue Feb 11, 2025 · 1 comment

Comments

@matte-schwartz
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Are you using any gamescope patches or a forked version of gamescope?

  • The issue occurs on upstream gamescope without any modifications

Current Behavior

Due to a busted controller stuck in lizard mode on my MSI Claw, I found a case where we can cause gamescope to get stuck in a crashloop if constant mouse events are emitted during gamescope's startup in the DRM backend.

Checking my journal shows we are hitting an assert here: gamescope: ../src/wlserver.cpp:2345: void wlserver_mousemotion(double, double, uint32_t): Assertion `wlserver_is_lock_held()' failed.

Steps To Reproduce

You can reproduce this on any Steam Deck

  1. On SteamOS, switch to desktop mode
  2. While in desktop mode, start the switch to game mode
  3. Before the Steam logo appears, start holding down the Steam button on Deck and move the right touchpad to send constant mouse events

You should see gamescope fail to initialize due to the above assert.

Hardware information

- Distro: SteamOS, CachyOS (Arch Linux)
- CPU: Intel Core Ultra 7 258V 
- GPU: Intel Lunar Lake [Intel Arc Graphics 130V / 140V]
- Driver Version: Mesa 25.1.0-devel (git-9ef01a0f98)

Software information

- Desktop environment: N/A
- Session type: gamescope-session
- Gamescope version: gamescope version 3.16.1+ (gcc 14.2.1)
- Gamescope launch command(s): standard gamescope-session

Which gamescope backends have the issue you are reporting?

  • Wayland (default for nested gamescope)
  • DRM (default for embedded gamescope, i.e. gamescope-session)
  • SDL
  • OpenVR

Logging, screenshots, or anything else

coredump:
#0  0x00007ffb9b2a18cb in pthread_kill () from /usr/lib/libc.so.6
#1  0x00007ffb9b242098 in raise () from /usr/lib/libc.so.6
#2  0x00007ffb9b225578 in abort () from /usr/lib/libc.so.6
#3  0x00007ffb9b2254de in ?? () from /usr/lib/libc.so.6
#4  0x00007ffb9b238876 in __assert_fail () from /usr/lib/libc.so.6
#5  0x0000556ea0aa422b in wlserver_mousemotion (dx=0, dy=5, time=675273) at ../src/wlserver.cpp:2345
#6  0x0000556ea0a9ed04 in wlserver_handle_pointer_motion (listener=0x556eac7e4308, data=0x7ffc26482280) at ../src/wlserver.cpp:345
#7  0x00007ffb9be2755e in wl_signal_emit_mutable () from /usr/lib/libwayland-server.so.0
#8  0x0000556ea0c86270 in handle_pointer_motion (event=0x556eac758270, pointer=0x556eac8ddaa0) at ../subprojects/wlroots/backend/libinput/pointer.c:37
#9  0x0000556ea0c85c06 in handle_libinput_event (backend=0x556eac656dc0, event=0x556eac758270) at ../subprojects/wlroots/backend/libinput/events.c:161
#10 0x0000556ea0c84c9a in handle_libinput_readable (fd=48, mask=1, _backend=0x556eac656dc0) at ../subprojects/wlroots/backend/libinput/backend.c:59
#11 0x0000556ea0c84eb3 in backend_start (wlr_backend=0x556eac656dc0) at ../subprojects/wlroots/backend/libinput/backend.c:109
#12 0x0000556ea0c82266 in wlr_backend_start (backend=0x556eac656dc0) at ../subprojects/wlroots/backend/backend.c:57
#13 0x0000556ea0c8864c in multi_backend_start (wlr_backend=0x556eac6cd5a0) at ../subprojects/wlroots/backend/multi/backend.c:32
#14 0x0000556ea0c82266 in wlr_backend_start (backend=0x556eac6cd5a0) at ../subprojects/wlroots/backend/backend.c:57
#15 0x0000556ea0aa2bd6 in wlserver_init () at ../src/wlserver.cpp:1834
#16 0x0000556ea0a98f48 in main (argc=26, argv=0x7ffc26482688) at ../src/main.cpp:960
@matte-schwartz matte-schwartz changed the title [DRM] - Constant mouse events during wlserver_init() at startup cause a crashloop on a `wlserver_is_lock_held()' assert [DRM] - Constant mouse events during wlserver_init() at startup cause a crashloop on a wlserver_is_lock_held() assert Feb 11, 2025
@matte-schwartz matte-schwartz changed the title [DRM] - Constant mouse events during wlserver_init() at startup cause a crashloop on a wlserver_is_lock_held() assert [DRM] - Constant input events during wlserver_init() at startup cause a crashloop on a wlserver_is_lock_held() assert Feb 12, 2025
@matte-schwartz
Copy link
Author

the issue can be reproduced with touch input events as well so I've updated the title accordingly. was able to get the same crash just by holding a finger on the touch display during gamescope-session loading on SteamOS Stable 3.16.21 and the SteamOS 3.7 Preview Candidate.

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

No branches or pull requests

1 participant