Page 1 of 1

Factorio flickers heavily all of the sudden

Posted: Tue Oct 06, 2020 9:59 pm
by belgianguy
Hi all,

I'm a long time player that has thoroughly enjoyed the game for more than 1000 hours, but that fun came to a screeching halt some days ago.
I think my graphics driver is somehow no longer rendering Factorio correctly and I was wondering if there are any logs I could inspect or any settings I could adjust to make the flickering stop. Or any other info I could gather to seek out the origin of this issue.

Could it be something like v-sync? Could I turn that off/on through configuration?

The flickering starts as soon as I start the game from within Steam, a little grey triangle appears over the "Loading sprites..." text. Afterwards the whole screen flickers like mad.

I've recorded it here ( :arrow: Not advised for anyone prone to seizures or those who suffer from epilepsy): https://youtu.be/YFQcAn6O3Tg

I still can run Portal and Portal 2 without issue, as well as Fallout 4/Skyrim through wine. So the hardware seems ok.
But that probably means either Steam or a specific part of the graphics driver is borked here.

Code: Select all

OS: Ubuntu 20.04.1
GPU: RX 480
CPU: AMD Ryzen 7 1800X
RAM: 32 GB

GPU Driver: Mesa 20.3.0-devel (git-961a8d7 2020-10-05 focal-oibaf-ppa)
So yeah, I really don't know why it all the sudden stopped working, any ideas are apprecciated.

Edit: I've added the log files and a screenshot with some debug output, but the flckering actually hides a lot of the items.

Re: Factorio flickers heavily all of the sudden

Posted: Tue Oct 06, 2020 10:12 pm
by Koub
belgianguy wrote: Tue Oct 06, 2020 9:59 pm Could it be something like v-sync? Could I turn that off/on through configuration?
V-sync is easily found in the graphic settings
here
Have you fiddled with anything in the config files ?

Re: Factorio flickers heavily all of the sudden

Posted: Tue Oct 06, 2020 10:19 pm
by belgianguy
Koub wrote: Tue Oct 06, 2020 10:12 pm
belgianguy wrote: Tue Oct 06, 2020 9:59 pm Could it be something like v-sync? Could I turn that off/on through configuration?
V-sync is easily found in the graphic settings
here
Have you fiddled with anything in the config files ?
Ah, thanks for that. Most of the options are reduced to just a checkbox, so I can't see their text anymore.
I did not change anything in the config files.
But sadly it didn't fix it, I restarted after every change to verify, but it keeps on flickering.

Re: Factorio flickers heavily all of the sudden

Posted: Wed Oct 07, 2020 5:42 am
by Koub
I would download the standalone (zip) version from the website, unzip it in a random place, and try to run the game.
If it still flickers, we'll have to figure something on your computer, if not, then it's just something in your config (and this is very easy to fix).

Re: Factorio flickers heavily all of the sudden

Posted: Wed Oct 07, 2020 10:27 am
by posila
belgianguy wrote: Tue Oct 06, 2020 9:59 pm

Code: Select all

GPU Driver: Mesa 20.3.0-devel (git-961a8d7 2020-10-05 focal-oibaf-ppa)
So yeah, I really don't know why it all the sudden stopped working, any ideas are apprecciated.
Hello, can you test it is reproducible also with standalone demo (https://www.factorio.com/get-download/1 ... mo/linux64) and report it to Mesa (https://gitlab.freedesktop.org/mesa/mesa/-/issues), please? Since you have 2 days old development build of the driver, I assume it's a recent bug in the driver.

Re: Factorio flickers heavily all of the sudden

Posted: Wed Oct 07, 2020 6:17 pm
by belgianguy
posila wrote: Wed Oct 07, 2020 10:27 am
belgianguy wrote: Tue Oct 06, 2020 9:59 pm

Code: Select all

GPU Driver: Mesa 20.3.0-devel (git-961a8d7 2020-10-05 focal-oibaf-ppa)
So yeah, I really don't know why it all the sudden stopped working, any ideas are apprecciated.
Hello, can you test it is reproducible also with standalone demo (https://www.factorio.com/get-download/1 ... mo/linux64) and report it to Mesa (https://gitlab.freedesktop.org/mesa/mesa/-/issues), please? Since you have 2 days old development build of the driver, I assume it's a recent bug in the driver.
Hi posila,

I also tested on the demo, the flickering happens there too: https://www.youtube.com/watch?v=dOc_mN7 ... e=youtu.be

I'll go and create a Mesa bug ticket. It's indeed a rather fresh driver, but had held out quite well for a long time. Hope they can fix it!

Re: Factorio flickers heavily all of the sudden

Posted: Wed Oct 07, 2020 6:48 pm
by belgianguy
I created a ticket https://gitlab.freedesktop.org/mesa/mesa/-/issues/3612 but it's likely mine will be closed as someone else posted one 9 minutes before me which seems to be more technical inclined with regards to the origin of the issue.

The other ticket https://gitlab.freedesktop.org/mesa/mesa/-/issues/3611

Re: Factorio flickers heavily all of the sudden

Posted: Wed Oct 14, 2020 9:32 pm
by belgianguy
As a layperson, let me first and foremost tell you that I don't know the first thing about graphics drivers, but that for the sake of discussion, maybe the graphics lead of Factorio could chime in on Pierre-Eric Pelloux-Prayer's comment:
At the moment I think there are 2 bugs:
  • One in Factorio: it uses 2 map/write/unmap/draw sequences using the same buffer + same area + GL_UNSYNCHRONIZED. GL_SYNCHRONIZED allows the driver to take shortcuts, and one of these shortcut breaks Factorio.
  • One in radeonsi: if the 2nd map was made without GL_SYNCHRONIZED the driver should wait for previous operations to complete. Currently radeonsi doesn't wait in this situation.
Once again, I am not here to assign blame, but to get the eyes that understand the issue to look at the problem.

Re: Factorio flickers heavily all of the sudden

Posted: Thu Oct 15, 2020 10:53 am
by posila
belgianguy wrote: Wed Oct 14, 2020 9:32 pm
Thanks for notifying me about the development. If driver devs say be use graphics API incorrectly, I definitelly want to know what do we do wrong and fix it.

Re: Factorio flickers heavily all of the sudden

Posted: Sat Oct 17, 2020 8:43 pm
by Hiew
I just registered here to post that I'm having the same exact issue. I'm running the same version of mesa drivers. I have very little knowledge with linux and how to change drivers. If there is a workaround for this issue it would be greatly appreciated.

Re: Factorio flickers heavily all of the sudden

Posted: Sat Oct 17, 2020 10:20 pm
by Jap2.0
Hiew wrote: Sat Oct 17, 2020 8:43 pm I just registered here to post that I'm having the same exact issue. I'm running the same version of mesa drivers. I have very little knowledge with linux and how to change drivers. If there is a workaround for this issue it would be greatly appreciated.
Either revert to Mesa 20.2 (I think 20.2.1 might be fine), or otherwise it will probably be fixed in the next version of Factorio and Mesa (i.e. the next time at least one of them updates).

Are you using Ubuntu?

Re: Factorio flickers heavily all of the sudden

Posted: Sat Oct 17, 2020 11:40 pm
by Hiew
Thanks for the reply, no i'm running Manjaro actually. I installed mesa 20.3 through the software center. I think I might need to do some digging around to figure out how to use the older (stable) driver. I'll try to get Mesa 20.2

Re: Factorio flickers heavily all of the sudden

Posted: Sun Oct 18, 2020 1:02 am
by Hiew
So I've reverted to the stable version of mesa provided by Manjaro. Factorio indeed no longer flickers. The command below got me what I needed.

Code: Select all

sudo pacman -Syyu mesa lib32-mesa

Re: Factorio flickers heavily all of the sudden

Posted: Tue Oct 27, 2020 7:05 pm
by belgianguy
Hi all,

I just checked the Mesa issue, and it seems the commit that caused the flickering has been reverted, and that revert has been merged into the 'unstable' branch.

So for me on Ubuntu, Factorio runs flawless again on the unstable branch, will need to see how it evolves.

Current version of driver: 4.6 Mesa 20.3.0-devel (git-af0435c 2020-10-27 focal-oibaf-ppa