Repository navigation
Keep Awake means not Screen Saver? #120
Unanswered
th3Bastian
asked this question in
Q&A
Replies: 7 comments 1 reply
|
Hi, Jack |
0 replies
|
Ah okay, got it. Could this be a new feature, Keep Awake but allow Screen Saver. Actually I need another tool to get this working. Tool is Caffeinated. It would be nice if Only Switch could do this for me. Sebastian |
0 replies
0 replies
|
Thanks a lot for the answer and your information. Tests the scripts and it works.
But I think I misunderstood Keep Awake.
I meant Keep Awake prevents my Mac from hibernation.
Pmset -g
System-wide power settings:
Currently in use:
lidwake 1
lowpowermode 0
standbydelayhigh 86400
standbydelaylow 10800
standby 1
proximitywake 0
ttyskeepawake 1
hibernatemode 3
powernap 0
gpuswitch 2
hibernatefile /var/vm/sleepimage
highstandbythreshold 50
displaysleep 10
womp 0
networkoversleep 0
sleep 1 (sleep prevented by Caffeinated)
acwake 0
halfdim 1
tcpkeepalive 1
disksleep 10
That’s what Caffeinated sets. It sets sleep not to 0 but prevents from sleep.
Sadly I don’t understand how to do this with pmset. I can set sleep 0 but I don’t know if this is the same.
Sebastian
… Am 04.02.2024 um 21:06 schrieb jack ***@***.***>:
Your requirement isn't a big deal. You can make it by Evolution of OnlySwitch.
Please create a new Switch Evolution, and setup like this:
Turn on (Apple Script):
do shell script "sudo pmset -a displaysleep 0" with prompt "OnlySwitch" with administrator privileges
Turn off(Apple Script):
do shell script "sudo pmset -a displaysleep 4" with prompt "OnlySwitch" with administrator privileges
You can change the value of sleep time, the unit is min. -a means for both battery and charge mode.
Check status(Shell):
[[ $(pmset -g | grep displaysleep) =~ 0 ]] && echo true || echo false
Output: true
The commands will ask your Mac password every time, if you feel it annoying, please add password "your Mac password" at the end of Turn on/off command. For example:
do shell script "sudo pmset -a displaysleep 0" with prompt "OnlySwitch" with administrator privileges password "xxxxx"
I'll add a helper to avoid the password problem in the future. I hope this solution can meet your demands. If it works on your side, I'll share it on Evolution Gallery.
Screenshot.2024-02-04.at.20.52.49.png (view on web) <https://github.com/jacklandrin/OnlySwitch/assets/3782279/9474f192-b0fc-4607-bb1f-3af36b866413>
—
Reply to this email directly, view it on GitHub <#120 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ARD3WJ4NOHU6ELUFIUW62G3YR7S3DAVCNFSM6AAAAABCX7ZKUOVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DGNRSHAZTG>.
You are receiving this because you authored the thread.
|
1 reply
|
Caffeinated uses caffeinate
https://www.dssw.co.uk/reference/caffeinate/
… Am 05.02.2024 um 21:17 schrieb jack ***@***.***>:
The principle of Keep Awake in OnlySwitch is like playing video, preventing system enter idle. it doesn't change pmset.
I don't know how Caffeinated implement.
regarding the pmset, please also check this doc: https://www.dssw.co.uk/reference/pmset/
—
Reply to this email directly, view it on GitHub <#120 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ARD3WJY6WRYXGETUNJULAZTYSE44PAVCNFSM6AAAAABCX7ZKUOVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DGNZUHEYDE>.
You are receiving this because you authored the thread.
|
0 replies
|
I just tested |
0 replies
|
I think they use caffeinate -w <pid> tp prevent the Mac from sleep.
With pmset -g I can check which process prevents the Mac from sleep.
I tried this and my screen saver starts.
Sebastian
… Am 05.02.2024 um 22:05 schrieb jack ***@***.***>:
I just tested caffeinate -d and caffeinate -I, both didn't enter screen saver 🤔 I think they should be different
—
Reply to this email directly, view it on GitHub <#120 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ARD3WJ6OVSMGBHZSTIPXRGTYSFCTJAVCNFSM6AAAAABCX7ZKUOVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DGNZVGI4TI>.
You are receiving this because you authored the thread.
|
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
Hi,
I've a problem with the app.
I thought Keep Awake and Screen Saver turned on means Screen Saver is allowed and device doesn't turn off.
But if I activate Keep Awake the Screen Saver doesn't turn on anymore.
Is this the correct behavior or is this a bug?
Sebastian
All reactions