Mac-precision-touchpad: High memory usage after 2 days

Created on 29 Sep 2018  Â·  12Comments  Â·  Source: imbushuo/mac-precision-touchpad

I compiled and installed SPI driver, but after 2 or 3 days( I'm not use this PC too much, maybe 3~4 hours total), system becomes very slow.

Checked the task manager, memory usage becomes 100%, even I closed all apps.
After change back to old version of SPI touchpad driver, memory usage reduced to 18%

Memory leak?

All 12 comments

I think I also encounter this issue. The RAM occupation is almost 100%. It down to normal when I stop touch pad driver.

I will look into it. If you can trigger a manual system crash when the usage is high, it might be helpful to me.

Confirming this on 2015 13" rMBP. I only restarted earlier today, however I have had a few sleep/wakes since then, and have connected/disconnected various different peripherals and external monitors. Edit: After rebooting, my idle memory usage dropped from 6GB to 3GB.

I can confirm the same issue on my MacBook 12" 2017, using latest Windows 10 1903. I usually have my laptop connected to an external monitor, keyboard and mouse, and I've auto-sleep disabled on purpose. During the last 3 days, I've seen this situations:

  • Memory usage = 99% (I have 16GB of RAM). Computer was really slow and I had to manually restart it.
  • 3 time computer had restarted. After checking Event Viewer, it seems system crashed.

I've reverted to default Apple driver, and both issues are gone. I think both issues are related: I guess system crashed because of a high memory usage.

I'm a developer, so let me know if I can do anything to help you with this issue.

I am currently looking into the matter on SPI driver and aware of one piece of memory allocation that not being recycled (at a hot path). Will spin up a device to verify it shortly.

@enricmarques If you can provide me a memory dump after crash (located in C:\Windows\MEMORY.DMP), it will be helpful for me to understand the inner issue.

Please note that this file might contains Personal Identifiable Information (PII), so please contact me using the email provided in my GitHub profile, and avoid handling personal sensitive information during the test session if you need to capture a new dump file.

Hi @imbushuo,

There is no C:\Windows\MEMORY.DMP file. I've checked my "Startup and Recovery" system settings, and my computer should write an "Automatic memory dump" at this location when the system crashes, but it seems the file is not generated.

I've checked the event viewer, and there is a Event 41 just when the computer restarted. The event description is: "The system has rebooted without cleanly shutting down first. This error could be caused if the system stopped responding, crashed, or lost power unexpectedly". I have checked events of the previous minutes, and there are some errors from services that says something like "There are not enough system resources to complete the operation". I think Windows crashed without generating a memory dump file. Maybe there aren't enough system resources to save the dump.

@enricmarques Never mind, I've narrowed down to the root cause right now.

@imbushuo. Great! I was about to use the NotMyFault tool from SysInternals (https://docs.microsoft.com/en-us/sysinternals/downloads/notmyfault) to manually generate a memory.dmp file.

Root cause: something still takes the reference even though input routine completes, and hence the non paged pool memory for input buffer cannot be freed.

Fixed in release 3544.

image

THERE'S ABSOLUTELY NO LEAK - Phil Swift

I can confirm the leak is gone, as I had it installed for two days without crahes or memory issues.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zakhaj picture zakhaj  Â·  4Comments

cor picture cor  Â·  4Comments

duanyu47 picture duanyu47  Â·  4Comments

imbushuo picture imbushuo  Â·  6Comments

kazenoai picture kazenoai  Â·  6Comments