BetterTouchTool freezing up MacBook Pro on lockscreen

My MBP freezes at the login screen too, when waking from sleep. Happened 3-4 times in the last one week. The password prompt is shown, the cursor changes to a spinning wheel and the password box cannot be clicked.

Now the OS itself is not stuck, in my opinion, because I can continue moving the mouse pointer (albeit in the shape of a spinning wheel) with no lag,... toggling CAPS LOCK on the keyboard will toggle the light on/off with no noticeable delay too. The touchbar, however, will be unresponsive (although there was once the GoldenChaos layout disappeared and got replaced by the system touchbar layout before the touchbar froze).

The only option is to force a reboot.

Am on the latest public version of Catalina (with all the supplemental updates installed).

Have just enabled remote login... will try and see if SSH-ing in and killing processes can "cure" this freeze.

MBP 15-inch, 2018
32GB RAM
Radeon Pro 560X (just to be sure, I have also tried forcing the GPU to be on Intel UHD only but I still experienced the same freeze).
BTT 3.206 (1382)
GoldenChaos BTT 3.202

Hmm... could it be some runaway scripts by GoldenChaos? Perhaps one of the scripts that was trying to detect the state of apps/hardware was running in a timer and was not aware of the OS going to sleep? So when the OS wakes up, all the backlog iterations get executed.

Just a shot in the dark though.

I'm not sure what the heck is going on, but the minor update seems to have made it worse. loginwindow and distnoted fight for CPU time once my Mac wakes and renders it literally unusable. When I force-quit loginwindow the system crashes back to the login screen and forces me to log in again. At least once I do that then the two processes calm down somewhat and don't fight for CPU time.

Until I put my Mac to sleep and then wake it again. Repeat above.

I'm starting to lean toward GoldenChaos being the culprit, too. Maybe something is calling system APIs and that's causing the processes to freak. Who knows

@cheemeng, I just noticed we have the same MBP (I know, right?!) and am wondering if that's the issue. Even the problem symptoms you described match up exactly to mine (down to the system being semi-responsive, but not really)

MBP 15-inch, 2018, 32GB RAM, Radeon Pro 560X, 2.2GHz i7.

Wonder if it's a specific hardware combination that's causing the issue.

Same BTT and GoldenChaos version as @cheemeng if anybody is wondering.

I'm using a 2.6GHz i7 (ok so we know it's not Intel's fault LOL).

@ideaman924 perhaps it's the specific GC widgets and controls we used? Could be that one of them is polling the machine like there's no tomorrow.

My GC Variables:

gc_version: 3.202
showCaffeinate: true
showAppSwitcher: false
showMapsBadge: true
showNewsBadge: true
showChromeCanaryBadge: false
showDiscordCanaryBadge: false
showNewTab: false
showMaipoBadge: false
showSlackBadge: false
showTwitterBadge: false
showWifi: true
showSparkBadge: false
menuBarSize: large
showTwitchBadge: false
showSiri: never
showMailplaneBadge: false
showConnectBeats: false
CALWGT-DisplayEventsAs: Now+Next
showWindowSnapper: false
showPolymailBadge: false
dateFormatSmall: h:mm a
showQQBadge: false
showSettings: false
showBrowserTabs: false
showBatteryPercentage: true
showAirDrop: hide
showVolumeUp: true
showRemindersBadge: true
showAirmailBadge: false
showCommandMenu: false
dateFormatLarge: E d h:mm a
showAbstractBadge: false
showFaceTimeBadge: true
useNormalEscKey: true
showSkypeBadge: true
showCarrotBadge: false
showSafariBadge: true
customVariable1: controlMenuOn
showDeliveriesBadge: false
showControlMenu: true
AQT_InstalledVer: 3.0.1
showTelegramBadge: false
showHazeOver: false
showShowFinder: hide
showFirefoxBadge: false
showBrightnessUp: true
showWeChatBadge: false
showDayOne: false
showOptionMenu: true
dateFormatMedium: E d h:mm a
showBackForward: false
showBoxyBadge: false
customVariable3: commandMenuOff
showPostboxBadge: false
showCurrentLanguage: false
showCalculator: false
showColorSnapper: false
showReminders: false
showVolumeMute: true
showGoofyBadge: false
showMailMateBadge: false
showWeiboBadge: false
calendarApp: calendar
showChattyBadge: false
showOmniFocusBadge: false
showCollapseMenuBar: true
showConnectGamepad: false
showChromeBadge: false
showSkypeBusinessBadge: false
showConnectBose: false
showNotificationCenter: never
DNDStatus: OFF
dateSize: dynamic
dateFormatLarge24Hour: E d MMM H:mm
showBrightnessDown: true
showBodoBadge: false
showCalendar: false
showWindowSnapping: false
showThings: false
showSuperhumanBadge: false
showShowPaste: false
showAppleMailBadge: false
showVolumeDown: true
showCaprineBadge: false
showOutlookBadge: false
showSafariPreviewBadge: false
CS_Highlighting: ON
showNowPlaying: dynamic
showSpotlight: never
enableWindowSnapper: false
showEmojiPicker: true
showWhatsAppBadge: false
showFacebookBadge: false
showRefresh: false
showTrelloBadge: false
showTumblrBadge: false
showDock: false
showMicrophoneMute: true
showAppleCalendarBadge: true
CS_HighlightCal_Mode: Both
showBattery: always
showBluetooth: true
showClipboardHistory: false
showTweetbotBadge: false
ESC_Format: Edge
show1Password: false
showMediaControls: dynamic
showWeather: always
showiMessageBadge: true
showYakYakBadge: false
showConnectAirPods: false
showFranzBadge: false
customVariable2: optionMenuOn
showDiscordBadge: false
init_complete: complete
showThingsBadge: false
showZeplinBadge: false
showFantasticalBadge: false
HAPTICS_CurrentlyOn: OFF
timeFormat: 12Hour
dateFormatSmall24Hour: H:mm

How can you check the variables? I tried looking in the GC control menu but can't see any options to export config or anything like that..

If you can reproduce the freeze and login via SSH you could try to run these commands, they would allow me to see whether some function is being called in a indefinite loop or something like that:

sample BetterTouchTool -file ~/Desktop/BetterTouchToolSample.txt

sample BetterTouchToolScriptRunner -file ~/Desktop/BetterTouchToolSampleScriptRunner.txt

sample BetterTouchToolAppleScriptRunner -file ~/Desktop/BetterTouchToolSampleAppleScript.txt

(the will save the textiles to your desktop that you could post here)

It's in BTT config, under Advanced Settings -> Scripting BTT -> User Script Variables

Alright, making an executable shell script for that so that I can run it when I SSH in...

My variables are like so:

dateSize: small
showZeplinBadge: false
showOptionMenu: true
showFantasticalBadge: false
showVolumeMute: false
menuBarSize: large
showCollapseMenuBar: false
showChromeCanaryBadge: false
showTumblrBadge: false
showFirefoxBadge: false
showMapsBadge: true
dateFormatSmall24Hour: H:mm
showRefresh: true
showSettings: true
showMailplaneBadge: false
showCurrentLanguage: false
dateFormatMedium: MMM d h:mm a
showDiscordBadge: false
showWeather: never
showWhatsAppBadge: false
showVolumeDown: true
showEmojiPicker: true
showThings: false
showSkypeBusinessBadge: false
showConnectAirPods: false
showAbstractBadge: false
dateFormatLarge24Hour: E d MMM H:mm
timeFormat: 12Hour
showConnectBeats: false
showNowPlaying: dynamic
showiMessageBadge: true
showTwitchBadge: false
customVariable1: controlMenuOn
showShowFinder: full
showTelegramBadge: false
showVolumeUp: true
dateFormatLarge: E MMM d h:mm a
showSkypeBadge: false
showRemindersBadge: true
showOmniFocusBadge: false
showNewTab: true
showBrowserTabs: true
showNewsBadge: true
showClipboardHistory: false
dateFormatSmall: h:mm a
showFacebookBadge: false
customVariable3: commandMenuOn
show1Password: false
showWifi: false
showSiri: never
showChattyBadge: false
showCarrotBadge: false
useNormalEscKey: true
showReminders: true
showSpotlight: never
showBatteryPercentage: false
showAppleCalendarBadge: true
showBoxyBadge: false
showBrightnessUp: false
showHazeOver: false
showColorSnapper: false
showDayOne: false
showAirmailBadge: false
showQQBadge: false
showSafariPreviewBadge: false
showSparkBadge: false
showBrightnessDown: false
showPolymailBadge: false
enableWindowSnapper: true
showConnectGamepad: false
showSuperhumanBadge: false
showYakYakBadge: false
showDiscordCanaryBadge: false
showNotificationCenter: never
showBluetooth: false
showWindowSnapper: false
showCalendar: true
showThingsBadge: false
showConnectBose: false
showBattery: never
showMailMateBadge: false
showSafariBadge: true
showGoofyBadge: false
showBackForward: true
showPostboxBadge: false
showDock: false
showTrelloBadge: false
showMaipoBadge: false
showMediaControls: dynamic
showCaffeinate: false
customVariable2: optionMenuOn
showOutlookBadge: false
showCalculator: false
showFranzBadge: false
showCaprineBadge: false
gc_version: 3.202
showBodoBadge: false
showShowPaste: false
showSlackBadge: false
showWindowSnapping: true
showChromeBadge: false
showDeliveriesBadge: false
showAppleMailBadge: true
showCommandMenu: true
calendarApp: calendar
showFaceTimeBadge: true
dateFormatMedium24Hour: d MMM H:mm
showControlMenu: true
showMicrophoneMute: true
showTweetbotBadge: false
showTwitterBadge: false
showAirDrop: full
showWeChatBadge: false

I forgot to mention, I manually edited the preset in BTT because GoldenChaos currently does not have the option to hide the clock (and I don't need a second clock on the touch bar), so I just clicked on hide widget inside the BTT settings. Shouldn't be an issue though, since this worked 100% on Mojave.

@Andreas_Hegenberg not a freeze, but my MBP is now screaming again with distnoted and BTT taking up most of the CPU cycles. I ran samples on the distnoted process as well, in case it helps.

(oh and the uploader prohibits text files so zip it is)samples.zip (491.0 KB)

Interesting. I think it seems to be stuck deep inside some system function that does something with handwriting support for the trackpad.
Is your system set to a language that uses handwriting via the trackpad?

In general it seems to somehow be related to the input language. Does GoldenChaos has something that displays the input type / language?

That explains it! One of the runaway processes was TextInputMenuAgent. I do have Chinese handwriting support enabled. I take Chinese classes (against my will) and whenever I need to input Chinese characters I just draw them using trackpad input because I don't know the pinyin equivalent. (Yes I still suck at Chinese, haha)

Should I try and remove those language input methods? I'm not sure if GC has input language whatever applets/widgets.

Edit: Looking at the variables I see this: showCurrentLanguage: false. Maybe that's the language switcher option? My Mac is not near me at the moment..

And here's the interesting part...

I have handwriting support enabled too! :grimacing: but it is not activated. (I have seen TextInputMenuAgent going haywire once too!)

I will try to reproduce this. I'm not yet sure whether this is a Catalina bug or something else. (The freeze happens in a system framework that doesn't seem to be triggered by BTT, but it is still somehow affected by the BTT process).

I think it could be some Apple Script in GoldenChaos which accesses the input type stuff and by doing this triggers a bug in Catalina, but I'm not sure yet.
If you don't need them, try to remove these input methods until I have more information.

Thanks for the confirmation @Andreas_Hegenberg! I will remove the input methods until this is fixed. For reference, here is my configuration. The only thing that is different from @cheemeng is the Simplified Handwriting input, while @cheemeng has Traditional.

Again this is some "what are the odds" situation, haha, I never expected someone else with the same MBP configuration and the same language layout! Thanks @cheemeng and thank you @Andreas_Hegenberg for looking so closely into this bug report!

I just noticed something weird while removing Handwriting support.

In the System Preferences input window there was no Handwriting method listed.

To fix this I had to go inside the Terminal and force-quit TextInputMenuAgent a bunch of times until it finally showed under the Input Sources menu. However, clicking on the '--' minus button to remove the method didn't reflect changes inside the Input Sources menu, but the Handwriting method disappeared from the menu bar:

45%20AM

After relaunching TextInputMenuAgent and System Preferences both of them now display the correct settings with no Chinese input. Really fascinating. I wonder if this is some Catalina bug that is yet to be fixed.

I then launched BTT, unsurprisingly the CPU shot up once again to 100%, distnoted being the culprit. I force quit distnoted and now my Mac is running really well. Still wondering how the heck the Input Source bug manages to trip up the laptop this badly, but oh well. No Chinese classes is a bonus for me :smiley:

So far so good, no frozen lockscreens yet. Had no issue removing Handwriting method, unlike @ideaman924, hehe.

Thanks @Andreas_Hegenberg for helping look into this issue for my MBP and its evil twin MBP belonging to Eric.

PS: No Chinese classes is a bonus for me too! :grin:

If you had enabled this Chinese handwriting stuff before Catalina it might be interesting to see whether adding it again now brings back the issue or not.

The posted samples look a bit like some conflicting settings in the handwriting tools are causing an endless loop - maybe their settings got corrupted during the update.

I will definitely take a closer look soon, however I’m quite busy until the end of next week, so it may still take me a while.

Alright, just had Handwriting tools re-enabled. Keeping my fingers crossed.

No worries @Andreas_Hegenberg, you take your time doing your other stuff... if it freezes again I'll just remove Handwriting Tools for now :slight_smile: