I don't know what you're talking about, but I took a look at your post. I tried to do what you did (setting the variable LIBGL_ALWAYS_SOFTWARE to 1) through terminal and then launching steam from it. The game run smoothly, even when I tried to set LIBGL_ALWAYS_SOFTWARE to 0. But if I launch Steam ...
HUGE discovery: resizing the window ends the freeze, doesn't matter how: going from a small size to a big size or from a big size to a small size. Even if I go from fullscreen (but still windowed) to not fullscreen (windowed) the freeze stops.
Maybe is some kind of window manager that's causing the ...
I haven't played the game for some time, but a week ago I decided to start a new campaign again and see what has been added with the new updates. I have updated Factorio through Steam to the latest stable version: 0.14.23
After about a minute of playing the screen freezes for 15-30 seconds while ...