Tests/Suspend Resume: Difference between revisions

From OLPC
Jump to navigation Jump to search
 
(99 intermediate revisions by 7 users not shown)
Line 1: Line 1:
[[Category: Test plans]]
[[Category: Test Plans]]


==screen turns off==
==Before You Start==

===Battery vs. Power Adapter?===

For [http://dev.laptop.org/milestone/Update.1 Update.1] release, there will be no difference in power management whether the laptop is powered by the external power adapter or its battery. Therefore, please test the following cases with '''(1) solely the battery on''', and '''(2) with the power adapter plugged in'''.

===Tips===

In the test cases, whenever "X minutes" or "a period of time" appears:
:* To find out how long X should be, go to '''the Terminal activity''' and type <tt> xset -q </tt>. Screen Saver timeout is set to 600, which means 10 minutes. DPMS Standby is set to 1200, which means 20 minutes.
:* To change the Screen Saver time out to, for example, 5 minutes, type <tt> xset s 300 </tt>. To change other values, type <tt>xset</tt> for usage.

:* Also see info found under [[Suspend_Resume/ohm|/etc/ohm/plugins.d]]

==Modes==

===Suspend Mode===

The purpose of suspend is behind the scenes processor suspension to save power during regular use.

====Testing Suspend Mode====


Actions:
Actions:
# Boot up the machine, and do not do anything else.
# Boot up the machine, adjust the brightness level to 6 (brightest: 8, darkest: 1, black/white: 0).
# Open Terminal or Write; randomly type something. (This is optional, depending on which mechanism is used in [[#Resume_from_Suspend_Mode|Resume from Suspend Mode]].)
# Leave the machine on and untouched for X minutes.
# Leave the machine on for at least 5 minutes, and do not do anything else.

Verify:
Verify:
* After X minutes of inactivity through keyboard, mouse, directional, or gamepad keys, the screen will turn completely off (black).
* After 5 minutes of input inactivity (keyboard, touchpad, buttons), the screen will dim, unless a running activity has asked to inhibit this.
(where to find out how long X should be? --[[User:Chihyu|Chihyu]] 16:16, 10 January 2008 (EST))


==screen turns on==
Actions:
Actions:
# After an additional delay, the processor suspends. Observe the power indicator and the wireless indicators.
# Open Terminal or Write; randomly type something (optional, depending on which mechanism is used in the 3rd step --[[User:Chihyu|Chihyu]] 16:32, 10 January 2008 (EST))

# Leave the machine on until the screen turns off
# Press any key on the keyboard, mouse, directional or gamepad keys
(may have to repeat this multiple times to make sure the machine can be resumed by all different types of keys --[[User:Chihyu|Chihyu]] 16:32, 10 January 2008 (EST))
Verify:
Verify:
* After the additional delay, the power indicator blinks slowly.
* The screen will turn back on. The back light will come back on to the level it was before the screen was turned off. Also, if the machine was resumed by key press, the key press will not be acted upon.
* Wireless is operational. (wireless LEDs are on/blinking)
*<strike> The screen also goes blank.</strike> (not currently in Update.1; if see screen go blank, that is only the screen saver - can be verified by the non-blinking power indicator)


==test item goes here==
====Resume from Suspend Mode====


Actions:
Actions:
# When the machine is in suspend mode, press any key on the keyboard, mouse, directional pad or game pad keys, or the power button, or touch the touchpad.
# action steps go here
# Count how many key presses should be the screen to the brightest level (level 8). ([http://dev.laptop.org/ticket/4843 #4843])

Verify:
Verify:
* At the press of any key on the keyboard, mouse, directional pad or game pad keys, the power button, or the touch of the touchpad, the laptop will wake from suspend.
* things to verify go here
* If resume from pressing the keyboard, the key press shall be acted upon.
* If the screen was previously blank, the back light will come back on to the level 6 (i.e. the level before the suspend).
* Wireless activity should not noticeably af suspend/resume.


===Sleep Mode (power button)===
----


The purpose of the 'Sleep button' (i.e. the power button) on the laptop is to allow a child to leave the laptop open with the antenna up (and potentially having set up a good RF relay) and put the laptop into suspend with only the wireless on.
==bugs==


===fixed===
====Testing Sleep Mode ====


Actions:
http://dev.laptop.org/ticket/5400
# Launch an activity such as Write or Paint; randomly type or draw something.
# Press the power button.


Verify:
http://dev.laptop.org/ticket/4843
* The machine should be put into suspend mode, which includes screen going blank.
* The power indicator blinks slowly.
* Wireless is operational. (wireless LEDs are on/blinking)


====Testing Sleep Mode, rigorous version====
===not yet===


<strike>http://dev.laptop.org/ticket/3355</strike>
'''This may NOT work until [http://dev.laptop.org/ticket/6010 Update.2].'''


Actions:
<strike>http://dev.laptop.org/ticket/4824</strike>
# Launch an activity that plays a long audio/video file, or launch record and start recording a video.
# Press the power button.


Verify:
http://dev.laptop.org/ticket/2765
* The machine should be put into suspend mode, which includes screen going blank.
* The power indicator blinks slowly.
* Wireless is operational. (wireless LEDs are on/blinking)


====Resume from Sleep Mode====
http://dev.laptop.org/ticket/5457


Actions:
# When the laptop is in sleep mode, press any key on the keyboard, mouse, directional pad or game pad keys, as in [[Test_Suspend_Resume#Resume_from_Suspend_Mode|Resume from Suspend Mode]].
# Press the power button.
# Shut down the machine from home view.


Verify:
----
* Resume can ONLY be performed by pressing the power button, NOT by other key presses. That is, the key press will not be acted upon.
* The machine should return to powered on state with the same activities running as before being put into sleep.
<!-- * One should be able to execute a full power down of the laptop from the Sugar home view. -->


===Sleep Mode (lid closing)===
(copy the requirements over just for me own ease; will delete later)


====Testing Sleep Mode====
==Power Management Requirements==
Most of the power management is behind the scene and should be invisible to the student.


# Launch an activity such as Write or Paint; randomly type or draw something.
The [[Table_of_Power_Mgmt|Power Management Table]] details what sections of the laptop are powered in different states. A more detailed description of the implementation is available at [[Hardware Power Domains]].
# Close the lid.


Verify:
====Screen off====
* The machine should be put into sleep mode, which includes screen going blank.
<strike>*PW1 After X minutes of inactivity through keyboard, mouse, directional, or gamepad keys, the screen will turn completely off (black), unless a running activity has asked to inhibit this timeout.</strike>
* The power indicator blinks slowly.
*PW2 In this mode, the mesh network is working properly and can forward packets.
* <strike>Wireless is NOT operational (wireless LEDs off).</strike> (not currently in Update.1)
*PW3 The screen will turn back on at the press of any key on the keyboard, mouse, directional or gamepad keys. The back light will come back on to the level it was before the screen was turned off. The key press will not be acted upon.


====Testing Sleep Mode, rigorous version====
====Suspend/Resume Button====
The purpose of the 'suspend/resume' button on the laptop is to allow a child to leave the laptop open with the antenna up (and potentially having set up a good RF relay); and go into suspend with only the wireless on. The 'suspend' that happens is the same as that when the lid is closed, but that changes the RF characteristics quite a bit.


'''This may NOT work until [http://dev.laptop.org/ticket/6010 Update.2].'''
*PW4 Pushing the 'Suspend/Resume' button (previously the power button), will put the laptop into suspend mode, which includes Screen off.
**PW4.1 In suspend mode, the laptop will continue to forward mesh networking packets if it is in the path between other mesh points (laptops, school servers).
**PW4.2 Pushing the 'Suspend/Resume' button when the laptop is suspended will return it to powered on state with the same activities running as before it suspended.
**PW4.3 Pressing any key on the keyboard, the mouse, directional keys or gamepad keys will also return the laptop to its full operational state. The button will not be acted upon.
*PW5 When the battery gets to its defined shut down level, whether in suspend mode or full operational mode, it will shut down gracefully, without data destruction.
*PW6 The student must be able to execute a full power down of the laptop from the Sugar home view.


Actions:
====Lid Closed====
# Launch an activity that plays a long audio/video file, or launch record and start recording a video.
Whenever a student closes the lid, the laptop should go into suspend mode to save battery power. Wireless is still operational.
# Close the lid.


Verify:
*PW7 When the lid is closed on the laptop, it will have the same affect as pushing the suspend/resume button (see [[#Suspend/Resume_Button|Suspend/Resume Button]]).
* The machine should be put into sleep mode, which includes screen going blank.
*PW8 When the lid is opened, the laptop will resume (or, it may be necessary for the student to press a key or the suspend/resume button)
* The power indicator blinks slowly.
* <strike>Wireless is NOT operational (wireless LEDs off).</strike> (not currently in Update.1)


====Ebook mode====
====Resume from Sleep Mode====

Behind the scenes, reading should consume the least amount of power after 'suspend'. The student shouldn't notice anything when in ebook mode.
Actions:
# When the lid is closed, open the lid.
# Press the power button.
# Shut down the machine from home view.

Verify:
* The machine should remain in sleep mode even when the lid is opened.
* Resume can ONLY be performed by pressing the power button, NOT by other key presses. That is, the key press will not be acted upon.
* The machine should return to powered on state with the same activities running as before being put into sleep.
<!--* One should be able to execute a full power down of the laptop from the Sugar home view.-->

===Ebook Mode===

In the ebook mode, the machine should be put into suspend mode immediately in order to consume the least amount of power. However, this is done in the background. The user shouldn't notice any change when reading a pdf file in the ebook mode.

Prior to testing, download pdf file (for example, [http://wiki.laptop.org/images/d/d5/PDF_test.pdf PDF_test.pdf]) and click on it to launch the Read activity.

====Suspend in Ebook Mode====

Actions:

# Launch Read activity.
# Adjust the brightness level to 0. (This is optional.)
# Convert the laptop to tablet mode. (This is optional.)
# Use the directional keys for scrolling through the text.
# Press the rotate button.
# Leave the machine untouched for about 5 seconds.

Verify:
* Clicking on the pdf file will put the screen in low power mode.
* The screen brightness button can be used to reduce the power consumption even more.
:(how to verify these two? --[[User:Chihyu|Chihyu]] 19:47, 14 January 2008 (EST))
* The directional keys can be used to scroll through the text and go back and forth between pages.
* Pressing the rotate button will rotate the screen 90 degrees.
* The machine should suspend (power indicator blinks slowly) after being idled for 5 seconds. ([http://dev.laptop.org/ticket/1396 #1396])
* The screen may be turned off if there is no input activity for a fixed time period. (not currently in Update.1?)
see also: [[Battery_Results|Battery Life Test]]

====Keypress in Ebook Mode (Suspend)====

Actions:
# When the machine suspend in ebook mode, press the "down" directional key once, and the "up" directional key once.

Verify:
* Each key press should only scroll the text down/up a few rows at a time, rather than going all the way to the end/beginning of the pdf file. ([http://dev.laptop.org/ticket/2401 #2401])

==Restart Sugar==

Actions:
# When the machine is on, hit Ctrl-Alt-Erase.
Verify:
* This should not crash power manager. All suspend/resume behaviors should remain the same. ([http://dev.laptop.org/ticket/5400 #5400])

==Shut Down in Battery Mode==

Actions:
# Unplug the machine from the power source.
# Launch Write; type something. (optional)
# Manually suspend the machine or wait for automatic suspension.

Verify:
* When the battery gets to its defined shut down level, whether in suspend mode or full operational mode, it will shut down gracefully, without data destruction.
:* The activity content will become empty once the machine is shut down. This should work for [http://dev.laptop.org/ticket/4824 Update.2].
:* Is the defined shut down level 14%? --[[User:Chihyu|Chihyu]] 19:56, 11 January 2008 (EST)

==Turning off suspend/resume==

Actions:
# In the Terminal activity, login as root.
# Type <tt>touch /etc/ohm/inhibit-idle-suspend</tt>
# Type <tt>touch /etc/inhibit-ebook-sleep</tt>
# Open a pdf file to launch ebook mode.
# Press the power button.
# Close the lid, and then open the lid.

Verify:
* The laptop should NEVER suspend regardless of what action was taken.

<!--
==test item goes here==

Actions:
# action steps go here
Verify:
* things to verify go here


-->
*PW9 A student can download a pdf file, and click on it. It will format and open for reading on the screen in low power mode. The screen brightness button can be used to reduce the power consumption even more.
*PW10 The student can convert the laptop to tablet mode and use the directional keys for scrolling through the text.
*PW11 If the student presses the rotate button, the screen will rotate 90 degrees. (This is in any mode, not just ebook mode !)
*PW12 In ebook mode, the screen may be turned off (see [[#Screen_off|Screen Off]]) if there is no input activity for a fixed time period.

Latest revision as of 07:15, 16 January 2009


Before You Start

Battery vs. Power Adapter?

For Update.1 release, there will be no difference in power management whether the laptop is powered by the external power adapter or its battery. Therefore, please test the following cases with (1) solely the battery on, and (2) with the power adapter plugged in.

Tips

In the test cases, whenever "X minutes" or "a period of time" appears:

  • To find out how long X should be, go to the Terminal activity and type xset -q . Screen Saver timeout is set to 600, which means 10 minutes. DPMS Standby is set to 1200, which means 20 minutes.
  • To change the Screen Saver time out to, for example, 5 minutes, type xset s 300 . To change other values, type xset for usage.

Modes

Suspend Mode

The purpose of suspend is behind the scenes processor suspension to save power during regular use.

Testing Suspend Mode

Actions:

  1. Boot up the machine, adjust the brightness level to 6 (brightest: 8, darkest: 1, black/white: 0).
  2. Open Terminal or Write; randomly type something. (This is optional, depending on which mechanism is used in Resume from Suspend Mode.)
  3. Leave the machine on for at least 5 minutes, and do not do anything else.

Verify:

  • After 5 minutes of input inactivity (keyboard, touchpad, buttons), the screen will dim, unless a running activity has asked to inhibit this.

Actions:

  1. After an additional delay, the processor suspends. Observe the power indicator and the wireless indicators.

Verify:

  • After the additional delay, the power indicator blinks slowly.
  • Wireless is operational. (wireless LEDs are on/blinking)
  • The screen also goes blank. (not currently in Update.1; if see screen go blank, that is only the screen saver - can be verified by the non-blinking power indicator)

Resume from Suspend Mode

Actions:

  1. When the machine is in suspend mode, press any key on the keyboard, mouse, directional pad or game pad keys, or the power button, or touch the touchpad.
  2. Count how many key presses should be the screen to the brightest level (level 8). (#4843)

Verify:

  • At the press of any key on the keyboard, mouse, directional pad or game pad keys, the power button, or the touch of the touchpad, the laptop will wake from suspend.
  • If resume from pressing the keyboard, the key press shall be acted upon.
  • If the screen was previously blank, the back light will come back on to the level 6 (i.e. the level before the suspend).
  • Wireless activity should not noticeably af suspend/resume.

Sleep Mode (power button)

The purpose of the 'Sleep button' (i.e. the power button) on the laptop is to allow a child to leave the laptop open with the antenna up (and potentially having set up a good RF relay) and put the laptop into suspend with only the wireless on.

Testing Sleep Mode

Actions:

  1. Launch an activity such as Write or Paint; randomly type or draw something.
  2. Press the power button.

Verify:

  • The machine should be put into suspend mode, which includes screen going blank.
  • The power indicator blinks slowly.
  • Wireless is operational. (wireless LEDs are on/blinking)

Testing Sleep Mode, rigorous version

This may NOT work until Update.2.

Actions:

  1. Launch an activity that plays a long audio/video file, or launch record and start recording a video.
  2. Press the power button.

Verify:

  • The machine should be put into suspend mode, which includes screen going blank.
  • The power indicator blinks slowly.
  • Wireless is operational. (wireless LEDs are on/blinking)

Resume from Sleep Mode

Actions:

  1. When the laptop is in sleep mode, press any key on the keyboard, mouse, directional pad or game pad keys, as in Resume from Suspend Mode.
  2. Press the power button.
  3. Shut down the machine from home view.

Verify:

  • Resume can ONLY be performed by pressing the power button, NOT by other key presses. That is, the key press will not be acted upon.
  • The machine should return to powered on state with the same activities running as before being put into sleep.

Sleep Mode (lid closing)

Testing Sleep Mode

  1. Launch an activity such as Write or Paint; randomly type or draw something.
  2. Close the lid.

Verify:

  • The machine should be put into sleep mode, which includes screen going blank.
  • The power indicator blinks slowly.
  • Wireless is NOT operational (wireless LEDs off). (not currently in Update.1)

Testing Sleep Mode, rigorous version

This may NOT work until Update.2.

Actions:

  1. Launch an activity that plays a long audio/video file, or launch record and start recording a video.
  2. Close the lid.

Verify:

  • The machine should be put into sleep mode, which includes screen going blank.
  • The power indicator blinks slowly.
  • Wireless is NOT operational (wireless LEDs off). (not currently in Update.1)

Resume from Sleep Mode

Actions:

  1. When the lid is closed, open the lid.
  2. Press the power button.
  3. Shut down the machine from home view.

Verify:

  • The machine should remain in sleep mode even when the lid is opened.
  • Resume can ONLY be performed by pressing the power button, NOT by other key presses. That is, the key press will not be acted upon.
  • The machine should return to powered on state with the same activities running as before being put into sleep.

Ebook Mode

In the ebook mode, the machine should be put into suspend mode immediately in order to consume the least amount of power. However, this is done in the background. The user shouldn't notice any change when reading a pdf file in the ebook mode.

Prior to testing, download pdf file (for example, PDF_test.pdf) and click on it to launch the Read activity.

Suspend in Ebook Mode

Actions:

  1. Launch Read activity.
  2. Adjust the brightness level to 0. (This is optional.)
  3. Convert the laptop to tablet mode. (This is optional.)
  4. Use the directional keys for scrolling through the text.
  5. Press the rotate button.
  6. Leave the machine untouched for about 5 seconds.

Verify:

  • Clicking on the pdf file will put the screen in low power mode.
  • The screen brightness button can be used to reduce the power consumption even more.
(how to verify these two? --Chihyu 19:47, 14 January 2008 (EST))
  • The directional keys can be used to scroll through the text and go back and forth between pages.
  • Pressing the rotate button will rotate the screen 90 degrees.
  • The machine should suspend (power indicator blinks slowly) after being idled for 5 seconds. (#1396)
  • The screen may be turned off if there is no input activity for a fixed time period. (not currently in Update.1?)

see also: Battery Life Test

Keypress in Ebook Mode (Suspend)

Actions:

  1. When the machine suspend in ebook mode, press the "down" directional key once, and the "up" directional key once.

Verify:

  • Each key press should only scroll the text down/up a few rows at a time, rather than going all the way to the end/beginning of the pdf file. (#2401)

Restart Sugar

Actions:

  1. When the machine is on, hit Ctrl-Alt-Erase.

Verify:

  • This should not crash power manager. All suspend/resume behaviors should remain the same. (#5400)

Shut Down in Battery Mode

Actions:

  1. Unplug the machine from the power source.
  2. Launch Write; type something. (optional)
  3. Manually suspend the machine or wait for automatic suspension.

Verify:

  • When the battery gets to its defined shut down level, whether in suspend mode or full operational mode, it will shut down gracefully, without data destruction.
  • The activity content will become empty once the machine is shut down. This should work for Update.2.
  • Is the defined shut down level 14%? --Chihyu 19:56, 11 January 2008 (EST)

Turning off suspend/resume

Actions:

  1. In the Terminal activity, login as root.
  2. Type touch /etc/ohm/inhibit-idle-suspend
  3. Type touch /etc/inhibit-ebook-sleep
  4. Open a pdf file to launch ebook mode.
  5. Press the power button.
  6. Close the lid, and then open the lid.

Verify:

  • The laptop should NEVER suspend regardless of what action was taken.