Quick answer: Pygame mixer failing to init after a Linux suspend/resume? PulseAudio drops the connection - call mixer.quit and re-init on the next sound trigger.
Laptop sleeps. Wakes up. Game plays no audio. Restart fixes; suspending again breaks.
Detect failure and reinit
try:
s.play()
except pygame.error:
pygame.mixer.quit()
pygame.mixer.init()Catch the error; reset the subsystem; retry.
Or use SDL audio device callbacks
SDL exposes device-change events. Subscribe; reinit on disconnect.
Document Linux-specific behavior
Suspend/resume audio loss is a Linux desktop pattern. Note in your support docs.
“Audio is a session resource. Sessions don't always survive suspend.”
If your game runs for hours, test the suspend cycle. The bug surfaces in player sessions and rarely in QA.