Ticket #2449 (closed defect: fixed)

Opened 7 years ago

Last modified 7 years ago

Too many things wake system.

Reported by: warp Owned by: cjb
Priority: blocker Milestone: Trial-3
Component: kernel Version:
Keywords: battery Cc: rsmith, Zack
Action Needed: Verified: no
Deployments affected: Blocked By:
Blocking:

Description (last modified by jg) (diff)

This is on a B4 with Q2C18 and build 532.

Too many things wake the system from suspend: Plugging in/unplugging the laptop, closing the lid, something periodic which I'm guessing is the battery percentage changing, but which might be something else.

All in all, we should consider having the EC wake up from all of them, but having userspace immediately put the laptop back to sleep if it's one we don't want to wake up from.

Only the first is Trial-2 fodder.

Attachments

set-ec-mask.patch (1.2 kB) - added by cjb 7 years ago.

Change History

  Changed 7 years ago by cjb

  • owner changed from jg to dilinger
  • priority changed from normal to high
  • component changed from distro to kernel

We can set a mask (in the kernel) that the EC uses to decide which SCIs cause wackups. We should do that, disabling the power-related ones from wakeup.

  Changed 7 years ago by jg

  • cc rsmith added
  • milestone changed from Untriaged to Trial-2

Most of these we'll want to key on.

For example, plugging in a laptop will likely want us to use it more for mesh than if it is on battery.

I also think the battery dropping level by some amount causes wakeups.

Richard, can you please note what you think will cause an event?

follow-up: ↓ 5   Changed 7 years ago by cjb

  • priority changed from high to blocker

I'd like to raise this to blocker -- waking up from suspend every 1% of battery loss is no good.

  Changed 7 years ago by dilinger

Agreed; due to SOC events, we wake up every 100 seconds or so. That seems like a waste.

in reply to: ↑ 3 ; follow-ups: ↓ 6 ↓ 7   Changed 7 years ago by rsmith

Replying to cjb:

I'd like to raise this to blocker -- waking up from suspend every 1% of battery loss is no good.

I point to #555 and http://lists.laptop.org/pipermail/devel/2007-March/004447.html thats where the 1% came from.

I vote that when we have proper cpu idle detection we take measurements and see how much extra power the wakeups cause and decide what to do then.

in reply to: ↑ 5   Changed 7 years ago by cjb

Replying to rsmith:

I vote that when we have proper cpu idle detection we take measurements and see how much extra power the wakeups cause and decide what to do then.

I'm not saying that the EC should change. I'm saying that, for Trial-2, since we *have* no CPU idle detection putting us back to sleep, we should set the wakeup mask such that the 1% battery events never wake us up.

I agree that, if we had CPU idle detection putting us back to sleep, it would be a subtle issue. Right now, it clearly isn't subtle; if we hit the power button to go to sleep, we should not wake up a minute or two later and stay up.

in reply to: ↑ 5   Changed 7 years ago by frief

  • keywords battery added

Replying to rsmith:

Replying to cjb:

I'd like to raise this to blocker -- waking up from suspend every 1% of battery loss is no good.

I point to #555 and http://lists.laptop.org/pipermail/devel/2007-March/004447.html thats where the 1% came from.

Maybe I'm off track but I'd suggest having no 1% battery events at all.

Instead the host should send a threshold for the capacity to the EC. If capacity falls below that threshold the XO is woken up. When woken up the XO transmitts a new threshold to the EC.

Thus the XO can decide that a drop from 98% to 96% does not matter whereas a drop from 9% to 8% (or 8.4%) does. (Preferrably a raw value is transmitted. If raw instead of cooked values are used then the EC does not have to have an idea about current sense resistors or capacities (kernel probably does not want to know either:))

  Changed 7 years ago by Zack

  • cc Zack added

  Changed 7 years ago by jg

  • owner changed from dilinger to cjb
  • description modified (diff)
  • The system should mask the SCI on boot to not interrupt.
  • There should be some way to set the number of % between notification.
  • And there should be separate battery low notification to tell the system to shutdown/hibernate.

  Changed 7 years ago by cjb

Here's a patch (attached) to disable the battery SOC wakeups.

Changed 7 years ago by cjb

  Changed 7 years ago by jg

  • milestone changed from Trial-2 to Trial-3

OK, battery no longer waking us up at 1% increments.

  Changed 7 years ago by cjb

Closing for now.

  Changed 7 years ago by jg

  • status changed from new to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.