On Wednesday 31 October 2007, Alexey Starikovskiy wrote: > Andrey Borzenkov wrote: > > I suspect new ACPI AC adapter code but have to add some printk's to be > > sure. > > > > To reproduce - plug in AC cord, suspend, unplug, resume - kpowersave and > > sysfs still show AC adapter online. Or other way round. > > > > -andrey > > Please check if this patch helps. > It does not even compile :) On serious note (after adding forward declaration) - patch half works. It does make "online" return true value (which confirms that underlying ACPI works correctly) but HAL still does not notice it. The problem is, with power_supply interface HAL does not use polling, it relies on CHANGE event. This event is apparently never generated if AC adapter state changes on resume. So the obvious fix is to compare AC state before and after suspend in ->resume function and generate synthetic CHANGE event if something has changed. This will also make superfluous polling redundant.
Attachment:
signature.asc
Description: This is a digitally signed message part.
- Follow-Ups:
- Re: [2.6.24-rc1 regression] AC adapter state does not change after resume
- From: Alexey Starikovskiy <[email protected]>
- Re: [2.6.24-rc1 regression] AC adapter state does not change after resume
- References:
- [2.6.24-rc1 regression] AC adapter state does not change after resume
- From: Andrey Borzenkov <[email protected]>
- Re: [2.6.24-rc1 regression] AC adapter state does not change after resume
- From: Alexey Starikovskiy <[email protected]>
- [2.6.24-rc1 regression] AC adapter state does not change after resume
- Prev by Date: Re: [PATCH] af_key: suppress a warning for 64k pages.
- Next by Date: Re: tipc_config.h requires linux/string.h, which does not exist in exported headers
- Previous by thread: Re: [2.6.24-rc1 regression] AC adapter state does not change after resume
- Next by thread: Re: [2.6.24-rc1 regression] AC adapter state does not change after resume
- Index(es):