[2.0.7] Frequent FPS slowdowns during gameplay (Apple Silicon)

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
Var18
Burner Inserter
Burner Inserter
Posts: 7
Joined: Sat Oct 26, 2024 11:20 pm
Contact:

Re: [2.0.7] Frequent FPS slowdowns during gameplay (Apple Silicon)

Post by Var18 »

posila wrote: Tue Nov 19, 2024 1:30 pm You use external ultrawide display. What resolution does it have? I wouldn't expect problems on 2560x1080 (unless you configured macOS to render in higher resolution and downscale) but on 3440x1440 and higher, I would expect framerate issues.
Thanks for the reply @posila, I'm glad to see we're on the same page now. Great to see you sharing all your plans and updates with some rough timelines.

To reiterate, I'm on macOS Sonoma 14.5 on an M1 Pro (stock), hooked up in clamshell mode to a single external LG monitor ultrawide rendering at 3840 x 1620 (using "BetterDisplay").

In my case, I have actually been able to play the game with minimal issues with Native Resolution disabled (I never had it enabled) and importantly Wait for VSync turned off. When I switch that on the game instantly drops from a pretty stable 60FSP to ~30FPS at the point I am in the game (50 hours, Gleba). This stutter is similar to the one I recalled on Navuis a few hours in. I toggled Vsync off at some point in the run and that's probably what fixed things for me. So maybe that's an interesting lead. Let me know if you want me to toggle some more things or play with rendering options to get more info.

If you ask the community for more detailed things to test or logs to provide, I bet we'd be happy to give that. People in this thread seem to be under the impression they've given more than enough data for a repro when it sounds like that isn't the case. Some specific requests would be great.
posila
Factorio Staff
Factorio Staff
Posts: 5344
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [2.0.7] Frequent FPS slowdowns during gameplay (Apple Silicon)

Post by posila »

Var18 wrote: Wed Nov 20, 2024 5:14 amIf you ask the community for more detailed things to test or logs to provide, I bet we'd be happy to give that. People in this thread seem to be under the impression they've given more than enough data for a repro when it sounds like that isn't the case. Some specific requests would be great.
Could you post your log? I am still not sure how you have your display configured and therefore if the game renders in 3840x1620 regardless of "Render native resolution" or if it renders in half that resolution when you have it disabled.

I feel like you (or people in general here) are disatisfied with my "2.0 rendering is more demanding - will add options to make it less so" and "planets are heavy on effects - therefore much more demanding on GPU than Nauvis - will add options to make it less so" and I don't understand quite why. Is it because of inconsistency of the slowness (irregularity of the stutter)? I am not saying there aren't issues other than "more demanding rendering", but I have trouble seeing them as clearly separate issues, when they very well could be different symptoms of the same issue.

"Wait for V-sync" is kind of a wild card, on Windows disabling it should never cause screen tearing ... and I think that's the case also on macOS. On Windows we used to default it to disabled for some time, but changed it for some reason (I don't remember why). I always disable it on my machines. The point is - there doesn't seem to be "right configuration" for everyone. That's why graphics options are a thing - if the game doesn't perform well, player can change things so it does. But it's a good tip, I'll remember to have in mind, when giving technical support and we might try have it disabled by default on macOS.
posila
Factorio Staff
Factorio Staff
Posts: 5344
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [2.0.7] Frequent FPS slowdowns during gameplay (Apple Silicon)

Post by posila »

brunzenstein wrote: Tue Nov 19, 2024 7:13 pm The game slows down significantly after about fifteen minutes, even on up-to-date machines running the latest software.
That's what you experience? Up until now I was under the impression 2.0 runs fine for you on both your 2016 MacBook Pro and MacBook Pro M2.

Akyri above you describes something similar, but they also said disabling Render in native resolution fixed it (they just don't like using that option). I recall Oleg_7777776 giving similar description of the problem (as if there was a memory leak, or something like that).
brunzenstein wrote: Tue Nov 19, 2024 7:13 pm That said, I believe you should not focus on isolated reports from users experiencing stuttering on multiple external monitors or vintage Macs. Instead, it would be more beneficial to concentrate on the core issue:
I am not sure what you mean by this. Do you feel like I focus on isolated reports now, or are you saying that as a response to "After that I am gonna start collecting data for the external display issue", or something else?
User avatar
brunzenstein
Smart Inserter
Smart Inserter
Posts: 1116
Joined: Tue Mar 01, 2016 2:27 pm
Contact:

Re: [2.0.7] Frequent FPS slowdowns during gameplay (Apple Silicon)

Post by brunzenstein »

posila wrote: Wed Nov 20, 2024 8:48 am
brunzenstein wrote: Tue Nov 19, 2024 7:13 pm The game slows down significantly after about fifteen minutes, even on up-to-date machines running the latest software.
That's what you experience? Up until now I was under the impression 2.0 runs fine for you on both your 2016 MacBook Pro and MacBook Pro M2.

Sorry for being unclear dear Posila
On my MacBook Air M2 you can see for yourself with a medium base the FPS drops between 30 and 40 - but remains very playable
Attachments
Posila.png
Posila.png (15 MiB) Viewed 601 times
posila
Factorio Staff
Factorio Staff
Posts: 5344
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [2.0.7] Frequent FPS slowdowns during gameplay (Apple Silicon)

Post by posila »

brunzenstein wrote: Wed Nov 20, 2024 9:02 am On my MacBook Air M2 you can see for yourself with a medium base the FPS drops around 40 - but remains very playable
Cool, thank you. The screenshot is 2946x2060 but the screen was even larger. That is consistent with my conclusions about "rendering performance issue in high resolution", core issue in this thread, and what I am working on to improve.
fpe
Burner Inserter
Burner Inserter
Posts: 13
Joined: Wed Mar 02, 2016 3:06 pm
Contact:

Re: [2.0.7] Frequent FPS slowdowns during gameplay

Post by fpe »

fpe wrote: Tue Oct 22, 2024 10:11 am I have similar problems, but on Windows with a 2017 Dell XPS 15 9560 (GTX 1050M) and 4K display.
Maybe interesting here as a follow-up to my (slightly off-topic since not Apple Silicon) post from earlier this thread:

The not reaching 60 fps anymore was indeed due to the more demanding graphics in 2.x and the new planets. Even in the menu simulations especially Space and Gleba scenes ran really slow in native 4K resolution. With a lower resolution of 2048x1152 I can fully enjoy the game with constant 60 FPS, even though some things now look a bit blurry. So yes, an option to render the game at a lower resolution while still having a native resolution sharp UI would be very "nice to have".

As for "the game slows down after a few minutes and/or periodically now and then":
Turns out that was a pollution problem!
Seems like too much pollution causes Throttler enemies to spawn (on every planet and even in space ;-))
pollution1.jpg
pollution1.jpg (45.19 KiB) Viewed 549 times
pollution2.jpg
pollution2.jpg (46.23 KiB) Viewed 549 times
After cleaning those fans and air vents my notebook does not overheat anymore (resulting in thermal throttling) and the framerate stays constant.
User avatar
brunzenstein
Smart Inserter
Smart Inserter
Posts: 1116
Joined: Tue Mar 01, 2016 2:27 pm
Contact:

Re: [2.0.7] Frequent FPS slowdowns during gameplay

Post by brunzenstein »

fpe wrote: Wed Nov 20, 2024 12:06 pm
After cleaning those fans and air vents my notebook does not overheat anymore (resulting in thermal throttling) and the framerate stays constant.
Occam’s razor in full swing :-)
Factorio folks should indeed ask the user first to try to solve the stuttering with a "blow job" :D
Luckily the Apple Mac Book air don't have / need any fan...
Var18
Burner Inserter
Burner Inserter
Posts: 7
Joined: Sat Oct 26, 2024 11:20 pm
Contact:

Re: [2.0.7] Frequent FPS slowdowns during gameplay (Apple Silicon)

Post by Var18 »

posila wrote: Wed Nov 20, 2024 8:20 am Could you post your log? I am still not sure how you have your display configured and therefore if the game renders in 3840x1620 regardless of "Render native resolution" or if it renders in half that resolution when you have it disabled.
Sure, here's me on a very early save. This one seems kind of intermittent, it sometimes flickers up and down in FPS/UPS, might correlate with research being done (!?) or maybe even the zoom level (?!). Two screenshots are zoomed in / out with perf issues, and another two zoom in / out without perf issues (taken a minute later). Sometimes UPS also drops to ~30. I also noticed these problems when driving, but maybe just because that's when the stutter affects the gameplay the most, not sure if it's the cause.

These have Wait For Vsync on and Render in native screen resolution off.

For fun I added one more screenshot on Gleba. When I turn on wait for Vsync it immediately goes to ~36fps, unlike the former save which seems more intermittent.
Attachments
Gleba example
Gleba example
var18_gleba_bad_perf.png (19.96 MiB) Viewed 473 times
First Space Age 03 robots.zip
(5.75 MiB) Downloaded 5 times
factorio-current.log
(7.74 KiB) Downloaded 9 times
Zoom out good
Zoom out good
var18_factorio_good_zoom_out.png (19.44 MiB) Viewed 473 times
Zoom in good
Zoom in good
var18_factorio_good_zoom_in.png (14.29 MiB) Viewed 473 times
Zoom out bad
Zoom out bad
var18_factorio_bad_zoom_out.png (19.17 MiB) Viewed 473 times
Zoom in bad
Zoom in bad
var18_factorio_bad_zoom_in.png (14.22 MiB) Viewed 473 times
Var18
Burner Inserter
Burner Inserter
Posts: 7
Joined: Sat Oct 26, 2024 11:20 pm
Contact:

Re: [2.0.7] Frequent FPS slowdowns during gameplay (Apple Silicon)

Post by Var18 »

One more piece of data, here's an example on Gleba with basically everything off / lowest settings I could find but with Wait for Vsync on. It still hangs around 40FPS in that case.
Attachments
Screenshot 2024-11-20 at 5.43.04 PM.png
Screenshot 2024-11-20 at 5.43.04 PM.png (13.96 MiB) Viewed 470 times
User avatar
hgschmie
Inserter
Inserter
Posts: 37
Joined: Tue Feb 06, 2024 5:18 am
Contact:

Re: [2.0.7] Frequent FPS slowdowns during gameplay (Apple Silicon)

Post by hgschmie »

All my problems on a MacBook Pro with M2Max go away when I turn off "Wait for Vsync". Render in native resolution, everything turned to max. FPS/UPS at 60/60, no problem. I turn "wait for vsync" back on, drops immediately to 30-40 FPS.
posila
Factorio Staff
Factorio Staff
Posts: 5344
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [2.0.7] Frequent FPS slowdowns during gameplay (Apple Silicon)

Post by posila »

Hmm, I see, interesting. Thank you for the data.

Do you guys expericence any negative effects when Vsync is off - specifically, do you see screen tearing?

@hgschmie: what macOS version do you have?
Oleg_7777776
Inserter
Inserter
Posts: 27
Joined: Wed Oct 23, 2024 6:01 am
Contact:

Re: [2.0.7] Frequent FPS slowdowns during gameplay (Apple Silicon)

Post by Oleg_7777776 »

posila wrote: Thu Nov 21, 2024 8:04 am Hmm, I see, interesting. Thank you for the data.

Do you guys expericence any negative effects when Vsync is off - specifically, do you see screen tearing?

@hgschmie: what macOS version do you have?
good afternoon, no, there is Vsync to turn off - there will be no graphical artifacts, there is no difference in the graph. in the current situation, when V-sync is turned on, fps drops, and if it is turned off, it will simply slow down and slow down the game.
Var18
Burner Inserter
Burner Inserter
Posts: 7
Joined: Sat Oct 26, 2024 11:20 pm
Contact:

Re: [2.0.7] Frequent FPS slowdowns during gameplay (Apple Silicon)

Post by Var18 »

posila wrote: Thu Nov 21, 2024 8:04 am Do you guys expericence any negative effects when Vsync is off - specifically, do you see screen tearing?
There is either no screen tearing or it's not particularly noticeable, in my case.
User avatar
brunzenstein
Smart Inserter
Smart Inserter
Posts: 1116
Joined: Tue Mar 01, 2016 2:27 pm
Contact:

Re: [2.0.7] Frequent FPS slowdowns during gameplay (Apple Silicon)

Post by brunzenstein »

posila wrote: Thu Nov 21, 2024 8:04 am Hmm, I see, interesting. Thank you for the data.

Do you guys expericence any negative effects when Vsync is off - specifically, do you see screen tearing?

@hgschmie: what macOS version do you have?
Running with Vsync off let Factorio run smoother indeed on a MacBook Air M2 as well as on my 2016 MacBook Pro running Monterey
User avatar
hgschmie
Inserter
Inserter
Posts: 37
Joined: Tue Feb 06, 2024 5:18 am
Contact:

Re: [2.0.7] Frequent FPS slowdowns during gameplay (Apple Silicon)

Post by hgschmie »

posila wrote: Thu Nov 21, 2024 8:04 am Hmm, I see, interesting. Thank you for the data.

Do you guys expericence any negative effects when Vsync is off - specifically, do you see screen tearing?

@hgschmie: what macOS version do you have?
Hi,

Sonoma (14.7). I don't see screen tearing but sometimes scrolling seems jerky but FPS/UPS stays stable.
wormeyman
Burner Inserter
Burner Inserter
Posts: 14
Joined: Fri Oct 20, 2023 10:06 pm
Contact:

Re: [2.0.7] Frequent FPS slowdowns during gameplay (Apple Silicon)

Post by wormeyman »

M1 Air with 8GB of memory; I do have an M4 Pro binned cpu with 24GB of memory coming soon though 😎.

2.0.21 has had a massive performance improvement if I turn "render in native resolution" back on. I get up to ~55FPS if I disable "Occlude light sprites" graphics option to switch back to 1.1 light rendering. This is on my 60+ hour save with the four basic planets. I have attached my settings:
Screenshot 2024-11-21 at 11.20.37.png
Screenshot 2024-11-21 at 11.20.37.png (10.58 MiB) Viewed 229 times
User avatar
brunzenstein
Smart Inserter
Smart Inserter
Posts: 1116
Joined: Tue Mar 01, 2016 2:27 pm
Contact:

Re: [2.0.7] Frequent FPS slowdowns during gameplay (Apple Silicon)

Post by brunzenstein »

Same for me -
2.0.21 has had a massive performance improvement if I turn "render in native resolution" back on.
I don't know what you've done but the result on a MacBook Air M2 is stunning indeed.
Chapeau!
Also on my vintage 2016 MacBook Pro running Monterey Factorio is now
(not perfect as scrolling is jerky, but were not reaching for the moon - eg. Gleba)
indeed very playable.
posila
Factorio Staff
Factorio Staff
Posts: 5344
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [2.0.7] Frequent FPS slowdowns during gameplay (Apple Silicon)

Post by posila »

Awesome! I am relieved 2.0.21 update greatly improved rendering performace.

I did some tests with V-sync and I think GL_TIMESTAMP issue I mentioned in viewtopic.php?p=641892#p641892 had really bad synergy with V-sync. But it is strange it didn't show up in 1.1 ... (I still suspect the main reason for it all is more demanding rendering)

Anyway, the work doesn't end here, Rendering scale option, tweaking graphics setting defaults and exploring new optimizations awaits.
omcnoe
Manual Inserter
Manual Inserter
Posts: 3
Joined: Fri Nov 08, 2024 10:57 am
Contact:

Re: [2.0.7] Frequent FPS slowdowns during gameplay (Apple Silicon)

Post by omcnoe »

posila wrote: Wed Nov 20, 2024 8:20 am I feel like you (or people in general here) are disatisfied with my "2.0 rendering is more demanding - will add options to make it less so" and "planets are heavy on effects - therefore much more demanding on GPU than Nauvis - will add options to make it less so" and I don't understand quite why. Is it because of inconsistency of the slowness (irregularity of the stutter)? I am not saying there aren't issues other than "more demanding rendering", but I have trouble seeing them as clearly separate issues, when they very well could be different symptoms of the same issue.
I think reason that some people sound dissatisfied is that for some of us the issues it doesn't clearly feel obviously like a simple GPU power performance issue.

For instance, today I was running 2.0.20 on an external display in windowed mode. It started lagging really badly around a lot of Gleba enemies, I hit alt+enter to toggle into fullscreen, then alt+enter again to toggle back to windowed mode (so game is running at the exact same window resolution it was running at originally) and the lag instantly disappears. Exact same scene, exact same resolution, but toggling to fullscreen and back fixed the lag.

Other times I can resize the window up/down by a really tiny amount, only a few pixels, and it's the difference between unplayably laggy <20FPS and 60FPS.

It feels like there is some more complex performance bugs than just "graphics are more demanding now".

That said the issues I was experiencing seem to be significantly improved after disabling render in native res, and updating to the latest macOS release and Factorio version, so I'd suggest anyone experiencing perf issues try updating. Game performance is in much better state today than at Space Age release.
User avatar
hgschmie
Inserter
Inserter
Posts: 37
Joined: Tue Feb 06, 2024 5:18 am
Contact:

Re: [2.0.7] Frequent FPS slowdowns during gameplay (Apple Silicon)

Post by hgschmie »

Let me chime in as well.

THANK YOU, @posila for all your hard work!

2.0.21 is a very noticeable improvement, at this point the game feels as fluent as 1.1.
Post Reply

Return to “Technical Help”