← All solutions
Steam · Linux Native

Stardew Valley Co-op stuck on
"Connecting to online services…"

Entering Co-op mode causes the game to hang indefinitely on the connecting screen. It never progresses. The root cause is an executable stack flag on the GOG Galaxy libraries bundled with the Linux native version - modern kernels silently reject it, preventing the online services from initializing.

Arch Linux Steam - Linux Native version only SMAPI / .NET mods
Symptom

When entering the Co-op mode in Stardew Valley (Linux native via Steam), the game shows the screen "Connecting to online services…" and stays there forever. It never connects, never errors out - just hangs.

This only affects the Linux native version. The Proton/Windows version does not have this issue - but Proton is incompatible with SMAPI-based mods, which is why running native Linux matters for modded playthroughs.
Root Cause

The Linux native version of Stardew Valley ships two GOG Galaxy API libraries:

  • libGalaxy64.so
  • libGalaxyCSharpGlue.so

Both have the executable stack flag (PT_GNU_STACK RWE) set in their ELF headers. Modern Linux kernels with memory protection features (NX bit, hardened configs) silently refuse to map executable stacks - no error is surfaced to the game, it just never finishes loading the multiplayer backend.

Fix

Use the execstack tool to clear the executable stack flag from both libraries. Install it from the AUR first.

Install execstack

bash
paru -S execstack

Clear the flag on both libraries

bash
execstack -c ~/.local/share/Steam/steamapps/common/Stardew\ Valley/libGalaxy64.so
execstack -c ~/.local/share/Steam/steamapps/common/Stardew\ Valley/libGalaxyCSharpGlue.so

Verify the flag was removed

bash
execstack -q ~/.local/share/Steam/steamapps/common/Stardew\ Valley/libGalaxy64.so
# Output should be: - (a dash = no executable stack flag)
# If it shows X, the flag is still set - re-run step 2
Steam game updates reset this fix. When Stardew Valley updates through Steam, the library files get overwritten with fresh copies that have the flag set again. If Co-op stops working after an update, simply re-run the two execstack -c commands from Step 2.