Minecraft server breaks after locking screen

Pop!_OS 22.04 LTS
AMP Release “Callisto” v2.5.1.8, built 03/09/2024 11:47

From what I understand, locking the screen on a Linux system shouldn’t affect any currently running processes, but it seems to be doing just that to my AMP server that sleeps on start. Here’s what I’ve found in my testing:

  • Boot system and open AMP web GUI
  • Server is offline (expected)
  • Start (and sleep) server from GUI
  • Successfully wake server by pinging from Minecraft on a separate laptop
  • Manually sleep server
  • Lock my profile using gnome-screensaver-command -l
  • Attempt to wake server again from the laptop, can’t connect
  • Log back into my profile to see server is still sleeping after refreshing local instances in GUI main menu
  • Still can’t connect on laptop

What’s odd to me is that the loss of function persists even after unlocking my profile. Could it have something to do with the fact that AMP runs from it’s own system user, so locking my own profile makes something unexpected happen? That’s the only idea I’ve got.

Putting your laptop to sleep (or logging out of the primary user) probably puts things into some power saving mode, which won’t allow things like MC servers to run, or much else for that matter.
For sleep mode, AMP stops the server, then starts a TCP server to listen for MC connections, and then starts the server when it receives a connection.

1 Like

Do you know if/how I can change what the system does when I lock the screen? I asked elsewhere but haven’t gotten any answers.

Honestly not a clue, though I know you can turn off hibernation somewhere.
If that’s related to the same mechanism that might fix things.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.