On Fri, 2004-01-23 at 22:35, Guido Guenther wrote: > On Fri, Jan 23, 2004 at 11:32:46AM +0100, Michael Schmitz wrote: > > I've had the same happen on occasion, and won't of course blame pmud for > > it :-) Seriously, what seems to happen is the battery is lying about how > > much charge is left, and runs out during sleep. > Just for the record, I didn't look into this further: > I had the clock reset to 1904 after hitting Magic-Sysrq+M (showMem) > where the machine simply powered off and when hitting Magic-Syrrq+B > (reboot).
Well, this is different. The kernel continuously talks to the PMU. It happens asynchronously at interrupt time. If for some reason, that communication is stopped in the middle of a message transmission, the PMU times out and shuts the machine down, losing the time (I suspect it resets itself, and since it does the timekeeping as well...) So a kernel hang or stopping it (with sysrq) in the middle of such a message transmission can trigger that. One fix would be to shield the sysrq stuff with pmu_suspend() or to call pmu_poll in the sysrq code. That's unrelated to the battery problem. Ben.