Page 1 of 1

Display freezes while game keeps running

Posted: Wed Mar 09, 2016 6:52 pm
by sillyfly
I haven't been playing Factorio in the last month or two, and today I loaded up my game again. The game prompted me to update to 0.12.26, and so I did.

When I started playing, though, I have noticed that every few minutes the display completely froze for 5-10 seconds, but the game kept playing - I could hear sounds, the music went on, and if I kept walking, when the display finally resumed I was indeed away from where I was when the game froze. Even pressing Escape worked, pausing all sounds, and when the display resumed I could see the menu.

The weird thing is it isn't the whole computer or the monitor - the mouse cursor kept moving, and I could change the size of Factorio's window and move it around without problem.
The last version I know this didn't happen to me is 0.12.23, so it could be something in the new versions, or perhaps something else?
I have looked at the logs, but there doesn't seem to be anything interesting there, so - any other ideas?

Playing on Linux 64bit, on a laptop with i5-3120m CPU, integrated Intel (HD4000) GPU, SSD and 12GB of DDR3 @ 1600MHz.
Just to be sure, I have updated my system and ran a complete Memtest86+ test.

Re: Display freezes while game keeps running

Posted: Sun Mar 13, 2016 7:04 am
by sillyfly
Turns out Debian (testing) had been using Wayland as the default display engine for a while now, which has been causing various other problems. I won't be surprised if this was one of them (although I have not tested it yet).

Just heads up to everybody on Linux though, that Wayland may cause problems :D

Re: Display freezes while game keeps running

Posted: Sun Mar 13, 2016 9:56 pm
by sillyfly
Well, I was too quick to blame Wayland.
Reverting to X didn't solve the problem, and I'm still having annoying display-freezes while the game keeps running.
Things that seem to trigger display freeze:
  • Zooming out to maximum distance
  • Background music track change
  • Autosave
  • Resuming from menu
but none of them are 100% correlated with the freezes.
Anybody got another idea on what to check, or how to solve this?

Re: Display freezes while game keeps running

Posted: Sun Mar 13, 2016 10:08 pm
by prg
Flaky graphics drivers? Anything funny in dmesg/xorg log when that happens? Maybe try with LIBGL_ALWAYS_SOFTWARE=1 to see if a software renderer is more reliable.

Re: Display freezes while game keeps running

Posted: Mon Mar 14, 2016 3:55 pm
by sillyfly
Thanks prg, that seems to have been it!

Running with "LIBGL_ALWAYS_SOFTWARE=1" gave me an abysmal 15FPS, but at least the display didn't freeze.
I looked into the exact driver version I had, and came across this remark:
This driver is deprecated in favor of the server builtin modesetting driver.
Removing the package and restarting made X.org load the modesetting driver (which is apparently built in and doesn't require an extra package), and now the game runs smoothly again.