After computer sleeps, Audio Output is not working

• Aug 7, 2020 - 20:33

When the following happens:

  • Open MuseScore
  • Computer goes to Sleep Mode
  • Wake computer
  • Go to MuseScore
  • Try to play a score

Program stays steady, no sound is played. The progress bar is stopped.


Comments

In reply to by bobjp

Changing I/O parameters to other one, then closing MuseScore, then opening it again and changing to the original one.
All the other softwares that I use doesn't have problem with that, they react normal after sleep mode. For example VLC, Google Chrome, Audacity, even the Windows Media Player.
This is an issue that is generated from MuseScore. :(

In reply to by danymansk8

Perhaps not, but since this issue since unique to your system, it would seem to have soemthing to do with device drivers or other system-dependent issues. Switching to the usual supported build of MuseScore for your architectures is likely to improve any number of behaviors. I don't know that this will be one of the things fixed, but it is not unlikely.

If that doesn't fix it right there, next bit of advice is to make sure you've installed all relevant OS and driver updates.

In reply to by danymansk8

Again, we really need more info on your computer.

  1. W10, laptop 8gb ram SSD.
  2. MuseScore and Sibelius open with scores active.
  3. Close lid, computer sleeps.
  4. Wake Computer up. Both MS and Sibelius playback as expected.

Can't say it"s your 32 bit version, but it's worth trying the 64 bit. 32 bit software is limited on 64 bit machines.

In reply to by bobjp

I just installed the 64 version: OS: Windows 10 (10.0), Arch.: x86_64, MuseScore version (64-bit): 3.5.0.13199, revision: 43c5553
As I suspected, it doesn't solve the issue, it remains the same. I'm pretty sure it has to do with the audio traveling through the hdmi up to the TV. When the software restarts, it doesn't play it there and stays freezed.
I know is related solely to this software since other softwares work fine.
And I know is the last version of drivers.
Also, some other detail, previous version of MuseScore worked fine. It started happening with v3, but v2 worked fine.

In addition to the original comment:

I just installed the 64 version: OS: Windows 10 (10.0), Arch.: x86_64, MuseScore version (64-bit): 3.5.0.13199, revision: 43c5553
As I suspected, it doesn't solve the issue, it remains the same. I'm pretty sure it has to do with the audio traveling through the hdmi up to the TV. When the software restarts, it doesn't play it there and stays freezed.
I know is related solely to this software since other softwares work fine (VLC, Chrome, Media Player, etc).
And I know is the last version of drivers.
Also, some other detail, previous version of MuseScore worked fine. It started happening with v3, but v2 worked fine.

In reply to by danymansk8

Interesting, because until recently, I also had one setup that used a TV as a monitor. Though I never used it for sound. The TV quit working so I can't test your scenario. However, you can test some things by using headphones (or speakers) plugged into your computer. Then test sleep. Something may have indeed changed in MuseScore.

I have the same issue of audio output, when my PC is connected with the TV display. When my PC is not connected with the TV display, this issue does not happen. I do not know the reason. If anyone knows the way to fix this issue, will you tell me.

In reply to by danymansk8

I'm confused, previously you wrote that you experience this in 3.4.2, which is many months old. Are you now saying the problem actually didn't start until the current version 3.5?

Either way, the fact that only a couple of people are experiencing this lends some credibility to the theory that this is an audio driver issue. What audio driver are you each using?

And it continues and continues... Is there any developer that is reading this thread? Or this is just a forum for users? Because this is definitely a bug...

In reply to by danymansk8

Sure the contributors read here as well.. but that doesn't magically means they can reproduce your issue.

I'll have a go tonight with attaching my laptop to the TV and then putting it in sleep; but so far (just the laptop and other external screens) have not yet triggered this behavior in MuseScore.

In reply to by danymansk8

Yes, developers read this, but so far no one is able to reproduce this problem. So, the more information you can provide about the unique qualities fo your particular system (e.g., the specific monitor being used, the specific device drivers involved), the more possible it would be that a developer might be able to reproduce the issue

I think I was able to reproduce this after I had detected a similar issue with Audacity and my docking station. And sure enough, I can reproduce this now.
However, I'm not quite sure if we can solve it (will need some more investigation, for which I currently unfortunately don't have the free time). The problem seems to be that MuseScore, after waking from sleep keeps sending audio to the device it had opened previously. But on some systems (depending on manufacturer/driver) waking from sleep means that all devices are re-enumerated by the operating system. Meaning that that same audio device no longer is linked to the pipe MuseScore had open. And I'm not sure whether MuseScore is really aware of it (although I think it somewhat can be, given that the playback cursor doesn't appear/advance).

There seem to be two possible workarounds currently:

  1. Press the MIDI input icon in the toolbar twice after waking from sleep. It'll restart all Audio/MIDI devices from within MuseScore, thus also refreshing the audio connection it remembered from before sleep. (This might not work out for you if you had to change the settings in Preferences → I/O from their defaults

  2. Change the preferences to use the Windows DirectSound API with the Primary Sound Driver device and make sure that is saved (close and re-open MuseScore to verify).
    This device is a software device from MicroSoft, which does the hardware interaction behind another abstraction layer. For me, it seems to be not affected by the re-enumeration after waking from sleep.

That 2nd method is what I use with Audacity as well, otherwise it fails to pick up on switching between speakers and headphones on my Dell Latitude laptop.

In reply to by jeetee

Further observation:
Even with the directsound API, I can get very similar behavior just by unplugging the HDMI cable to the TV. MuseScore will not switch back to the internal speakers automatically and playback will be in the same (or at least very similar) hanging state.

In reply to by jeetee

Or...maybe we shouldn't use sleep mode with software open. There are programs that don't like to work after coming out of sleep. Sure, sleep is convenient, But if you know you are going to have problems, closing MuseScore first seems like a lot less hassle than fiddling with it after.

In reply to by bobjp

Nowadays, new users are just closing the top cover of the laptop. And the computer goes into sleep mode. Then they open the top cover and continue working. And they work for days like this without rebooting.

Desktop users also now like to leave the device in sleep mode. Because they can continue working immediately without waiting for a reboot.

It goes without saying that while working as an IT I solved many problems with a simple reboot (I always asked myself why they were too lazy to do this).

In reply to by jeetee

Yes, it's true that there are some issues with renumbering devices while the OS wakes up (or device changes).

If a software only uses the system device, this shouldn't be a problem. But if it allows to select a device in itself, there have been problems with the enumeration it received from the system before sleeping (or after a device was removed).

In reply to by jeetee

Thanks for taking your time in this! In fact, what you are describing seems to be the issue. But doing your workarounds doesn't fully work when I do them. At least there is consensus that the issue is real, is happening, and it is annoying.

Is there anything else we can do to solve this?

In reply to by danymansk8

This is not a workaround. This is the way a computer should be used. When you aren't using it, leave it alone or shut it down. Get an SSD if your HDD takes for ever to start. It's worth it. A restart clears out many things you don't need. When you leave the room for awhile do you leave the TV on? Doesn't you far more complicated computer deserve the same courtesy you give your TV?

In reply to by bobjp

Your answer is so unprofessional or ignorant.
How come then all other SW resumes all the settings status as was?
Think of the browser, other game SW, Netflix etc, they all resume the audio devices setting as was after sleeping.

If you compare the Computers with TV and if the modern computer was ever like the TV, your life would have been miserable from all the resetting each time you reboot/sleep the computer !!

In reply to by ndidc1000

Most other software simply uses the default system audio or just lets you select between high level device names and doesn't provide the ability to select specific raw audio interfaces. So indeed, most programs won't suffer this issue. Other programs that specialize in audio do indeed have similar issues on OS's like Windows that reassign these id's. But presumably there does exist a way for programs to request the OS notify them of changes to interface id's. This sort of very low level OS-dependent code is not something MuseScore normally deals with directly - that happens in the libraries we depend on. But probably someone who is sufficient expert in these matters could find a solution.

Since MuseScore is open source, I do hope someone with that level of expertise volunteers! But first, you might want to check to see if it's even still an issue in current nightly builds of MuseScore 4, which have very different audio internals.

In reply to by danymansk8

Hey!! This may be 4 years late but here's something I found
I'm using Musescore 4.1.1 for Apple Silicon Mac (M2 13" Air, 8c CPU and GPU, 8gb ram) and the errors are the same. The thing I noticed, is my Windows 11 computer (3700X, 5700XT 16gb ram, custom built) has the exact same issue. It appears to be that Musescore requires some time for it to work again. I was reading through this thread as my Musescore on mac broke like explained above, trying to find a solution, and after I finished reading this, I tried my Musescore again and it worked.
I have a feeling that Musescore is unloading all the audio files from memory when on sleep and reloading them on wake, to preserve memory. This is a suspicion tho. Sorry it doesn't work for you, life never likes to cooperate with us.

In reply to by bokboygamer

I also came looking for this issue (musescore 4, macbook air m2, Sonoma 14.5). Exact same thing happened to me, too. Opened laptop from sleep, clicked on a note or played a score, no sound. Came here and read the thread, tried it again and it worked. I was closing musescore and opening it again previously, which also worked, but perhaps it was just that it had been long enough? In any case, it's annoying, and hopefully there is a solution to be had somewhere down the line, but at least on this laptop, the amount of time needed is not very long (maybe a minute or so)?

Do you still have an unanswered question? Please log in first to post your question.