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

Posted on Dec 10, 2019 12:52 PM

Reply
Question marked as Top-ranking reply

Posted on Apr 6, 2020 12:03 AM

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


66 replies

May 27, 2020 2:35 AM in response to gjdkeu

Sure, as stated in my previous post, with 10.15.4 supplemental update the issue did vanish.

So it would means it is back on 10.15.5 ?!


see my state below on 10.15.4


$ uptime
11:28  up 15 days, 13:07, 11 users, load averages: 0.87 0.99 1.11
$ pmset -g stats
Sleep Count:121
Dark Wake Count:104
User Wake Count:53
$


And regularly I can see that my iMac is slower to wake-up as it is in sleep.


In regards of statistic I'm more at 15% of sleep prevented by wbc_drain


$ pmset -g log | grep wbc_drain | wc -l
     635
$ pmset -g log | grep wbc_drain | grep PrevIdle | wc -l
      98


I hope the problem is not back on 10.15.5, I have not yet upgraded.

Jan 31, 2020 1:05 PM in response to bkunze

I think I understand how to build launched…. I tried but the script did not work, however, because I think I made some errors in filling the form. In particular, the tick should be placed under the heading "RUN AT LOAD" or under the heading "LAUNCH ONLY ONCE"? Please let me know ... I am attaching how I filled out the form ... Tell me if I'm wrong ... Thanks ...

Apr 6, 2020 4:08 AM in response to gjdkeu

It can be true as people are chosing SSD.


however my iMac is recent and was sold with an Fusion drive.


I will contact Apple Care.

I know they won’t do anything but this a way to tell the problem exists.


may be a class action in US would help but I’m quite sure most owners simply don’t notice this issue.

This does not exist, the class action, in my country.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

com.apple.apfsd.wbc_drain

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.