I recently bought a brand new laptop (Asus vivobook x510uf). I'm using ubuntu 18.04.2
When I plug it to charger, It charges near 98-99 percent. It always shows less than 5 min remains to full charge, but it takes about 30 min to gets 100%. After that its state changes to discharging and after few minutes the battery logo changes to a battery with cross on it and for remaining time it says "estimating...". What's the problem?
$ upower --dump
Device: /org/freedesktop/UPower/devices/line_power_AC0
native-path: AC0
power supply: yes
updated: Wed 03 Apr 2019 05:43:43 PM +0430 (155 seconds ago)
has history: no
has statistics: no
line-power
warning-level: none
online: yes
icon-name: 'ac-adapter-symbolic'
Device: /org/freedesktop/UPower/devices/battery_BAT0
native-path: BAT0
vendor: ASUSTeK
model: ASUS Battery
power supply: yes
updated: Wed 03 Apr 2019 05:45:43 PM +0430 (35 seconds ago)
has history: yes
has statistics: yes
battery
present: yes
rechargeable: yes
state: pending-charge
warning-level: none
energy: 39.443 Wh
energy-empty: 0 Wh
energy-full: 40.679 Wh
energy-full-design: 43.046 Wh
energy-rate: 4.065 W
voltage: 11.55 V
percentage: 100%
capacity: 91.7089%
technology: lithium-ion
icon-name: 'battery-full-charging-symbolic'
History (rate):
1554297343 4.065 pending-charge
Device: /org/freedesktop/UPower/devices/DisplayDevice
power supply: yes
updated: Wed 03 Apr 2019 05:45:43 PM +0430 (35 seconds ago)
has history: no
has statistics: no
battery
present: yes
state: unknown
warning-level: none
energy: 39.443 Wh
energy-full: 40.679 Wh
energy-rate: 4.065 W
percentage: 100%
icon-name: 'battery-missing-symbolic'
Daemon:
daemon-version: 0.99.7
on-battery: no
lid-is-closed: no
lid-is-present: yes
critical-action: HybridSleep
You need to calibrate your battery and sensors. Unplug and run the laptop until the machine shuts down for "critical low battery", then leave it turned off while it charges back up. One, two, or at most three cycles like this will let Ubuntu calibrate how much power is available at what sensor readings, and should cause the display to more closely reflect what you expect.
If your battery is removable, remove it, disconnect AC power, and hold down the power button for 15 seconds. This will reset the power manager. Reconnect all power and see if the problem is resolved.
If your battery is not removable, then disconnect AC power, leave the computer turned on and not sleeping/hibernating, and let the battery drain to zero. Once the computer turns off, hold down the power button for 15 seconds. Reconnect the AC power. Turn computer back on and let it recharge the battery, and recheck operation.
If the above two options don't resolve the problem, and you dual-boot with Windows, boot into Windows, and locate the power/battery settings. Look for an option that allows you to tailor the battery charge... something like it'll charge to 98% and identify that as full... it might be in the power or energy saver or "ECO" settings. Reboot into Ubuntu and see if the problem is solved.