From nobody Mon Mar 6 02:19:56 2023 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PVMjj1cS5z3wGZg for ; Mon, 6 Mar 2023 02:20:09 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PVMjj0sNsz3CRt for ; Mon, 6 Mar 2023 02:20:09 +0000 (UTC) (envelope-from kevans@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678069209; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=VUWgXMNeOlowYkZBqfe2seHIBkNOLyB38Z1cHuWwuos=; b=DgcZd0dYnHcgeIIP7CYDbjSJjdeOJSCGqVHN0I76Qa5qoYjWAb08YXHmaZB3Zmurnl3e5P VtWjWR2e4jR8/ZktH/S1NQkxQcee/2vsr7ewhzCxaMJhLWmGvtwn9ut6FNwcTNhdo0gjET yeI5nLN5BDYuFZd/LeiWIlMjw4YSlAgkALYfI45W+bTMjbVtTVM1oRqkm33Ot1SCkNaG5h RkCpn0NTydfn0ZX/B1/EfQqe3G7l0S/InaNMxEaytlTKhL+x1QEZprs2AFcS86IjdhUBbX 5N6XUl/88iljO5xlVVy7cac7mHshFth20O/kjj/19xEgdXrzDpYBJY5409tw4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678069209; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=VUWgXMNeOlowYkZBqfe2seHIBkNOLyB38Z1cHuWwuos=; b=hKVURnrJWk9WEVSr61NR6ivj793qUD7YEBQqWDAlFknIDk6wXp1GAW4RJsjKtTHsZu157D BB7/0AKL9ChYjNMkXc083dOOamp0QZsxzyNU25T2T53DWz3vdzUgaC0k+RVsMOvSB0ugHb aOf79ZJwgYVjkVafIC/mg6dbQw+zyrUs4NlXWMv7wLJmZRoj1fTQQ29e1tuyD6uo0jTAsP +GGmNHHnV9KtSeSi4aosEjFCQAa4MjZ4kjAQEFjH37NxB8WTY1PthTJa5sGsQc7FVvBjoM qkvjprEVYDE+94mrho3o4sTudYBcd3+zgRvovjWHyYdXHn7x6P01YlioLafwYw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1678069209; a=rsa-sha256; cv=none; b=TDNexg4IpE3R4wE+Qbbk+OcE4vD+19FWLR2w9kz3Ouy5Hw5wt/QyimDXVqPxERajP1AMsk bKCPuDiVaQJUEedEHesnATrqnCcYrTFRwJfLMla3kq4Npq/xN//2nnb2vUFXyzejEz62JM +MTMrl1zc+AM/5PrY8LnTeq22N0U79Jhn+n1aRmETFz0NoIJzQAiPCvDnP0jQO1nUcpHuo ptfLmfhigMs2PJ6d0PF2EN9FyPe0hI3X8y8fu7V2o4HCbjS2PAQEBebgbyPSLkS5KIIhxS YH5AKVWnKpzZITQFQDo7KIFo6w8P4vUKPv+mCwg2LnRg0oc0nmLNPp6CX+9qOA== Received: from mail-qv1-f52.google.com (mail-qv1-f52.google.com [209.85.219.52]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 4PVMjh6ynyztc8 for ; Mon, 6 Mar 2023 02:20:08 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qv1-f52.google.com with SMTP id y3so5726520qvn.4 for ; Sun, 05 Mar 2023 18:20:08 -0800 (PST) X-Gm-Message-State: AO0yUKXj3anArPsAepmeIg99ftsuPV381nr4Rxct5y6c2K41gmHnB40+ hrdcR3MhKsOJFMXuGNA8hp5dyOd14DaChsmzTKc= X-Google-Smtp-Source: AK7set/eLyN/X1iNYeR/gYIfrd9JqXYV9dsXMkfwtaWyD7nRYbOsoQHfsW06wjyEBC45bLe8Dt8p7osrtDOttHK2YtE= X-Received: by 2002:a05:6214:1854:b0:56e:8c9a:2610 with SMTP id d20-20020a056214185400b0056e8c9a2610mr2522038qvy.3.1678069208431; Sun, 05 Mar 2023 18:20:08 -0800 (PST) List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 From: Kyle Evans Date: Sun, 5 Mar 2023 20:19:56 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: acpi_cmbat with charge-limited battery To: FreeBSD Hackers Content-Type: text/plain; charset="UTF-8" X-ThisMailContainsUnwantedMimeParts: N Hello! I've dealt with this mainly over the weekend, but my solution was to just disable acpi_cmbat entirely, which is maybe not the best solution but I can't tell if this should be considered a firmware bug or if it's something we could find a way to workaround in the kernel. Basically, I've set the firmware on my frame.work laptop to limit the battery charge to 80%. When it hits 80% while plugged in, things get a little funky- I assume it's because the firmware's trying to carefully maintain the limit, but I end up getting (at least) one acpi notification per second, alternating between BST_CHANGE/BIX_CHANGE, which in turn drives up CPU usage as we tap it out to devd and upowerd picks it up. upowerd ends up pegging a core consistently. Should we be rate-limiting these devd notifications? Is this even reasonable behavior for the firmware? I'm not really sure how other OS behave here, but I haven't really seen any complaints from other framework'ers. Thanks, Kyle Evans