Bug#919914: Systematic test of settings & tweaks

2019-04-29 Thread Simon McVittie
On Sun, 28 Apr 2019 at 19:37:18 -0700, Tassia Camoes Araujo wrote:
> Failure #1
> 
> - To reproduce: Gnome-Tweaks configuration "Suspend when laptop lid is
> closed" turned OFF. Gnome-settings Privacy option "Automatic lock" is
> turned ON, and "After screen turns off". Close the lid.
> - Expected: when the lid is closed, the laptop should not suspend, but
> when the lid is re-opened the screen should be locked, asking for
> authentication.
> - What happens: No suspend, and no authentication required. ***this was
> the situation described when the bug was opened***

This is (at least arguably) a bug.

> Failure #2
> 
> - To reproduce: Gnome-Tweaks configuration "Suspend when laptop lid is
> closed" turned OFF. Gnome-settings Privacy option "Automatic lock" is
> turned ON, and "After blank for X minutes". Close the lid and wait for X
> minutes.
> - Expected: when the lid is closed, the laptop should not suspend, but
> after X minutes have passed, the lid is re-opened and the screen should
> be locked, asking for authentication.
> - What happens: No suspend, and no authentication required, even after X
> minutes have passed.

So's this. While the lid is closed, the screen is blanked (because it
would be useless to leave it on, and possibly also to avoid heat from
the backlight building up), so time-based screen blanking doesn't happen,
which probably has the side-effect of not running the timer that counts
how long the screen has been blank.

> Failure #3
> 
> - To reproduce: Gnome-Tweaks configuration "Suspend when laptop lid is
> closed" turned ON. Gnome-settings Privacy option "Automatic lock" is
> turned ON, and "After blank for X minutes". Close the lid and re-open
> before the X minutes have passed.
> - Expected: when the lid is closed, the laptop should suspend, but only
> after X minutes have passed that the screen should be locked. If the lid
> is open before X minutes, I would expect it to not be locked.
> - What happens: suspend is OK, but screen is locked right away, even
> before the X minutes.

I think this one is working as expected. Suspending always locks the
screen immediately (before actually suspending, in fact), because at
the time of suspending, the laptop cannot know how much time will pass
while suspended (it might be more than X minutes); and while the laptop
is suspended, processes do not run, so there is no opportunity to lock
the screen.

Older versions of GNOME only locked the screen after resuming from
suspend, but this was a security-relevant bug, which was fixed by better
logind integration: opening the lid to resume the laptop caused user
apps to appear briefly before the screen locked, and an attacker could
see (possibly confidential) window contents during that time.

> Failure #4
> 
> - To reproduce: Gnome-settings power saving is configured "Blank screen
> after X minutes". Gnome-settings Privacy option "Automatic lock" is
> turned ON, and "After blank for Y minutes". Close the lid and re-open
> before the X+Y minutes have passed.

With "Suspend when laptop lid is closed" turned on or off?

> - Expected: when the laptop is inactive for X minutes, the screen should
> blank, but only after extra Y minutes that the screen should be locked.
> If the lid is open before X+Y minutes, I would expect it to not be
> locked.
> - What happens: but screen is locked right after blank, even before the
> X+Y minutes.

If it suspends, then I think this is working as expected, as in case 3.

smcv



Bug#919914: Systematic test of settings & tweaks

2019-04-28 Thread Tassia Camoes Araujo
On 2019-04-28 16:18, Simon McVittie wrote:
> 
> Please could you describe precisely what these tests mean, and
> particularly the cases you describe as failing? 
>
Sure. Please check below more info on each case described as a failure
in my previous message.

Failure #1

- To reproduce: Gnome-Tweaks configuration "Suspend when laptop lid is
closed" turned OFF. Gnome-settings Privacy option "Automatic lock" is
turned ON, and "After screen turns off". Close the lid.
- Expected: when the lid is closed, the laptop should not suspend, but
when the lid is re-opened the screen should be locked, asking for
authentication.
- What happens: No suspend, and no authentication required. ***this was
the situation described when the bug was opened***

Failure #2

- To reproduce: Gnome-Tweaks configuration "Suspend when laptop lid is
closed" turned OFF. Gnome-settings Privacy option "Automatic lock" is
turned ON, and "After blank for X minutes". Close the lid and wait for X
minutes.
- Expected: when the lid is closed, the laptop should not suspend, but
after X minutes have passed, the lid is re-opened and the screen should
be locked, asking for authentication.
- What happens: No suspend, and no authentication required, even after X
minutes have passed.

Failure #3

- To reproduce: Gnome-Tweaks configuration "Suspend when laptop lid is
closed" turned ON. Gnome-settings Privacy option "Automatic lock" is
turned ON, and "After blank for X minutes". Close the lid and re-open
before the X minutes have passed.
- Expected: when the lid is closed, the laptop should suspend, but only
after X minutes have passed that the screen should be locked. If the lid
is open before X minutes, I would expect it to not be locked.
- What happens: suspend is OK, but screen is locked right away, even
before the X minutes.

Failure #4

- To reproduce: Gnome-settings power saving is configured "Blank screen
after X minutes". Gnome-settings Privacy option "Automatic lock" is
turned ON, and "After blank for Y minutes". Close the lid and re-open
before the X+Y minutes have passed.
- Expected: when the laptop is inactive for X minutes, the screen should
blank, but only after extra Y minutes that the screen should be locked.
If the lid is open before X+Y minutes, I would expect it to not be
locked.
- What happens: but screen is locked right after blank, even before the
X+Y minutes.

Let me know if anything is still not clear.
Cheers,

Tassia.



Bug#919914: Systematic test of settings & tweaks

2019-04-28 Thread Simon McVittie
On Sun, 28 Apr 2019 at 07:31:39 -0700, Tassia Camoes Araujo wrote:
> We did some systematic tests

Please could you describe precisely what these tests mean, and
particularly the cases you describe as failing? If the behaviour you
expect doesn't match the behaviour that was intended, I don't want to be
"fixing" things that are behaving as designed.

(In terms of: steps to reproduce; what you expected to happen; what
actually happened.)

Thanks,
smcv



Bug#919914: Systematic test of settings & tweaks

2019-04-28 Thread Tassia Camoes Araujo
user debian-rele...@lists.debian.org
usertags 919914 + bsp-2019-04-ca-toronto
thanks

We did some systematic tests and believe it is a bug in the integration
between gnome-tweaks and gnome-settings-daemon (Privacy -> Screen Lock
option). We still considered the status of the Power saving settings,
blank screen, check below.

I) Behavior on closing the lid

a) Tweaks: "Suspend when laptop lid is closed" OFF

"Automatic screen lock OFF" --> OK
"Automatic lock: After screen turns off" --> FAIL *** this was the bug
reported ***
"Automatic lock: After blank for X minutes: check passed X" --> FAIL
"Automatic lock: After blank for X minutes: check before X" --> OK (no
block)

b) Tweaks: "Suspend when laptop lid is closed" ON

"Automatic screen lock OFF" --> OK
"Automatic lock: After screen turns off" -.> OK
"Automatic lock: After blank for X minutes: check passed X" --> OK
"Automatic lock: After blank for X minutes: check before X" --> FAIL
(already blocked before X)

II) Behavior on inactivity

c) Power saving: "Blank screen after X minute"
   Laptop lid position: OPEN
   Privacy:

"Automatic screen lock OFF" --> OK
"Automatic lock: After screen turns off" -.> OK
"Automatic lock: After blank for X minutes: check passed X" --> OK
"Automatic lock: After blank for X minutes: check before X" --> OK (no
block)

d) Power saving: "Blank screen after X minute:
   Laptop lid position: CLOSED
   Privacy:

"Automatic screen lock OFF" --> OK
"Automatic lock: After screen turns off" --> OK
"Automatic lock: After blank for X minutes: check passed X" --> OK
"Automatic lock: After blank for X minutes: check before X" --> FAIL
(already blocked before X)


we hope this helps!

Tassia & Valessio.