anegostudios / VintageStory-Issues

Vintage Story's public issue tracker for reporting bugs, crashes and the like
43 stars 16 forks source link

Mouse does not capture in Wayland/Sway #3152

Open neirenoir opened 11 months ago

neirenoir commented 11 months ago

Game Version

v1.18.12 (and earlier)

Platform

Linux

Modded

None

SP/MP

None

Description

Ever since I bought the game and downloaded it on my NixOS desktop, I have been unable to play it. Everything works fine, save for one thing: the mouse cursor isn't captured. Since the mouse isn't captured, the camera cannot detect the mouse resetting to the center, and the camera just keep spinning like crazy, which makes the game unplayable.

I have tried to play Vintage Story in my NixOS laptop, which has an identical configuration save for it being Nvidia+Xorg based, and it works just fine, which makes me think the issue is with Wayland or Sway. Judging from the amount of other bug reports mentioning bugs related to Wayland input, but totally different to this one, makes me think it could have something to do with the way Sway implements the Wayland protocol.

Either way, I would like to hear from someone else if they experiencing these issues, or if I should report it somewhere else.

How to reproduce

  1. Run Vintage Story on a Sway session
  2. Open a world
  3. speeeeen

Screenshots

No response

Logs

No response

fazo96 commented 10 months ago

I have the same problem on NixOS with Hyprland. Did you find a workaround @neirenoir ?

neirenoir commented 10 months ago

Not at all. I have been awaiting reports of other users from Discord but it seems we are the only two people to run this on NixOS + Wayland. Having it happen in two different window managers, tho... maybe the issue should be reported on the NixOS repo instead?

fazo96 commented 8 months ago

I tried again (see https://github.com/NixOS/nixpkgs/issues/265817#issuecomment-1880105985) and now by enabling "Direct mouse mode" in the game settings, the game is playable, and the only issue is that the cursor stays visible instead of disappearing while the camera is moved

ghost commented 7 months ago

I've got the same problem on KDE Plasma 5 Wayland session (NixOS 23.11). Direct mouse mode also fixed the issue.

FERNANDOHYDE commented 5 months ago

Also having this exact issue on nix after specifically switching to wayland/plasma5.

**update Turns out I had immersive mouse mode on, which coupled with this issue DOES make inventories unusable. With that off it's playable with direct mouse mode.

pingouyn commented 5 months ago

If that helps troubleshooting, been playing both solo & server on Plasma 5.27.x, wayland session, kubuntu 23.10 without any issue including no issue with the mouse (no direct mouse mode required). I also tried the flatpak release at some point and it worked fine. I used this guide to configure the system: https://wiki.vintagestory.at/index.php/Installing_the_game_on_Linux/en

Could you maybe do the same install as above in a vm and see what relevant files are mismatched between NixOS and kubuntu?

fazo96 commented 2 months ago

I tested the flatpak package today (vs the nixos packaged version) and it doesn't have this issue. Other people report the same over here https://github.com/NixOS/nixpkgs/issues/265817

So it looks like this issue can be closed and it's a problem in some library or in the nixos packaging of the game.