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

All unity games tested crashing in proton 7.0-1 and proton experimental (but not proton 6) #5658

Closed
2 tasks done
ryannathans opened this issue Mar 9, 2022 · 41 comments
Closed
2 tasks done
Labels
Regression Confirmed working on an older version of Proton

Comments

@ryannathans
Copy link

ryannathans commented Mar 9, 2022

Compatibility Report

  • Name of the game with compatibility issues: Bloons TD6, Phasmophobia
  • Steam AppID of the game: 960090, 739630

System Information

Pop OS 20.04
https://gist.github.com/ryannathans/9a326ee3cb9c05c1b09e9e99f39f1c36

I confirm:

  • that I haven't found an existing compatibility report for this game.
  • that I have checked whether there are updates for my system available.

Symptoms

Unity games seem to crash on startup with proton version >= 7, but launch without issue in proton 6.3-8. Non unity games, such as Control Ultimate Edition, launch without issue with proton >=7
Oddly, proton experimental worked on Bloons TD6 on Feb 10 for me, I believe this would have been proton 7 before 7.0-1 was released. Wonder what broke between Feb 10 and 7.0-1?

Reproduction

set steam play to proton experimental or 7.0-1 and launch bloons TD 6 or phasmophobia (probably any unity title but these are the two I have to test with)

@ryannathans ryannathans changed the title All unity games tested crashing in proton 7.0-1 and proton experimental All unity games tested crashing in proton 7.0-1 and proton experimental (but not proton 6) Mar 9, 2022
@ryannathans
Copy link
Author

Possibly related to #5504?

@kisak-valve kisak-valve added the Regression Confirmed working on an older version of Proton label Mar 9, 2022
@ipr
Copy link

ipr commented Mar 9, 2022

Which GPU do you have and what driver are you using? Or what do you assume you are using?

Your logs have this line:
WARNING: radv is not a conformant Vulkan implementation, testing use only.

I haven't seen that in any logs before.

@Blisto91
Copy link

Blisto91 commented Mar 9, 2022

@ipr It's fine. It shows up in some logs and should not cause issues.

@ryannathans
Copy link
Author

@ipr As per the system information log, I am running an AMD 6900XT on Mesa 21.3.7 using the kisak Mesa ppa. I don't know why this warning appears.

@Blisto91
Copy link

Blisto91 commented Mar 9, 2022

@ryannathans Does launching with this make a difference?

PROTON_NO_FSYNC=1 %command%

@ryannathans
Copy link
Author

@Blisto91 unfortunately not

@GlenMerlin
Copy link

This is happening for Tunic as well on my system

@LinuxForEveryone
Copy link

Can confirm this happens with Tunic on my Steam Deck as well -- but only in Desktop Mode?

@GlenMerlin
Copy link

Can confirm this happens with Tunic on my Steam Deck as well -- but only in Desktop Mode?

maybe this is an xorg vs. Wayland thing?

doesn't SteamOS mode use xorg and steam desktop mode use Wayland?

@ryannathans
Copy link
Author

Can confirm this happens with Tunic on my Steam Deck as well -- but only in Desktop Mode?

maybe this is an xorg vs. Wayland thing?

doesn't SteamOS mode use xorg and steam desktop mode use Wayland?

Pop OS 20.04 LTS does not use wayland

@LiamDawe
Copy link

Same here with Tunic. It works in gaming mode on Steam Deck normally, but the moment I connect up via HDMI even still in gaming mode it breaks and gives a unity error loading box.

@alasky17
Copy link
Collaborator

@KillYourFM Just to clarify - it sounds like the crash you are seeing with Tunic is happening immediately on launch before the game opens-- is that correct?

@LiamDawe Your report did not sound like it was happening on launch. If you have the deck connected via HDMI before launching the game, does the game crash on launch?

@LiamDawe @KillYourFM Also, the earlier reporters on this thread indicated that the crash was not happening on Proton 6.3-8 and only starts with Proton 7.0-1 - is that the case for the crash with Tunic that you are reporting? Could you also get logs of the crash on the deck? (easiest is just adding PROTON_LOG=1 %command% and logging into github in desktop mode to upload the logs which are stored at ~/steam-553420.log by default).

Also - do you have any unusual peripherals plugged into the deck? We have been unable to replicate any crash.

@farmboy0
Copy link

Did you create the proton prefixes for your games with Proton 6.3? If so they might not work with 7.0

@LiamDawe
Copy link

Sorry don't own Tunic any more (wasn't for me), but can confirm the same happens with The Planet Crafter that just came out. Proton 7 doesn't work, get the Unity crash screen.

Here's a log of this game specifically:
steam-1284190.log

Again, this one works with Proton 6, so here's a log from it working:
steam-1284190.log

@LiamDawe
Copy link

LiamDawe commented Mar 29, 2022

Another one for you, PowerWash Sim works fine with Proton 7, that is until I hook up HDMI on Steam Deck and then I just get the Unity crash screen (same issue as TUNIC).

Log file:
steam-1290000.log

This one again works fine with Proton 6.8 just like The Planet Crafter.

@Blisto91
Copy link

Blisto91 commented Mar 29, 2022

When you say hook up HDMI do you mean to an external monitor?
Maybe it's a multimonitor issue. Does anyone with the issue have only one monitor?

@LiamDawe
Copy link

As in HDMI out on the Steam Deck, one of the big features of it is the ability to hook up another screen and will be an even bigger thing when the official Dock is released. Unity games work fine handheld but seem to crash with the Unity error screen with Proton 7 when using HDMI on Deck.

@Blisto91
Copy link

Rgr understood.
My thought about the multimonitor thing is because I'm guessing it's still detecting the built in screen as a seperat monitor when you hook it up externally.

@ryannathans
Copy link
Author

I do have a couple monitors... interesting. I will test various multi monitor configurations tomorrow

@alasky17
Copy link
Collaborator

@LiamDawe Two of us so far have tried to reproduce the crash with a monitor plugged into the deck, and neither of us has been able to repro yet. Could you give more info about your setup - monitor resolution, specs, etc? any other peripherals plugged in besides the HDMI cord for the monitor? What kind of dock are you using to get the usb-c to HDMI conversion?

Could you also get a log of the failing setup with +event,+x11drv,+x11settings,+win,+system,+fshack?

@LiamDawe
Copy link

How would I do all that in the launch options? How exactly I mean should it look?

Guess what though: i found the issue.

Simply having my Logitech USB Receiver (for my wireless keyboard) plugged into the Dock (i just leave it in all the time so i don't lose it...) was causing it. As soon as I took that out, PowerWash Sim works as expected.

Tested repeated runs, every time it crashes with that plugged in. Even with the game loaded fine, if I plug that in -> instant Unity error screen and then it quits to Deck Library.

@HidYn
Copy link

HidYn commented Mar 29, 2022

Replying to #5658 (comment)

That's some good troubleshooting! I was having the exact same problem with Planet Crafter on Arch Linux and a AMD 6900XT and I have a Logitech G Pro Wireless Mouse. I took out the receiver and tried it wired and the Unity crash doesn't happen. Plugged it back in and we're back to crashing on Proton 7>

@GlenMerlin
Copy link

GlenMerlin commented Mar 29, 2022

Replying to #5658 (comment)

that's bizarre

I have a bluetooth usb adapter I'll try yanking that out later and see if I can get Tunic working on 7.0-1

@alasky17
Copy link
Collaborator

@LiamDawe Strangely we are still unable to repro. Could you give any more detail about which dock you are using? Also, have you tried current experimental-7.0-20220323? For the logging - you can add WINEDEBUG=+timestamp,+pid,+seh,+unwind,+debugstr,+loaddll,+mscoree,+event,+x11drv,+x11settings,+win,+system,+fshack %command% to the launch options for the game.

@LiamDawe @HidYn Can you think of anything special about your Logitech receivers or the devices they connect with? We are just using pretty standard Logitech wireless devices. Does the receiver have an orange star to indicate that it can be programmed for multiple Logitech devices?

@ryannathans
Copy link
Author

ryannathans commented Mar 29, 2022

I have a logitech MX vertical mouse that came with a logitech unifying receiver.

I have Solaar flatpak (1.1.1) installed to manage the settings for this device.

Removing the logitech receiver from my PC USB port successfully works as a workaround for the issue and I can now launch all my unity games in proton 7.0-1 and experimental

Maybe the HID issue in the stack trace for bloons TD6 wasn't a red herring after all

I plug it back in and same issue again.

Can get you some more logs later when I have some time to debug.

@alasky17
Copy link
Collaborator

@ryannathans @LiamDawe

After the connection about HID has come to light, I have some additional logging channels to request for when y'all grab logs:
WINEDEBUG=+timestamp,+pid,+seh,+unwind,+debugstr,+loaddll,+mscoree,+event,+x11drv,+x11settings,+win,+system,+fshack,+hid,+hidp,+hid_report,+plugplay,+rawinput,+dinput,+xinput,+joystick,+setupapi,+input %command%

@tyisafk
Copy link

tyisafk commented Mar 31, 2022

I have a wireless Logitech G mouse as well. I had an issue with Fall Guys immediately crashing and decided to try Tunic since I planned to pick it up anyway. Same crash, found this thread, unplugged the wireless receiver and now both games work and plugging it back in while Fall Guys is running and the game immediately crashed. That is really bizarre. It's only the wireless receiver causes the crash. The mouse connected to USB directly works fine.

@GlenMerlin
Copy link

GlenMerlin commented Mar 31, 2022

Can confirm this is happening with my HyperX Pulsefire Surge (a wired mouse!) as well

https://youtu.be/td2IB_aL4eQ video proof of this issue, the first launch my mouse is plugged in, the second I used KDE connect to control the mouse pointer and move it to the start button, it may look like the game had issues loading but I that is simply OBS's flatpak build being obnoxious.

I can also confirm it runs flawlessly with the mouse connected in Proton 6.8-3 and 5.13-6, unfortunately I don't own any other Unity games that don't have Linux Native versions to test this on

EDIT: My Setup

OS: Manjaro Linux Qonos 21.2.5
KERNEL: 5.16.14-1-MANJARO
CPU: AMD Ryzen 5 1600 Six-Core
GPU: AMD AMD DIMGREY_CAVEFISH (DRM 3.44.0, 5.16.14-1-MANJARO, LLVM 13.0.1) [RX 6600]
GPU DRIVER: 4.6 Mesa 21.3.7
RAM: 16 GB

Devices connected:
Steelseries Apex 3 Keyboard
HyperX Pulsefire Surge Wired Mouse
Power-A Wired Xbox One/Series X Gamepad

@Sojiro84
Copy link

@alasky17 here is my log with the commands you gave. In my case it is with the game KEO (also Unity) (bug report #5719), but I got the same issue.

I have a a wireless keyboard and mouse from Logitech. 2 USB receivers are plugged into my PC.

I ran the game with Proton 6.3-8 (7 and experimental crash immediately). The game works as long as I don't touch the mouse, but in this log I moved the mouse shortly after the intro was playing and then it generated a crash.

steam-1424910.log

@Sojiro84 Sojiro84 mentioned this issue Mar 31, 2022
2 tasks
@ryannathans
Copy link
Author

@ryannathans @LiamDawe

After the connection about HID has come to light, I have some additional logging channels to request for when y'all grab logs: WINEDEBUG=+timestamp,+pid,+seh,+unwind,+debugstr,+loaddll,+mscoree,+event,+x11drv,+x11settings,+win,+system,+fshack,+hid,+hidp,+hid_report,+plugplay,+rawinput,+dinput,+xinput,+joystick,+setupapi,+input %command%
steam-739630.log
steam-960090.log

hope this helps :)

@whizse
Copy link

whizse commented Mar 31, 2022

I noticed that one Unity game, Saint Kotar, started crashing with Proton 7.0.

A hacky workaround is to return HIDP_STATUS_SUCCESS early in HidP_SetUsages in dlls/hid/hidp.c

The actual crash seems to happen when HidD_FlushQueue is called.

@LiamDawe
Copy link

steam-1290000.log

With the debug options as requested, and yes it's the receiver with the orange star thing on it.

@ivyl
Copy link
Collaborator

ivyl commented Mar 31, 2022

Thanks for all the logs!

It looks like UnityPlayer.dll calls HidP_SetUsages() and one of the provided usages to set is 0, which is lower than caps->min_usage.

This causes bit = caps->start_bit + params->usage - caps->usage_min to be negative and then report_buf[bit / 8] |= (1 << (bit % 8)) writes outside of the array.

I'm now trying to figure out why this happens. Is it Wine feeding Unity bad data somewhere before? Is it programmer's error and Windows is just more robust here?

@whizse are you sure this crash happens to you in HidD_FlushQueue()? If you are confident in your assessment that would sound like a different crash.

@ivyl
Copy link
Collaborator

ivyl commented Mar 31, 2022

Ok. Looks like the issue is that Logitech's receivers expose HID devices with multiple top level collections (i.e. one device that exposes many "subdevices" like mouse, keyboard, etc.). Wine doesn't parse those quite right yet which then confuses Unity which in turn is trying to do something nonsensical and crashes. Proton 6.3 wasn't exposing those devices at all.

We've merged a fix that should help with that, it's currently in experimental bleeding-edge. You can enable it by searching Proton Experimental in your library, in properties go to "betas" tab and select "bleeding-edge". Please report if this fixed the game for you. After having the confirmation we'll try to release experimental-proper with the fix as soon as we can.

Warning: bleeding-edge is automated integration build that is not meant for general use. It's not tested for prefix upgrades/preservation and may require other bleeding-edge software (e.g. DirectX 12 requires Mesa 22). After testing please go back to stable experimental.

@LiamDawe
Copy link

God damn that was fast, excellent work to anyone involved in the patch.

I can confirm bleeding-edge fixes it for PowerWash Sim.

@ryannathans
Copy link
Author

Fantastic, will test tomorrow. Do we need to open an upstream issue for wine or is this an area of active development?

@whizse
Copy link

whizse commented Mar 31, 2022

Thanks for the quick fix! Can confirm that Saint Kotar starts now!

@ivyl
Copy link
Collaborator

ivyl commented Mar 31, 2022

The fix is now live in experimental-proper: https://github.com/ValveSoftware/Proton/wiki/Changelog/_compare/541074d4f8ae5d1fa649535ae705b7e87893ff90...50fef26d04ba0707e4959730e14741b4c7ae38c5

@ivyl
Copy link
Collaborator

ivyl commented Mar 31, 2022

Fantastic, will test tomorrow. Do we need to open an upstream issue for wine or is this an area of active development?

It's a known shortcoming and area of development. The issue should have only affected Proton as we expose many more HID devices there.

@ryannathans
Copy link
Author

Confirmed fixed, beautiful work :)

@grogniakss
Copy link

I encountered precisely the same issue where the game would open, display Unity and developer logos, and then transition to a black screen. I managed to resolve the problem by unplugging my USB wheel drive (Thrustmaster TX). I'm not entirely sure why, but it appears that USB devices may be a potential cause for this issue. Following this, I can now play any Unity game without any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Regression Confirmed working on an older version of Proton
Projects
None yet
Development

No branches or pull requests