I am running a new installation of Ubuntu 20.04.2 (kernel 5.8.0-43-generic) on an HP Pavilion X2 (10-J008TU) and the battery percentage indicator is jumping between showing the correct reading and unknown 0% in activities bar (not even power settings show the level in these intervals). This only happens when on battery, when AC is plugged in it shows correctly.
Regardless of the Kernel version the problem is the same on all kernels and distros I have tested so far. Fedora 30 (k:5.6), Mint 19 (k:4.15), Manjaro 18 (k:4.14), Ubuntu 18 and 20 (k:5.4, 5.6, 5.11), bionicpup 8 (k:4.9), pop-os 20 (k:5.11)
I have recorded the frequency of the change:
xx:51 working
xx:53 unknown (defaults to 0%)
xx:58 working
xx:00 unknown (defaults to 0%)
xx:05 working
xx:07 unknown (defaults to 0%)
xx:11 working
Some things I must point out: I had to lock the kernel version to 5.8.0 because of the sound drivers not working in later release
upower -i /org/freedesktop/Upower/devices/battery_BAT0 outputs the following:
native-path: (null)
power supply: no
updated: Thu 01 Jan 1970 01:00:00 CET (1629044245 seconds ago)
has history: no
has statistics: no
unknown
warning-level: unknown
battery-level: unknown
icon-name: '(null)'
I hope to hear some creative answers