[Linux] Lazer randomly loses viewport, with the game still running in the background
Type
Crash to desktop
Bug description
I am not sure why, but after updating flatpak version it started crashing after a couple of seconds after opening, no matter how you interact with the game, and i have no fix for it. Before the update everything worked flawlessly. Tested it out on gnome and everything is exactly the same. If you have a tablet you can still interact with the game when the window is closed
Note: it may seem that the issue occurs when starting the level, but that's a coincidence.
Nixos 24.11 Open-source amd driver Kde 6 + wayland
Screenshots or videos
https://github.com/user-attachments/assets/04257bb4-a36b-4482-9baa-75741013820d
Version
2025-221-0
Logs
I am experiencing the exact same. The window disappears and is no longer on the taskbar, but the game keeps running like you tabbed out of the game with the music filter and volume changed. When running the flatpak in a console, once the window disappears, it logs an error: wp_linux_drm_syncobj_surface_v1#56: error 3: explicit sync is used, but no buffer is attached
I have the same issue, but it seems to only affect native wayland. I start the game with SDL_VIDEODRIVER=wayland and got the problem. If I start it without this and osu runs thru xwayland it seems to be fine. I just use the appimage from the release page.
please try OSU_SDL3=0 envvar
@bdach This seems to fix it, with both SDL_VIDEODRIVER=wayland and OSU_SDL3=0
Yep, around 5 minutes of gameplay and it's stable
This seems to be the same issue that I was facing at #26210 though I've had this issue for over a year now so it's probably not related to SDL3 on my end. I have SDL_VIDEODRIVER=wayland set as well.
osu!lazer freezes on Fedora 6.12.13-200.fc41.x86_64 with GNOME 47 Wayland, since version 2025.220.0.
I can reproduce the bug, just keeping click the setting button at top left for a few times, then osu will freeze at foreground. I click the windows(super) key to show activities overview and back, osu back to normal.
run osu with OSU_SDL3=0 environment variable seems to fix it
It was recently reported that this issue may be fixed.
@zamonary1 Try setting envvar OSU_SDL3=1 and reproducing your original issue again:
- If you can reproduce the issue, note down your current configuration (if it has changed).
- If you can't reproduce, close the issue (as completed). Keep playing osu! with
OSU_SDL3=1. - If you notice a different issue, open a new issue (search first). Link to it in your comment.
Good evening,
I recently updated my game and I have started getting this issue (non-issue before). The logs show:
2026-05-14 18:35:57 [verbose]: SDL video log [error]: Wayland display connection closed by server (fatal)
This can happen after a very long session or just after a view minutes. I believe this to be related to: https://github.com/ppy/osu-framework/pull/6746
This is posted on behalf of nullptr_osu on Discord:
I believe I found the root cause of the problem. It boils down to concurrently calling
SDL_GL_SwapWindow()andSDL_WarpMouseInWindow()from different threads while SDL3 marks both of those function to be thread unsafe:\threadsafety This function should only be called on the main thread.The problem happens only when receiving input from a tablet (
SDL_WarpMouseInWindow()doesn't seem to be called otherwise on my system) and when the multithreaded mode is enabled (but could still cause frame pacing issues as detailed in the NVIDIA quote at the end of this post).Detailed mechanism
The exact problem is this:
SDL_GL_SwapWindow()eventually callseglSwapBuffers()which generates several wayland protocol messages:
wp_linux_drm_syncobj_surface_v1#54.set_acquire_point&wp_linux_drm_syncobj_surface_v1#54.set_release_pointwl_surface#39.attachwl_surface#39.framewl_surface#39.commitSDL_WarpMouseInWindow()which is implemented inSDL_waylandmouse.ccallswl_surface_commit(window->surface)When the concurrent execution interleaves in such a way that the surface commit from the mouse warp ends up after the syncobj setup from the swap window but before the attach it errors out:
{Default Queue} -> wp_linux_drm_syncobj_surface_v1#54.set_acquire_point(wp_linux_drm_syncobj_timeline_v1#65, 0, 40537) {Default Queue} -> zwp_pointer_constraints_v1#14.lock_pointer(new id zwp_locked_pointer_v1#78, wl_surface#39, wl_pointer#40, nil, 1) {Default Queue} -> zwp_locked_pointer_v1#78.set_cursor_position_hint(1526.55078125, 493.91015625) {Default Queue} -> wl_surface#39.commit() {Default Queue} -> zwp_locked_pointer_v1#78.destroy() {Default Queue} -> zwp_pointer_constraints_v1#14.confine_pointer(new id zwp_confined_pointer_v1#66, wl_surface#39, wl_pointer#40, nil, 2) {Default Queue} -> wp_linux_drm_syncobj_surface_v1#54.set_release_point(wp_linux_drm_syncobj_timeline_v1#65, 0, 40538) {EGLSurface(39)} -> wl_surface#39.attach(wl_buffer#4278190081, 0, 0) {EGLSurface(39)} -> wl_surface#39.frame(new id wl_callback#73) {EGLSurface(39)} -> wl_surface#39.commit() {EGLSurface(39)} -> wl_display#1.sync(new id wl_callback#59) {Default Queue} wl_pointer#40.motion(41398484, 1525.60156250, 501.53515625) {Default Queue} wl_pointer#40.frame() discarded [unknown]#78.[event 0](0 fd, 8 byte) {Display Queue} wl_display#1.delete_id(79) {Display Queue} wl_display#1.error(wp_linux_drm_syncobj_surface_v1#54, 3, "Acquire point set but no buffer attached") wp_linux_drm_syncobj_surface_v1#54: error 3: Acquire point set but no buffer attachedThe NVIDIA implementation of
eglSwapBuffershas this to say about it:In particular, an application MUST NOT send a wl_surface.commit request for a surface concurrently with an eglSwapBuffers call. Due to the lack of orthogonality between surface changes and the lack of any synchronization across multiple requests, surface commits in Wayland are not thread-safe. Even with a single thread, due to limitations in the fifo-v1 and presentation-time protocols, sending a wl_surface.commit request at all outside of eglSwapBuffers will break frame throttling, and may result in discarded frames.
If the above is accurate (which I cannot - or am unwilling to, really - verify) then my understanding is that wayland basically does not allow for tablet input processing via OTD on a separate thread from draw at all, and as such it would basically be required to couple the two (which is just a little less than what setting single threaded does).
wayland - once more - is apparently the only one of multiple OSes and their compositors that has this problem, and I am unsure how the game is to resolve this in a way that would not compromise the point of multithreaded. Which is to say, probably no action will be taken. Maybe aside from forcing wayland users to play single threaded which I bet will go over well! /s
As this is effectively a wontfix, I should mention that, at least for NVIDIA devices, a possible workaround is setting __NV_DISABLE_EXPLICIT_SYNC=1. Unfortunately, I don't remember if there is an equivalent envvar for AMD GPUs
There's not much to do from osu! side anyway. SDL behavior explained in https://github.com/ppy/osu/issues/32015#issuecomment-5196451716 is essentially a hack for Wayland compositors, that haven't implemented wp_pointer_warp_v1 protocol.
Major compositors (KDE ≥6.5, GNOME ≥49) seem to already have it, so this shouldn't affect most of linux/wayland players.