Power, time keeping, networking...
hmurray at megapathdsl.net
Tue Aug 11 12:12:33 EDT 2009
cjb at laptop.org said:
> Every build since 8.2.0 (last October) does this, if you go to the
> Power control panel and turn on Automatic power management. For more
> power saving by turning off the wifi chip, turn on Extreme power
Neat. Thanks. Somehow I'd missed that.
That page might be a nice place to put a check-box to turn off networking
when active, either to save power when there are no other XOs around (or
school servers or APs) or to make it airplane safe. (Is a switch like that
good enough for airplanes?)
Could somebody give me an update?
I though the goal was to go to sleep between keystrokes. A sleeping XO
running 802 takes 1.6 seconds to respond to a ping. I assume waking up from
a key or cursor are similar, but I can't measure them as easily. At the
keyboard/cursor, I find that delay annoying. I might choose to live with it
after a bit of practice if I really wanted longer battery life.
ping to a sleeping xo consistently drops the second packet. It's acting like
the module only has enough buffering for one packet. (It takes 1.6 second to
wakeup. The second ping goes out after 1 second.) But only-one-buffer would
probably screwup normal operations. Is the WiFi firmware doing anything
different in the sleeping case?
An XO (running 802) doesn't wakeup in response to a broadcast ARP looking for
it. That's http://dev.laptop.org/ticket/3732
Network traffic doesn't seem to kick the don't-sleep timer. I tried to use
ping to keep a system from going to sleep. It sends a packet every second,
but the xo went to sleep occasionally: 2% packet loss and an occasional time
of 1.6 seconds.
I've seen several cases (over several days) where waking up or going to sleep
gets stuck in a strange state. It's running, the network and cursor work,
but the button to turn the backlight on doesn't do anything. Is there
something I should look for to gather more info?
I also saw another case where the radio got turned off. (Net didn't respond,
LED was out, keyboard worked.)
Is there an API and/or documentation for this area? (I'm interested in both
the XO and Linux in general.) Can I setup a machine to wake up in 10
minutes? (For example, to maximize battery life while collecting data.)
What happens to a program that calls sleep? Some quick shell hacking says if
the system goes to sleep, the program doesn't get woken up until something
else wakes up the system. That's going to break a lot of code. (but
probably necessary/appropriate if you are running the type of code that polls
What happens with arp and dhcp timers while an XO is sleeping? My straw man
is that arp timers should time out, DHCP timers should wakeup the system so
it can renew its lease.
What can I do to help?
I'm interested in timekeeping.
What sort of accuracy are people expecting for the time on their XO?
All I can see in the control panel => Date & time is a way to select the time
zone. Is there a way for a non-geek to manually set the time?
I see that /etc/NetworkManager/dispatcher.d/time-sync calls ntpdate to try to
set the time when a network comes up.
What chunk of hardware keeps track of time while the XO is sleeping? I
would have guessed the RTC/TOY clock, but ssh-ing in to an XO that was
sleeping shows that hwclock and date are way off. Is there a counter in the
EC? Can I read it from user code? (The RTC/TOY is a poor choice anyway
since you can only read it to a second. You can do better than that by
spinning until it ticks, but that's not appropriate for suspend/wakeup.)
Does anybody know which timekeeping option the XO kernel is using? (Linux
has several choices. I can probably find it by looking at the kernel config
file and/or hacking in some printfs.)
When auto-suspend is disabled, I see a drift rate of roughly 10 seconds in 24
hours on one particular system. That's 115 ppm, not good but not silly.
It's a nice clean drift, what I expect if the crystal is slightly off
frequency or the software is slightly off.
When the XO goes to sleep and gets woken up once or twice every 5 minutes,
the clock is much more "interesting". Offsets of 5 or 20 seconds are common.
Typically it drifts with a sawtooth pattern, say losing 10 seconds over a
few hours then changing direction, gaining a few seconds, then switching
back... I haven't been able to sort out a pattern.
ntpd doesn't like running on an xo with power savings enabled. I've seen it
gain 200 seconds in under 8 hours.
These are my opinions, not necessarily my employer's. I hate spam.
More information about the Devel