Opened 9 years ago

Closed 9 years ago

Last modified 20 months ago

#4401 closed defect (fixed)

Sugar battery capacity does not update

Reported by: rsmith Owned by: kimquirk
Priority: blocker Milestone:
Component: power manager (OHM) Version:
Keywords: Cc: marco, cjb, hughsient, dilinger, rafael
Blocked By: Blocking:
Deployments affected: Action Needed:
Verified: no


The capacity indicator in sugar does not update as the capacity of the battery changes. I think the reason for this is because the 1% SCI events are masked to prevent being woken up from sleep.

The eventual solution to this is to mask the SCI events when we go to sleep and then to unmask them during normal operation. OHM also needs to start deciding when the system is idle and put the system to sleep.

Until these things are in place sugar will have to poll for battery capacity changes. I think that every 3 to 5 minutes should be enough. 1% capacity changes happen about every 100 seconds.

Change History (12)

comment:1 Changed 9 years ago by marco

  • Component changed from sugar to power manager (OHM)
  • Owner changed from marco to hughsient@…

Sugar is not involved at all here, it just listen on HAL property changes. I'm assigning to power-manager which, even if not completely correct, seem a better component for this. Jim, if you actually want me to look into this problem at the HAL level please reassign to me.

comment:2 Changed 9 years ago by kimquirk

  • Cc rsmith added
  • Milestone changed from Never Assigned to First Deployment, V1.0
  • Priority changed from normal to blocker

comment:3 follow-up: Changed 9 years ago by kimquirk

  • Cc cjb added
  • Owner changed from hughsient@… to rsmith

comment:4 in reply to: ↑ 3 Changed 9 years ago by rsmith

  • Cc hughsient added
  • Owner changed from rsmith to marco

Replying to kimquirk:

Yes. Marco please look into this. We just need _some_ sort of workaround. So it does not matter if its in Sugar or HAL. Wherever its easiest to apply and then un-apply once proper idle detection works and the battery capacity SCI's are unmasked. I would just fix it myself but my initial poking around didn't go anywhere. I'll be happy to come up with some sort of fix if you can get me in the general vicinity of the code that is responsible for this.

comment:5 Changed 9 years ago by marco

  • Cc marco added; rsmith removed
  • Owner changed from marco to rsmith

I think rsmith is trying to solve this for real at ohm/kernel level.

comment:6 Changed 9 years ago by dilinger

Longer term, we need to fix OHM or sugar. In the short term, we'll work around it in the kernel by enabling SoC SCI events during normal operation, but shut them prior to suspend.

Patch applied to stable:;a=commitdiff;h=ca9cca5c8f9a66a350d13c159b8fd1279406dbd6

comment:7 Changed 9 years ago by dilinger

(should probably be downgraded in priority?)

comment:8 Changed 9 years ago by dilinger

  • Cc dilinger added

comment:9 Changed 9 years ago by RafaelOrtiz

  • Cc rafael added

comment:10 Changed 9 years ago by wmb@…

  • Owner changed from rsmith to kimquirk

Need someone to test this, cjb can give recipe.

comment:11 Changed 9 years ago by jg

  • Resolution set to fixed
  • Status changed from new to closed

comment:12 Changed 20 months ago by Quozl

  • Milestone 8.2.0 (was Update.2) deleted

Milestone 8.2.0 (was Update.2) deleted

Note: See TracTickets for help on using tickets.