https://bugs.winehq.org/show_bug.cgi?id=53114
Bug ID: 53114 Summary: Crash of applications and games when out of focus Product: Wine-staging Version: unspecified Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: major Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: ryu.ketsueki@outlook.com CC: leslie_alistair@hotmail.com, z.figura12@gmail.com Distribution: ---
I don't know why this happens but every wine application I could test, they need to stay on focus in the current virtual desktop (from the Desktop Environment, not Wine's virtual desktop) or else they will simply close on their own. I can't track to a specific cause because even with a completely new prefix with no "helpers", Lutris and even Valve's own Proton, this happens. So far I got the exact same result with The Sims 4, StarCraft 2 and Sonic After the Sequel. All those games will close if I change to another virtual desktop, let's say, desktop 2, if the apps themselves are on desktop 1. It also happened with the releases but it persists with Staging as well. I don't know how to backtrace this, as launching them through CLI didn't return anything useful and I'm not sure if wine itself is what is crashing or the applications. I didn't get the classic crash window either. They simply close.
https://bugs.winehq.org/show_bug.cgi?id=53114
--- Comment #1 from Rafał Mużyło galtgendo@o2.pl --- Is this a regression ?
How many apps did you test besides the mentioned ones ?
While wine (at least winex11.drv) doesn't handle desktop switches correctly (it minimizes then restores instead of unmapping/remapping), this usually doesn't result in the app terminating.
https://bugs.winehq.org/show_bug.cgi?id=53114
--- Comment #2 from Rafał Mużyło galtgendo@o2.pl --- ...also, which window manager are you using ?
https://bugs.winehq.org/show_bug.cgi?id=53114
--- Comment #3 from ryu.ketsueki@outlook.com --- (In reply to Rafał Mużyło from comment #2)
...also, which window manager are you using ?
I tested with two WMs and the same thing happens on both. Twin and Kwin. But I'm not exactly sure if the WMs are causing this because it didn't happen before. I am used to have this set up of different virtual desktops and wine applications on one of them while I do stuff on the other one. While I did observe it happening with Proton, I assumed it was because Valve's own implementation of Wine got something wrong so I didn't care that much about it. It only started happening outside of Proton when I started using a new wineprefix. It's not generated by Lutris, PlayOnLinux, winetricks or anything. I just nuked the prefix and created a new one by launching winecfg once. I didn't do anything else with that prefix. The old prefix is gone, so I can't do comparison between them.
https://bugs.winehq.org/show_bug.cgi?id=53114
--- Comment #4 from ryu.ketsueki@outlook.com --- By the way, different display servers doesn't seem to have any effect whatsoever. KWin is running on a Wayland session while TWin is on a X11 one, so it happens on both
https://bugs.winehq.org/show_bug.cgi?id=53114
--- Comment #5 from ryu.ketsueki@outlook.com --- (In reply to Rafał Mużyło from comment #1)
Is this a regression ?
How many apps did you test besides the mentioned ones ?
While wine (at least winex11.drv) doesn't handle desktop switches correctly (it minimizes then restores instead of unmapping/remapping), this usually doesn't result in the app terminating.
Those are the only apps I use with Wine. I didn't test any other. At first I thought there had something to do with The Sims 4 and StarCraft 2 originally running in fullscreen but Sonic After the Sequel doesn't so it can't be that either. Also believed it could have been how those apps handle being out of focus but this only happens if they are in a different virtual desktop. If they are just below another window, they don't close, from what I could see.
https://bugs.winehq.org/show_bug.cgi?id=53114
--- Comment #6 from Rafał Mużyło galtgendo@o2.pl --- AFAIK, wine doesn't have a pure wayland backend and (as you've mentioned yourself) KWin - so a XWayland case, meaning still winex11.drv.
Anyway, my initial guess would go along you providing WINEDEBUG="win,event,x11drv" output (likely someone else could suggest a better selection of channels, but these seem a good start).
https://bugs.winehq.org/show_bug.cgi?id=53114
--- Comment #7 from ryu.ketsueki@outlook.com --- (In reply to Rafał Mużyło from comment #6)
AFAIK, wine doesn't have a pure wayland backend and (as you've mentioned yourself) KWin - so a XWayland case, meaning still winex11.drv.
Anyway, my initial guess would go along you providing WINEDEBUG="win,event,x11drv" output (likely someone else could suggest a better selection of channels, but these seem a good start).
Following your instructions, I added that WINEDEBUG parameter in the environment before running the app again and this is the output I got. I saw lots of fixmes (which I assume are not related) and traces, although this time there was something different at the bottom, two X Error of failed request. I ran this on KWin. I'll make the same test on TWin as soon as possible to make sure it is the same cause.
https://bugs.winehq.org/show_bug.cgi?id=53114
--- Comment #8 from ryu.ketsueki@outlook.com --- Here's the output I forgot to attach: https://pastebin.com/5Z8QK4rB
https://bugs.winehq.org/show_bug.cgi?id=53114
--- Comment #9 from Rafał Mużyło galtgendo@o2.pl --- Technicality: logs should be attached, not be links to external resources.
As for the log, *I* can't tell much, but what I can tell is that those minimize/restore paths appear to not be hit.
Though perhaps it's a UseTakeFocus problem ? Does setting it to false ('N') either globally (HKEY_CURRENT_USER\Software\Wine\X11 Driver) or for specific app (via app compatibility keys) makes a difference (google for details) ?
https://bugs.winehq.org/show_bug.cgi?id=53114
--- Comment #10 from ryu.ketsueki@outlook.com --- The entire key is missing on my end. It doesn't have a key for the x11 driver.
https://bugs.winehq.org/show_bug.cgi?id=53114
--- Comment #11 from Austin English austinenglish@gmail.com --- (In reply to ryu.ketsueki from comment #10)
The entire key is missing on my end. It doesn't have a key for the x11 driver.
It's not there by default.
https://bugs.winehq.org/show_bug.cgi?id=53114
--- Comment #12 from ryu.ketsueki@outlook.com --- So do I create the key? As what value? String, Binary, DWORD, I have no idea. All I know is that I have to put an N there
https://bugs.winehq.org/show_bug.cgi?id=53114
--- Comment #13 from Austin English austinenglish@gmail.com --- (In reply to ryu.ketsueki from comment #12)
So do I create the key? As what value? String, Binary, DWORD, I have no idea. All I know is that I have to put an N there
If you have winetricks, the easiest way would be to run 'winetricks usetakefocus=n'. Otherwise, use 'wine regedit' then edit like you would on windows (value is a string).
https://bugs.winehq.org/show_bug.cgi?id=53114
--- Comment #14 from ryu.ketsueki@outlook.com --- I did just that. App gets terminated same way. I also tried changing the type of the window, after all this game allow you to change between Fulscreen, Windowed Fullscreen and Windowed. Same result always. Output on konsole also show the same error, so nothing changed with that new key. I also tried using winetricks to input the key but there was no change.
https://bugs.winehq.org/show_bug.cgi?id=53114
CapSel wine.15c9@capsel.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |wine.15c9@capsel.org
--- Comment #15 from CapSel wine.15c9@capsel.org --- Could you check if the crash is caused by touchpad multitouch gestures or by alt+tab too?
https://bugs.winehq.org/show_bug.cgi?id=53114
Fedor zhadaevfm@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |zhadaevfm@gmail.com
--- Comment #16 from Fedor zhadaevfm@gmail.com --- (In reply to CapSel from comment #15)
Could you check if the crash is caused by touchpad multitouch gestures or by alt+tab too?
I've just faced the same issue and it only occurs with touchpad multitouch gestures. alt+tab works fine.
https://bugs.winehq.org/show_bug.cgi?id=53114
--- Comment #17 from ryu.ketsueki@outlook.com --- (In reply to CapSel from comment #15)
Could you check if the crash is caused by touchpad multitouch gestures or by alt+tab too?
I don't think it is being caused by multitouch trackpad gestures. TWin is the window manager from Trinity Desktop, a fork of KDE3 3.5 and it doesn't support trackpad gestures for that, or if it does, I don't use it. I used keyboard shortcuts to change to another virtual desktop there. So yeah, can confirm it happens without gestures. I don't know if it has anything to do with how the window is in another state when in a different virtual desktop but if it is in the same, doesn't happen.
https://bugs.winehq.org/show_bug.cgi?id=53114
--- Comment #18 from Fedor zhadaevfm@gmail.com --- (In reply to Fedor from comment #16)
(In reply to CapSel from comment #15)
Could you check if the crash is caused by touchpad multitouch gestures or by alt+tab too?
I've just faced the same issue and it only occurs with touchpad multitouch gestures. alt+tab works fine.
Forgot to mention the configuration: System: Fedora 36 Environment: GNOME on Wayland Wine version: wine-7.10 (Staging) Application: World of Warcraft
https://bugs.winehq.org/show_bug.cgi?id=53114
--- Comment #19 from ryu.ketsueki@outlook.com --- (In reply to ryu.ketsueki from comment #17)
(In reply to CapSel from comment #15)
Could you check if the crash is caused by touchpad multitouch gestures or by alt+tab too?
I don't think it is being caused by multitouch trackpad gestures. TWin is the window manager from Trinity Desktop, a fork of KDE3 3.5 and it doesn't support trackpad gestures for that, or if it does, I don't use it. I used keyboard shortcuts to change to another virtual desktop there. So yeah, can confirm it happens without gestures. I don't know if it has anything to do with how the window is in another state when in a different virtual desktop but if it is in the same, doesn't happen.
Correction. It IS being caused by touchpad gestures. TWin is no longer an example of the bug in question. I also just opened an issue on KDE Bugzilla because I don't think it would be feasible to fix this but on Wine side if it is being caused by something on KWin side
https://bugs.winehq.org/show_bug.cgi?id=53114
--- Comment #20 from ryu.ketsueki@outlook.com --- A possible workaround for this issue on KDE side is being made. You can check the merge request here:
https://invent.kde.org/plasma/kwin/-/merge_requests/2651
What it appears to be happening is that WM gestures are being passed on to applications, which triggers the wine applications to terminate for not knowing what to do. Of course it is not a perfect solution, as we still have to figure out what is happening on Wine side but at least is an effort to prevent that from happening on Plasma, which does run as desktop mode for the Steam Deck. Now I don't know what can be done for this issue to be avoided on Gnome as well, at least for the time being. If someone has already reported it to Gnome devs, please post here.
https://bugs.winehq.org/show_bug.cgi?id=53114
albertgeanta@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |albertgeanta@gmail.com
--- Comment #21 from albertgeanta@gmail.com --- I just want to add that this is not specific to Plasma as it also happens on Gnome, and it's also not specific to the 3 finger swipe gestures, I have noticed that it also happens with e.g. pinch-in/-out gestures, but those aren't so problematic as they don't have other intended functions.
https://bugs.winehq.org/show_bug.cgi?id=53114
--- Comment #22 from ryu.ketsueki@outlook.com --- (In reply to albertgeanta from comment #21)
I just want to add that this is not specific to Plasma as it also happens on Gnome, and it's also not specific to the 3 finger swipe gestures, I have noticed that it also happens with e.g. pinch-in/-out gestures, but those aren't so problematic as they don't have other intended functions.
Yeah, it exists on Gnome too. I don't use Gnome and don't know how to report the issue to them so if anyone can, so they can come up with a workaround until Wine can find an actual fix...
https://bugs.winehq.org/show_bug.cgi?id=53114
--- Comment #23 from albertgeanta@gmail.com --- (In reply to ryu.ketsueki from comment #22)
(In reply to albertgeanta from comment #21)
I just want to add that this is not specific to Plasma as it also happens on Gnome, and it's also not specific to the 3 finger swipe gestures, I have noticed that it also happens with e.g. pinch-in/-out gestures, but those aren't so problematic as they don't have other intended functions.
Yeah, it exists on Gnome too. I don't use Gnome and don't know how to report the issue to them so if anyone can, so they can come up with a workaround until Wine can find an actual fix...
I did submit an issue: https://gitlab.gnome.org/GNOME/mutter/-/issues/2353
https://bugs.winehq.org/show_bug.cgi?id=53114
msizanoen@qtmlabs.xyz changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |msizanoen@qtmlabs.xyz
--- Comment #24 from msizanoen@qtmlabs.xyz --- This issue can currently be worked around with the following command: ``` xinput list --name-only | grep ^xwayland-pointer-gestures | xargs -n1 xinput disable ``` Please note that this will disable touchpad gestures for ALL X11 applications. To revert this, run the same command with `disable` replaced with `enable`.
https://bugs.winehq.org/show_bug.cgi?id=53114
--- Comment #25 from albertgeanta@gmail.com --- (In reply to msizanoen from comment #24)
This issue can currently be worked around with the following command:
xinput list --name-only | grep ^xwayland-pointer-gestures | xargs -n1 xinput disable
Please note that this will disable touchpad gestures for ALL X11 applications. To revert this, run the same command with `disable` replaced with `enable`.
Thanks a lot this workaround is great, as I only use xwayland for games anyways!
https://bugs.winehq.org/show_bug.cgi?id=53114
mistermagio@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mistermagio@gmail.com
--- Comment #26 from mistermagio@gmail.com --- (In reply to msizanoen from comment #24)
This issue can currently be worked around with the following command:
xinput list --name-only | grep ^xwayland-pointer-gestures | xargs -n1 xinput disable
Please note that this will disable touchpad gestures for ALL X11 applications. To revert this, run the same command with `disable` replaced with `enable`.
Thanks for the workaround ! Is there a way to make this persist through reboots?
https://bugs.winehq.org/show_bug.cgi?id=53114
Aman Das amandas62640@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |amandas62640@gmail.com
--- Comment #27 from Aman Das amandas62640@gmail.com --- (In reply to mistermagio from comment #26)
(In reply to msizanoen from comment #24)
This issue can currently be worked around with the following command:
xinput list --name-only | grep ^xwayland-pointer-gestures | xargs -n1 xinput disable
Please note that this will disable touchpad gestures for ALL X11 applications. To revert this, run the same command with `disable` replaced with `enable`.
Thanks for the workaround ! Is there a way to make this persist through reboots?
I was struggling to apply the workaround persistently too. Found a solution: 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`
https://bugs.winehq.org/show_bug.cgi?id=53114
7erxk5uav@mozmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |7erxk5uav@mozmail.com
https://bugs.winehq.org/show_bug.cgi?id=53114
Capybara capybaraserene@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |capybaraserene@gmail.com
--- Comment #28 from Capybara capybaraserene@gmail.com --- The Xwayland wine touchpad gesture crash should be stopped by this fix recently merged into xserver.
https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1215