com.apple.apfsd.wbc_drain
This task has now been running for a month now, when will it stop.
Just upgraded to MacOS 10.15.2 in hope that it would stop running. 😕
It prevents my iMac to go to sleep automatic.
iMac with Retina 5K display, macOS 10.15
This task has now been running for a month now, when will it stop.
Just upgraded to MacOS 10.15.2 in hope that it would stop running. 😕
It prevents my iMac to go to sleep automatic.
iMac with Retina 5K display, macOS 10.15
iMac (Retina 5K, 27 pouces, 2019) 10.15.4 - fusion drive (apple built-in)
I have reproduce it on a completely clean install. I added a volume and did install Catalina on it and boot from it.
I did not install anything, just created an account, and an issue is there.
So this is definitively a Catalina issue (I never see on Mojave).
It is related to fusion drive, this does not happen on my MBP that has a SSD, a task will appear after some time or after the 1st sleep/wake sequence.
This task is started by apfsd that starts a user agent that starts com.apple.apfsd/wbc_drain that will never stop and prevent the sleep.
I'm wondering if Apple take care of this as you can find many people having the issue.
I find a workaround, not very clean but this is the only way out, and it will not persist across boot.
The workaround consist in killing this background task by killing the UserEventAgent that supports it.
It turns that it need to be killed several times as it restart
in zsh you can copy past this. This will hide the issue until reboot or may be after sometimes the OS will restart this endless task.
until [ -z $(ps -ef | grep UserEventAgent | grep System | awk '{print $2}') ]
do
ps -ef | grep UserEventAgent | grep System | awk '{print $2}' | xargs sudo kill -9
done
10.15.4 update did not solve the issue for me.
Supplemental update, I have never got one ??
I had hoped that this, and many other bugs, was fixed in 10.15.5, but no.
Not likely to be fixed is my guess. :(
100% agree. 😩
Yeahhh.. Apple will never solve this issue because they don't care. 😩
OK, here is what I did to automate. I created the below python script:
#
# Fix apfsd assertion for Mac power management under Catalina
# (C) 2020-01-29 Bernd Kunze
#
import subprocess
import os
import time
Done = 0;
while Done == 0:
time.sleep (60);
Result = subprocess.Popen(['pmset', '-g', 'assertions'],
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
PMSet = Result.communicate();
if "wbc_drain" in str (PMSet):
os.system ("ps -ef | grep UserEventAgent | grep -v grep | awk '{print $2}'| xargs kill -9");
time.sleep (5);
os.system ("ps -ef | grep UserEventAgent | grep -v grep | awk '{print $2}'| xargs kill -9");
print('\a');
print('\a');
Done = 1;
Using hhttp://launched.zerowidth.com/
a plist file is created and installed.
FixSleep.py basically waits for the assertion to appear, then kills UserEventAgent twice.
Works here, no warranties, use at your own risk.
com.apple.apfsd.wbc_drain