Page 1 of 1

Unable to exit game + sound not working on resume

Posted: Mon Jun 25, 2018 2:50 pm
by mrvn
Version: 0.16.36
OS: Debian Linux

I've always had the problem that sound randomly isn't working after resume and I've always blamed pulse audio for that. Restarting pulse and the game makes the sound work again.

But now I've tried playing without pulse audio installed with the same effect, except it is consistent. No sound on every resume.

This might very well be something due to my hardware and kernel version. Pulse has the same problem so probably not something factorio can fix. So now we come to the bigger problem and reason why I reported this bug: One can't exit the game. It just hangs when clicking exit in the gui. The logfile shows the following:

Code: Select all

1889.138 Info AppManagerStates.cpp:1642: Saving finished
1959.135 Can't recover from suspend, resume failed: Function not implemented

1959.135 Unknown error code: -77

1959.135 MMAP begin avail error: File descriptor in bad state

2306.569 Info AppManagerStates.cpp:1642: Saving finished
2308.294 Info GlobalContext.cpp:694: Waiting for child processes to exit: 
Luckily I can switch to the console where I started the game. Pressing ctrl-c shows:

Code: Select all

2675.227 Received SIGINT, shutting down
Since it has no effect hitting again finally shuts down the game saying:

Code: Select all

2676.967 Received second SIGINT, terminating immediately
My thoughts there is that the sound thread breaks on resume, doesn't exit and no longer reacts to the game shutting down. So when trying to join it the game hangs.

Re: Unable to exit game + sound not working on resume

Posted: Mon Jun 25, 2018 4:05 pm
by Rseding91
Thanks for the report however we don't support suspending the game.

Re: Unable to exit game + sound not working on resume

Posted: Thu Jun 28, 2018 3:02 pm
by mrvn
I'm not suspending the game. I'm suspending my laptop. Simply closing the lid will do that.

Even if you don't want to try fixing the sound issue, which I understand, the game should still be able to exit on it's own.

Re: Unable to exit game + sound not working on resume

Posted: Thu Jun 28, 2018 4:21 pm
by Rseding91
mrvn wrote:I'm not suspending the game. I'm suspending my laptop. Simply closing the lid will do that.

Even if you don't want to try fixing the sound issue, which I understand, the game should still be able to exit on it's own.
That's what I meant by suspending the game: leaving it running while you suspend the laptop is suspending the game - which we don't support.

You can change your laptop so it doesn't suspend when closing the lid (I always do - because I want to be able to move across the room with the laptop without it going into sleep mode just because I closed the lid for 5 seconds).

This may or may not work differently in 0.17 with the graphics re-work but it's not something we're directly working on or looking to fix.