[Bug 251618] sysutils/battmond: battmond won't act if battery level suddenly drops to zero

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sat Dec 5 20:40:18 UTC 2020


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=251618

            Bug ID: 251618
           Summary: sysutils/battmond: battmond won't act if battery level
                    suddenly drops to zero
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs at FreeBSD.org
          Reporter: dirtystickyfloor at web.de
                CC: ntarmos at gmail.com
             Flags: maintainer-feedback?(ntarmos at gmail.com)
                CC: ntarmos at gmail.com
 Attachment #220292 text/plain
         mime type:

Created attachment 220292
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=220292&action=edit
proposed patch

I configured battmond to suspend (option -z) after reaching a threshold of 5%
(-H 5). In some cases, e.g. when running the system under high load and/or if
the battery becomes old, it is not unusual that the battery level drops
suddenly from more than 5 percent to zero percent. In this case the system will
shut off unexpectedly instead of going to sleep. This is because battmond
checks for remaining capacity greater than zero and not greater than or equal
to zero (Line 192 in battmond.c).

Patchfile attached.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list