Bug 656440 - usbhid-ups alternates between online and on-battery state
Summary: usbhid-ups alternates between online and on-battery state
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: nut
Version: 14
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ---
Assignee: Michal Hlavinka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-11-23 18:25 UTC by Fabrice Bellet
Modified: 2012-08-16 19:28 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-16 19:28:53 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
log obtained with "usbhid-ups -a myups -D -D -D -D -D" (229.93 KB, text/plain)
2010-11-23 18:27 UTC, Fabrice Bellet
no flags Details

Description Fabrice Bellet 2010-11-23 18:25:41 UTC
usbhid-ups alternates between online and on-battery state, quite frequently, and on a regular timeline basis. On the attached log from usbhid-ups :
  around 46 secs : send_to_all: SETINFO ups.status "OB CHRG"
  around 56 secs : send_to_all: SETINFO ups.status "OL CHRG"
  around 86 secs : send_to_all: SETINFO ups.status "OB CHRG"
  around 96 secs : send_to_all: SETINFO ups.status "OL CHRG"
 .. and so on...

the problem is that the online state is triggered by the path "UPS.PowerSummary.PresentStatus.ACPresent" with value 1 (at time 46.108213), which is ok, but the !online state is triggered by the path " UPS.PowerConverter.Input.[3].PresentStatus.Used" with value 1 (just below at time 46.108445).

When the full ups status is requested (every 40 secs I guess), the second path value comes just after, and leaves ups_status to value !online, and when the partial ups status is requested to the hardware (every 10 secs), only the first path is obtained, and the ups_status value is switched back to online, which explains the flip-flop with this precise timing.

The bug IMO is that UPS.PowerConverter.Input.[3].PresentStatus.Used==1 should probably not change the ups.status value.

Comment 1 Fabrice Bellet 2010-11-23 18:27:04 UTC
Created attachment 462408 [details]
log obtained with "usbhid-ups -a myups -D -D -D -D -D"

Comment 2 Fabrice Bellet 2010-11-23 20:50:15 UTC
from drivers/mge-hid.c:744,

[...]
        { "BOOL", 0, 0, "UPS.PowerSummary.PresentStatus.ACPresent", NULL, NULL, HU_FLAG_QUICK_POLL, online_info },
        { "BOOL", 0, 0, "UPS.PowerConverter.Input.[3].PresentStatus.Used", NULL, NULL, 0, mge_onbatt_info },
[...]

and according to the mapping for mge_onbatt_info and online_info, having both values==1 seems contradictory. I'm confused...

Comment 4 Fedora End Of Life 2012-08-16 19:28:55 UTC
This message is a notice that Fedora 14 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 14. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained.  At this time, all open bugs with a Fedora 'version'
of '14' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this 
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen 
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we were unable to fix it before Fedora 14 reached end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" (top right of this page) and open it against that 
version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping


Note You need to log in before you can comment on or make changes to this bug.