attractplus icon indicating copy to clipboard operation
attractplus copied to clipboard

Window frozen after sleep

Open Chadnaut opened this issue 4 months ago • 9 comments

Sometimes AM appears frozen after waking PC from sleep.

  • Master build (533), Window Mode
  • A few hours up-time (developing layouts, ie: many reload events)
  • Close laptop for the night, putting it into a sleep state
  • Open laptop 7 hours later
  • AM is frozen on a single frame of the screensaver
  • Despite pressing all inputs, the single frame persists

However

  • Console logs show AM is still responding
  • Displays get loaded, focus events reported, games can be launched
  • It's only the window surface that is not getting redrawn

I'm sure I've experienced something similar with previous builds. This time I dug around a bit more instead of just restarting. Might be a tricky one to reproduce.

Chadnaut avatar Aug 28 '25 22:08 Chadnaut

Yes, it may be tricky, one try per night. I'm unable to reproduce with short sleep periods.

  • Does it happen also on layouts, or just on the screensaver?
  • ~Can you open the settings menu?~ nvm
  • ~Does pressing reload helps in any way?~ nvm
  • Have you tried resizing the window? It reinitializes the surface.
  • Is audio still working?

oomek avatar Aug 28 '25 22:08 oomek

  • When the laptop was closed my layout was running, I'm not sure how the screensaver started during sleep... will disable screensaver for future tests.
  • Possibly, but the window never redraws so it's hard to tell. AM responds to inputs (next display, etc)
  • The reload occurs, logs show as much, but the window never redraws
  • Resize just stretches the frozen texture to fit
  • Did not test audio, will test if/when this re-occurs

Chadnaut avatar Aug 28 '25 22:08 Chadnaut

I left my pc sleeping overnight with AM+ running, but it did not freeze. Will keep trying.

oomek avatar Aug 29 '25 06:08 oomek

PC slept a few more times with AM running (screensaver disabled):

  • Woke to working layout, a few minutes later crashed (likely during focus change)
  • Woke to working layout, worked fine

Results appear to be random, put this on the backlog and revisit when reliably reproducible...

Chadnaut avatar Sep 01 '25 02:09 Chadnaut

  • Woke to frozen layout today
  • No abnormal GPU/CPU/memory behavior
  • Audio still plays, and changes correctly with game selection
  • Blindly navigating to Settings > General > Window Mode and changing it (in this case I chose borderless) un-freezes the display

So there's another clue - re-initializing the window restores redraw.

Chadnaut avatar Sep 01 '25 21:09 Chadnaut

That's a very helpful clue. We are reinitializing audio device due to sfml bug, so Lets reinitialize window also on resume

oomek avatar Sep 01 '25 21:09 oomek

Possibly related: offset window content after returning from game. It may be a nVidia Quadro T1000 related issue, but no other window suffers from this. I'll probably have to sort this out (at a later time) since I have the hardware to reproduce it, and it occurs randomly... Moving the window fixes the offset. image

Chadnaut avatar Sep 10 '25 04:09 Chadnaut

Again, I've never had this issue. It must be a Quadro thing. Do I have a green light to push the 3.2.0 label and start constructing the changelog?

oomek avatar Sep 10 '25 09:09 oomek

All good. Leave this issue with me and I'll have a play sometime in future.

Chadnaut avatar Sep 10 '25 09:09 Chadnaut