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.
The Linux native version of Stardew Valley ships two GOG Galaxy API libraries:
libGalaxy64.solibGalaxyCSharpGlue.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.
Use the execstack tool to clear the executable stack flag from both
libraries. Install it from the AUR first.
Install execstack
paru -S execstack
Clear the flag on both libraries
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
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
execstack -c commands from Step 2.