I have combed through /sys/class/power_supply myself and under Qubes (at least on my device) these do not appear. I have already wiped the default installation of PureOS on my drive so I can’t verify if those exist or not. The problem is less about determining when the battery starts charging but the behavior that the battery is being used while being plugged into the wall.
And it appears that we have no way to update the EC firmware in any way yet so a fix is probably for the future
I’ve been monitoring /sys/class/power_supply/BAT0/current_now and mysteriously after a couple reboots and updates it appears to be stable at 0 and my battery is constant at 96%.
This leads me to the conjecture that the charger cannot provide enough wattage to the computer if under significant load and therefore needs to pull current from the battery as well.
In the above post Nicole talks about limiting the CPU wattage by using
echo 15000000 > /sys/devices/virtual/powercap/intel-rapl/intel-rapl:0/constraint_0_power_limit_uw
echo 20000000 > /sys/devices/virtual/powercap/intel-rapl/intel-rapl:0/constraint_1_power_limit_uw
But powercap does not show up under virtual so I haven’t been able to try that solution.
Edit: Executing “find /sys/ | grep constraint” also returns no results.