#[1.0.3-rc3] [Linux] Input causes lag spikes after leaving game open for too long

118 messages ยท Page 1 of 1 (latest)

harsh tartan
#

It seems when leaving the game open for too long (haven't timed how long yet, I just know this doesn't seem to happen upon short play sessions) any input from the mouse/keyboard causes lag spikes. When not touching anything it runs fine, and restarting the game fixes it.
This doesn't happen with any of my other games and my system seems fine (thermals are all good, nothings being overworked), so I'm guessing this is something caused by Shapez 2 and not my system.

Attached;

  • A video of the problem in action (with all the debug charts open so you can see it better)
  • Player.log from the session the video was taken from
  • My save file
  • The output of debug.sysinfo and what my Graphics settings are.

Linux setup in-case that's relevant; Arch Linux on Kernel 7.0.3-arch1-2 under Niri (Wayland Compositor)
Steam launch args gamescope -w 2560 -h 1440 -r 240 -- %command% (from ProtonDB, apparently that's what lets it run under Wayland?)

Thanks for any help! If I've missed something just let me know

gusty sinewBOT
#

Thank you for reporting this bug! Our team will review your report soon.
Feel free to add more details in follow-up messages โ€” we're also scanning for duplicate reports automatically now.
๐Ÿ“จ There are currently 35 reports awaiting team review. Due to the high volume, it may take a little longer for us to get to yours.
โฐ Our team is off on weekends, so it may take a bit longer for us to review your report. Thank you for your patience!

gusty sinewBOT
gusty sinewBOT
sudden notch
harsh tartan
#

I can but can I ask how your meant to run the game under Wayland then? Cus it just seems to crash instantly upon launching when it's off

gusty sinewBOT
#

โœ… Thank you for providing further information, our team will have a look again!

sudden notch
#

Try this:
It will hopefully allow the game to be opened in windowed mode.
But be warned, once you get in and try to change it back to full screen it will most likely crash again. It does seem to work sometimes if the fullscreen is less than native.
Locate this folder: ~/.config/unity3d/tobspr Games/shapez 2/
Place the prefs file within that folder
Place Display.json within the Local folder.

harsh tartan
#

Still immediete crashes unfortunately

sudden notch
harsh tartan
#

No, looks like it starts in Windowed

#

thank you discord

#

there

sudden notch
#

Wow. that is quick on its decision to not start ๐Ÿ™

harsh tartan
#

o, got a crash in Player.log actually

gusty sinewBOT
# harsh tartan
๐Ÿ“‹ Log File Analysis

Log Analysis (Player.log):

  1. Fatal Runtime Error: A fatal error occurred in the Mono runtime or one of the native libraries, with native fault reporting also failing, leaving some diagnostic information unavailable.
#

Shapez 2 can crash when switching graphics settings while using Linux.
To Do โ€ข Priority: Critical โ€ข Fix: Post 1.0 โ€ข Game: 0.1.1

shapez 2 can crash or become unstable on Linux when changing Graphics settings such as resolution and window mode, then applying them. The issue was observed in rc1 and may also occur on startup if the game attempts to apply outdated Graphics settings from a previous version. It does not appear to affect all Linux users, and the reproduction rate is unknown. Expected behavior is that the game remains stable after applying Graphics changes. The team is investigating whether DirectX 12 usage co...
๐Ÿ’ฌ Threads: [1.0.2-rc1] Crash when hitting apply in

#

Crash on startup
Done โ€ข Priority: Medium โ€ข Fix: Version 0.0.9 โ€ข Game: 24.2.2 โ€ข Resolution: Won't Fix

shapez 2 crashes on startup on Linux with a SIGSEGV error in native code, occurring after recent OS package updates (such as mesa, mutter, vulkan-loader, xwayland). The game was previously working with older package versions. The issue appears related to compatibility between the native Linux build and updated system libraries. Running the game under Proton is a workaround, though sound issues were also reported in that configuration. There is currently no fix planned on the game side.
๐Ÿ’ฌ Threads: [1.0.3-rc3 Linux] Game launches for a fe, [1.0.3-rc3] Linux | detects wrong resolu

#

Linux: Crash when losing focus if in full screen or borderless mode
To Do โ€ข Priority: Highest โ€ข Fix: Probably Never โ€ข Game: 6.5.5

On Linux (KDE Plasma and Ubuntu), shapez 2 crashes instantly when the game loses focus while in fullscreen or borderless screen mode. The crash is triggered by alt-tabbing, pressing the Windows key, or clicking outside the game window. It also reportedly crashes when a Steam achievement is earned. The game should continue running when losing focus regardless of screen mode. The issue was previously observed on Bazzite but has since resolved there for unknown reasons.
๐Ÿ’ฌ Threads: [1.0.3-rc3 Linux] crashes every time the, [0.1.1] Linux - Game crash on FN key pre

#

Mono RAM continuously climbs then periodically drops, causing severe low 0.1% fps events
To Do โ€ข Priority: High โ€ข Fix: Probably Never

Mono RAM continuously climbs over time and then periodically drops sharply, causing severe low 0.1% fps events. This can be observed by enabling debug charts and watching the memory cycle of constant increase followed by sudden drops. Each drop corresponds to a garbage collection event that triggers a significant performance stall. The expected behavior is that memory remains relatively stable without forcing large garbage collection passes. This has been identified as a natural side effect o...
๐Ÿ’ฌ Threads: mono ram is constantly climbing and then

sudden notch
#

It's detecting vulkan 2 times at the beginning. No idea what that means.

harsh tartan
#

I technically have my dedicated GPU and an APU in my cpu, could be probing for vulkan support on both?

sudden notch
#

It does it with the first log file with gamescope as well

sudden notch
#

I will test on ubuntu on my system that can see if the same thing happens.

harsh tartan
#

Cool, if it doesn't maybe an arch thing then

sudden notch
# harsh tartan Cool, if it doesn't maybe an arch thing then

It's happening on my system as well and its showing both the integrated graphics + my rx6600 without any crashing.
The next thing that should happen in your log file is applying graphics settings.
Can you tell me the folder you put Display.json into? That is the file that it applies.

harsh tartan
#

~/.config/unity3d/tobspr Games/shapez 2/Local

sudden notch
# harsh tartan

That totally should have worked ๐Ÿ™
Then it might be an arch thing as you have said.
It doesn't work with proton?

harsh tartan
#

I'll go quickly test with Proton, as well as a different compositor first in-case it's Niri causing issues

#

Alright, it launches on KDE

#

So it's the Niri WM i'm using

#

Strange, no idea why Shapez would care about that

#

And yeah Proton was fine on Niri

sudden notch
#

looks up Niri WM

harsh tartan
#

Lmao, yeah if you don't want to deal with that I'm happy to just run it as proton and call it there cus I know you have better things to be doing than debugging a WM that almost nobody else probably uses

#

Just tried Jazzpunk (another unity game with native linux builds, although older engine version) and it runs fine so not sure what's happening with shapez specifically

sudden notch
#

I wish it was just that simple.
A lot of people are having issues with Linux and AMD GPUs currently.

#

And Shapez 2

harsh tartan
#

Strange

sudden notch
#

It's a problem with the version of unity the game uses. I am not sure of the exact specifics.

#

The moment I swapped the rx6600 with a RTX5060 on ubuntu the problems just ceased.

#

And now the RTX5060 is in its box because its nice to have the problem being reproducible for possible work arounds etc.

harsh tartan
#

What Unity version is it? I've still got Unity Hub installed so can screw around with it to try to see if I can find whats causing it at least for you

sudden notch
harsh tartan
#

Oh yeah I would imagine, for the record this is most likely just Unity's problem and not yours, just curious if I can find a workaround or something

#

Thanks

sudden notch
#

Thanks for being understanding ๐Ÿ™‚

harsh tartan
#

Just made an empty project and built it, same error it would seem. What's interesting is when I force OpenGL it runs fine, only when I make the graphics API Vulkan does it die

#

Does Shapez let you change the graphics API on linux native or is it always forced to Vulkan?

#

Yeah. Shapez native runs with the -force-glcore flag just fine

#

So something with Unity's Vulkan impl is the issue

#

Rendering issues with some stuff but tbf if you guys don't support it that's expected

#

Enabling srgb write mode fixes Vulkan for my little unity project, can't test this on Shapez obviously myself so you'll have to fill me in there

sudden notch
#

What exactly does that do?

harsh tartan
#

thats what Unity says, in truth graphics api stuff is a weak point for me so can't comment that much on it

#

not even sure what the alternative to srgb color space unity would be trying without it

#

Ah, of course... that method doesn't exist in their docs lol

sudden notch
harsh tartan
#

True

#

Just tried it on KDE again to see if it fixes the fullscreen/tabbing out issues that were linked and so far it looks fine yep - -force-glcore and the game's perfectly happy lol

#

Without it it'll crash either upon the loading bar starting or upon tabbing out

sudden notch
#

Its running in opengl when that is set. Unless I messed with something I shouldn't have.

harsh tartan
#

As in when it's first loading or?

sudden notch
harsh tartan
#

Oh

#

Wait

#

What?

#

So the game uses OpenGL fully

sudden notch
#

Badly but yeah.

harsh tartan
#

Why does it log out vulkan stuff then lmfao

#

I thought it was in Vulkan the entire time

#

In that case I'm even more confused as to why that launch arg fixes it

sudden notch
#

Do you know for sure your mini test was running in vulkan, and not opengl?

harsh tartan
sudden notch
#

I might be doing something wrong. I don't usually mess around with anything like this.

harsh tartan
#

Wait, nevermind I misunderstood you - Yeah your fine
I thought you meant shapez uses OpenGL anyways, regardless of that launch flag - I now realize you meant when that flag is set only otherwise it goes into Vulkan

#

Yeah nah in that case your right, that flag forces it into OpenGL yeah

#

And removing it should make the game go back to vulkan and crash

sudden notch
#

Trying something else.

sudden notch
#

Got it running with vulkan with SRGB Write Mode is on, but it's still crashing.

harsh tartan
#

Same stack trace?

#

With the weird internal mono error

sudden notch
harsh tartan
#

Yeah seems to be

sudden notch
#

Well, it was an interesting experiment ๐Ÿ˜‰

harsh tartan
#

Let me try something with my project

#

So its crashing with the fullscreen thing ye?

sudden notch
#

It appears to work if the resolution is less than native, but still fullscreen

#

or borderless

harsh tartan
#

Yup, again Unity bug

#

Little test game does the same - Exclusive fullscreen crashes but fullscreen windowed doesn't

#

Now the question is why ๐Ÿค”

sudden notch
#

Yeah ๐Ÿ™

harsh tartan
#

Try enabling "Aquire Swapchain image as late as possible"

#

Literally two options below SRGB Write

sudden notch
#

Not right now. Work actually finished a few hours ago. I need a break ๐Ÿ˜›

harsh tartan
#

That fixes it for me lmao, it seems the key is to keep pressing random checkboxes until it works

sudden notch
#

Give me a screenshot of what it looks like for when I test it?

harsh tartan
#

the one in blue

sudden notch
#

What does your linux API options look like?

harsh tartan
#

Not sure why swapchain would have any effect either unless its just getting it too early while trying to fullscreen the application but thats unity for ya

harsh tartan
sudden notch
#

Before mine was set to auto and had Vulkan + opengl as options after I turned it off.
And I think it defaulted to opengl

harsh tartan
#

That was mine too, just the default

#

I manually removed OpenGL so I knew it would be going into vulkan and not backing up to gl

sudden notch
# harsh tartan the one in blue

Thanks for bringing this up as a possible fix/improvement to the crashing issues.
It does have potential, but it will need a lot of testing to see if its going to work for most players affected, and not create other issues at the same time.

sudden notch
#

@harsh tartan Can you try one more thing for your initial issue with your original settings? Turn off vsync?

harsh tartan
gusty sinewBOT
#

โœ… Thank you for providing further information, our team will have a look again!