MantisBT - Zandronum
View Issue Details
0003919Zandronum[All Projects] Bugpublic2021-11-01 20:202022-03-27 09:31
RushJet1 
 
normalminoralways
confirmedopen 
MicrosoftWindows 10XP/Vista/7
3.1-beta 
 
0003919: Zandronum (3.0.1 and 3.1, OpenGL) stops rendering when window does not have focus, but uses way more GPU and can freeze.
As seen in this thread:

'https://zandronum.com/forum/viewtopic.php?t=7084 [^]'

This is meant to be an optimization, but instead it's just inconvenient at best (if you have multiple monitors, you want the game to still update) and can freeze the game at worst (GPU usage spikes to 100% and alt tabbing back either has a long delay or outright stops running).

I have worked around this problem by binding my alt key to cl_capfps true, which negates the GPU spiking issue. Otherwise I assume the game is trying to render <nothing> as quickly as possible at thousands of FPS or something.

I've seen this behavior on an RX 480, GTX 1650, Intel HD 4400 so it's not specific to any one video card or manufacturer. This is much less pronounced on the Intel system but it's also a lot weaker than the other two.

See attached image of GPU usage. Every time it shoots up to 100% I have alt-tabbed out, and 10 seconds later or so I alt-tab back in and usage drops down to 19% or so. If I leave it alt-tabbed out for a lot longer, say a minute or more, the GPU will get really hot/loud at 100% and the game will be frozen when I try to switch back to it.

This appears to happen in both windowed and fullscreen, though it seems more severe in fullscreen mode.

No tags attached.
png 1650.png (14,648) 2021-11-01 20:20
/tracker/file_download.php?file_id=2670&type=bug
png

png zangpuusage.png (51,330) 2021-11-01 22:47
/tracker/file_download.php?file_id=2671&type=bug
png

png Zandronum_GPU_Spike.png (46,365) 2021-11-02 15:11
/tracker/file_download.php?file_id=2673&type=bug
png
Issue History
2021-11-01 20:20RushJet1New Issue
2021-11-01 20:20RushJet1File Added: 1650.png
2021-11-01 20:28RushJet1Note Added: 0021812
2021-11-01 21:33KaminskyStatusnew => acknowledged
2021-11-01 22:47DrinkyBirdNote Added: 0021813
2021-11-01 22:47DrinkyBirdFile Added: zangpuusage.png
2021-11-02 14:37RushJet1Note Added: 0021814
2021-11-02 15:11KaminskyFile Added: Zandronum_GPU_Spike.png
2021-11-02 15:20KaminskyNote Added: 0021815
2021-11-02 15:20KaminskyStatusacknowledged => confirmed
2021-11-02 16:37RushJet1Note Added: 0021816
2021-11-03 09:46DrinkyBirdNote Added: 0021819
2021-11-04 00:07KaminskyAssigned To => Kaminsky
2021-11-04 00:07KaminskyStatusconfirmed => assigned
2022-02-22 14:56KaminskyAssigned ToKaminsky =>
2022-02-22 14:56KaminskyStatusassigned => confirmed
2022-03-27 09:31auratoostronkNote Added: 0022167

Notes
(0021812)
RushJet1   
2021-11-01 20:28   
Just wanted to add that this is specifically in multiplayer. In single player all game logic stops, so CPU/GPU usage drop significantly when alt-tabbed.
(0021813)
DrinkyBird   
2021-11-01 22:47   
I did some quick testing, but can't reproduce this. Using 1600x900 windowed, OpenGL, in multiplayer, alt-tabbing out reduces my system's GPU usage.
See attached screenshot: the areas of the GPU usage graph where it drops are when the window is not focused.
(0021814)
RushJet1   
2021-11-02 14:37   
When you alt-tab out, are you opening the menu first? That can limit the FPS as well.
(0021815)
Kaminsky   
2021-11-02 15:20   
I can confirm that the GPU spike does occur (I use a GTX 1060 with 6 GB) when Zandronum is out of focus. This only happens in multiplayer, both in windowed mode and fullscreen, as you said. If left out of focus long enough, Zandronum might completely freeze and need to be forcefully shut down.

In my attachment: periods where the GPU spikes to 100% occur when I alt-tabbed or minimized Zandronum.
(0021816)
RushJet1   
2021-11-02 16:37   
I also noticed that if the game freezes for say 10 seconds, it will reflect that in my ping (people saying my ping jumped to 9000 for example) which is a pretty funny side effect.
(0021819)
DrinkyBird   
2021-11-03 09:46   
Hmm, I think I managed to reproduce to a lesser extent on another mod (WDI) at fullscreen 1080p... but the GPU usage when unfocused is only slightly above the usage when focused.

I'm unable to reproduce any freezing too.
(0022167)
auratoostronk   
2022-03-27 09:31   
I've encountered this issue many times, can confirm.