Linux ACPI
 help / color / mirror / Atom feed
* [PATCH] ACPI: battery: Force "Discharging" status on battery for ASUS TUF Gaming A16
@ 2026-09-26 13:25 calvitohq
  0 siblings, 0 replies; only message in thread
From: calvitohq @ 2026-09-26 13:25 UTC (permalink / raw)
  To: linux-acpi

From: Marco <soytucalvitofavorito@icloud.com>

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.

Signed-off-by: Marco <soytucalvitofavorito@icloud.com>
---
 drivers/acpi/battery.c | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

--- a/drivers/acpi/battery.c
+++ b/drivers/acpi/battery.c
@@ -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"),
+		},
+	},
 	{},
 };
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-26 13:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-26 13:25 [PATCH] ACPI: battery: Force "Discharging" status on battery for ASUS TUF Gaming A16 calvitohq

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox