"Prevent Screen and Computer from Powering Down..." not working?

Discussions, Bug Reports and Issues related to Beta versions of SharpCap
Post Reply
lowenthalm
Posts: 153
Joined: Mon May 07, 2018 12:27 am

"Prevent Screen and Computer from Powering Down..." not working?

#1

Post by lowenthalm »

Sorry, this is using previous beta release.

I have always had this setting checked in the settngs panel. Seemed to work as expected. My screen saver would come on, but the computer wouldn't go to sleep if SharpCap was busy doing something important.

So, tonight I was capturing a bunch of darks with an automated sequence. 30x2m B1 and 30x2m B2, full frame for my ASI294 pro cooled camera. It was going to take a a little over two hours, so I napped. Woke up, and my computer had gone to sleep, while plugged into power, 4 frames short of finishing the second capture, so about 8 minutes prior to finishing.

I have captured a series of darks that took over 2 hours prior to this without issues, but not with the 4.1 beta. Is it possible preventing sleep is broken in the beta version?

I am running Parallels on a Mac. The My laptop sleep setting was set to never, never in Windows 10. While on the Mac side, it was set to turn display off after 1 hour (see attached screen shot of the setting screens). I think I touched I might have touched it around the 1 hour mark, so its possible this kicked in. I also noticed that "Prevent computer from sleeping automatically when the display is off" was not checked. Its possible the this setting had some sort of effect upon things, but I don't remember changing this setting. I upgraded from Windows 7 to Windows 10 and the latest version of Parallels recently, so maybe it has something to do with that. I know this function in SharpCap worked as expected previously under Windows 7.
Attachments
Windows and Mac Sleep settings
Windows and Mac Sleep settings
Screen Shot 2023-07-25 at 1.57.21 AM.jpg (403.92 KiB) Viewed 358 times
User avatar
admin
Site Admin
Posts: 13420
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: "Prevent Screen and Computer from Powering Down..." not working?

#2

Post by admin »

Hi,

had the whole Mac gone to sleep, or was the Mac awake and the Windows inside parallels had gone to sleep?

When that option is set, SharpCap uses various Windows API calls to request that Windows should not go to sleep or power off the display, then clears the request when it exits. However, I wouldn't expect what SharpCap is doing to have any effect on the host MacOS operating system when you are running in Parallels. In any case, you have set Windows up to never sleep and to never turn off the display, so I suspect that what SharpCap is doing would have no effect on Windows under those settings either.

The real mystery is... If it every worked before - how?

cheers,

Robin
lowenthalm
Posts: 153
Joined: Mon May 07, 2018 12:27 am

Re: "Prevent Screen and Computer from Powering Down..." not working?

#3

Post by lowenthalm »

The whole Mac had gone to sleep.

I had similar thoughts, but thought I should ask, just to be sure nothing had changed in 4.1 that would only cause this to fail with dark capture.

What windows API calls are you using to do this? I’ll try exploring this behavior today and research how parallels handles this windows api behavior. I may have changed something in the Mac sleep settings that caused this.
lowenthalm
Posts: 153
Joined: Mon May 07, 2018 12:27 am

Re: "Prevent Screen and Computer from Powering Down..." not working?

#4

Post by lowenthalm »

OK. Ran the tests with some good results (and good news). Skip ahead to the bottom line below if you are in a hurry and trust my test methodology!

Test Methodology:
I ran the deep sky test camera and live stacked with save raw images turned on to generate Sharpcap activity, both disk and CPU. Sharpcap settings that prevent computer from sleeping was turned on. Then I ran the following sequence of tests:

1) Set the Mac display display off to 1 minute in order to reproduce last nights issue. The issue was reproduced. Observed that raw images were saved until the display turned off after 1 minute of no mouse and keyboard activity, then the computer slept and no images were saved until I woke it up. Then raw images started saving again as soon as I woke it up.

2) Tried checking on the "Prevent computer from sleeping automatically when the display is off" setting in the Mac sleep settings and repeated the test in (1). The display turned off, but SharpCap kept on saving raw images. The computer did not not fully go to sleep. SUCCESS!

3) Repeated test (2), but unchecked prevent computer from sleeping in SharpCap settings. Raw images stopped saving as soon as the display went off, and restarted saving when I woke the computer up. Essentially, it went back to the behavior observed in test (1).

4) Repeated test (3), but turned prevent computer from sleeping in SharpCap settings back on. Behavior again returned to the desired behavior observed in test (2).

Bottom line:
1) SharpCap can fully control whether the Mac/Parallels combo is allowed to fully goes to sleep or not. BUT, this only works if the "Prevent computer from sleeping automatically when the display is off" setting circled in the attached jpg is turned checked on.
2) If the circled sleep control in the Mac energy saving Control panel is not checked, Sharpcap sleep prevention functionality is completely overridden.
Attachments
Correct Mac sleep settings for SharpCap/Parallels
Correct Mac sleep settings for SharpCap/Parallels
2023-07-25 Sharpcap doesn't prevent Sleep Screen Shot - SOLUTION.jpg (223.34 KiB) Viewed 330 times
User avatar
admin
Site Admin
Posts: 13420
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: "Prevent Screen and Computer from Powering Down..." not working?

#5

Post by admin »

Hi,

nice one - glad you got it sorted. I must admit that my experience of using MacOS is incredibly limited, so I always struggle when it comes up in questions. I much prefer sticking to Windows and Linux...

cheers,

Robin
Post Reply