BTT preventing screensaver and sleep

Describe the bug
BTT is preventing screensaver and sleep

Affected input device (e.g. MacBook Trackpad, Magic Mouse/Trackpad, Touch Bar, etc.):
2018 13" MBP w Touch Bar

Device information:

  • Type of Mac: MBP 13" with TouchBar
  • macOS version: 10.14.0
  • BetterTouchTool version: 2.645

Seems to work fine here, but maybe some script you are running with BTT?

Edit: After rebuilding my presets one by one, it seems that the cause was a preset switch action I had triggering on "After Launching On Mac With Serial Number". It seems that BTT relaunches itself as soon as a screensaver starts, and this action caused the screensaver to quit.

I'm resolving this by changing the trigger for my preset switches to named actions, and using an Applescript in my User's Login Items to trigger these on startup for each of my Macs.

Original post:

I'm seeing this too. The screensaver starts but exists within a couple of seconds. With BTT closed, this doesn't happen. But with BTT running, this happens 100% of the time even after a restart.

If I look closely at the menu bar, it looks like BTT is being relaunched when it comes out of the screensaver - the BTT icon disappears momentarily and then reappears in the menu bar.

How can I check if BTT is running a script? I have a Switch to Preset run on startup, but otherwise there shouldn't be anything running at the time the screensaver starts.

BTT 2.660
macOS 10.13.6

Edit: if I disable the attached preset, the problem disappears. But I'm having trouble identifying which of the actions is causing the screensaver to exit.

Edit: if I force quit BTTRelaunch in activity monitor before the screensaver starts, then the problem doesn't occur. Obviously this is not a fix, but maybe sheds some light on the issue?

Interesting, thanks for the detailed insight. I'll have a look!

EDIT: Aaargh! Spoke too soon. Still happening.

Original post: Don't worry about it. The problem seems to have been resolved after I rebuilt the presets.

@Andreas_Hegenberg, is there any update about this issue?

To summarise - the problem occurs when using a "Switch to Preset" action triggered using a "Launch on Mac with Serial Number" event.

The action gets triggered every time the computer screensaver attempts to start (after timeout or using hot corners set up in System preferences) and the action forces the screensaver to exit.

The effect is that the computer cannot enter screensaver or sleep, because BTT forces the screensaver to exit every time.

Unfortunately I don't have a fix yet.
However - are you sure this is caused by BTT?

I'm also having issues with Mojave not entering the screen saver, however in my case it seems to be caused by the macOS "Allow Apple Watch to unlock Mac" option. This apparently causes the mac to immediately login again after the screen saver started (which in turn causes BTT to restart and trigger the "start on mac with serial number" action).

Not to simply add a "me too" to this but I am having the exact same issue as patrickrushton with basically all his parameters but without any "Switch to Preset" actions set up. Any way I can help to track this issue down?

FWIW, I've found a workaround for this. Instead of using multiple presets and switching between them on different computers, I have combined my actions into a single preset. I have changed the shortcuts/gestures that I want to behave differently across machines into named triggers, then use applescripts to invoke different named triggers based on the serial number of the machine. It slows things down a bit but at least my computer isn't interrupted from sleeping.

The applescripts look like this:

set strIOPlatformSerialNumber to (do shell script "ioreg -l | grep IOPlatformSerialNumber | cut -d '\"' -f4")
if strIOPlatformSerialNumber is "MYSER1ALNUM3R" then
tell application "BetterTouchTool"
trigger_named "TriggerName" 
end tell
end if

Is there a possibility to not have BTT trigger the "start on mac with serial number" action? Is this license related?

I resorted to using a third party app to get my mac to go to sleep after 10 minutes of inactivity to temporary fix the issue, but I'd much prefer to not force sleep my machine...

That's only triggered if you configure it explicitly in the "Other" tab in BTT.

Just to follow up on this, since BTT 2.714 now supports variables as conditions for Conditional Activation Groups, a more elegant workaround is to use the "start on mac with serial number" action to set a customVariable.

This saves messing about with trying to automate preset switching and avoids conflicts with screensaver/sleep.

EDIT: Note that creating a Conditional Action Group based on just a customVariable appears to override all application specific shortcuts in BTT (Global shortcuts will continue to work). A workaround for this is to move any app specific shortcuts to their own Conditional Action Groups (that check for application name).

A workaround for a workaround for a workaround :grin: