Blender Does Not Account for Suspend #43597

Closed
opened 2015-02-08 17:28:32 +01:00 by Zauber Paracelsus · 9 comments

System Information
64bit Manjaro Linux, kernel 3.14.29
CPU: AMD Phenom II 970 Deneb quad-core
GPU: nVidia GTX 650 Ti, driver 343.36

Blender Version
Broken: Buildbot Build 2.73 4cbf2ebd
Worked: Not sure this ever worked

Short description of error
Each night when I go to bed, I put my computer into suspend mode, rather than just leaving it on or shutting down. Most applications I leave running during the night don't have any problems. Blender, however, does. Two main problems I have observed:

  • Textures on models will often be garbled.
  • Rendering in cycles with CUDA will fail until you close blender and reopen it.

Exact steps for others to reproduce the error

  1. Start blender from the command line, and open or create a scene with textured surfaces, set Cycles to GPU mode. Go to the Render->Performance tab, and make sure that Persistent Images is turned on.
  2. Render the scene. It should render normally.
  3. Exit rendered view, go back to 3D view.
  4. Put your computer into suspend for at least 30 seconds.
  5. Exit suspend mode. Textures on the model will be garbled.
  6. Attempt to render. The render will fail, and if you click or touch anything you will get error messages about illegal instructions on the command line.
  7. Reload the file. The model textures will be corrected.
  8. Attempt to render. It will still fail to render, with the same illegal instruction errors.
  9. Close and reopen blender, then go to the Render->Performance tab and turn the Persistent Images option off.
  10. Repeat steps 1-8 with Persistent Images disabled. The texture corruption still occurs, but the CUDA errors do not.

Fixing the issue should be simple (in theory). It could be done by detecting when the computer suspends or hibernates (most OS's should provide an interface to detect this, but I could be wrong) and then clear/reload the data stored on the GPU.

Error output I got: CUDA_Errors.txt

**System Information** 64bit Manjaro Linux, kernel 3.14.29 CPU: AMD Phenom II 970 Deneb quad-core GPU: nVidia GTX 650 Ti, driver 343.36 **Blender Version** Broken: Buildbot Build 2.73 4cbf2ebd Worked: Not sure this ever worked **Short description of error** Each night when I go to bed, I put my computer into suspend mode, rather than just leaving it on or shutting down. Most applications I leave running during the night don't have any problems. Blender, however, does. Two main problems I have observed: - Textures on models will often be garbled. - Rendering in cycles with CUDA will fail until you close blender and reopen it. **Exact steps for others to reproduce the error** 1) Start blender from the command line, and open or create a scene with textured surfaces, set Cycles to GPU mode. Go to the Render->Performance tab, and make sure that Persistent Images is turned on. 2) Render the scene. It should render normally. 3) Exit rendered view, go back to 3D view. 4) Put your computer into suspend for at least 30 seconds. 5) Exit suspend mode. Textures on the model will be garbled. 6) Attempt to render. The render will fail, and if you click or touch anything you will get error messages about illegal instructions on the command line. 7) Reload the file. The model textures will be corrected. 8) Attempt to render. It will still fail to render, with the same illegal instruction errors. 9) Close and reopen blender, then go to the Render->Performance tab and turn the Persistent Images option off. 10) Repeat steps 1-8 with Persistent Images disabled. The texture corruption still occurs, but the CUDA errors do not. Fixing the issue should be simple (in theory). It could be done by detecting when the computer suspends or hibernates (most OS's should provide an interface to detect this, but I could be wrong) and then clear/reload the data stored on the GPU. Error output I got: [CUDA_Errors.txt](https://archive.blender.org/developer/F141930/CUDA_Errors.txt)

Changed status to: 'Open'

Changed status to: 'Open'

Added subscriber: @ZauberParacelsus

Added subscriber: @ZauberParacelsus

Added subscribers: @Sergey, @Psy-Fi, @mont29

Added subscribers: @Sergey, @Psy-Fi, @mont29

Not quite sure we can do anything here… Afaik, suspending an OpenGL (or DirectX, for what matters) application is always problematic, it uses specific low-level access to the GPU driver, unlike regular applications which only use OS APIs. Antony or Sergey should know better here, though.

Not quite sure we can do anything here… Afaik, suspending an OpenGL (or DirectX, for what matters) application is always problematic, it uses specific low-level access to the GPU driver, unlike regular applications which only use OS APIs. Antony or Sergey should know better here, though.

@mont29 - Yeah, that's why I said it would be simple "in theory". And because I know that nothing is truly simple with programming, lol.

@mont29 - Yeah, that's why I said it would be simple "in theory". And because I know that nothing is truly simple with programming, lol.

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Sergey Sharybin self-assigned this 2015-02-09 12:41:11 +01:00

You can think of hibernation as something totally transparent for application -- it just should not notice anything happened. You can't fix it from userspace (aka blender in this case). Some workarounds are probably possible, but it'll be really nasty code which would still fail in loads of cases (for example on my laptop probability of ogl stuck at 100% CPU usage after hibernation is quite high, this you can't fix from blender without restarting it).

So thanks for the report, but we can't really do much about this. Ideally nvidia should look into their driver, but from quick google seems they're not really interested in solving this =/

You can think of hibernation as something totally transparent for application -- it just should not notice anything happened. You can't fix it from userspace (aka blender in this case). Some workarounds are probably possible, but it'll be really nasty code which would still fail in loads of cases (for example on my laptop probability of ogl stuck at 100% CPU usage after hibernation is quite high, this you can't fix from blender without restarting it). So thanks for the report, but we can't really do much about this. Ideally nvidia should look into their driver, but from quick google seems they're not really interested in solving this =/

There is such a thing as a robust context in newer OpenGL, check https://www.opengl.org/registry/specs/ARB/robustness.txt. We could try using it but I'm not certain it will fix resets in CUDA contexts...Any CUDA guru here who might know? I'd suggest to use command-line only rendering for such tasks for now.

There is such a thing as a robust context in newer OpenGL, check https://www.opengl.org/registry/specs/ARB/robustness.txt. We could try using it but I'm not certain it will fix resets in CUDA contexts...Any CUDA guru here who might know? I'd suggest to use command-line only rendering for such tasks for now.

@Psy-Fi, i'm not sure why exactly the robust contexts will help? From the problem description it just seems driver is flacky enough to not ensure row refresh signals are keeping to happen on video card's SDRAM, which eventually leads to textures corruption. At least that's what likely happening based on the timing and symptoms. Not totally clear why other contents of VRAM are fine tho.

In any case, opengl+hibernation issue is not something blender-specific, it's kernel+driver specific. My main desktop seems to survive it all just fine i.e.

CUDA+hibernation is major problems, being discussed in loads of places. Driver is just to be fixed..

@Psy-Fi, i'm not sure why exactly the robust contexts will help? From the problem description it just seems driver is flacky enough to not ensure row refresh signals are keeping to happen on video card's SDRAM, which eventually leads to textures corruption. At least that's what likely happening based on the timing and symptoms. Not totally clear why other contents of VRAM are fine tho. In any case, opengl+hibernation issue is not something blender-specific, it's kernel+driver specific. My main desktop seems to survive it all just fine i.e. CUDA+hibernation is major problems, being discussed in loads of places. Driver is just to be fixed..
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#43597
No description provided.