Hello everyone, just noticed that Factorio seems to massively load the GPU when the game is sped up and gets put in the background.
This might be a duplicate, but GPU is too short a search term for the forum.
What did you do?
- Testing on the attached save in editor mode (Steam Experimental)
- Turn up game speed to x64 in editor
- Alt + Tab out of the game, see two different scenarios below
What happened?
Scenario 1: Factorio is still visible, GPU usage according to Task Manager approximately doubled from 15% to 30%
Scenario 2: Factorio is not visible (hidden behind maximized browser window), GPU usage according to Task Manager shoots up to 80%
For reference: GPU usage at 1x game speed is 5-6% and at 64x game speed 15-16% when in foreground.
What did you expect to happen instead? It might be obvious to you, but do it anyway!
I would have expected GPU usage to stay level or decrease, not increase in the way it seems to do.
Does it happen always, once, or sometimes?
Could reproduce the issue consistently
[2.0.42][windows] GPU load increases massively when Factorio is in background at high game speed
[2.0.42][windows] GPU load increases massively when Factorio is in background at high game speed
- Attachments
-
- factorio-current.log
- (9.09 KiB) Downloaded 12 times
-
- gleba.zip
- (4.74 MiB) Downloaded 12 times
Re: [2.0.42][windows] GPU load increases massively when Factorio is in background at high game speed
Thanks for the report however I don’t consider this to be a bug. We do not do anything different rendering wise when the game is focused or not, minimized or not and so there’s nothing for us to do code wise.
If there is any difference it’s in how windows and or the graphics driver is handling the window in this state.
What I suspect happens is: since the window is not visible - draw to screen does not happen and the usual wait for frame to finish drawing doesn’t happen - instead it skips right to the next frame. This is just a theory since it’s code outside of our control.
If there is any difference it’s in how windows and or the graphics driver is handling the window in this state.
What I suspect happens is: since the window is not visible - draw to screen does not happen and the usual wait for frame to finish drawing doesn’t happen - instead it skips right to the next frame. This is just a theory since it’s code outside of our control.
If you want to get ahold of me I'm almost always on Discord.
Re: [2.0.42][windows] GPU load increases massively when Factorio is in background at high game speed
It could also be a case of the GPU going into lower power state and then reporting higher utilization percentage even though it doesn't do any additional work, looking at power consumption of the GPU might be a better indicator. But this is also just a wild guess.
Re: [2.0.42][windows] GPU load increases massively when Factorio is in background at high game speed
Had a look, that does not seem to be the case, power use is noticeably going up when in the background.Donion wrote: Fri Mar 21, 2025 2:12 pm It could also be a case of the GPU going into lower power state and then reporting higher utilization percentage even though it doesn't do any additional work, looking at power consumption of the GPU might be a better indicator. But this is also just a wild guess.
I initially had a look at it because the fans were spooling up like crazy.
That's fine, just reporting it in case you delegated something to the GPU that's going ham when the rendering is idle.Rseding91 wrote: Fri Mar 21, 2025 1:51 pm Thanks for the report however I don’t consider this to be a bug. We do not do anything different rendering wise when the game is focused or not, minimized or not and so there’s nothing for us to do code wise.
If there is any difference it’s in how windows and or the graphics driver is handling the window in this state.
What I suspect happens is: since the window is not visible - draw to screen does not happen and the usual wait for frame to finish drawing doesn’t happen - instead it skips right to the next frame. This is just a theory since it’s code outside of our control.
Something that I noticed when checking for power usage is that the game FPS seems to go past the monitor refresh rate when unfocused.
Foreground focused it's 144 FPS, foreground unfocused it's going to 288 FPS and no idea what happens in the background (but I'm assuming the flip timer goes to 0 and it's drawing as fast as it can without pushing anything to the display from the way the GPU is sucking power).
Turning on "Wait for VSync" in the graphics options makes the whole load issue I'm having go away as it puts an upper limit on FPS(?).
Re: [2.0.42][windows] GPU load increases massively when Factorio is in background at high game speed
You can turn on Wait For Vsync permanently. Game is working and displaying everything in 60 FPS anyway.