bottlesdevs / wine

Repository for Vaniglia CI builds
Other
46 stars 10 forks source link

[Bug]: Using GNOME Shell gestures crashes programs running in Bottle #41

Open elmagio opened 2 years ago

elmagio commented 2 years ago

Describe the bug

It happens no matter which Windows game/program I'm running, whether I'm running them windowed/fullscreen or within a virtual desktop. I can open the GNOME overview or switch workspace if I use keyboard shortcuts, but it will invariably crash if I use the 3-finger gestures baked into GNOME while the windows program is in focus, giving this output:

X Error of failed request: BadMatch (invalid parameter attributes) Major opcode of failed request: 131 (XInputExtension) Minor opcode of failed request: 28 (X_GetDeviceButtonMapping) Serial number of failed request: 197 Current serial number in output stream: 197 X Error of failed request: BadMatch (invalid parameter attributes) Major opcode of failed request: 131 (XInputExtension) Minor opcode of failed request: 28 (X_GetDeviceButtonMapping) Serial number of failed request: 369 Current serial number in output stream: 369 X Error of failed request: BadMatch (invalid parameter attributes) Major opcode of failed request: 131 (XInputExtension) Minor opcode of failed request: 28 (X_GetDeviceButtonMapping) Serial number of failed request: 2711 Current serial number in output stream: 2711

This is something that I haven't had happen running games on regular Wine, on Lutris or on Steam Proton outside of Bottles. My main Bottle is fairly unmodified from default settings (I've experimented turning a few settings on and off, to no difference), but to make sure I tried it with a fresh Bottle and it crashed the same way, same terminal output.

To Reproduce

  1. Running on GNOME Shell's Wayland session
  2. Launch a .exe from a Bottle
  3. Do a three-finger up swipe to open the overview

Package

Flatpak from Flathub

Distribution

Ubuntu 22.04

Troubleshooting Logs

Version: 2022.7.28-brescia-2
Display:
    X.org: true
    X.org (port): :99.0
    Wayland: true
Graphics:
    vendors:
        intel:
            vendor: intel
            envs:
                DRI_PRIME: '1'
            icd: /usr/lib/x86_64-linux-gnu/GL/vulkan/icd.d/intel_icd.x86_64.json:/usr/lib/i386-linux-gnu/GL/vulkan/icd.d/intel_icd.i686.json
    prime:
        integrated: null
        discrete: null
Kernel:
    Type: Linux
    Version: 5.15.0-46-generic
Distro:
    Name: GNOME
    Version: '"42 (Flatpak runtime)"'
Disk:
    Total: 8269156352
    Free: 8269008896
RAM:
    MemTotal: 15.4GiB
    MemAvailable: 10.3GiB
Bottles_envs: null

Display Protocol

Wayland

Display Backend used by Bottles

Wayland

Additional context

No response

elmagio commented 2 years ago

I hadn't thought anything about it yesterday which is why I made this issue, but it does seem to actually be due to Wine upstream issues, also being tracked for Proton, but seemingly a rather recent one which is why it didn't affect my system Wine and others. I have been able to reproduce the issue with an assortment of soda (7.0-2), caffe and Lutris based Bottles, but if I set it to my system wine (7.0 Ubuntu) there is no issue.

I'll leave it up to you whether to close this issue as it clearly has to do with upstream, or to leave it open for tracking.

mirkobrombin commented 2 years ago

So the bug hit 7.0+ versions and not 7.0. What is the exact version of your system wine?

May also be caused by a patch in our runners.

Moving to the right repository

elmagio commented 2 years ago

So the bug hit 7.0+ versions and not 7.0. What is the exact version of your system wine?

Well, I'm actually not too sure now. In Bottles, I selected the "sys-wine-7.0" for the runner option so I assumed my system Wine was 7.0, but when typing "wine --version" in a shell it returns "wine-6.0.3 (Ubuntu 6.0.3~repack-1)".

Others I've also tested caffe-6.23, caffe-7.10, Vaniglia 7.11, vaniglia 6.18, Lutris 5.21-2, Lutris 6.0 and they all exhibit the issue. The only runner I'm not having an issue with is sys-wine-7.0.

From my research online, this issue seems to be quite a mess. Some have it only with Proton (or Proton based runners), but others report it happening with basic Wine, some say it only happens only with DXVK enabled, but some have it happen regardless (I've tried with DXVK on and off).

Have you been able to reproduce the issue?

mirkobrombin commented 2 years ago

That's weird. I'm not able to reproduce with Soda or Caffe

elmagio commented 2 years ago

If there's something you want me to test out to help you diagnose this, let me know. Do think it might just have to be fixed upstream.

mirkobrombin commented 2 years ago

Are there useful logs?

elmagio commented 2 years ago

Besides the error log in my initial message, I am not sure which logs would be relevant. I would be happy to provide any you request, though.

Some additional stuff I found: The issue was reported to be happening on KDE as well, which they worked around on their side by pushing a merge request that stops Kwin forwarding DE gestures to applications. The same proposal was made for GNOME/Mutter here, but so far GNOME devs have rejected the idea of a workaround.

One thing that does work is manually disabling the forwarding of gestures to all XWayland programs with this command: xinput list --name-only | grep ^xwayland-pointer-gestures | xargs -n1 xinput disable

The DE still receives the gestures so you don't lose that functionality, they just don't get to the applications. It might cause issues with some XWayland programs, but I've yet to find one.

mirkobrombin commented 2 years ago

I think this is not a bug in our end, I tried to replicate in any way without success

Aman9das commented 1 year ago

For others like me struggling to apply the workaround persistently, add an Xinput-Disable-XWayland-Gestures.desktop file to ~/.config/autostart/ to run the command at startup.

Its content should be like:

[Desktop Entry]
Encoding=UTF-8
Type=Application
Terminal=false
Exec=xinput disable xwayland-pointer-gestures:16
Icon=/usr/share/icons/Papirus-Dark/64x64@2x/apps/libinput-gestures.svg
Name=Xinput-Disable-XWayland-Gestures
Comment=Fix Wine Crash on Gesture Use
X-GNOME-Autostart-enabled=true

Edit the Exec=... line according your own output of xinput list --name-only | grep ^xwayland-pointer-gestures

All3xJ commented 1 year ago

Bug still present

afzl-wtu commented 1 year ago

Same here wine app crashes when swiping three fingers.

Aleksandar204 commented 10 months ago

Still present on Fedora 39, using wayland. Both two (zoom or move in app view) and three finger gestures crash all apps. Using the flatpak version of bottles from flathub

Superdistro999 commented 10 months ago

is there any other way around it that is possible instead of disabling the gestures as i am only using gestures to navigate through my work flow or using any other gestures works like touch egg or other please let me know

another-sapiens commented 9 months ago

Here's a workaround which doesn't require disabling gestures. It works for most of my games, at least.

You need to enable the Virtual Desktop; but not from "Advanced Display Settings", as for some reason this crashes all the programs. Instead, scroll down to "Legacy Wine Tools", and click on "Configuration". You'll see a GUI with a different style and a bunch of tabs. Click on "Graphics", and activate the option that says "Emulate Virtual Desktop". In Desktop Size, type your current resolution. Apply and try your game again. Gestures should work.