From nobody Sun Dec 05 03:47:41 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 6C5111897BAA for ; Sun, 5 Dec 2021 03:47:41 +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 4J6CF90phhz3Nm3 for ; Sun, 5 Dec 2021 03:47:41 +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 F005510F56 for ; Sun, 5 Dec 2021 03:47:40 +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 1B53leD7044070 for ; Sun, 5 Dec 2021 03:47:40 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 1B53len6044069 for bugs@FreeBSD.org; Sun, 5 Dec 2021 03:47:40 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] acpi_battery: Should provide current/max battery charge in Wh (wine expects them) Date: Sun, 05 Dec 2021 03:47:41 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 13.0-RELEASE X-Bugzilla-Keywords: needs-patch, needs-qa X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: damjan.jov@gmail.com X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? mfc-stable13? mfc-stable12? X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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=1638676061; 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: in-reply-to:in-reply-to:references:references; bh=1+RTntoGPvZ2CtIbTCSYofEWfwbzD2dq8BN8fqATqNA=; b=YUjk82Pz3ujn/TCi9A2JaFjdjWzOFeyNEb0xi0kAmk5iycVd36EWeBlr71gYRyAkQg1w/y 0LZ/6j8zdDzEJHzBcKi0+c5vicwJ6PgJRDExkys51K3A6wTPT7d5k/k6qbwOMl7p7hN/1Y D1gMtz3TnBkNb/vKUV6RRCsbVYXISWvtVGfyKktvfiilzRIew2HtO2B1uhuqPXajjmvyUw GobpkAwGxhUDQ2jfr48nbv7OF4CK+KF/a2+qJUmgREhTO/WkLgr+MRe3hbMLpwggOKXUsR of9f6HTnW+Cx7DWSSvrE+B/LvRbyDOnkZQ3QNLwlmDgvD57M8vpIOOXtkWlMMg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638676061; a=rsa-sha256; cv=none; b=w3p438x8/eUuXcy+DlrJdTN67nAcjzvUgPIchFGVuMinRDjb3Aecs/ObV8UaGFjbAnX2ji Tj733m0X8YhochTV6L+6jwjila5IuGcpF+sjuJG52i73Ax1osgNr13FiLrPo10gDrlqlwk ZEZ3F16IXntILERsSmcUDFTF6yxo3hMcKuVOKft/K3GiV5m+aTdm2n8EzlzrHTY4GTJTxR oToXuWbirJVoNKaGoBpdLIz0r9V4y2m90/2hDefPvw2zs92cg/1U72vc5YmmMFI9AMnbhj na1kOnV8FgpohL5mKwPJ4GW81pbsTgWUb9L2PeX4j2F2oGsJhhEYNlX40HGsNg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D260214 --- Comment #2 from Damjan Jovanovic --- (In reply to Kubilay Kocak from comment #1) There's only 6 sysctls in hw.acpi.battery, and they're useful to compare between a working battery on a new laptop, and a broken battery on an old laptop, while charging and discharging, so I'll post them inline: Broken Working Working battery battery battery AC power discharging AC power hw.acpi.battery.info_expire 5 5 5 hw.acpi.battery.units 1 1 1 hw.acpi.battery.state 0 1 2 hw.acpi.battery.rate 0 11959 0 hw.acpi.battery.time -1 97 -1 hw.acpi.battery.life 0 72 44 time =3D=3D -1 and rate =3D=3D 0 can't be used to calculate battery capacit= y Wh while charging (not that they're particularly accurate even when discharging; the life% especially lacks sufficient granularity). Yes, the ioctl is better, but /dev/acpi is owned by root:operator, and even though it's crw-rw-r-- when I successfully open it as non-root user with O_RDONLY, the ioctl() get= s: ioctl: Operation not permitted --=20 You are receiving this mail because: You are the assignee for the bug.=