Blender is constantly playing an audio stream of silence and preventing the computer from entering sleep #78649

Closed
opened 2020-07-05 18:44:05 +02:00 by Timo Kinnunen · 17 comments

System Information
Operating system: Windows-10-10.0.19035-SP0 64 Bits
Graphics card: GeForce GTX 970/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 432.00

Blender Version
Broken: version: 2.83.1, branch: master, commit date: 2020-06-25 09:47, hash: 8289fc688b
Worked: unknown, broken at least since 2013.

Short description of error
Immediately after starting, Blender opens on audio stream and starts playing silence using OpenAL. This prevents the computer from entering sleep as Windows cannot know if Blender might start playing audiple sound at any given moment.

Using Process Explorer it is possible to confirm that two threads of the Blender process are constantly active, presumably to supply the silence to the audio stream.
1st of them (running at the highest priority level 15) is typically at OpenAL32.dll!alcResetDeviceSOFT+0x314f9.
2nd of them (running at a normal priority level 8) is typically at blender.exe!PyInit_aud+0x59b1b4.

Exact steps for others to reproduce the error

  1. Open an Administrator: Command Prompt
  2. Run the command: powercfg /requests
  3. Observe that the output includes:
    System:
    none
  4. Open Blender
  5. In the command prompt, run the command: powercfg /requests
  6. Observe that the output has changed to include something like:
    System:
    [DRIVER] High Definition Audio Device (HDAUDIO\FUNC_01&VEN_1106&DEV_0441&SUBSYS_1458A014&REV_1001\4&36b8cb0&0&0201)
    An audio stream is currently in use.

Screenshot (23).png

**System Information** Operating system: Windows-10-10.0.19035-SP0 64 Bits Graphics card: GeForce GTX 970/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 432.00 **Blender Version** Broken: version: 2.83.1, branch: master, commit date: 2020-06-25 09:47, hash: `8289fc688b` Worked: unknown, broken at least since 2013. **Short description of error** Immediately after starting, Blender opens on audio stream and starts playing silence using OpenAL. This prevents the computer from entering sleep as Windows cannot know if Blender might start playing audiple sound at any given moment. Using Process Explorer it is possible to confirm that two threads of the Blender process are constantly active, presumably to supply the silence to the audio stream. 1st of them (running at the highest priority level 15) is typically at OpenAL32.dll!alcResetDeviceSOFT+0x314f9. 2nd of them (running at a normal priority level 8) is typically at blender.exe!PyInit_aud+0x59b1b4. **Exact steps for others to reproduce the error** 1) Open an Administrator: Command Prompt 2) Run the command: powercfg /requests 3) Observe that the output includes: System: none 4) Open Blender 5) In the command prompt, run the command: powercfg /requests 6) Observe that the output has changed to include something like: System: [DRIVER] High Definition Audio Device (HDAUDIO\FUNC_01&VEN_1106&DEV_0441&SUBSYS_1458A014&REV_1001\4&36b8cb0&0&0201) An audio stream is currently in use. ![Screenshot (23).png](https://archive.blender.org/developer/F8667337/Screenshot__23_.png)
Author

Added subscriber: @Timo_Kinnunen

Added subscriber: @Timo_Kinnunen

Added subscriber: @Regnas

Added subscriber: @Regnas

Yeah... that's the reason why I set the sound device to null and save the preferences... í ½í¸‰

Yeah... that's the reason why I set the sound device to null and save the preferences... í ½í¸‰

Added subscriber: @iss

Added subscriber: @iss

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'

I can't reproduce this, and I am not sure if this is bug in Blender.

It may be that audio manufacturer thought this would be good idea to enable (chip/driver may not support hibernate feature). It may be possible to change this in device manager, but I don't really remember keywords to find guide.

What device do you use that is preventing PC from going to sleep?

I can't reproduce this, and I am not sure if this is bug in Blender. It may be that audio manufacturer thought this would be good idea to enable (chip/driver may not support hibernate feature). It may be possible to change this in device manager, but I don't really remember keywords to find guide. What device do you use that is preventing PC from going to sleep?

Added subscriber: @deadpin

Added subscriber: @deadpin

Interesting, and this is indeed an issue back in the 2.7x series too.

Opening a tab in chrome and playing youtube will show something similar. If you close the tab the entry in powercfg disappears as well. So even browsers seem to be somewhat nicer in this regard even though their audio sessions come and go frequently.

Interesting, and this is indeed an issue back in the 2.7x series too. Opening a tab in chrome and playing youtube will show something similar. If you close the tab the entry in powercfg disappears as well. So even browsers seem to be somewhat nicer in this regard even though their audio sessions come and go frequently.
Author

In #78649#975045, @iss wrote:
I can't reproduce this, and I am not sure if this is bug in Blender.

It may be that audio manufacturer thought this would be good idea to enable (chip/driver may not support hibernate feature). It may be possible to change this in device manager, but I don't really remember keywords to find guide.

What device do you use that is preventing PC from going to sleep?

There's a "High Definition Audio Device" and a "NVIDIA High Definition Audio" in Device Manager, but I think Windows stopped giving direct access to audio hardware around Windows Vista.

And in fact an entry for Blender appears immediately in Volume Mixer after startup and disappears from there in about 1/4 second after closing Blender, indicating that an audio stream from Blender is being software-mixed-in to the output audio stream that goes out to my speakers. This mirrors what I see using the powercfg /requests -command, as well.

You can open Volume Mixer by right-clicking the Speakers-icon in the Taskbar and selecting "Open Volume mixer".

> In #78649#975045, @iss wrote: > I can't reproduce this, and I am not sure if this is bug in Blender. > > It may be that audio manufacturer thought this would be good idea to enable (chip/driver may not support hibernate feature). It may be possible to change this in device manager, but I don't really remember keywords to find guide. > > What device do you use that is preventing PC from going to sleep? There's a "High Definition Audio Device" and a "NVIDIA High Definition Audio" in Device Manager, but I think Windows stopped giving direct access to audio hardware around Windows Vista. And in fact an entry for Blender appears immediately in Volume Mixer after startup and disappears from there in about 1/4 second after closing Blender, indicating that an audio stream from Blender is being software-mixed-in to the output audio stream that goes out to my speakers. This mirrors what I see using the powercfg /requests -command, as well. You can open Volume Mixer by right-clicking the Speakers-icon in the Taskbar and selecting "Open Volume mixer".
Author

In #78649#975045, @iss wrote:
What device do you use that is preventing PC from going to sleep?

To provide a precise answer to this, the device is indeed the "High Definition Audio Device", which was actually mentioned in my report, I just didn't notice earlier. This is a generic audio device implemented by Microsoft.

I think that it would be possible, using Blender's addon mechanism, to have an addon which opens an audio stream, let's it play silence for a pre-determined amount of time and then, when the time is up, plays an alarm sound. To Windows, this would look exactly like what Blender is doing currently, so Microsoft can't detect whether Blender will use the stream for playing audiple sound or not. And with the addon functionality, I don't think Microsoft should try to second-guess Blender in this respect, either. Given all that, I think this should be fixed within Blender.

> In #78649#975045, @iss wrote: > What device do you use that is preventing PC from going to sleep? To provide a precise answer to this, the device is indeed the "High Definition Audio Device", which was actually mentioned in my report, I just didn't notice earlier. This is a generic audio device implemented by Microsoft. I think that it would be possible, using Blender's addon mechanism, to have an addon which opens an audio stream, let's it play silence for a pre-determined amount of time and then, when the time is up, plays an alarm sound. To Windows, this would look exactly like what Blender is doing currently, so Microsoft can't detect whether Blender will use the stream for playing audiple sound or not. And with the addon functionality, I don't think Microsoft should try to second-guess Blender in this respect, either. Given all that, I think this should be fixed within Blender.

Can you try to follow this guide? https://answers.microsoft.com/en-us/insider/forum/insider_wintp-insider_devices-insiderplat_pc/high-definition-audio-device-audio-stream-is/f3d7ef5e-ee78-4027-8635-46f0a9355505

It may be possible to change current behavior but that is feature request really.

Can you try to follow this guide? https://answers.microsoft.com/en-us/insider/forum/insider_wintp-insider_devices-insiderplat_pc/high-definition-audio-device-audio-stream-is/f3d7ef5e-ee78-4027-8635-46f0a9355505 It may be possible to change current behavior but that is feature request really.
Author

In #78649#975670, @iss wrote:
Can you try to follow this guide? https://answers.microsoft.com/en-us/insider/forum/insider_wintp-insider_devices-insiderplat_pc/high-definition-audio-device-audio-stream-is/f3d7ef5e-ee78-4027-8635-46f0a9355505

It may be possible to change current behavior but that is feature request really.

Before following the guide, I want to contrast Blender with App Radio, an app for listening to internet radio stations.

This is with App Radio open and set to play the stream of "Radio Stad den Haag" radio station:
C:\Windows\system32>powercfg.exe /requests
DISPLAY:
None.

SYSTEM:
[DRIVER] High Definition Audio Device (HDAUDIO\FUNC_01&VEN_1106&DEV_0441&SUBSYS_1458A014&REV_1001\4&36b8cb0&0&0201)
An audio stream is currently in use.

AWAYMODE:
None.

EXECUTION:
None.

PERFBOOST:
None.

ACTIVELOCKSCREEN:
None.

This is with neither Blender nor App Radio open:
C:\Windows\system32>powercfg.exe /requests
DISPLAY:
None.

SYSTEM:
None.

AWAYMODE:
None.

EXECUTION:
None.

PERFBOOST:
None.

ACTIVELOCKSCREEN:
None.

Finally, this is with Blender open:
C:\Windows\system32>powercfg.exe /requests
DISPLAY:
None.

SYSTEM:
[DRIVER] High Definition Audio Device (HDAUDIO\FUNC_01&VEN_1106&DEV_0441&SUBSYS_1458A014&REV_1001\4&36b8cb0&0&0201)
An audio stream is currently in use.

AWAYMODE:
None.

EXECUTION:
None.

PERFBOOST:
None.

ACTIVELOCKSCREEN:
None.

As you can see, both App Radio and Blender use the same audio device and have identical output. As far as power management system is aware they are equal.

Unfortunately, this means I can't simply override the High Definition Audio Device from power management as -- while working-around the problem for Blender -- it would introduce the problem in App Radio and in other MP3 playing software such as Groove Music and possibly others, causing the computer to enter sleep right in the middle of playing music.

> In #78649#975670, @iss wrote: > Can you try to follow this guide? https://answers.microsoft.com/en-us/insider/forum/insider_wintp-insider_devices-insiderplat_pc/high-definition-audio-device-audio-stream-is/f3d7ef5e-ee78-4027-8635-46f0a9355505 > > It may be possible to change current behavior but that is feature request really. Before following the guide, I want to contrast Blender with App Radio, an app for listening to internet radio stations. **This is with App Radio open and set to play the stream of "Radio Stad den Haag" radio station:** C:\Windows\system32>powercfg.exe /requests DISPLAY: None. SYSTEM: [DRIVER] High Definition Audio Device (HDAUDIO\FUNC_01&VEN_1106&DEV_0441&SUBSYS_1458A014&REV_1001\4&36b8cb0&0&0201) An audio stream is currently in use. AWAYMODE: None. EXECUTION: None. PERFBOOST: None. ACTIVELOCKSCREEN: None. **This is with neither Blender nor App Radio open:** C:\Windows\system32>powercfg.exe /requests DISPLAY: None. SYSTEM: None. AWAYMODE: None. EXECUTION: None. PERFBOOST: None. ACTIVELOCKSCREEN: None. **Finally, this is with Blender open:** C:\Windows\system32>powercfg.exe /requests DISPLAY: None. SYSTEM: [DRIVER] High Definition Audio Device (HDAUDIO\FUNC_01&VEN_1106&DEV_0441&SUBSYS_1458A014&REV_1001\4&36b8cb0&0&0201) An audio stream is currently in use. AWAYMODE: None. EXECUTION: None. PERFBOOST: None. ACTIVELOCKSCREEN: None. **As you can see, both App Radio and Blender use the same audio device and have identical output. As far as power management system is aware they are equal.** Unfortunately, this means I can't simply override the High Definition Audio Device from power management as -- while working-around the problem for Blender -- it would introduce the problem in App Radio and in other MP3 playing software such as Groove Music and possibly others, causing the computer to enter sleep right in the middle of playing music.

Changed status from 'Needs User Info' to: 'Archived'

Changed status from 'Needs User Info' to: 'Archived'
Richard Antalik self-assigned this 2020-07-10 11:47:18 +02:00

I would assume those applications already have separate (and user configurable) means of preventing to entering sleep mode, because not all audio devices will prevent going to sleep.

Blender does have modes where it is required to keep device open and constantly output silence, so I guess developers decided it is just simpler to keep it that way all the time. Regardless of reasoning this is not a bug. So I will close this report as this bug tracker is only for bugs and errors.

For user requests and feedback, please use other channels: https://wiki.blender.org/wiki/Communication/Contact#User_Feedback_and_Requests
For more information on why this isn't considered a bug, visit: https://wiki.blender.org/wiki/Reference/Not_a_bug

I would assume those applications already have separate (and user configurable) means of preventing to entering sleep mode, because not all audio devices will prevent going to sleep. Blender does have modes where it is required to keep device open and constantly output silence, so I guess developers decided it is just simpler to keep it that way all the time. Regardless of reasoning this is not a bug. So I will close this report as this bug tracker is only for bugs and errors. For user requests and feedback, please use other channels: https://wiki.blender.org/wiki/Communication/Contact#User_Feedback_and_Requests For more information on why this isn't considered a bug, visit: https://wiki.blender.org/wiki/Reference/Not_a_bug
Author

In #78649#976468, @iss wrote:
I would assume those applications already have separate (and user configurable) means of preventing to entering sleep mode, because not all audio devices will prevent going to sleep.

Well, they do: they open a stream on a device when the user presses the play button, and they close the stream and release the device when the user presses the pause or stop button. This is how Blender should work too, because that's all that's needed to play nice with power management while not wasting CPU resources on playing silence. But Blender is not my project, it's your project and you are free to disagree.

> In #78649#976468, @iss wrote: > I would assume those applications already have separate (and user configurable) means of preventing to entering sleep mode, because not all audio devices will prevent going to sleep. Well, they do: they open a stream on a device when the user presses the play button, and they close the stream and release the device when the user presses the pause or stop button. This is how Blender should work too, because that's all that's needed to play nice with power management while not wasting CPU resources on playing silence. But Blender is not my project, it's your project and you are free to disagree.

Added subscriber: @rboxman

Added subscriber: @rboxman

Oh found this bug... hate to comment after it's closed, but KDE's taskbar also shows Blender using audio continuously. It's not a good look.

The below is what it looks like with just opening the default scene (plain kubuntu on 20.04 lts):
audio.png

Oh found this bug... hate to comment after it's closed, but KDE's taskbar also shows Blender using audio continuously. It's not a good look. The below is what it looks like with just opening the default scene (plain kubuntu on 20.04 lts): ![audio.png](https://archive.blender.org/developer/F8753741/audio.png)
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
5 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#78649
No description provided.