No login required after resume from sleep.

Hi all, I’m running openSUSE leap 15 with the kde desktop (plasma 5.12.5) and SDDM as diplaymanager on a HP pavilion laptop with Intel HD-Graphics-620 for graphics.

I configured it so that when I close the lid the laptop goes to sleep, and requires login after it resumes.
It does this, but not always.
Somtimes it goes straight to the desktop without asking to log in.

This behaviour is 50/50.
And I don’t know how to reproduce the problem.
It does not seem to matter what software I am running.
Normaly this is Firefox and Dolphin.

First time it happend whas when I closed the lid when it was playing a video, so I thought that because playing a video blocks the energy-saving settings that that could be it.
But it was just a coincidence, it happens with whatever software I am running.

Didn’t see anything outstanding in boot.msg, and now I don’t know where to look for errors.

Can anybody help?

Thanks.

Operius.

While I do not know why this is happening, I assume that you do not mean “login”. That is when you are logged in when it goes to sleep, you should still be logged in at resume with all your applications (with there windows available), but it should ask for your password as if you would have done a screen lock.

When you are not logged in when you close the lid, the system should not log in you at resume (but maybe that could be a side effect of having automatic log in, which is of course a security risk by itself).

You are correct, I meant that I do not have give my password to resume to the desktop.

You are correct.
What I meant was that I do not have to give my password to return to the desktop.

Operius.

Hmm… I’ve been experimenting a bit, and it seems that when I close the lid too fast some buttons get pushed on the keyboard.
Somtimes after the machine resumed from sleep I see a menu on the desktop, as if I right-clicked on the desktop.

If I use a keyboard shortcut to suspend the machine, or close the lid slowly, I haven’t seen the machine going back to the desktop without asking for a password.

Is this an HP pavilion issue?
It’s not like I am slamming the lid with force or something.
Is anybody else seeing this beghaviour?

operius.

How did you perform this configuration?The default method to configure “Lock screen on resume” is to use the KDE System Settings category “Workspace -> Desktop Behavior -> Screen Locking”.
The default method to configure the behaviour on closing the Laptop Lid – only available if a battery is detected – is to use the KDE System Settings category “Hardware -> Power Management -> Energy Saving”.

In KDE systemsettings - energy savings (translated from Dutch).

But it seems that it has simply to do with closing the lid too fast.
Buttons get pressed by the screen before it goes to sleep it seems.

On X11 it’s impossible to establish a full screen lock if a grab is active - for instance a context menu.

So it’s not just a coincidence, it’s actually the cause. If you make sure to not press the right mouse button when closing the lid, it’ll lock properly.

Yeah that’s what I thought too, thanks!
I made it a habbit now to wait 1 second just before the lid is 100% closed and had no more issues since.
Maybe I’ll put something small on the top right and left of the screenframe so it will never push any buttons when it is closed.
Seems like a design flaw to me from HP, but then again it is not an expensive laptop and working pretty well :slight_smile:

https://s33.postimg.cc/kcso21wtp/Fixed.jpg?dl=1

Fixed!lol!

Patent pending.

Hi,

This is not exclusive to HP; same here on Asus Vivobook X510UR. I am not sure if this is really because lid presses the keyboard. But I have not noticed this issue when suspending with lid open (via keyboard shortcut) or if a close the lid slowly as you suggested.