Slow to wake, update error

Up until today I had version 3.148 of BTT and was encountering an issue where after restart/login, no BTT shortcuts would work until I manually opened a window or program, at which point it would activate BTT and all my shortcuts would work.

When I clicked on update BTT, it pops up a window that says "UPDATE ERROR! An error occurred in retrieving update information. Please try again later" with a button that says Cancel Update. The same thing happens when checking for alpha updates.

Checking the website, I noticed there were quite a few updates so I downloaded the most recent, 3.162. This somewhat fixed the original problem of BTT not allowing any shortcuts until another program was activated first, but it still takes quite a while for BTT to actually activate following a restart/login/deep sleep. I have checked the "try to restart faster after waking from sleep" box and I have installed process priority helper, but the process priority helper does NOT remain active. It will say it is active, but then after a restart of the system, it won't be.

The update to 3.162 also did not fix the update error noted above.

I've seen quite a few threads mentioning this problem and problems like it, but have not seen any sort of solution to it except rolling back to 3.160, which I have not yet tried.

All input devices are impacted.

Device information:

  • Type of Mac: MacBook Pro Retina Early-2015
  • macOS version: Mojave 10.14.5
  • BetterTouchTool version: 3.162 (1335)

Sorry, the update server will soon be back.

The restart after wake is normal, but I’m working on options to speed that up a bit more.

Is there a setting I am missing to keep the process priority helper on and active? It works if I install and activate it manually, but the second I restart my system, it is no longer active which obviously defeats the purpose.

I think if that part would remain active, the time it takes for BTT to restart would be fine but it just refuses to remain active after a restart.

The system should automatically launch it, it is set as a LaunchDaemon. Can you check what messages are in the /Library/Logs/BetterTouchTool.log? (go to /Library/Logs via Finder => Go => Go To Folder)

Here is the last bit of info from the BTT log:

2019-07-23 16:24:22.985 BetterTouchProcessPrioWatcher[693:26783] launching
2019-07-23 16:24:22.989 BetterTouchProcessPrioWatcher[693:26783] checking signature for bundle: file:///Applications/BetterTouchTool.app/
2019-07-23 16:24:23.586 BetterTouchProcessPrioWatcher[693:26783] signature looks good!
2019-07-23 16:24:23.586 BetterTouchProcessPrioWatcher[693:26783] did set BetterTouchTool priority to -2 | 0
2019-07-23 16:24:23.587 BetterTouchProcessPrioWatcher[693:26783] did launch
2019-07-23 16:28:58.368 BetterTouchProcessPrioWatcher[693:26783] BTT did launch
2019-07-23 16:28:58.373 BetterTouchProcessPrioWatcher[693:26783] checking signature for bundle: file:///Applications/BetterTouchTool.app/
2019-07-23 16:28:59.484 BetterTouchProcessPrioWatcher[693:26783] signature looks good!
2019-07-23 16:28:59.484 BetterTouchProcessPrioWatcher[693:26783] did set BetterTouchTool priority to -2 | 0
2019-07-23 16:29:15.740 BetterTouchProcessPrioWatcher[693:26783] BTT did launch
2019-07-23 16:29:15.752 BetterTouchProcessPrioWatcher[693:26783] checking signature for bundle: file:///Applications/BetterTouchTool.app/
2019-07-23 16:29:17.238 BetterTouchProcessPrioWatcher[693:26783] signature looks good!
2019-07-23 16:29:17.238 BetterTouchProcessPrioWatcher[693:26783] did set BetterTouchTool priority to -2 | 0
2019-07-23 16:30:53.352 BetterTouchProcessPrioWatcher[732:33292] launching
2019-07-23 16:30:53.352 BetterTouchProcessPrioWatcher[732:33292] did launch
_RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.
2019-07-23 16:39:18.055 BetterTouchProcessPrioWatcher[634:18953] launching
2019-07-23 16:39:18.057 BetterTouchProcessPrioWatcher[634:18953] checking signature for bundle: file:///Applications/BetterTouchTool.app/
2019-07-23 16:39:18.739 BetterTouchProcessPrioWatcher[634:18953] signature looks good!
2019-07-23 16:39:18.739 BetterTouchProcessPrioWatcher[634:18953] did set BetterTouchTool priority to -2 | 0
2019-07-23 16:39:18.739 BetterTouchProcessPrioWatcher[634:18953] did launch
2019-07-23 16:39:55.934 BetterTouchProcessPrioWatcher[642:19819] launching
2019-07-23 16:39:55.935 BetterTouchProcessPrioWatcher[642:19819] did launch
_RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.

Immediately after that, I double checked BTT and it was not active after a computer restart. I uninstalled and reinstalled, and the same launching, checking signature for bundle, signature looks good, did set BTT priority to -2 | 0, did launch process entered itself into the log.

Ah interesting. Maybe the LaunchDaemons are sometimes being started too early.
Could you try these terminal commands?

sudo launchctl unload /Library/LaunchDaemons/com.hegenberg.BetterTouchProcessPrioWatcher.plist
sudo mv /Library/LaunchDaemons/com.hegenberg.BetterTouchProcessPrioWatcher.plist /Library/LaunchAgents/com.hegenberg.BetterTouchProcessPrioWatcher.plist

sudo launchctl load -w /Library/LaunchAgents/com.hegenberg.BetterTouchProcessPrioWatcher.plist

I think LaunchAgents are opened a little bit later which should solve the _RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL. error in your log

It is telling me no such directory is found when trying to run those commands, which I assume is because I restarted my computer and it isn't showing up. When I uninstall and reinstall in BTT, the file shows up in the LaunchDaemons folder and then I click refresh process status and it shows "process has higher priority" but then after restart the same issue happens.

After this most recent restart after running these commands, another error was added into the BTT Log:

2019-07-23 17:12:19.467 BetterTouchProcessPrioWatcher[585:11974] +[NSXPCSharedListener endpointForReply:withListenerName:]: an error occurred while attempting to obtain endpoint for listener 'ClientCallsAuxiliary': Connection interrupted
_RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.

That was the first log after restart.

1 Like

I have made a little change in 3.163 - you can use the uninstall and install button in that version again, afterwards it should install it in a better way, which I hope will make it stay active on all systems. (First hit uninstall though).

This version will be online in about 10 minutes.

It looks like that took away the error, but the process priority helper tool still does not reactivate following a restart.

2019-07-23 17:33:45.447 BetterTouchProcessPrioWatcher[643:12934] BTT did restart
2019-07-23 17:34:01.740 BetterTouchProcessPrioWatcher[670:14329] launching
2019-07-23 17:34:01.745 BetterTouchProcessPrioWatcher[670:14329] did launch
2019-07-23 17:37:31.258 BetterTouchProcessPrioWatcher[551:10832] launching
2019-07-23 17:37:31.260 BetterTouchProcessPrioWatcher[551:10832] checking signature for bundle: file:///Applications/BetterTouchTool.app/
2019-07-23 17:37:31.847 BetterTouchProcessPrioWatcher[551:10832] signature looks good!
2019-07-23 17:37:31.848 BetterTouchProcessPrioWatcher[551:10832] did set BetterTouchTool priority to -2 | 0
2019-07-23 17:37:31.848 BetterTouchProcessPrioWatcher[551:10832] did launch

This was immediately after the 3.163 install. I uninstalled process priority helper, which did not appear to do anything in the log and then reinstalled and it worked like before. Upon restarting the computer, BTT launched like normal but nothing appeared in the log at all, no error, nothing. Opening BTT and going to the process priorty helper tool page in settings, it still shows normal priority.

You are right. After more testing I think I figured out why the helper tool didn’t work after Restart on some machines.

I hope it does work now in 3.164 - unfortunately it will again require a uninstall and reinstall (will add a proper update system for the helper tools soon)

It looks like the priority process issue is fixed now. After uninstall and reinstall and a restart, it is loading up perfectly without me needing to do anything. It looks like BTT is loading within 5 seconds of restart/login, which solves all the problems I was having entirely!

Thank you so much!