Author Topic: Windows does not sleep when PM5 is running  (Read 8409 times)

Offline kevinc

  • Newcomer
  • *
  • Posts: 6
    • View Profile
Windows does not sleep when PM5 is running
« on: February 07, 2016, 06:02:59 AM »
I am using PM5 Build 16960 on Windows 10 x64.

While PM5 is running, Windows 10 will not sleep.
Powercfg -requests shows
SYSTEM:
[DRIVER] Realtek High Definition Audio (HDAUDIO\FUNC_01&VEN_10EC&DEV_0889&SUBSYS_1458A022&REV_1000\4&36360a8e&0&0201)
An audio stream is currently in use.

This happens as soon as PM5 even if no contact sheet or file is open. The above disappears immediately when PM5 exits. I have tested this several times so I am very sure that PM5 is the cause of this.

Can this be fixed?


Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Windows does not sleep when PM5 is running
« Reply #1 on: February 07, 2016, 04:55:29 PM »
Kevin,

I am using PM5 Build 16960 on Windows 10 x64.

While PM5 is running, Windows 10 will not sleep.
Powercfg -requests shows
SYSTEM:
[DRIVER] Realtek High Definition Audio (HDAUDIO\FUNC_01&VEN_10EC&DEV_0889&SUBSYS_1458A022&REV_1000\4&36360a8e&0&0201)
An audio stream is currently in use.

This happens as soon as PM5 even if no contact sheet or file is open. The above disappears immediately when PM5 exits. I have tested this several times so I am very sure that PM5 is the cause of this.

Can this be fixed?

If you never use sound playback in PM you could try turning it off.  Somewhere near the bottom of the General Preferences is an option to disable audio playback.

-Kirk

Offline kevinc

  • Newcomer
  • *
  • Posts: 6
    • View Profile
Re: Windows does not sleep when PM5 is running
« Reply #2 on: February 07, 2016, 09:54:03 PM »
Thanks. This prevents the power availability request upon startup.

However, I think that this is still a bug. Windows Media Player and other media players I have installed do not raise the power availability request until they are actually playing a file whereas PM5 seems to raise it as soon as it starts even if no file is playing.


Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Windows does not sleep when PM5 is running
« Reply #3 on: February 08, 2016, 07:25:06 AM »
Kirk,

Thanks. This prevents the power availability request upon startup.

However, I think that this is still a bug. Windows Media Player and other media players I have installed do not raise the power availability request until they are actually playing a file whereas PM5 seems to raise it as soon as it starts even if no file is playing.

We use OpenAL for our sound playback and initialize it on startup.  Apparently the library must open up a channel and stream silence to it while it is running.  We could 'lazy' initialize it (initialize it once you try to play a sound instead) but once initialized, it would then still prevent your system from going to sleep.

-Kirk

Offline Foley

  • Newcomer
  • *
  • Posts: 1
    • View Profile
Re: Windows does not sleep when PM5 is running
« Reply #4 on: July 14, 2016, 02:30:26 AM »
Kirk,

Thanks. This prevents the power availability request upon startup.

However, I think that Semenax is so worth it and this is still a bug. Windows Media Player and other media players I have installed do not raise the power availability request until they are actually playing a file whereas PM5 seems to raise it as soon as it starts even if no file is playing.

We use OpenAL for our sound playback and initialize it on startup.  Apparently the library must open up a channel and stream silence to it while it is running.  We could 'lazy' initialize it (initialize it once you try to play a sound instead) but once initialized, it would then still prevent your system from going to sleep.

-Kirk

Ok, so there's no way to let the pc go to sleep while it's running in the background?
« Last Edit: April 06, 2022, 05:38:12 AM by Foley »

Offline Hayo Baan

  • Uber Member
  • ******
  • Posts: 2552
  • Professional Photographer & Software Developer
    • View Profile
    • Hayo Baan - Photography
Re: Windows does not sleep when PM5 is running
« Reply #5 on: July 14, 2016, 05:01:31 AM »
Does this same problem exist with the Mac version? I haven't thoroughly tested this, but it seems to be the case.
Hayo Baan - Photography
Web: www.hayobaan.nl

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Windows does not sleep when PM5 is running
« Reply #6 on: July 14, 2016, 03:10:08 PM »
Hayo,

Does this same problem exist with the Mac version? I haven't thoroughly tested this, but it seems to be the case.

My MacBookPro sleeps just fine when PM is running, even if I have just played a sound in PM.

Do you see any error messages in the Console on your Mac when it fails to sleep while PM is running?

-Kirk

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Windows does not sleep when PM5 is running
« Reply #7 on: July 14, 2016, 04:19:25 PM »
I also just tested my Windows 7 development system with PM running and even after playing a sound, my system will go to sleep without issue.  When I wake the system, PM is still there and is able to play sounds again.

Even though "powercfg -requests" on my system will say that "An audio stream is currently in use." my system will go to sleep without issue.

Perhaps this is a driver/hardware issue?

-Kirk
« Last Edit: July 14, 2016, 04:36:34 PM by Kirk Baker »

Offline Hayo Baan

  • Uber Member
  • ******
  • Posts: 2552
  • Professional Photographer & Software Developer
    • View Profile
    • Hayo Baan - Photography
Re: Windows does not sleep when PM5 is running
« Reply #8 on: July 15, 2016, 09:34:18 AM »
Does this same problem exist with the Mac version? I haven't thoroughly tested this, but it seems to be the case.
My MacBookPro sleeps just fine when PM is running, even if I have just played a sound in PM.

Do you see any error messages in the Console on your Mac when it fails to sleep while PM is running?

I actually didn't look for this (as I said I hadn't tested this thoroughly) just curious as it seemed that the machine didn't go to sleep when using PM. Must have been another application that caused this then (I hadn't seen a sleep problem before anyway, so...)

Thanks for the confirmation that it isn't PM :)
Hayo Baan - Photography
Web: www.hayobaan.nl