macOS periodically freezing with BetterTouchTool running

Hi Andreas,

Well, it is impossible to run the sample check while the freeze is occurring since all input is frozen, unfortunately. The best I've been able to do is check the Console.app log file output when it does occur. I posted that output in the other thread, but I'll post it again here:

fault	16:49:33.902047 -0700	kernel	virtual IOReturn IOAccelEventMachine2::waitForStamp(int32_t, stamp_t, stamp_t *): initial wait for 1 second expired. Continue wait for 4 seconds. stamp 502913 (gpu_stamp=502912)

fault	16:49:37.902351 -0700	kernel	virtual IOReturn IOAccelEventMachine2::waitForStamp(int32_t, stamp_t, stamp_t *): timeout waiting for IntelAccelerator stamp 502913 (gpu_stamp=502912)
fault	16:49:37.902365 -0700	kernel	void IOAccelEventMachine2::handleFinishChannelRestart(IOReturn, int32_t, uint32_t) - Setting restart type to 4
fault	16:49:37.902370 -0700	kernel	void IOAccelEventMachine2::handleFinishChannelRestart(IOReturn, int32_t, uint32_t): GPURestartDequeued stampIdx=4 type=4 fromWhere=1 waitingOnIdx=4
default	16:49:37.902373 -0700	kernel	[IGPU] display event timeout on index = 4
fault	16:49:37.902426 -0700	kernel	void IOAccelEventMachine2::restart_channel(): GPURestartSkipped stampIdx=4 type=4
fault	16:49:37.902429 -0700	kernel	void IOAccelEventMachine2::restart_channel(): no channel associated with stamp_idx 4 (type 4)

This is what occurs at the exact moment of the freeze. And this is definitely related to BTT. As I mentioned in the other thread, when I stop using BTT the freezes go away 100%. When I re-enable BTT they come back. I tried not using BTT for 10 days straight, and I got no freezes, turned BTT back on, crossed my fingers, and boom, freezes came back like clockwork.

I use my laptop all day long. I don't have many other apps running, either. I've been using BTT since you released it, and this has only been an issue for the past 1.5 years. This has been freezing, randomly, 2-3 times per day on average, for 1.5 years, which is why I'm still trying to get your help in resolving this; it has been going on long enough. This also proves how valuable I think BTT is and how accustomed to it I have become! BTT is an awesome app, and I do love it! I just want this freezing to stop...

My laptop specs:
MacBook Pro (Retina, 15-inch, Mid 2015)
Processor: 2.2 GHz Intel Core i7
RAM: 16 GB 1600 MHz DDR3
Video Card: Intel Iris Pro 1536 MB

Thanks again, Andreas, I appreciate your help with this!
Jason

Ah so your issue is different from the others because they could always reproduce the freeze after it happened once. In your case it only happens once and then works again for a few hours?

Unfortunately the logs you posted come directly from the system (after it encountered an error with the GPU) , thus there is no way to trace them back to BTT. They sound like some issue with the graphics card, maybe some driver or even hardware issue that's possibly triggered by something in BTT. The only thing I can think of where BTT uses the graphics card, is the window snapping animation / preview window. Are you using window snapping in BTT?

Well, I can't reproduce the freeze at will, it just happens randomly.

Yes, I am using window snapping, actually.

Maybe try to disable the animation of the window snapping preview for testing. I think the animation is the most demanding task.

Ok, I disabled that setting. I'll use it for a few days and see what happens. FWIW, the freezes don't occur when I use the Window Snapping feature, they occur when I'm doing nothing related to BTT, but I understand what you mean, maybe snapping is somehow affecting things in the background. Thanks, I'll try it.

Well, I just had another freeze today, so that Window Animation setting wasn't it, unfortunately. =/

but that was quite a long time without freeze, wasn't it? (compared to 1-3 freezes per day)

Yes, this is true; it was the first freeze I noticed in around 8-10 days since I disabled that setting. I'm going to keep that setting turned off, too. So that is definitely progress. I'll let you know how it goes. Thanks, Andreas.

I still think your issue is somehow GPU or display related and it is just "bad luck" that is is triggered by something in BTT.
Could you maybe run this terminal command to see what kind fo kernel extensions you have installed?
kextstat | grep -v com.apple

Nothing, just "Index Refs Address Size Wired Name (Version) UUID "

And I've had 4 freezes so far today, all within about 2 hours... Still had that animation setting disabled.

Also, since I was using an older version of BTT: 2.428 (788), I figured to demonstrate good faith, and in an attempt to prove I'm not just trying to troll you or waste your time, I've upgraded to the latest version by buying a license. :wink: So I just bought one and upgraded to 2.645. This also might fix the bug, so I'll just keep using it and see if here are any freezes from here on out. Thanks!

Do you maybe still have Apple Care? If so I'd try to get the GPU checked. I don't think the new BTT version will change much in your case unfortunately ;-(

I don't have Apple Care anymore. I could still take it in to a genius bar and see if they can run a diagnostic on it, though. Might be worth it.

I've been having this same problem since one of the most recent versions of High Sierra. Currently on 10.13.6.

Happens every couple days. I'm not using "Toggle Mouse Speed" or "Animate Preview Window". I'm still using 2.4x, and just upgraded to 2.428 alpha (from 2.427x I believe) after having this issue again. (Sorry been cheap, I know should pony up…)

It occurred to me that BTT might be the culprit after seeing this thread on input devices. (Not using MagicPrefs). Reviewing this thread and console log, I see no instance of "IOReturn."

I added these lines to .bashrc for next time:
alias sbtt='sample BetterTouchTool -file ~/Desktop/BetterTouchToolSample.txt'
alias kbtt='killall BetterTouchTool'

Oh, and incidently, may be unrelated, but I get frequent disconnects and re-connects with the original Magic Trackpad. I attribute it to well, it being an old Magic Trackpad. But wonder if BTT is also the culprit here. I will try living withing BTT for a few days to see if it solves that too.

I back-ported the fix to 2.428, so you should not encounter it again on that version.