!!! DEPRECATED !!!

My website has moved. I have an actual domain name now, and it's hosted on a VPS. These pages have been kept solely as an archive, and to not break any links leading to them.

Please go to https://mitchy.xyz/ for the up-to-date site. (continue to the current path here: /2021/07/13/e14g2-battery.html)

!!! DEPRECATED !!!

KDE Plasma battery indicator on the Thinkpad E14 Gen 2

Battery indicator kept saying the thing was "charging". It wasn't.
TL;DR: blacklist typec.
Linux issues are fun to solve.

I’m just putting this here so that people that might have similar problems will hopefully find it. Yeah and to have at least something here on my “"”blog”””.

PS: I documented my journey in this twitter thread (nitter link).

An issue with typec

I noticed that if my laptop goes to sleep with the charger plugged in, after waking up the battery indicator stays stuck on the charging icon.

At first I thought, “I can live with that” but then it started really bugging me.

It also didn’t play the charger unplug sound. Everything else said “discharging”.

Trying to solve it

So, I started searching the World Wide Internets for solutions. Someone said that calibrating their battery solved the issue.

So I tried doing that.

…And it did not do anything.

I found this, and that was pretty close to what was happening. They mentioned that switching back to kernel version 5.7 fixes the issue, and that it was caused by the commit that added USB-C power sources.

But I didn’t feel like switching to an older kernel, so I just gave up.

The actual solution

Somehow, I found out that there’s a kernel module called typec. lsmod shows it, along with typec_ucsi. And then it clicked - I recalled reading about “something something ucsi”. So I tried blacklisting those modules, and lo and behold: it worked.

So yeah, that’s the fix. The end.