Skip to contentSkip to conversation

ACPI: battery: Force "Discharging" status on battery for ASUS TUF Gaming A16

PATCH In review [email protected] 2 participants 2 messages Sep 26 – Oct 12 ACPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ACPI: battery: Force "Discharging" status on battery for ASUS TUF Gaming A16

From: Marco <[email protected]>

On the ASUS TUF Gaming A16 (FA608UMI), after AC is unplugged the ACPI _BST status word reports neither the charging nor the discharging bit set, so the battery driver reports "Not charging" (and UPower "fully-charged") even though the battery is actively discharging (current_now stays positive).

This is the same class of firmware bug as the ASUS Vivobook 18 M1807HA (Launchpad bug 2152185), where the status flips between "Full"/"Not charging"/"Discharging". Add a DMI quirk that, when the system is running on battery, forces a computed "Full" or "Not charging" status to "Discharging".

Based on the M1807HA quirk patch by Norman Becker.

---
 drivers/acpi/battery.c | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
drivers/acpi/battery.c +31 -0
@@ -58,6 +58,7 @@
 static int battery_bix_broken_package;
 static int battery_notification_delay_ms;
 static int battery_ac_is_broken;
+static bool battery_force_discharging;
 static unsigned int cache_time = 1000;
 module_param(cache_time, uint, 0644);
 MODULE_PARM_DESC(cache_time, "cache time in milliseconds");
@@ -192,6 +193,19 @@
 		battery->full_charge_capacity < battery->design_capacity;
 }
 
+static void acpi_battery_force_discharging_fix_status(union power_supply_propval *val)
+{
+	if (!battery_force_discharging)
+		return;
+
+	if (power_supply_is_system_supplied())
+		return;
+
+	if (val->intval == POWER_SUPPLY_STATUS_FULL ||
+	    val->intval == POWER_SUPPLY_STATUS_NOT_CHARGING)
+		val->intval = POWER_SUPPLY_STATUS_DISCHARGING;
+}
+
 static int acpi_battery_get_property(struct power_supply *psy,
 				     enum power_supply_property psp,
 				     union power_supply_propval *val)
@@ -250,6 +264,7 @@
 			val->intval = POWER_SUPPLY_STATUS_FULL;
 		else
 			val->intval = POWER_SUPPLY_STATUS_NOT_CHARGING;
+		acpi_battery_force_discharging_fix_status(val);
 		break;
 	case POWER_SUPPLY_PROP_PRESENT:
 		val->intval = acpi_battery_present(battery);
@@ -1258,6 +1273,13 @@
 	return 0;
 }
 
+static int __init
+battery_force_discharging_quirk(const struct dmi_system_id *d)
+{
+	battery_force_discharging = true;
+	return 0;
+}
+
 static const struct dmi_system_id bat_dmi_table[] __initconst = {
 	{
 		/* NEC LZ750/LS */
@@ -1294,6 +1316,15 @@
 			DMI_MATCH(DMI_PRODUCT_NAME, "Surface Go 3"),
 		},
 	},
+	{
+		/* ASUS TUF Gaming A16 FA608UMI */
+		.callback = battery_force_discharging_quirk,
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "ASUS"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "TUF Gaming A16 FA608UMI"),
+			DMI_MATCH(DMI_BOARD_NAME, "FA608UMI"),
+		},
+	},
 	{},
 };
 
#1 lore raw
Quoted 34 lines · On Sat, Sep 26, 2026 at 3:25 PM <[email protected]> wrote:

From: Marco <[email protected]>

On the ASUS TUF Gaming A16 (FA608UMI), after AC is unplugged the ACPI _BST status word reports neither the charging nor the discharging bit set, so the battery driver reports "Not charging" (and UPower "fully-charged") even though the battery is actively discharging (current_now stays positive).

This is the same class of firmware bug as the ASUS Vivobook 18 M1807HA (Launchpad bug 2152185), where the status flips between "Full"/"Not charging"/"Discharging". Add a DMI quirk that, when the system is running on battery, forces a computed "Full" or "Not charging" status to "Discharging".

Based on the M1807HA quirk patch by Norman Becker.

---
 drivers/acpi/battery.c | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
drivers/acpi/battery.c +1 -0
@@ -58,6 +58,7 @@
 static int battery_bix_broken_package;
 static int battery_notification_delay_ms;
 static int battery_ac_is_broken;
+static bool battery_force_discharging;
 static unsigned int cache_time = 1000;
 module_param(cache_time, uint, 0644);
 MODULE_PARM_DESC(cache_time, "cache time in milliseconds");
@@ -192,6 +193,19 @@
                battery->full_charge_capacity < battery->design_capacity;

drivers/acpi/battery.c line 203

Quoted 10 lines
drivers/acpi/battery.c +8 -0
 }
 
+static void acpi_battery_force_discharging_fix_status(union power_supply_propval *val)
+{
+       if (!battery_force_discharging)
+               return;
+
+       if (power_supply_is_system_supplied())
+               return;
+

The two checks above can be combined.

drivers/acpi/battery.c line 205

Quoted 2 lines
drivers/acpi/battery.c +2 -0
+       if (val->intval == POWER_SUPPLY_STATUS_FULL ||
+           val->intval == POWER_SUPPLY_STATUS_NOT_CHARGING)

What about POWER_SUPPLY_STATUS_CHARGING?

drivers/acpi/battery.c line 267

Quoted 11 lines
drivers/acpi/battery.c +4 -0
+               val->intval = POWER_SUPPLY_STATUS_DISCHARGING;
+}
+
 static int acpi_battery_get_property(struct power_supply *psy,
                                     enum power_supply_property psp,
                                     union power_supply_propval *val)
@@ -250,6 +264,7 @@
                        val->intval = POWER_SUPPLY_STATUS_FULL;
                else
                        val->intval = POWER_SUPPLY_STATUS_NOT_CHARGING;
+               acpi_battery_force_discharging_fix_status(val);

Also it looks like you want the status to be POWER_SUPPLY_STATUS_DISCHARGING always if battery_force_discharging is set and power_supply_is_system_supplied() returns 'false' which can be checked upfront in the POWER_SUPPLY_PROP_STATUS case.

Quoted 34 lines
drivers/acpi/battery.c +16 -0
                break;
        case POWER_SUPPLY_PROP_PRESENT:
                val->intval = acpi_battery_present(battery);
@@ -1258,6 +1273,13 @@
        return 0;
 }
 
+static int __init
+battery_force_discharging_quirk(const struct dmi_system_id *d)
+{
+       battery_force_discharging = true;
+       return 0;
+}
+
 static const struct dmi_system_id bat_dmi_table[] __initconst = {
        {
                /* NEC LZ750/LS */
@@ -1294,6 +1316,15 @@
                        DMI_MATCH(DMI_PRODUCT_NAME, "Surface Go 3"),
                },
        },
+       {
+               /* ASUS TUF Gaming A16 FA608UMI */
+               .callback = battery_force_discharging_quirk,
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "ASUS"),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "TUF Gaming A16 FA608UMI"),
+                       DMI_MATCH(DMI_BOARD_NAME, "FA608UMI"),
+               },
+       },
        {},
 };