Author Topic: Musicbee stops playing when windows 10 turns off screen for energy saving  (Read 13958 times)

hiccup

  • Sr. Member
  • ****
  • Posts: 7785
It seems that Windows does things a bit differently when it detects a 'tablet-like' machine.
You can try to solve this by making a change in the registry.
(only do this if you are confident with these kinds of tweaks, make a registry backup, etc.)

Go to:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power
Change the value of 'CsEnabled' from 1 to 0
Reboot your laptop/tablet.

This might already be enough to prevent audio stopping when the screen turns off.
If not, you now should have other power plans such as 'high performance', and also more advanced settings available.

After doing this you might keep an eye out for a possible penalty in battery performance and effects on sleep state etc.

alec.tron

  • Sr. Member
  • ****
  • Posts: 752
Afaik, this is a general windows10 (which started on windows8 / RT) issue & mobile devices and used to be called Connected Standby (looks like they renamed it.. :D ) ...
Spotify & their app has been hit hard by this on windows as they can't get a "power-certified" status for their app (for which your app will need to be under a certain threshold to be allowed to play in the background and get connected standby, or so it was the last time I looked into this a few years ago... ).
Funnily enough, even recent windows10 versions do shut down Microsofts' own softwares' sound... i.e. try playing something through internetExplorer (eg youtube), wait for your tablet to switch off it's screen = youtube media/sound gets shut down as well.
At least that's how it used to be on a surface pro 3 & an v1 RT surface for the last years... and last I tried this was earlier this year when surfaceProd4 came out, and it still failed in that regard...
And, now hold on to something... the official work around from Microsoft is/was, 'just keep your screen awake all the time'...

On the other hand, there's some universal-apps that are powerCompliant (tried to find the docs for this quickly but I failed, no idea what I read a few years ago about it... official youtube app was one of the few that remained playing after screen going to sleep).

Yay 2016...
c.

hiccup

  • Sr. Member
  • ****
  • Posts: 7785
Afaik, this is a general windows10 (which started on windows8 / RT) issue & mobile devices and used to be called Connected Standby (looks like they renamed it.. :D ) ...

It sounds like you use a tablet/touchscreen device too.
Have you tried the solution I presented in the post right before yours?

alec.tron

  • Sr. Member
  • ****
  • Posts: 752
Hi hiccup!
I did see it and noted it with some interest; but I had this issue in 2014/15 ish, and it drove me nuts as I wante to use a an old surface RT as a BYOD at work (to listen to music to through...) since I had it anyway and it was catching dust. But since I got rid of the Surface a bit later due to the issues w audio and used an android & ipad instead I had no real need to play music through a windows device that gets hit by Connected Standby / InstantGo "throttle-ing"/screen-sleep affecting audio playback anymore...
Back then I even went so far to poke official M$ support for a bit about it, but to no avail... hence the reference to the "official" work around.
Nowadays I only occasionally check if it's still around for amusement as I found it a tad strange that hardly anyone complained about this and it apparently was a no-fix case for M$ (which surely will turn into frustration again when I need to play music extensively through a windows touch device on the side [with the screen going to sleep on purpose...] again).
Sorry I can't help with testing the registry trickery!
c.

silvandy

  • Newbie
  • *
  • Posts: 10
I ill try the registry editing in the next few days, I am busy with other matters right now... sorry

theta_wave

  • Sr. Member
  • ****
  • Posts: 680
It seems that Windows does things a bit differently when it detects a 'tablet-like' machine.
You can try to solve this by making a change in the registry.
(only do this if you are confident with these kinds of tweaks, make a registry backup, etc.)

Go to:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power
Change the value of 'CsEnabled' from 1 to 0
Reboot your laptop/tablet.

This might already be enough to prevent audio stopping when the screen turns off.
If not, you now should have other power plans such as 'high performance', and also more advanced settings available.

After doing this you might keep an eye out for a possible penalty in battery performance and effects on sleep state etc.
Gah, the mess of making one OS work on two different form factors.  I've been looking to upgrade to Win10 from my Win7 Ultimate install due to the deadline coming up, but seeing this and experiencing (then later correcting) the fuzzy pixel problem makes me hesitant to do it.

alec.tron

  • Sr. Member
  • ****
  • Posts: 752
Had a look around again when I had a minute, and this is the old ConnectedStandby win8 documentation:
https://software.intel.com/en-us/articles/windows-8-store-app-connected-standby-whitepaper
And on windows10/8.1 it's called "instantGo"...
c.

psychoadept

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 10691
Mine is doing okay, but I may have had issues with sleep kicking in unexpectedly before (reinstalled windows several times in March and April so settings got messed up).  Definitely continues playing through screen off now.
MusicBee Wiki
Use & improve MusicBee's documentation!

Latest beta patch (3.5)
(Unzip and overwrite existing program files)

hiccup

  • Sr. Member
  • ****
  • Posts: 7785
Mine is doing okay,

You earlier mentioned a Dell that had this issue.
Are you speaking now about the same laptop? Has it resolved by itself? Did you use the fix I posted?

psychoadept

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 10691
Mine is doing okay,

You earlier mentioned a Dell that had this issue.
Are you speaking now about the same laptop? Has it resolved by itself? Did you use the fix I posted?

Same computer, didn't apply your fix.  I'm not sure I was having the same problem to begin with
MusicBee Wiki
Use & improve MusicBee's documentation!

Latest beta patch (3.5)
(Unzip and overwrite existing program files)

foxj

  • Jr. Member
  • **
  • Posts: 57
Was anyone able to solve this issue? There are many hidden options in windows power settings. In my case all my music is stored on an external drive which was spinning down. In power settings I had changed was the usb selective suspend suspend settings USB Selective Suspend.
But my issue has returned. I read that chrome dealt with it by adding a switch to resist sleep while music is playing by adding "--exclusive-mode-audio"  to your chrome properties target line.

I'm sure my issue is some widows update reset a power setting.

For those of you who want to increase the available "power options" here are some registry tweeks I found on github. Place the following into a .reg file RevealPowerOptions.reg would do, save it and execute it (at your own risk).
Code
Windows Registry Editor Version 5.00
;Reveals the most used hidden power settings in Windows 10. The value Attributes=2 means reveal, where value of 1 or 0 means hide from Power Options.

;WLAN
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\19cbb8fa-5279-450e-9fac-8a3d5fedd0c1\12bbebe6-58d6-4636-95bb-3217ef867c1a]
"Attributes"=dword:00000002

;Power Scheme Personality
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\245d8541-3943-4422-b025-13a784f679b7]
"Attributes"=dword:00000002

;USB Power Settings
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\2a737441-1930-4402-8d77-b2bebba308a3\0853a681-27c8-4100-a2fd-82013e970683]
"Attributes"=dword:00000002
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\2a737441-1930-4402-8d77-b2bebba308a3\48e6b7a6-50f5-4782-a5d4-53bb8f07e226]
"Attributes"=dword:00000002
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\2a737441-1930-4402-8d77-b2bebba308a3\d4e98f31-5ffe-4ce1-be31-1b38b384c009]
"Attributes"=dword:00000002

;Intel Graphics
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\44f3beca-a7c0-460e-9df2-bb8b99e0cba6]
;"Attributes"=dword:00000002
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\44f3beca-a7c0-460e-9df2-bb8b99e0cba6\3619c3f2-afb2-4afc-b0e9-e7fef372de36]
"Attributes"=dword:00000002

;Intel DPTF with TPD Level Config (seems to make it worst if set other than default High TDP)
;[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\48df9d60-4f68-11dc-8314-0800200c9a66\07029cd8-4664-4698-95d8-43b2e9666596]
;"Attributes"=dword:00000002

;Intel DPTF with unkown settings (doesn't show up anyway)
;[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\48df9d60-4f68-11dc-8314-0800200c9a66\4a44b800-4f72-11dc-8314-0800200c9a66]
;"Attributes"=dword:00000002
;[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\48df9d60-4f68-11dc-8314-0800200c9a66\63c39116-4f72-11dc-8314-0800200c9a66]
;"Attributes"=dword:00000002

;Device idle Policy
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\4faab71a-92e5-4726-b531-224559672d19]
"Attributes"=dword:00000002

;PCIe Power Management
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\501a4d13-42af-4429-9fd1-a8218c268e20]
;"Attributes"=dword:00000002
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\501a4d13-42af-4429-9fd1-a8218c268e20\ee12f906-d277-404b-b6da-e5fa1a576df5]
"Attributes"=dword:00000002

;GPU preference Policy (for multi-gpu scenario)
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\5FB4938D-1EE8-4b0f-9A3C-5036B0AB995C\DD848B2A-8A5D-4451-9AE2-39CD41658F6C]
"Attributes"=dword:00000002

;Disconnected Standby Mode
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\68AFB2D9-EE95-47A8-8F50-4115088073B1]
"Attributes"=dword:00000002

;Network connectivity in Standby
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\F15576E8-98B7-4186-B944-EAFA664402D9]
"Attributes"=dword:00000002

;Presence Awareness Power Behaviour
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\8619B916-E004-4dd8-9B66-DAE86F806698]
;"Attributes"=dword:00000002
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\8619B916-E004-4dd8-9B66-DAE86F806698\468FE7E5-1158-46EC-88BC-5B96C9E44FD0]
"Attributes"=dword:00000002
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\8619B916-E004-4dd8-9B66-DAE86F806698\49CB11A5-56E2-4AFB-9D38-3DF47872E21B]
"Attributes"=dword:00000002
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\8619B916-E004-4dd8-9B66-DAE86F806698\60C07FE1-0556-45CF-9903-D56E32210242]
"Attributes"=dword:00000002
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\8619B916-E004-4dd8-9B66-DAE86F806698\82011705-FB95-4D46-8D35-4042B1D20DEF]
"Attributes"=dword:00000002
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\8619B916-E004-4dd8-9B66-DAE86F806698\9FE527BE-1B70-48DA-930D-7BCF17B44990]
"Attributes"=dword:00000002
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\8619B916-E004-4dd8-9B66-DAE86F806698\C763EE92-71E8-4127-84EB-F6ED043A3E3D]
"Attributes"=dword:00000002

;Multimedia Settings
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\9596FB26-9850-41fd-AC3E-F7C3C00AFD4B\03680956-93BC-4294-BBA6-4E0F09BB717F]
"Attributes"=dword:00000002
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\9596FB26-9850-41fd-AC3E-F7C3C00AFD4B\10778347-1370-4ee0-8bbd-33bdacaade49]
"Attributes"=dword:00000002
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\9596FB26-9850-41fd-AC3E-F7C3C00AFD4B\34C7B99F-9A6D-4b3c-8DC7-B6693B78CEF4]
"Attributes"=dword:00000002

;Surface Overlay Power Subgroup (can't be changed from UI apparently)
;uneven numbers for AC , even numbers for DC
;1,2 balanced, 3,4 High Perf, 5,6 Max Perf
;[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\bfeba2e4-fdcc-41d9-93f4-3f6991c1f730\a4a0ab02-11f1-4584-bc52-cbb98eabdb0b]
;"Attributes"=dword:00000002

;Windows Energy Saver
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\DE830923-A562-41AF-A086-E3A2C6BAD2DA]
;"Attributes"=dword:00000002
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\DE830923-A562-41AF-A086-E3A2C6BAD2DA\13D09884-F74E-474A-A852-B6BDE8AD03A8]
"Attributes"=dword:00000002
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\DE830923-A562-41AF-A086-E3A2C6BAD2DA\5C5BB349-AD29-4ee2-9D0B-2B25270F7A81]
"Attributes"=dword:00000002
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\DE830923-A562-41AF-A086-E3A2C6BAD2DA\E69653CA-CF7F-4F05-AA73-CB833FA90AD4]
"Attributes"=dword:00000002

;CPU Power Management (only the basic settings)
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\54533251-82be-4824-96c1-47b60b740d00]
;Maximum appropriated Frequency of the CPU (in MHz). Value 0 means auto
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\54533251-82be-4824-96c1-47b60b740d00\75b0ae3f-bce0-45a7-8c89-c9611c25e100]
"Attributes"=dword:00000002
;Minimum percentage of CPU allowed for use.
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\54533251-82be-4824-96c1-47b60b740d00\893dee8e-2bef-41e0-89c6-b55d0929964c]
"Attributes"=dword:00000002
;Cooling Policy
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\54533251-82be-4824-96c1-47b60b740d00\94D3A615-A899-4AC5-AE2B-E4D8F634367F]
"Attributes"=dword:00000002
;Maximum percentage of CPU allowed for use.
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\54533251-82be-4824-96c1-47b60b740d00\bc5038f7-23e0-4960-96da-33abaf5935ec]
"Attributes"=dword:00000002
Last Edit: August 24, 2019, 09:22:07 PM by cometothedarkside4it

pdmwhitelaw

  • Newbie
  • *
  • Posts: 1
A simple workaround was posted in the Superuser forum: "One solution that was suggested was to use a screensaver that's a black screen, and set your screen to never turn off."
See https://superuser.com/questions/1208698/how-to-stop-windows-10-muting-audio-playback-when-screen-turns-off for more discussion, but the workaround does work nicely.

foxj

  • Jr. Member
  • **
  • Posts: 57
After toying around with this for months and was going to dig in after the 5th time I had to climb back down a ladder.
The computer wasn't really sleeping (I had set it to 2 hours) just the monitor was in the screen saver and MusicBee was unresponsive every time needing to be closed and restarted.

I found a post
"Windows 10 keeps changing the power saving settings behind my back".

foxj

  • Jr. Member
  • **
  • Posts: 57
To add to this post I also found that on windows 10 setting developer mode configures the power options to keep the machine playing music. But still will put the machine to sleep if it isn't.