Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sanity for cat owners: stay awake with closed lid, external screen and no AC #83

Closed
sttts opened this issue Mar 16, 2017 · 11 comments
Closed

Comments

@sttts
Copy link

sttts commented Mar 16, 2017

Every cat owner will know that these creatures love to sleep on the warm Mac and once in a while disconnect the MacSafe connection. Normal OSX behavior with external screen and closed lid: GO TO SLEEP.

img_0632

Although more and more no-sleep apps pop up in the AppStore, none is supporting this scenario, i.e.:

Stay awake if

  • lid is closed
  • external display is attached
  • AC is disconnected.

Optionally, make this a time-boxed, i.e. stay awake for X minutes, then warn, wait another X minutes, then sleep.

@janclarin
Copy link

janclarin commented Apr 16, 2017

Unfortunately, this isn't possible. In order to use "closed-display" mode, the laptop has to be plugged in according to Apple.

@sttts
Copy link
Author

sttts commented Apr 17, 2017

Disabling the sleep mode with KeepingYouAwake or other tools works fine. What is missing is some logic which disables the awake-mode if the external screen is detached.

Why is this impossible? The computer is still awake and a check for attached screens every minute (or via some event) would be enough.

@janclarin
Copy link

The problem has to do with your third condition which is when AC is disconnected. "Closed display" mode only works when the laptop is plugged in. As in, if it is unplugged and the lid is closed, the computer is forced to sleep and cannot check for external displays.

Because it is asleep, it cannot run programs. So, KeepMeAwake won't have any effect no matter what you do. I hope that made sense.

@sttts
Copy link
Author

sttts commented Apr 18, 2017

Maybe I misunderstand how KeepingYouWake works. E.g. Amphetamine (https://www.ifun.de/amphetamine-os-x-app-haelt-eure-mac-wach-76364/) manages to disable sleep with closed display and without AC. The issue is that it only does this time-based, e.g. for 6 hours. Instead, this should be done depending on attached, external displays.

@janclarin
Copy link

janclarin commented Apr 18, 2017

I tried Amphetamine and was unable to get any output to the external display while the laptop was both unplugged and closed.

After some searching, I found this StackOverflow post asking a similar question.
Their solution is as follows:

You can use Insomniax to disable sleep when the display is closed. This will mean that you can close the lid and display the screen on a secondary monitor mode without needing to have a power adapter connected as the Mac will not sleep when you close the lid.

I don't know if or when this will ever be added to KeepingYouAwake, so you can use that for now.

@GitBruno
Copy link

I assume we are on hold until the licensing is sorted?

@ghost
Copy link

ghost commented Jul 31, 2017

http://semaja2.net

@semaja2
Copy link

semaja2 commented Jul 31, 2017

Posting on my mobile but I will update the licensing on the repository for InsomniaX shortly

However as long as the application using the InsomniaX source code is free and open source, I have no issues with the code being used :)

InsomniaX achieves its goal by loading the Insomnia kernel extension, and ultimately I would love for someone to take over or replace InsomniaX as there are many people still using it

@ghost
Copy link

ghost commented Jul 31, 2017

@newmarcel do you consider to add such a function?

@newmarcel
Copy link
Owner

@semaja2 Thanks for jumping into this discussion. It's sad to see that InsomniaX is unsupported now.

I can fully understand the discussion in this thread. In the past I always had the fear that running the MacBooks with the lid closed would cause overheating issues. But I'm currently using a closed-lid MacBook Pro at work (connected to the good old thunderbolt display, but not to a 🐈) and I never run into these kind of heat issues (might be different for different Macs).

On the other hand, it really looks like a Kernel Extension is required to achieve this functionality at all… which is problematic, because Apple seems to be locking down kexts more and more with every macOS release (which I can fully understand in this day and age). So I will most likely never add a kext to this app to achieve this functionality.

If someone finds a way or a new API to completely prevent a Mac from going to sleep in clamshell mode, please let me know. I'm still open to the general idea.

@knope

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants