Opened 7 years ago
Last modified 7 years ago
#1314 assigned defect
OpenGL window unresponsive after sleeping laptop
| Reported by: | Tristan Croll | Owned by: | Tom Goddard |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | Graphics | Version: | |
| Keywords: | Cc: | Greg Couch | |
| Blocked By: | Blocking: | ||
| Notify when closed: | Platform: | Windows 10 | |
| Project: | ChimeraX |
Description
Possible this is specific to my laptop (an Asus ROG Strix GL502VS, for what it's worth): in Windows, I put the laptop to sleep with ChimeraX running and a model opening. After resuming, the main OpenGL window was non-responsive. ChimeraX itself was clearly still working (responding to clicks in the Model Panel, updating the Model Panel when loading a new model). Closing all models and opening a new one (which I *think* should create a new OpenGL context?) didn't help - on closing all models it went back to the standard startup menu of previously-opened models, but opening a new one just yielded a blank screen.
Change History (4)
comment:1 by , 7 years ago
| Cc: | added |
|---|
comment:2 by , 7 years ago
Some more info on OpenGL context loss
https://stackoverflow.com/questions/20724294/opengl-context-loss
Doesn't clarify when a context loss can happen. Suggests for OpenGL it can only happen due to a driver error.
comment:3 by , 7 years ago
This thread says there is no such thing as an involuntary OpenGL context loss
comment:4 by , 7 years ago
Windows / nvidia timeout detection and recovery (TDR) events are mentioned in searching for opengl context loss
https://docs.microsoft.com/en-us/windows-hardware/drivers/display/timeout-detection-and-recovery
Might be worth checking the Windows system event log to see if there is any message about the OpenGL context being lost.
In the Qt documentation for QOpenGLContext describes a method isValid() that can return false after successfully using an OpenGL context because the context is "lost".
http://doc.qt.io/qt-5/qopenglcontext.html#
I didn't realize an OpenGL context could be lost, and I've never seen it happen on Windows or Mac machines that sleep. So it may be something is special about your machine that allows the context to be lost. What graphics driver are you using? The solution recommended in the Qt docs is to construct a new OpenGL context and reconstruct all the resources (vertex buffers, framebuffers, vertex array objects, ...) that were in use. ChimeraX currently cannot reconstruct all the OpenGL it was using.