From nobody Sat Dec 04 13:23:37 2021 X-Original-To: bugs@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 0EF9C18C1A2B for ; Sat, 4 Dec 2021 13:23:38 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J5r494zy2z4f6K for ; Sat, 4 Dec 2021 13:23:37 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8B74C2504D for ; Sat, 4 Dec 2021 13:23:37 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 1B4DNbLl065718 for ; Sat, 4 Dec 2021 13:23:37 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 1B4DNboX065717 for bugs@FreeBSD.org; Sat, 4 Dec 2021 13:23:37 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 260214] [wine] acpi_battery should provide current/max battery charge in Wh Date: Sat, 04 Dec 2021 13:23:37 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 13.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: damjan.jov@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638624217; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HL1PiCy96jqqnc4znos6V0gKC90cC0Inklc7aiRie6A=; b=mE695vpJHxjQhF0QT/yRpHMIdc/l936ymfUXoBBlUDqgACjoryjvSXgR8IAT9u9R7OUapr 8I+iJYTSC6NNiXmFa6pGK+ehTo0JuMyd2HWOTd2Id/dKxYSZ6RpM2khzsUl1f+TpOGKXhj HLKFva8aGkFx9cqOyvbsnbBrpxNGSYQ3KkQxf4l3ZbGOSbQKhpC1LJkIAhxFLpI0HhzpOS +pKsTgqnmLy30s26LPPbm9CLeWNU/+G6T2lZF7upiwOZVoWAFW62jVR/odFKiMl6BxRLa5 ZdfHOSLAbB7OFNfERYpuQX245GuCciUm9j1LphfW+D9iFozxqVYgNigXXc3e2A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638624217; a=rsa-sha256; cv=none; b=g0s/thDT9T/erQrUb1lf+cLjifwpWnrsys3z006Ejd8OA617kE3RNnZaN8PzDz1VITF+He 1w+4bGREoz/EsZ9CL8aGWYURljDGADH9PqQ9uFFY2EkcB8J8DX5CxnYDpDCBD0wUw3KmD6 qv1LFXOMCvuKaEd3mpVbHrXOJFBWkQmJRQBNGDKIeTALXPqB6B1NGRjYJZqt7TsXZ/9ao1 Ah4D+K+iS1YBMFarMcsjXOgtVreL4ROUw4ZnAYJILYIMKrWgxgEghTR8xu4TP1LIFwrkMg pXM3qLBqR+aFgeQGxncgoSIV4mgw+GItdkKp44wD4ealG7I1ri7UxQVx5ps9NQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D260214 Bug ID: 260214 Summary: [wine] acpi_battery should provide current/max battery charge in Wh Product: Base System Version: 13.0-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: damjan.jov@gmail.com We currently have these power level related acpi_battery sysctls: hw.acpi.battery.rate in mW hw.acpi.battery.time in minutes hw.acpi.battery.life in % While discharging, the maximum battery capacity in Wh can be calculated from those, as per below. But there is no way to determine current or maximum battery capacity when not discharging, as time =3D=3D -1, and rate could be= 0. Can't we have sysctls for that too? Windows and Linux and Mac provide this,= and Wine expects them. Remaining capacity =3D rate (mW) * time (minutes) =3D (rate/1000 (Watts or Joules/second)) * (60*time (seconds)) =3D rate/1000*60*time (Joules) =3D rate/1000*60*time/3600 (in Wh) Total capacity =3D remaining capacity / life * 100 Wh --=20 You are receiving this mail because: You are the assignee for the bug.=