[OLPC New Zealand] [OLPC-AU] [Testing] Testing summary, Auckland - 17 March 2012

Paul Fox pgf at laptop.org
Thu Mar 22 09:27:42 EDT 2012


jerry wrote:
 > On Wed, 2012-03-21 at 16:13 -0400, Paul Fox wrote:
 > > tabitha wrote:
 > >  > Testing Summary, Auckland - 17 March 2012
 > >  > Who: Fabiana, John, Oliver, Rachel, Tom
 > >  > 
 > >  > Tested build 30 customized on XO-1.75 and build 206 11.3.1-au on XO 1.5.
 > >  > 
 > >  > XO-1.5 Summary (details below):
 > >  > Power saving blanks the screen while recording a video
 > > ...
 > >  > build 206 11.3.1-au on XO 1.5:
 > >  > Rosella:
 > >  > Record activity - works fine for photo and video. high and low res.
 > >  > even long ones. But quite quickly the screen goes black - it is not
 > >  > going to sleep - there is no flashing of the power light and it
 > >  > continues recording. On Ivy it takes 1 minute to go black. Tabitha
 > > 
 > > jerry vonau tells me that the powerd version in this release is
 > > based on my powerd-44.  i cannot reproduce this problem with our
 > > os31 running with either powerd 44 or 46.
 > > 
 > > i don't know where to find the au modified packages, so i can't
 > > test the specific version that was being run above.
 > > 
 > 
 > Hi Paul,

jerry -- i think i've asked twice now (okay, i suppose it was just
implied, above) for a pointer to the modified version of powerd that
was included in your build 206.  where can i find that code?

 > 
 > I was tracking down why my XO-1.5's would never dim/blank in the normal
 > course of operation with version 46. I chose to modify version 44 as I

so you're working on a different problem than the one above.  the problem
above is that the screen _does_ dim and blank when Record is active.

 > was working with that as a baseline for some modifications. Well I
 > turned my attention to version 46 and I think I found the issue I was
 > having. In r1.patch I added some tracing to laptop_busy to get some idea
 > what was occurring, it looked like cpu_or_network_busy was keeping the
 > laptop from suspending, so I added r2.patch to capture more data. The
 > tracing uncovered on a XO-1.5 that check_network_activity would always
 > return 0 thus preventing the next step in the cycle from occurring. I

certainly if check_network_activity always returns 0, then the machine
will never dim or sleep.  why is it always returning 0?  oh.  there's
a bug in your patch, i think.  see below.

 > corrected the issue for me with r3-patch. What are your thoughts?
 > 

i'm not sure of the value of showing me a set of work-in-progress
patches.  one patch would be sufficient, i think.


r1-patch:
 > diff --git a/powerd b/powerd
 > index edbd8e9..5c9cb0c 100755
 > --- a/powerd
 > +++ b/powerd
 > @@ -2700,8 +2700,11 @@ sleep_action()
 >      # use it here.
 >      if laptop_busy
 >      then
 > +        trace laptop_busy TRUE
 >          reset_idlecounters  # restart the timers
 >          return
 > +    else
 > +        trace laptop_busy FALSE 
 >      fi
 >  
 >      # sleep until it's time to shut down

the above looks fine.


r2-patch:
 > diff --git a/powerd b/powerd
 > index edbd8e9..bf595d3 100755
 > --- a/powerd
 > +++ b/powerd
 > @@ -978,6 +978,7 @@ then
 >  
 >      check_camera_activity()
 >      {
 > +        trace check_camera_activity
 >          case $1 in
 >          start)
 >              camera_ints=$(camera_interrupts start)
 > @@ -1123,6 +1124,7 @@ check_cpu_activity()
 >  
 >  cpu_or_network_busy()
 >  {
 > +    trace start cpu_or_network_busy 
 >      check_cpu_activity start
 >      check_network_activity start
 >      check_camera_activity start
 > @@ -1131,6 +1133,8 @@ cpu_or_network_busy()
 >      # check for events while doing so.  we can afford this extra
 >      # wait seconds because we arranged to be signalled 5 seconds
 >      # before actually wanting to suspend.
 > +    trace loop cpu_or_network_busy 
 > +
 >      start=$(seconds)
 >      while : BUSYCHECK loop
 >      do
 > @@ -1138,9 +1142,16 @@ cpu_or_network_busy()
 >          test $(( $(seconds) - start )) -ge $BUSYCHECK && break
 >      done
 >  
 > +    trace busycheck cpu_or_network_busy 
 > +
 >      check_cpu_activity finish && return 0
 > +    trace cpu cpu_or_network_busy 
 > +

everything is fine up to here.

 >      check_network_activity finish && return 0
 > -    check_camera_activity finish && return 0
 > +    trace network cpu_or_network_busy 
 > +
 > +    check_camera_activity finish
 > +    trace camera cpu_or_network_busy && return 0

you're no longer checking the return value from check_camera_activity
at all -- you're checking the result of a trace statement.  as a result
cpu_or_network_busy() will always report busy-ness and keep the laptop
awake.

 >  
 >      return 1
 >  }

r3-patch:
 > diff --git a/powerd b/powerd
 > index bf595d3..e849f87 100755
 > --- a/powerd
 > +++ b/powerd
 > @@ -1010,7 +1010,9 @@ else
 >          test $1 = "finish" && \
 >              grep -q via-dma /proc/interrupts && \
 >              trace camera busy
 > +            return 0
 >      }
 > +    return 1
 >  fi

you've a) forced check_camera_activity() to always return 0, and b)
added a "return 1" outside of the body of the function.  so this
doesn't seem right.

 >  
 >  
 > @@ -1151,7 +1153,7 @@ cpu_or_network_busy()
 >      trace network cpu_or_network_busy 
 >  
 >      check_camera_activity finish
 > -    trace camera cpu_or_network_busy && return 0
 > +    trace camera cpu_or_network_busy
 >  
 >      return 1
 >  }

here you've fixed the issue i mentioned regarding r2-patch, so that
you're no longer checking the return value of a trace call.  that's
good.  but you're still not checking the value of check_camera_activity
at all, which i guess is why you didn't notice that it's always
returning success.


please point me to your release repo for powerd.  i'd like to get back
to understanding the problem reported by the testing group.

paul

=---------------------
 paul fox, pgf at laptop.org


More information about the OLPC-NZ mailing list