Created attachment 255113 [details] dmesg 4.11rc1 log Two batteries is detected on DEXP Ursus 7W tablet while physically there is only one battery. ~$ acpi Battery 0: Charging, 84%, 00:49:39 until charged Battery 1: Unknown, 0%, rate information unavailable Kernel config and patches: http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.11-rc1/ /sys/class/power_supply$ ls ADP1 axp288_fuel_gauge BMBT /sys/class/power_supply/BMBT$ cat model_name SR Real Battery dmesg is attached.
Created attachment 255117 [details] dsdt.dsl
As mentioned in bug 88471 if we were to implement the BMOP opregion for the battery acpi device that would fix the BMBT power_supply device from not working, but we would still have 2 batteries being reported to userspace instead of one...
Created attachment 255181 [details] acpi: battery: Add acpi_battery_unregister() function
Created attachment 255183 [details] power: supply: axp288_fuel_gauge: Unregister duplicate acpi battery supply
Ok, the 2 attachments I've just added should fix this, if someone can build a kernel with them and confirm, that would be great.
Thanks! 4.11-rc1 with both patches applied: # ls /sys/class/power_supply/ ADP1 axp288_fuel_gauge # dmesg | egrep 'BMBT|fuel' [ 16.616882] ACPI: Battery Slot [BMBT] (battery present) [ 17.372188] axp288_fuel_gauge axp288_fuel_gauge: HW IRQ 16 -> VIRQ 220 ... As I can see the invalid battery is unregistered by the working driver. # acpi Battery 0: Discharging, 91%, discharging at zero rate - will never fully discharge.
HI, (In reply to Sergei Trusov from comment #6) > Thanks! > > 4.11-rc1 with both patches applied: > > # ls /sys/class/power_supply/ > ADP1 axp288_fuel_gauge > > # dmesg | egrep 'BMBT|fuel' > [ 16.616882] ACPI: Battery Slot [BMBT] (battery present) > [ 17.372188] axp288_fuel_gauge axp288_fuel_gauge: HW IRQ 16 -> VIRQ 220 > ... > > As I can see the invalid battery is unregistered by the working driver. > > # acpi > Battery 0: Discharging, 91%, discharging at zero rate - will never fully > discharge. Great. Is it ok if I add a: Tested-by: Segei Trusov <t.rus76@redacted.ru> To the commit msg of both patches (but then with your actual email address) ? Regards, Hans
(In reply to Hans de Goede from comment #7) > Tested-by: Yes it is (and as I just understood it would be better to post test reports with this remark already added).
Hi, @Hans de Goede: Your two patches work. The battery support seems to work 'out-of-the-box' now. Thank you very much for your work. ;-)
Hi All, I've just submitted the patches for this upstream. Regards, Hans
Hi, it's targeting 4.12 or may get into 4.11?
(In reply to RussianNeuroMancer from comment #11) > Hi, it's targeting 4.12 or may get into 4.11? 4.12
As I understand since patches are pushed into upstream I can close this. P.S. Also working on DEXP Ursus 7W and Irbis NB41.