I see the same with a CalDigit TS4, on a 12th generation, BIOS 3.04.
One way to reproduce this is (assuming battery level is >30% and <99%):
while true
date ; sudo ectool fwchargelimit 30 ; sudo ectool console | grep "Battery\|Charge Limit" ; sleep 60 ; date ; sudo ectool fwchargelimit 99 ; sudo ectool console | grep "Battery\|Charge Limit" ; sleep 10
end
The dock disconnects basically every time when issuing fwchargelimit 30
. The sleeping time in between is necessary. When running watch ectool battery
in parallel, and looking at the numbers, it seems that the disconnects are triggered by switching from high charging current to 0. (The sleeps ensure that some high enough charging current builds up before forcing it to 0 again.)
I’ve also once observed a disconnect in the other direction, i.e., when switching from 0 to high charging current.
I wrote a small daemon that works around this:
The idea is to use ectool chargecurrentlimit
to set the charge current slowly to a low value when above 60%, and I’ve set the firmware charge limit in the BIOS to 65%. This makes sure that whenever I’m close to 65%, only a low charge current is applied.
I haven’t experienced any disconnects with that daemon.
This really appears to be a hardware issue. There are multiple threads about this, reproducing this with different generations, different BIOS versions, different OS, and different docks:
- [RESPONDED] 1TB expansion card disconnects randomly
- External display loses signal when charging via docking station
This is related to [TRACKING] Battery flipping between charging and discharging / Draws from battery even on AC . See my comments there.