[PATCH weston v5 0/7] Implement screensaver/idle inhibition

Bryce Harrington bryce at osg.samsung.com
Tue Aug 30 01:34:46 UTC 2016


Updated to include review feedback from Derek on the v4.  This includes
adding support to libweston / libweston-desktop to propagate the
inhibitor destruction event, and also adds a test client (see below).


Manual testing:
===============
0.  Default idling

	a.  Start compositor with `weston`
	b.  Leave system with no input until the idle time configured in
	    weston.ini (default 300 seconds)
    c.  Screen should fade to black
	d.  Generate some input events (e.g. move mouse cursor).  Display
	    should fade back in, showing an unlock-screen client.
    e.  Unlock the screen.  Should display an empty desktop.

1.  Configured idle time with no clients

	a.  Start compositor with `weston -i3`
	b.  After about 3 seconds the screen should begin fading to black
	c.  Re-awaken display and unlock
	d.  Repeat from b several times

2.  Idle time with non-inhibiting client

	a.  Start compositor with `weston -i3`
	b.  Launch weston-terminal
	c.  From weston-terminal run the following bash command
		`i=0; while :; do echo $i; i=$((i+100)); sleep 0.1; done`
    d.  Screen should fade out between 3000 and 3500 msec.
		There should be no discontinuity in the time outputs (i.e. the
		output should not jump from say 3200 msec to 8000 msec, but
		rather the scrollback should be a continual list of numbers
		incrementing by 100 each line).

3.  Idle inhibition

	a.  Start compositor with `weston -i3`
	b.  Launch weston-terminal
	c.  From weston-terminal launch the idle inhibition demo client
		`weston-simple-idle`
    d.  Allow the client to run for more than 3 seconds without touching
        keyboard, mouse, or other input activity.  While it is running
        the screen it is displayed on should not fade out.
    e.  From weston-terminal kill weston-simple-idle with ctrl-C
	f.  Wait another 3 seconds with no input activity.  The screen
	    should fade to black.
    g.  Repeat from (c) a few times.

4.  Verbose idle inhibition

 	a.  Start compositor with `weston -i3`
	b.  Launch weston-terminal
	c.  From weston-terminal run `weston-simple-idle -V`
	d.  Output should continue printing indefinitely (past 3000 msec),
		and the screen should not fade out.
    e.  Terminate the weston-simple-idle process from weston-terminal
        (i.e. via ctrl-C); screen should then fade out after 3 seconds.

5.  Delayed idle inhibition

 	a.  Start compositor with `weston -i3`
	b.  Launch weston-terminal
	c.  From weston-terminal run `weston-simple-idle -V -c1000`
	d.  Output should indicate client requests an inhibitor after 1000
	    msec.
    e.  Screen should not fade out until after the weston-simple-idle
        process is terminated.

6.  Inhibition request made after display is already idled off

 	a.  Start compositor with `weston -i3`
	b.  Launch weston-terminal
	c.  From weston-terminal run `weston-simple-idle -V -c4500`
	d.  Screen should fade out after 3 seconds of no input activity
	e.  Wake screen and unlock after several seconds
	f.  Output should show a discontinuity in output (i.e. a jump from
	    say, 4321 to 8765 msec.)  It should also indicate it has
	    requested an inhibitor subsequent to the screen fading to black.
    g.  Allow the client to run >3 additional seconds.  Output should
        continue printing and the screen should not fade out until after
        the client is exited.

7.  Inhibition request made while compositor is in the middle of fading
    out

	a.  Start compositor with `weston -i3`
	b.  Launch weston-terminal
	c.  From weston-terminal run `weston-simple-idle -V -c2800`
	d.  Allow it to run > 3 sec.  Screen should not fade out.
	e.  From weston-terminal run `weston-simple-idle -V -c3000`
	f.	Output should display 'Requesting inhibitor' just as the screen
	  	is fading out.  Screen should fade to black.

8.  Inhibition termination while compositor is otherwise sleeping

	a.  Start compositor with `weston -i10`
	b.  Outside weston, run `weston-simple-idle -V -d12000`
	c.  Output should print past 10000 msec and screen should not fade out.
	d.  After 12000 msec, output should indicate the inhibitor was
	    destroyed.  Screen should fade to black immediately (i.e. within less
	    than a second).


Bryce Harrington (7):
  desktop-shell: Enable per-output fade animations
  compositor: Add internal support to track idle inhibition requests
  compositor: Add public interface support for client-requested idle
    inhibition
  libweston: Add a signal to fire when the idle inhibitor is dropped
  libweston-desktop: Add listener and API to drop the idle inhibitor
  shell: Inhibit idle fade-out behavior
  clients: Add screensaver inhibitor client demo

 .gitignore                            |   1 +
 Makefile.am                           |  18 +-
 clients/simple-idle.c                 | 573 ++++++++++++++++++++++++++++++++++
 desktop-shell/shell.c                 | 172 ++++++----
 desktop-shell/shell.h                 |  14 +-
 libweston-desktop/internal.h          |   3 +
 libweston-desktop/libweston-desktop.c |   8 +
 libweston-desktop/libweston-desktop.h |   2 +
 libweston-desktop/surface.c           |  20 ++
 libweston/compositor.c                | 160 +++++++++-
 libweston/compositor.h                |  15 +-
 11 files changed, 907 insertions(+), 79 deletions(-)
 create mode 100644 clients/simple-idle.c

-- 
1.9.1



More information about the wayland-devel mailing list