Re: Power manager specification... (request for comments).

2007-08-17 Thread Walter Bender
Lets please be careful not to over-engineer. While Mike makes good
points, we have this wonderful human social network we can depend upon
as well. E.g., If I am downloading something from your machine, I can
ask you to hold on a second until I finish. Let's take advantage of
the fact that the kids are in the same community/school most of the
time and not worry so much about corner cases until we have some more
breathing room.

-walter

On 8/16/07, Mike C. Fletcher [EMAIL PROTECTED] wrote:
 Jim Gettys wrote:
 ...
  There seems to be no way to manually adjust the backlight level in
  ebook mode. What would be the policy for it? Leave it on all the time
  or dim down after some idle time? Also CPU (and wireless?) should go
  to suspend for most of time in ebook mode?
 
 
  We have code in at least our PDF viewer to literally do exactly this; as
  soon as the page is rendered and it is idle, it puts the machine to
  sleep.
 
 For the activity developers in the audience:

This is (I believe) in the GIT read-activity/readactivity.py[1]
module.  The implementation uses the HardwareManager[2] service
(set_kernel_suspend) exposed over dbus to directly send the kernel
into suspended state.  AFAICS there's no allowance for tracking
whether something *else* might need the machine to be alive (e.g. a
download or the like being done in the background).  The same
Manager object has controls for various operations such as changing
brightness and the like.

 On the original topic of the thread (what the power manager should do):

I'm guessing eventually we'll want some of the logic currently in
the read activity to migrate into HardwareManager.  That is, allow
for signaling inhibit_suspend( ) and allow_suspend()[3], rather
than directly setting suspend, such that a given activity can
declare that it must be allowed to continue processing in the
back-end.  Then you'd want something like suggest_suspend() so
that a foreground activity can tell the system hey, I don't expect
to do anything for a second or two, if no-one objects, feel free to
suspend.

 From there, a second level does a suggest-suspend from Sugar (or
whoever) on no-cpu, no-network (other than the autonomous routing),
no-input, for a given period.  No opinion on where/how to put that.

HardwareManager should likely send dbus events so that activities
can watch for resume, suggested-suspend, or what have you and adjust
behaviour accordingly.  Example usage scenario: switch a per-second
clock-updating timer to a per-minute timer.

 Hope this helps,
 Mike

 [1]
 http://dev.laptop.org/git.do?p=projects/read-activity;a=blob;f=readactivity.py;h=3eeb858cc5ea1dc67a60faee90628100479509be;hb=HEAD
 [2]
 http://dev.laptop.org/git.do?p=hardware-manager;a=blob;f=hardwaremanager.py;h=3154b17553621cc41fa947cbff2756372e6e37ec;hb=HEAD
 [3] with allow-suspend happening automatically after a short-ish timeout
 if the activity doesn't re-assert the inhibition

 --
 
  Mike C. Fletcher
  Designer, VR Plumber, Coder
  http://www.vrplumber.com
  http://blog.vrplumber.com

 ___
 Devel mailing list
 Devel@lists.laptop.org
 http://lists.laptop.org/listinfo/devel



-- 
Walter Bender
One Laptop per Child
http://laptop.org
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: Power manager specification... (request for comments).

2007-08-17 Thread Don Hopkins
You have to remember that the kids using these machines might not yet 
know how to read, so just popping up a notice with a paragraph 
explaining the situation and Yes/No buttons isn't an ideal solution.


   -Don

http://xarg.net/blog/one-entry?entry_id=20005
http://www.freebsd.org/cgi/getmsg.cgi?fetch=506636+517178+/usr/local/www/db/text/1999/freebsd-hackers/19991003.freebsd-hackers

Word of the day: Bikeshedding

I saw this word somewhere and did not know what it meant. It turns out 
to be an excellent word for describing a lot of what goes on in online 
communities.


It comes from Parkinson's Law by C. Northcoate Parkinson. He describes 
how a planning board will approve spending millions of dollars to build 
an atomic power plant but if you go to them to get approval to build a 
bike shed they will argue endlessly. The problem being that the atomic 
power plant is so large, complex, and difficult to understand that no 
one can really argue about how exactly it is done. On the other hand, 
everyone knows what goes into a building a bike shed and so everyone 
feels qualified to argue about the details.


For some reason, technical discussions seem to be particularly 
susceptible to bikeshedding. There was a great post by Poul-Henning Kamp 
on the freebsd-hackers list:

http://www.freebsd.org/cgi/getmsg.cgi?fetch=506636+517178+/usr/local/www/db/text/1999/freebsd-hackers/19991003.freebsd-hackers
which describes a particularly virulent attack they had on their list 
and submits a plea to avoid it in the future. I think just writing the 
code is a good antidote to engaging in the arguments in the first place. 
If the functionality is straightforward and easy to implement then just 
do it rather than argue about it. Most of the people spending their time 
arguing probably have enough inertia that they are not going to write 
any code and consequently, if you do have the initiative, the code 
itself is the most suitable response. As Poul-Henning Kamp said:


   I wish we could reduce the amount of noise in our lists and I wish 
we could let people build a bike shed every so often, and I don't really 
care what colour they paint it.


Who knows, if you write enough code we might even end up with an atomic 
power plant (or for you greens in the audience, a lovely old growth forest).


http://www.bikeshed.com/
Why Should I Care What Color the Bikeshed Is?

The really, really short answer is that you should not. The somewhat 
longer answer is that just because you are capable of building a 
bikeshed does not mean you should stop others from building one just 
because you do not like the color they plan to paint it. This is a 
metaphor indicating that you need not argue about every little feature 
just because you know enough to do so. Some people have commented that 
the amount of noise generated by a change is inversely proportional to 
the complexity of the change.



Guylhem Aznar wrote:

Hello,

On 8/17/07, Walter Bender [EMAIL PROTECTED] wrote:
  

Lets please be careful not to over-engineer. While Mike makes good
points, we have this wonderful human social network we can depend upon
as well. E.g., If I am downloading something from your machine, I can
ask you to hold on a second until I finish. Let's take advantage of
the fact that the kids are in the same community/school most of the
time and not worry so much about corner cases until we have some more
breathing room.



Yet thinking before implementing can easily overcome future problems.
I believethe idea of inibitors for the various power schemes should
not be overlooked since their benefits can be important.

In your example, a download activity could make the suspend wait an
additional minute or two, explaining the user than its request was
noticed, won't happen until the download/upload is over, unless it is
overriden.

If people are in the same class, of course, but what if the person is
several hops away on the mesh network?

Moreover, this interesting idea could also be applied to video
playback/screen rotation requests, explaining that the screen can't be
rotated or the playback will stop, etc.

There's a great potential in such examples to go beyond the
traditionnal power management done in GNU/linux.

But anyway, if you think these cases are so special and supporting
them will take too much time, write a quick shell script to test the
concepts, play with it, and see if it helps you or if it's just a
waste of cpu cycles.

PS I have some more suggestions (ex: a maximal suspend mode to carry
the machine without using it)  but on a computer I don't have here - I
will post a message a little bit later.


Guylhem
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel
  


___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


accessibilities first tests - many questions

2007-08-17 Thread Guylhem Aznar
Hello,

As explained before, I started playing with the DCON (displaying test
images in X, changing various parameters, etc) and other stuff.

The results are interesting. For example, a black and white mode will
backlight on, even if it reduces the percieved resolution, could be
usefull to read at night, or for people with sigh problems who need
high contrast. I am exploring other similar options.

The only things I don't know yet how to do with the DCON :
 - how to disable the smoothing algorithm applied in color mode
 - how to reduce the framerate (for ex for ebook reading, but it could
also be handy in text mode)

I have done some shell scripts to test my stuff (ugly but handy, esp
when you are only testing ideas) ; I will post them here when I will
get back home for feedback.

If someone can help with the smoothing/framerate, some quickdirty
bash code to do it would help.

Regarding power management, I have a problem with the DCON freeze
before suspend to ram: the display looks like frozen, but when I query
the freeze file just before and right after the suspend, I only get 0
while I should get 1.

Can I also ask for some help there?

Regarding the X being used, I am curious to know if there is a way to
do live screen scaling (zoom function, where the whole screen is
magnified) ? Ideally, it would be hardware managed, but that could
also be done by software.

See this if you don't know this function:
http://www.youtube.com/watch?v=LFQAqxoKyAE

The idea would be to do as fast as possible for moving around, then
when stopped on something, try to be as detailed as possible:
http://lists.freedesktop.org/pipermail/xorg/2005-April/007640.html

I am also wondering where/how the cursors are set. Matchbox theme is
only changing some cursors. I found a sugar gtk theme fixing
additional cursors as well, but it is not clear how everything
interacts. That's because I am looking for a way to magnify the mouse
cursor when a special keyboard sequence is pressed, to reveal where it
is on the screen, along with a way of magnifying the whole screen to
ease reading of content (ex: text from the internet, a small
picture...)

Finally, how can I interact in pen mode with the whole pad? Jim said
it was possible, so I tried to run a cat on various /dev input
devices, while moving my fingers on the left and right part around the
zone used for the pointer. However, I can't generate any data. What's
the problem ?

Side question - is is possible to get data when two objects (ex: 2
fingers) are moving ? (either in the same surface, or one in the pen
area mode and the other one in the mouse mode)

Guylhem
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: Power manager specification... (request for comments).

2007-08-17 Thread Guylhem Aznar
Hello,

On 8/17/07, Walter Bender [EMAIL PROTECTED] wrote:
 Lets please be careful not to over-engineer. While Mike makes good
 points, we have this wonderful human social network we can depend upon
 as well. E.g., If I am downloading something from your machine, I can
 ask you to hold on a second until I finish. Let's take advantage of
 the fact that the kids are in the same community/school most of the
 time and not worry so much about corner cases until we have some more
 breathing room.

Yet thinking before implementing can easily overcome future problems.
I believethe idea of inibitors for the various power schemes should
not be overlooked since their benefits can be important.

In your example, a download activity could make the suspend wait an
additional minute or two, explaining the user than its request was
noticed, won't happen until the download/upload is over, unless it is
overriden.

If people are in the same class, of course, but what if the person is
several hops away on the mesh network?

Moreover, this interesting idea could also be applied to video
playback/screen rotation requests, explaining that the screen can't be
rotated or the playback will stop, etc.

There's a great potential in such examples to go beyond the
traditionnal power management done in GNU/linux.

But anyway, if you think these cases are so special and supporting
them will take too much time, write a quick shell script to test the
concepts, play with it, and see if it helps you or if it's just a
waste of cpu cycles.

PS I have some more suggestions (ex: a maximal suspend mode to carry
the machine without using it)  but on a computer I don't have here - I
will post a message a little bit later.


Guylhem
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: Power manager specification... (request for comments).

2007-08-17 Thread Richard Hughes
On 15/08/07, Jim Gettys [EMAIL PROTECTED] wrote:
 Fpr general comment and discussion, the following is a list of things
 cjb and I think should happen.  What are we missing?  Other opinions?

Sorry for getting to the conversation late, it's been a busy week.

 Actions that OHM should do:

 o On momentary power button:
   turn off screen, suspend machine, leave keyboard and wireless on;
 keyboard/touchpad will cause instant on again.

Yup.

 o On lid close on battery, should turn off keyboard, turn off screen
   Then should suspend to RAM, including disabling and
   powering down wireless

Okay.

 o on lid close, on power, leave the machine on and running.

Not turn off the backlight?

 o On lid open, turn on keyboard, reset keyboard, resume from suspend,
 turn wireless back on, tell NM to reassociate (maybe only after some
 delay), try previous association first, of course...

Sure.

 o On ebook mode, should turn off keyboard

Turn off as in twiddle some bit to power it down, or just stop the input events?

 o On lid open, should reset keyboard
 o on ebook to non-ebook mode, should reset keyboard

How?

 o on external power supply on *or* off, should reset touchpad

Which command?

 o rotate should probably be done by OHM.

Totally agree. It's in the best position to enforce policy IMO.

 When we are suspended, and the battery wakes us up because it is low,
 then:
 For now, graceful shutdown after journal has been notified

How do we notify the journal - OHM is system and the journal is session, no?

 May do hibernation if enough flash is available.

Cool.

 Task: Tune the default DPMS parameters.

 Reset keyboard instructions are in trac.

 The big question is: how to do idle?
 X DPMS extension? X SS extension? cpuidle kernel patch, about to go
 mainline in Linux, with module to tell ohm the system has been idle?
 other ideas?

In g-p-m svn I've been using the idletime extension for some time now.
It works well, with a few little quirks, although it only gives the
user-activity point of idle, rather than the machine state idle.

Richard.
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: Power manager specification... (request for comments).

2007-08-17 Thread Tomeu Vizoso
Hi,

On Wed, 2007-08-15 at 16:01 -0400, Jim Gettys wrote:
 When we are suspended, and the battery wakes us up because it is
 low,
 then:
   For now, graceful shutdown after journal has been notified
   May do hibernation if enough flash is available.

I guess what we want here is to notify to each activity that they should
save their state to the datastore. Correct?

How much time do we have until the system really shuts off?

Tomeu

___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: [sugar] Some discussion on education

2007-08-17 Thread Edward Cherlin
Just as videophones have not taken off in industrialized nations, video chat
is not a killer app. I have used teleconferencing as a business tool, and it
will have a place in the XO program. But what we really need is quite
different.

There have been computers in schools for 30 years. But they have never been
integrated into the curriculum, because it was impossible to make an
assumption about how much computer time students would get, and it was
impossible to make an assumption about what software would be available. Now
we can create textbooks containing interactive models of phenomena. We can
give children real-world datasets to analyze. We will have powerful data
acquisition capabilities using the camera (including microscopy), and using
the sound input port as a high-speed A/D converter feeding a digital
oscilloscope, and so on.

This gives us an opportunity and a responsibility to look at the curriculum
anew. The time-honored divisions of subjects and sequences of ideas that
made sense for paper-and-pencil learning do not necessarily make sense when
the computer can do the heavy lifting. Just as one example, trigonometry
used to be a semester course, and no doubt still is in many places. That
probably made sense when surveyors in training had to learn to solve dozens
of triangles a day with no greater aid than a book of function and log
tables, but it is absurd in the age of scientific calculators and computers.
The essential mathematical content of trigonometry can be reduced to two or
three pages, including proofs. (It's not my opinion. Saunders Mac Lane
complained about trig in Mathematics: Form and Function, after reducing it
to less than three pages.)

Calculus is still treated as a high-level high school subject, but primary
school children can grasp the notion of the direction of a curve: just put a
ruler up to any convex object. They can equally grasp the concept of the
area under an arbitrary curve. Draw it on paper, cut it out, and weigh it.
Leave the formulas and the proofs for later. When we have the basic ideas in
place, we can use them for many purposes. Then when the students get to the
calculations and proofs, they know what it's all about, and will grasp it
much more readily.

The Internet gives unequalled opportunities for language learning through
online literature, songs, movies, mailing lists, chat rooms, voice
broadcasts, Voice over IP, and video conferencing. We really have no idea
how to take full advantage of all this.

There is much more of this sort of thing. I think we need a separate list to
discuss it properly.


On 8/16/07, Yoshiki Ohshima [EMAIL PROTECTED] wrote:

   Hello, Elijah,

   http://squeakland.org/pipermail/squeakland/2007-August/003717.html
  
   This discussion might make you think that claiming a video chat app as
   the killer app is not a very compelling pitch as an educational
   project...
 
  video chat alone, not so useful.
 
  video chat combined with lots of other practical collaborative tools?
  pretty great, pretty humanizing, very supportive of lots of other
  activities.

   Thank you for the comment.  While XO will have (if it is successful)
 a lot of off-school and recess time, the primary use case I thought
 should be the at school (even it is under tree).  The video chat
 wouldn't match the latter very well.  I don't say it is useless, but
 cannot be the killer app, and we shouldn't think so.

   If I understand correctly, the position of the OLPC is that making
 curriculum and organized materials are primarily the responsibility of
 the client governments.  However, we, the software developers, should
 think about making software tools for developing these materials (yes,
 that should be possible on XO), rather than simples games that are
 only useful for 5 minutes each.

 -- Yoshiki
 ___
 Sugar mailing list
 [EMAIL PROTECTED]
 http://lists.laptop.org/listinfo/sugar




-- 
Edward Cherlin
Earth Treasury: End Poverty at a Profit
http://wiki.laptop.org/go/Earth_Treasury
WIRE AFRICA  http//www.wireafrica.org/
http://www.linkedin.com/in/cherlin
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: Power manager specification... (request for comments).

2007-08-17 Thread Mike C. Fletcher
Walter Bender wrote:
 Lets please be careful not to over-engineer. While Mike makes good
 points, we have this wonderful human social network we can depend upon
 as well. E.g., If I am downloading something from your machine, I can
 ask you to hold on a second until I finish. Let's take advantage of
 the fact that the kids are in the same community/school most of the
 time and not worry so much about corner cases until we have some more
 breathing room.
   
Perhaps I was unclear, I was referring to another program *on the same 
machine* needing the machine to remain active in order to complete a 
task.  That is, things such as:

* playing music in the background while you read
* downloading a file from the school server which you need for
  homework while you are reading the assignment/textbook
* recording an audio stream while you are taking notes in write
  (i.e. interviewing someone)
* upgrading the OS/downloading updates while you are working in class

that is, all single-user on a single-machine use cases.  No social 
networks involved.  These are all fairly common use cases.  We see the 
same basic inhibit_suspend operation in media-players on Linux or 
Windows wrt screen savers.  You don't want your machine going to sleep 
in the middle of recording your interview, so the recording activity 
needs a way to say hey, I'm working, don't go to sleep right now 
(assume we've got a signed activity that can do background record for a 
moment).

I'm not saying that the implementation needs to be there today, I'm just 
saying that we likely need to eventually move toward an implementation 
that uses need-based signaling rather than direct manipulation of the 
whole computer state by any activity.  Something as simple as a 
decorator icon on the home view, (e.g. a bed with a circle-plus-slash 
over it for western audiences) should be sufficient to let the user know 
which activity is inhibiting suspension.

Hope that's clearer,
Mike
...
 On the original topic of the thread (what the power manager should do):

I'm guessing eventually we'll want some of the logic currently in
the read activity to migrate into HardwareManager.  That is, allow
for signaling inhibit_suspend( ) and allow_suspend()[3], rather
than directly setting suspend, such that a given activity can
declare that it must be allowed to continue processing in the
back-end.  Then you'd want something like suggest_suspend() so
that a foreground activity can tell the system hey, I don't expect
to do anything for a second or two, if no-one objects, feel free to
suspend.

 From there, a second level does a suggest-suspend from Sugar (or
whoever) on no-cpu, no-network (other than the autonomous routing),
no-input, for a given period.  No opinion on where/how to put that.

HardwareManager should likely send dbus events so that activities
can watch for resume, suggested-suspend, or what have you and adjust
behaviour accordingly.  Example usage scenario: switch a per-second
clock-updating timer to a per-minute timer.

 Hope this helps,
 Mike

 [1]
 http://dev.laptop.org/git.do?p=projects/read-activity;a=blob;f=readactivity.py;h=3eeb858cc5ea1dc67a60faee90628100479509be;hb=HEAD
 [2]
 http://dev.laptop.org/git.do?p=hardware-manager;a=blob;f=hardwaremanager.py;h=3154b17553621cc41fa947cbff2756372e6e37ec;hb=HEAD
 [3] with allow-suspend happening automatically after a short-ish timeout
 if the activity doesn't re-assert the inhibition
 
-- 

  Mike C. Fletcher
  Designer, VR Plumber, Coder
  http://www.vrplumber.com
  http://blog.vrplumber.com

___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: Autoreinstallation now saves user directory by default.

2007-08-17 Thread Gian Carlo Salvati

Dears,

I did exactly like the autoreinstallation wiki page, but the machine 
doesn't activate.

I tried everything, but nothing.

How can I active my board.

Best regards,

Gian

C. Scott Ananian escreveu:

On 8/15/07, Zephaniah E. Hull [EMAIL PROTECTED] wrote:
  

On Wed, Aug 15, 2007 at 04:32:53PM -0400, C. Scott Ananian wrote:


I've turned on the preserve the contents of the user's directory
feature in the Autoreinstallation image, and updated the wiki
instructions at:
http://wiki.laptop.org/go/Autoreinstallation_image
  

Does this/can this do ~root in addition to ~olpc?



It does not.  I'm not sure it's a good idea.  It does, however, do all of /home.

Do others on the list have strong feelings about what can/should/ought
to live in /root?
 --scott

  


___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: Does sugar web browser support extensions?

2007-08-17 Thread Kleber Infante
Dan,

I want to know better about the sugar web browser and learn how to create
extensions for it (port some firefox extension too).

I installed firefox2 in my XO emulated and I think every extension (addons)
will work fine there (google bar works fine), but I think firefox2 is not
the default browser and it will be a large software (size) to have installed
in the real laptop (am I right?).

Web activity is in python and you wrote that I should use pyxpcom.
Can you tell me something about pyxpcom?

sorry for my writing, I'm brazilian :)
I may be talking a lot of stupid things because I'm learning about olpc, I
hope you correct me
thanks

On 8/15/07, Dan Williams [EMAIL PROTECTED] wrote:

 On Tue, 2007-08-14 at 15:43 -0400, Samuel Klein wrote:
  what was the reason not to support firefox addons again?

 Well, it's not really a decision, but more of a side-effect.  The best
 and most flexible embedding technology to use is pyxpcom.  We're
 embedding a Gecko engine into a different app, and this is of course not
 firefox.  We are not using XUL as the UI toolkit, which is likely what
 most firefox addons require.

 It's sort of like Epiphany.  You can't put firefox addons into epiphany
 because epiphany is actually native and doesn't use XUL.

 We are shipping xulrunner though, so it's conceivable that whenever a
 xulrunner-based FF comes out it'll just run with the xulrunner we've
 got, but be completely unsugared.

 Dan

  firefox runs smoothly on my B4... and it's pretty great to have access
  to Google Gears, for instance.
 
  SJ
 
  On 8/14/07, Noah Kantrowitz [EMAIL PROTECTED] wrote:
   If you mean normal Firefox add-ons. It does not. We use a simpler
   core called XULRunner. It does support extensions of a sort using
   PyXPCom, though I don't (yet) know much about those.
  
   --Noah
  
   On Aug 14, 2007, at 3:00 PM, Kleber Infante wrote:
  
Hi all,
   
I saw in a post that Sugar web browser does not support extensions.
Is that true?
If it´s true, what can be done?
   
I would like to know how to install an extension in XO browser. I
wanna try to port an Firefox extension to sugar browser.
   
thanks
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel
  
   ___
   Devel mailing list
   Devel@lists.laptop.org
   http://lists.laptop.org/listinfo/devel
  
  ___
  Devel mailing list
  Devel@lists.laptop.org
  http://lists.laptop.org/listinfo/devel

 ___
 Devel mailing list
 Devel@lists.laptop.org
 http://lists.laptop.org/listinfo/devel




-- 
Kleber Manoel Infante (Corujito)
Bach. Ciências da Computação 2003
USP - São Carlos
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: Power manager specification... (request for comments).

2007-08-17 Thread Jim Gettys
On Fri, 2007-08-17 at 12:57 +0200, Tomeu Vizoso wrote:
 Hi,
 
 On Wed, 2007-08-15 at 16:01 -0400, Jim Gettys wrote:
  When we are suspended, and the battery wakes us up because it is
  low,
  then:
  For now, graceful shutdown after journal has been notified
  May do hibernation if enough flash is available.
 
 I guess what we want here is to notify to each activity that they should
 save their state to the datastore. Correct?
 
 How much time do we have until the system really shuts off?

Heh.  We'll probably have to have a protocol saying it's ok now.
You'll potentially have seconds or up to a minute.
 - Jim

-- 
Jim Gettys
One Laptop Per Child


___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: Power manager specification... (request for comments).

2007-08-17 Thread Jim Gettys
On Fri, 2007-08-17 at 11:46 +0100, Richard Hughes wrote:
 On 15/08/07, Jim Gettys [EMAIL PROTECTED] wrote:
  Fpr general comment and discussion, the following is a list of things
  cjb and I think should happen.  What are we missing?  Other opinions?
 
 Sorry for getting to the conversation late, it's been a busy week.
 
  Actions that OHM should do:
 
  o On momentary power button:
turn off screen, suspend machine, leave keyboard and wireless on;
  keyboard/touchpad will cause instant on again.
 
 Yup.
 
  o On lid close on battery, should turn off keyboard, turn off screen
Then should suspend to RAM, including disabling and
powering down wireless
 
 Okay.
 
  o on lid close, on power, leave the machine on and running.
 
 Not turn off the backlight?

Of course turn off the backlight.

 
  o On lid open, turn on keyboard, reset keyboard, resume from suspend,
  turn wireless back on, tell NM to reassociate (maybe only after some
  delay), try previous association first, of course...
 
 Sure.
 
  o On ebook mode, should turn off keyboard
 
 Turn off as in twiddle some bit to power it down, or just stop the input 
 events?
 
  o On lid open, should reset keyboard
  o on ebook to non-ebook mode, should reset keyboard
 
 How?
 

There is a keyboard command, that I think is in the trac issue on the
topic, on how to reset the keyboard; but there are actually two cases
here:

1) resetting the keyboard/touchpad when it has been powered up; this all
versions will do.  We should do this anytime external power is applied
or removed, or other major physical changes.

2) CTest and production touch pads can be set into a special extremely
low power mode, and save some 16mw, IIRC.  Bringing them out of this
state does a reset.  This is what we should do either when the machine
is suspended and the keyboard touch/pad is inaccessible.  It turns out
that while I'd been thinking of delaying bothering to go for this
minimal power savings, we have a problem in ebook mode where the buttons
can be pressed by accident if you squeeze, and it's too late to think
about physical changes to the machine.  So to fix that problem, we might
as well go ahead sooner rather than later.

  o on external power supply on *or* off, should reset touchpad
 
 Which command?
 
  o rotate should probably be done by OHM.
 
 Totally agree. It's in the best position to enforce policy IMO.

It's really something a window manager, in combination with hints should
solve.

 
  When we are suspended, and the battery wakes us up because it is low,
  then:
  For now, graceful shutdown after journal has been notified
 
 How do we notify the journal - OHM is system and the journal is session, no?
 
  May do hibernation if enough flash is available.
 
 Cool.
 
  Task: Tune the default DPMS parameters.
 
  Reset keyboard instructions are in trac.
 
  The big question is: how to do idle?
  X DPMS extension? X SS extension? cpuidle kernel patch, about to go
  mainline in Linux, with module to tell ohm the system has been idle?
  other ideas?
 
 In g-p-m svn I've been using the idletime extension for some time now.
 It works well, with a few little quirks, although it only gives the
 user-activity point of idle, rather than the machine state idle.

Machine state idle is more complex, and may involve detailed knowledge
of whether USB devices are installed, for example.

Adam Belay's et. al.'s CPUidle work may (part of) be the solution here.
There is a patch for 2.6.22, and I think it's now in the -mm tree (or
maybe Linus's tree).  So we can probably eventually arrange to notify
OHM when the system seems to be in a decent state for suspend on idle,
and when it is not.
- Jim

-- 
Jim Gettys
One Laptop Per Child


___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: accessibilities first tests - many questions

2007-08-17 Thread Jordan Crouse
On 17/08/07 11:56 +0200, Guylhem Aznar wrote:
 Hello,
 
 The only things I don't know yet how to do with the DCON :
  - how to disable the smoothing algorithm applied in color mode

We didn't enable this ability in the sysfs/ interface.  I have never
been too clear on what the actual practical uses are for something like
this, so the control never got added. 

In a pinch, you can use the i2c-tools utilities to write to the device
directly (use at your own risk!) 

  - how to reduce the framerate (for ex for ebook reading, but it could
 also be handy in text mode)

This is difficult to do - since it would involve synchronizing with the 
video driver which with X and the framebuffer driver will invariably result
in a screen glitch (note that just switching the rate on the DCON itself
doesn't cause a glitch - its the software that is braindead
here).  But we don't have any support for this in the kernel.

 I have done some shell scripts to test my stuff (ugly but handy, esp
 Regarding power management, I have a problem with the DCON freeze
 before suspend to ram: the display looks like frozen, but when I query
 the freeze file just before and right after the suspend, I only get 0
 while I should get 1.

Thats because the DCON driver does the freeze on its own while the system
is suspending, and it restores it long before userspace gets unfrozen, 
so from your perspective, it will always be 0.

 Can I also ask for some help there?
 
 Regarding the X being used, I am curious to know if there is a way to
 do live screen scaling (zoom function, where the whole screen is
 magnified) ? Ideally, it would be hardware managed, but that could
 also be done by software.

No.  The hardware doesn't have any way of zooming the graphics screen,
so you would have to do it in software, which is probably not ideal on
the Geode. 

Jordan
-- 
Jordan Crouse
Systems Software Development Engineer 
Advanced Micro Devices, Inc.


___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: accessibilities first tests - many questions

2007-08-17 Thread Jim Gettys
On Fri, 2007-08-17 at 17:34 -0600, Jordan Crouse wrote:
 On 17/08/07 11:56 +0200, Guylhem Aznar wrote:
  Hello,
  
  The only things I don't know yet how to do with the DCON :
   - how to disable the smoothing algorithm applied in color mode
 
 We didn't enable this ability in the sysfs/ interface.  I have never
 been too clear on what the actual practical uses are for something like
 this, so the control never got added. 
 
 In a pinch, you can use the i2c-tools utilities to write to the device
 directly (use at your own risk!) 
 
   - how to reduce the framerate (for ex for ebook reading, but it could
  also be handy in text mode)
 
 This is difficult to do - since it would involve synchronizing with the 
 video driver which with X and the framebuffer driver will invariably result
 in a screen glitch (note that just switching the rate on the DCON itself
 doesn't cause a glitch - its the software that is braindead
 here).  But we don't have any support for this in the kernel.

Actually, if the frame rate drop is just done by the dcon when it is in
control of the screen, it is glitchless; it's resetting the geode's mode
which is glitchful, and we'll avoid that.

 - Jim

-- 
Jim Gettys
One Laptop Per Child


___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: some first impressions

2007-08-17 Thread Hal Murray

 I've tried one SD card made by a local company. It's a bit thinker
 than the genuine panasonic one. So this results in that it can only be
 ejected out a bit and I have to use my finger nail to grab it out.
 (probably same situation as you) Usually there's a groove at the tail
 of an SD card top side. However, the access on XO SD slot is only on
 the bottom side... :( 

I tried a handy SD card in my system.  I have a B2 case with a B3 board.

There are a rubber flaps covering the entrance hole.  The flaps are pointed 
in, so inserting the card bends the flaps open but extracting the card tries 
to close the flaps.  If they stick (and they do) then closing the flaps makes 
them stick even more.

I think the basic problem is that the flaps stick harder than the internal 
spring pushes.  You can feel them if you poke the card in partway and then 
pull it out.

My SD card has a grove on the edge of the card.  It's about the right size 
for a fingernail.  The XO case has a slight indentation for your finger.  
Unfortunately, it's on the bottom rather than the top so I can't get at the 
grove in the card.

Mumble.  Better have a pair of tweezers handy if you expect to use the SD 
slot.


-- 
These are my opinions, not necessarily my employer's.  I hate spam.



___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel