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

Tabet movement inputs are completely dropped if built-in tablet support is disabled under Linux/Wayland. #21939

Open
timschumi opened this issue Dec 29, 2022 · 2 comments
Labels
osu!framework issue Can't resolve this without changes to osu!framework. platform/linux type:input

Comments

@timschumi
Copy link

Type

Game behaviour

Bug description

When disabling built-in tablet support (the intention being that I want to use the input events provided by my external instance of OpenTabletDriver), the game apparently stops processing movement events that are received from the tablet.

Button/Touch inputs continue to be processed, which are visible in the video through a jumping cursor, as the pen moved between me disabling tablet support and re-enabling it.

The issue can be mitigated temporarily by moving the cursor outside the window once, after which the game starts handling tablet movement inputs even with tablet support disabled. However, it breaks again once actual gameplay starts (as visible in the video, where the cursor suddenly stops shortly before the first hit objects show up). I haven't been able to confirm whether this also works on fullscreen mode, as the cursor isn't movable outside the window there. Simply tabbing out and tabbing back in doesn't appear to have the same effect, the cursor will stay frozen.

Note that this doesn't appear to affect setups that use X11, only Wayland.

The recorded video shows my OSes cursor above the in-game cursor. Note that this is not how it actually shows on screen, it's just how my OBS was configured and I figured it might be useful to see.

Screenshots or videos

osu-notablet.mp4

Version

2022.1228.0

Logs

input.log
network.log
performance.log
runtime.log

@SupDos
Copy link
Contributor

SupDos commented Dec 30, 2022

This is a known issue on Wayland with lazer, and it's listed on the OpenTabletDriver Linux FAQ page: https://opentabletdriver.net/Wiki/FAQ/Linux#osu-lazer-broken-input-wayland

To fix it, you need to set the enviroment variable SDL_VIDEODRIVER=wayland

@timschumi
Copy link
Author

Whoops, that's on me then. I believed that SDL switched their default from X11 to Wayland some time ago, but apparently they reverted that change shortly after.

If I'm following the discussion in libsdl-org/SDL#5527 correctly, most of the issues surrounding the Wayland videodriver appear to have been fixed, but the defaults change will not roll out until SDL 3.0.

Is there a possibility that we can just hint SDL to use Wayland over X11 (via SDL_SetHint(SDL_HINT_VIDEODRIVER, ...)) ourselves instead of relying on whatever default is hardcoded into SDL? Maybe I'll look into creating a PR for that to have it available for discussion/testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
osu!framework issue Can't resolve this without changes to osu!framework. platform/linux type:input
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants