All of lore.kernel.org
 help / color / mirror / Atom feed
From: calvitohq@gmail.com
To: linux-acpi@vger.kernel.org
Subject: [PATCH] ACPI: battery: Force "Discharging" status on battery for ASUS TUF Gaming A16
Date: Sat, 26 Sep 2026 06:25:33 -0700 (PDT)	[thread overview]
Message-ID: <6ab7c7cd.aec4f0e4.3a9f4c.54b2@mx.google.com> (raw)

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"),
+		},
+	},
 	{},
 };
 

             reply	other threads:[~2026-09-26 13:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-26 13:25 calvitohq [this message]
2026-10-12 15:54 ` [PATCH] ACPI: battery: Force "Discharging" status on battery for ASUS TUF Gaming A16 Rafael J. Wysocki (Intel)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6ab7c7cd.aec4f0e4.3a9f4c.54b2@mx.google.com \
    --to=calvitohq@gmail.com \
    --cc=linux-acpi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.