EEex icon indicating copy to clipboard operation
EEex copied to clipboard

EEex Uncap FPS Causes Severe System-Wide Lag and Input Delay

Open sendoa opened this issue 6 months ago • 9 comments

First of all, thank you so much for developing EEex. It’s truly amazing and has made me enjoy these games like never before.

When I enable uncap FPS and load a game, after a few seconds or minutes of play, everything becomes extremely slow, with terrible lag. The mouse cursor moves normally, but clicks and actions have a lag of several seconds. Even if I close the game, the system (Windows 11) remains in the same state. I have no choice but to restart the PC.

I have a PC with an Nvidia RTX 4080 graphics card and a G-Sync monitor. I’m using version 2.6.6.0 of BGEE.

Thanks you!

WeiDU.log

000000001-Quick-Save-4.zip

sendoa avatar May 19 '26 09:05 sendoa

I have a similar problem with FPS uncapped but only when outside the game.

In-game everything is fine but when I alt-tab out, the system slows down massively. I can't even scroll down a browser's web page. When I alt-tab back in the game everything is fine again. Alt-tab out, lag again, etc. Rinse and repeat.

Maltodaxtrin avatar May 19 '26 14:05 Maltodaxtrin

It seems to happen when the game is in windowed mode. I've been playing in full-screen mode and it seems to work fine, although that prevents me from using BG2RadarOverlay.

sendoa avatar May 19 '26 16:05 sendoa

I am on fullscreen and have the problem outlined above. In-game works fine, but while alt-tabbing it's painfully slow to do anything

Maltodaxtrin avatar May 19 '26 16:05 Maltodaxtrin

Thanks for the report. Some questions:

  1. What refresh rate is your monitor?
  2. What FPS do you have EEex's limiter set to?
  3. Is VSync enabled?

I'm aware of a particular bug with the FPS uncap code and am working on a fix. The bug sounds similar to yours; refresh rates around 60hz can cause the FPS uncap to delay game logic, resulting in "laggy" gameplay but smooth rendering. A temporary fix for that one is setting EEex's FPS limit slightly lower than the monitor's refresh rate - maybe that will work for you too?

As for alt-tabbing, I suppose I can build in a render throttle for when the game window is unfocused so it doesn't consume a ton of resources when you're doing something else.

Bubb13 avatar May 19 '26 18:05 Bubb13

Maybe when alt-tabbing the game forgets the 144 fps limit and uncaps it? Or forgets about vsync or something? Which would slowdown the PC a lot, hugging all available resources.

Just a theory I am throwing out there lol.

Anyway, I'm not sure if the 3 questions were for me or sendoa, but whatever, gonna answer them regardless. Disregard them if useless:

  1. 144 hz gsync
  2. 144 fps
  3. Yes

Thanks!

Maltodaxtrin avatar May 19 '26 18:05 Maltodaxtrin

@Bubb13

For what it's worth, the same stutter occurs if you enable the native Windows option Dynamically adjust your monitor's refresh rate to save battery...

4Luke4 avatar May 21 '26 16:05 4Luke4

Thanks for the report. Some questions:

  1. What refresh rate is your monitor?
  2. What FPS do you have EEex's limiter set to?
  3. Is VSync enabled?

I'm aware of a particular bug with the FPS uncap code and am working on a fix. The bug sounds similar to yours; refresh rates around 60hz can cause the FPS uncap to delay game logic, resulting in "laggy" gameplay but smooth rendering. A temporary fix for that one is setting EEex's FPS limit slightly lower than the monitor's refresh rate - maybe that will work for you too?

As for alt-tabbing, I suppose I can build in a render throttle for when the game window is unfocused so it doesn't consume a ton of resources when you're doing something else.

  1. 165Hz
  2. 144Hz
  3. Yes

Thank you!

sendoa avatar May 21 '26 17:05 sendoa

I have a similar issue, so i disabled the uncap FPS to see if it's better. For info, this bug already happened to me before v 1.0.0. My monitor refresh rate is 144.

Palanthiss avatar Jul 14 '26 22:07 Palanthiss

Hi all, I've gone ahead and overhauled the FPS uncap code as part of EEex v1.1. Could you please try it out and see if you still encounter problems?

Bubb13 avatar Jul 23 '26 17:07 Bubb13