BetterTouchTool freezing up MacBook Pro on lockscreen

Describe the bug
When resuming my Mac from sleep, the computer hangs completely on the lock screen. The screen is either stuck on the lock screen prompt (nothing is clickable on the lock screen), or it displays a black screen. There is sometimes a spinning wheel.

The only solution is to reboot because the computer never recovers from the freeze.

Affected input device (e.g. MacBook Trackpad, Magic Mouse/Trackpad, Touch Bar, etc.): Not applicable

Device information:

  • Type of Mac: MacBook Pro 15-inch, 2018 (T2 chip)
  • macOS version: 10.15
  • BetterTouchTool version: 3.206 (1382)

Additional information (e.g. StackTraces, related issues, screenshots, workarounds, etc.):

This repeats over and over in the system.log (until I reboot the computer):

Oct 15 10:17:54 Erics-MacBook-Pro syslogd[94]: ASL Sender Statistics
Oct 15 10:17:54 Erics-MacBook-Pro com.apple.xpc.launchd[1] (com.hegenberg.BetterTouchTool.4656[24152]): Service exited due to SIGTERM | sent by BTTRelaunch[24194]
Oct 15 10:17:55 Erics-MacBook-Pro xpcproxy[38537]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 10:17:55 Erics-MacBook-Pro xpcproxy[38538]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 10:17:55 Erics-MacBook-Pro xpcproxy[38539]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 10:17:55 Erics-MacBook-Pro xpcproxy[38540]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 10:17:55 Erics-MacBook-Pro xpcproxy[38541]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 10:17:55 Erics-MacBook-Pro xpcproxy[38542]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 10:17:55 Erics-MacBook-Pro xpcproxy[38543]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 10:17:56 Erics-MacBook-Pro com.apple.xpc.launchd[1] (com.hegenberg.BTTRelaunch.4660[24194]): Service exited due to SIGTERM | sent by BetterTouchTool[38531]
Oct 15 10:18:01 Erics-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.airport.wps): Service only ran for 6 seconds. Pushing respawn out by 4 seconds.
Oct 15 10:18:10 Erics-MacBook-Pro xpcproxy[38642]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 10:32:57 Erics-MacBook-Pro syslogd[94]: ASL Sender Statistics
Oct 15 10:32:57 Erics-MacBook-Pro xpcproxy[38663]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 10:32:57 Erics-MacBook-Pro xpcproxy[38665]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 10:32:57 Erics-MacBook-Pro xpcproxy[38667]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 10:32:57 Erics-MacBook-Pro xpcproxy[38668]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 10:32:57 Erics-MacBook-Pro xpcproxy[38671]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 10:32:57 Erics-MacBook-Pro xpcproxy[38672]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 10:32:57 Erics-MacBook-Pro xpcproxy[38673]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 10:33:16 Erics-MacBook-Pro xpcproxy[38766]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 10:48:00 Erics-MacBook-Pro syslogd[94]: ASL Sender Statistics
Oct 15 10:48:00 Erics-MacBook-Pro com.apple.xpc.launchd[1] (com.hegenberg.BetterTouchTool.4656[38531]): Service exited due to SIGTERM | sent by BTTRelaunch[38559]
Oct 15 10:48:00 Erics-MacBook-Pro xpcproxy[38792]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 10:48:00 Erics-MacBook-Pro xpcproxy[38794]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 10:48:00 Erics-MacBook-Pro xpcproxy[38795]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 10:48:00 Erics-MacBook-Pro xpcproxy[38796]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 10:48:00 Erics-MacBook-Pro xpcproxy[38797]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 10:48:00 Erics-MacBook-Pro xpcproxy[38799]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 10:48:00 Erics-MacBook-Pro xpcproxy[38801]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 10:48:01 Erics-MacBook-Pro com.apple.xpc.launchd[1] (com.hegenberg.BTTRelaunch.4660[38559]): Service exited due to SIGTERM | sent by BetterTouchTool[38798]
Oct 15 11:04:34 Erics-MacBook-Pro syslogd[94]: ASL Sender Statistics
Oct 15 11:04:34 Erics-MacBook-Pro xpcproxy[38954]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 11:04:34 Erics-MacBook-Pro xpcproxy[38955]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 11:04:34 Erics-MacBook-Pro xpcproxy[38956]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 11:04:34 Erics-MacBook-Pro xpcproxy[38957]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 11:04:34 Erics-MacBook-Pro xpcproxy[38958]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 11:04:35 Erics-MacBook-Pro xpcproxy[38975]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 11:04:35 Erics-MacBook-Pro xpcproxy[38976]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 11:04:42 Erics-MacBook-Pro timed[134]: settimeofday({0x5da5374a,0x2ce2e}) == 0
Oct 15 11:05:48 localhost bootlog[0]: BOOT_TIME 1571108748 901824

Keep getting the lockups. Every time it happens I need to force-reboot the computer which is super annoying. I turned off "Restart BTT after wake from sleep" and installed the process priority helper tool, so we'll see if that helps.

Nope, that did not help. Still getting freezes on wake.

Oct 15 16:11:53 Erics-MacBook-Pro com.apple.xpc.launchd[1] (com.hegenberg.BetterTouchToolAppleScriptRunner[7309]): Service exited due to SIGKILL | sent by BetterTouchToolAppleScriptRunner[7309]
Oct 15 16:26:54 Erics-MacBook-Pro syslogd[100]: ASL Sender Statistics
Oct 15 16:26:54 Erics-MacBook-Pro xpcproxy[10805]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 16:26:54 Erics-MacBook-Pro xpcproxy[10809]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 16:26:54 Erics-MacBook-Pro xpcproxy[10810]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 16:26:54 Erics-MacBook-Pro xpcproxy[10811]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 16:26:54 Erics-MacBook-Pro xpcproxy[10812]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 16:26:54 Erics-MacBook-Pro xpcproxy[10813]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 16:26:55 Erics-MacBook-Pro xpcproxy[10814]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 16:38:23 Erics-MacBook-Pro syslogd[100]: ASL Sender Statistics
Oct 15 16:38:23 Erics-MacBook-Pro com.apple.xpc.launchd[1] (com.hegenberg.BetterTouchTool.4656[10755]): Service exited due to SIGTERM | sent by BTTRelaunch[10761]
Oct 15 16:38:23 Erics-MacBook-Pro xpcproxy[10857]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 16:38:23 Erics-MacBook-Pro xpcproxy[10859]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 16:38:23 Erics-MacBook-Pro xpcproxy[10861]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 16:38:23 Erics-MacBook-Pro xpcproxy[10863]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 16:38:23 Erics-MacBook-Pro xpcproxy[10864]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 16:38:23 Erics-MacBook-Pro xpcproxy[10865]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 16:38:23 Erics-MacBook-Pro xpcproxy[10867]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 16:38:23 Erics-MacBook-Pro com.apple.xpc.launchd[1] (com.hegenberg.BTTRelaunch.4660[10761]): Service exited due to SIGTERM | sent by BetterTouchTool[10866]
Oct 15 16:38:29 Erics-MBP xpcproxy[10910]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 16:38:30 Erics-MBP timed[140]: settimeofday({0x5da58586,0x32bee}) == 0
Oct 15 16:38:32 Erics-MBP xpcproxy[10946]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 16:38:40 Erics-MacBook-Pro xpcproxy[10977]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 16:38:40 Erics-MacBook-Pro xpcproxy[10980]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 16:38:40 Erics-MacBook-Pro xpcproxy[10981]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 16:38:40 Erics-MacBook-Pro xpcproxy[10982]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 16:38:40 Erics-MacBook-Pro xpcproxy[10983]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 16:38:40 Erics-MacBook-Pro xpcproxy[10985]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 16:38:40 Erics-MacBook-Pro xpcproxy[10986]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 18:02:56 Erics-MacBook-Pro syslogd[100]: ASL Sender Statistics
Oct 15 18:02:56 Erics-MacBook-Pro com.apple.xpc.launchd[1] (com.hegenberg.BetterTouchTool.4656[10866]): Service exited due to SIGTERM | sent by BTTRelaunch[10872]
Oct 15 18:02:56 Erics-MacBook-Pro xpcproxy[11025]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 18:02:56 Erics-MacBook-Pro xpcproxy[11026]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 18:02:56 Erics-MacBook-Pro xpcproxy[11027]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 18:02:57 Erics-MacBook-Pro xpcproxy[11028]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 18:02:57 Erics-MacBook-Pro xpcproxy[11029]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 18:02:58 Erics-MBP xpcproxy[11043]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 18:02:58 Erics-MBP xpcproxy[11044]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 15 18:02:58 Erics-MBP com.apple.xpc.launchd[1] (com.hegenberg.BTTRelaunch.4660[10872]): Service exited due to SIGTERM | sent by BetterTouchTool[11030]

Here is what it looks like when it's stuck:

Are you sure this goes away if you quit BTT?
Your logs don't seem to show anything unusual in relation to BTT.

Possibly active directory related?
https://forums.developer.apple.com/thread/117209

I don't think it's anything else. I did a clean install on Friday because I was so sick of forcefully rebooting my computer. Sleep/wake worked flawlessly on Saturday/Sunday, so Monday I reinstalled BetterTouchTool and installed GoldenChaos on top. Started getting the wake issues Monday night (and throughout today... Tuesday 6PM where I am right now).

What's very interesting is it's very inconsistent. Sometimes, it will let me log on just fine, but then situations like the video above occur and then it's a race to get the laptop working again so that I can start taking notes. Lost a lot of Word documents because of this. I am hoping that I can identify what's causing the issue, but looking at the logs alone I keep coming back to BTT because I see the "BTT killed and relaunched" log line getting repeated over and over again.

And no, my home does not have Active Directory. My school has Active Directory but I am not enrolled in AD on my personal laptop (only school laptops/desktops have AD installed). This problem occurs at home as well.

First I thought it had something to do with my multi-monitor setup not playing nice with Catalina, but I didn't use my monitors for the last couple of days and the problem is still happening.

Weird. There haven't been similar reports for BTT / Catalina yet but maybe it's some weird combination of specific config options?

I'd try to quit BTT for a few days and see whether that really stops it from happening.

Sure, I will do that and get back to you if it crashes again. (then we'll know it's not BTT)

I wonder where these messages are coming from. Is there an xpcproxy process visible in Activity Monitor?

//edit: xpcproxy seems to be some system process that is used to start some services on system startup. Might not be active afterwards.

Yup, nothing about xpcproxy in Activity Monitor. I am stumped as to what the issue might be.

I'm thinking about enabling SSH and then collecting logs that way.

SSH is a good idea, I always have it enabled in case the system freezes.
You can also do killall BetterTouchTool && killall BTTRelaunch via SSH to see whether that unfreezes the Mac.

(There is an issue on Catalina where removing the Accessibility permissions from a running app like BTT will completely freeze the System. Maybe that's somehow related :-/ )

I've been running without BTT for the last 12+ hours and I am now convinced it is BTT causing the issue. Ever since I quit it, the computer hasn't locked up once (!) which is surprising because usually by now I would've gotten at least five or more lockups. I'm not sure what I can further do to remove confounding factors that might contribute to the lockups, but I am really convinced it is BTT as I've never encountered a single lockup without it.

I'll try the SSH trick in the meantime.

very weird. Unfortunately I don’t have a solution (or even idea) why this could happen. I assume it must be something very specific in your BTT or Catalina setup, otherwise I probably would have receives tons of issue reports after the Catalina release.

Possibly try to reset all the various Catalina permissions as these are the only new thing I can imagine causing something like this.

To reset these permissions you can run this terminal command (while BTT is quit):

tccutil reset All

Something really interesting happened. I just launched BTT after not using it for 3~5 days. Before I launched BTT I ran your tccutil command.

After launching my CPU usage spiked almost immediately, with a process called distnoted eating up 100% of my CPU. BTT prompted me to give it Accessibility permissions (as expected), but when I enabled the permissions for BTT it did not go to the next screen (as in, BTT would confirm the permission is enabled and let me start using it).

I quit BTT, relaunched it, and was greeted with the configuration screen. The GoldenChaos preset showed up in the Touch Bar. However, my Mac suddenly started to freeze whenever I scrolled with the trackpad. It wouldn't even let me scroll a bit. As soon as I put two fingers down on the trackpad, boom, the entire system would freeze. The mouse cursor would move, but basic things like clicking and typing would be completely dead. The three-finger swipe to show Mission Control would be dead as well. After 5~10 seconds the computer would recover, and it would let me click and type (this comment) and do Mission Control. But if I scroll again (in this webpage, on Firefox), then the computer would freeze for an additional 5~20 seconds.

Given that I have been using this Mac without a problem for the last 3~5 days, it seems like something is horribly broken on BTT's side. Whether it's Apple with their buggy Catalina implementation or if it's something within BTT causing the crashes I cannot tell. But the above is what happened when I launched BTT, and I had to quit BTT over SSH to regain partial control over my computer (the scroll is still broken as I type this post, however!)

Anything you need @Andreas_Hegenberg before I reboot? I can try and grab logs.

EDIT: Even scrolling with my USB mouse is broken right now. What has BTT done?? Haha

sorry, as noted above there is a bug in catalina when running the tccutil command while an app like BTT is launched (all apps that use a specific API are affected).

A system restart will solve this, however this should be unrelated to your other issue and Apple is already working on a fix as far as I know.

Ah, gotcha, so it's a Catalina bug. I'll see if a reboot helps. I also noticed something going through the logs. It seems like I made a mistake. The log I posted above has nothing to do with BTT. I am constantly getting this:

Oct 18 23:22:42 Erics-MacBook-Pro xpcproxy[80941]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port
Oct 18 23:22:42 Erics-MacBook-Pro xpcproxy[80942]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port 

in the Console even without BTT (last couple of days) so I believe that isn't the issue. Sorry!

I'll try running BTT after the reboot to see if the issue persists. For now I know that the lockup freeze (not the scroll bug) can be fixed with SSH force-quits. I'll see if it freezes on lockscreen again. Thanks!

I get the follow error when I wake up from sleep with BTT loaded.

BAD+MAGIC!+(flag+set+in+iBoot+panic+header)%2C+no+macOS+panic+log+available

If I quit it before letting it goes to sleep it seems to disappear.

Sorry for hijacking the thread, but it seems related.

Also running Catalina

The 10.15 minor update is now available so I'll have to see if that improves things somewhat.

@Samuel_Au where are you getting that message? Console? Where in the Console?

I get the crash message when I recover from a hard reset. I was running 10.15.1 beta.

Oh, then that's not what I'm getting. When I force reboot I see no crash message.

I just woke my MBP from sleep and distnoted is now eating up 100% of my CPU again. @Andreas_Hegenberg is there something in BTT that spams the notification center or anything like that? I read that "bad interactions" with 3rd party programs and the notification center could cause distnoted to start eating CPU cycles and RAM. (Article mentioned Skype and Teamspeak as biggest offenders) Just throwing that out in case you know of anything that is related to distnoted.

ic. I get a spinning lock up right after sign in also.. anyways.. installing beta 2 to see if it helps.. will report in

Imprint | Privacy Policy