Bug 500682

Summary: Add option that makes the Lock Screen remain locked as long as the notebook's lid is closed
Product: [Applications] systemsettings Reporter: Fernando M. Muniz <fernandommuniz>
Component: kcm_screenlockerAssignee: Fernando M. Muniz <fernandommuniz>
Status: RESOLVED INTENTIONAL    
Severity: wishlist CC: kdedev, nate
Priority: NOR    
Version First Reported In: 6.3.1   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: This setting.

Description Fernando M. Muniz 2025-02-24 17:30:22 UTC
Currently Plasma has an option for locking the session while an external monitor is connected.
But there's no option that makes it impossible to unlock (with bluetooth, for example) while the notebook's lid is closed.

So I'm requesting an option that makes it impossible to unlock the session while the notebook's lid remains closed.
Comment 1 Nate Graham 2025-02-24 20:16:40 UTC
> Currently Plasma has an option for locking the session while an external monitor is connected.

Can you clarify which option you're referring to here? Exactly?
Comment 2 Fernando M. Muniz 2025-02-24 20:18:19 UTC
Created attachment 178836 [details]
This setting.
Comment 3 TraceyC 2025-02-24 20:37:27 UTC
In the screenshot:
Power Management - On AC power
 - When laptop lid is closed - set to Lock
- Even when an external monitor is connected - checked

They are asking for an additional checkbox / option here to prevent unlocking while the laptop lid is closed
Otherwise, it's possible for a user to unlock with an external keyboard
Comment 4 Nate Graham 2025-02-26 19:41:58 UTC
Is that a problem, though?

Fernando, can you describe your use case for this?
Comment 5 Nate Graham 2025-02-26 19:44:11 UTC
Also, as I've requested before, it's generally better if you can describe problems and use cases, rather than requesting new features with no context. It makes it very difficult to determine whether any proposed new feature is actually a good idea or even if it would solve the problem you had that prompted you to request the feature.

Can you please try to write your bug reports in the form of describing problems rather than requesting new features?

When you do request new features (i.e. by using the "wishlist" status), please make sure you're also describing the use case that would benefit in some way from the requested feature.

Thanks!
Comment 6 Fernando M. Muniz 2025-02-26 20:10:50 UTC
(In reply to Nate Graham from comment #4)
> Is that a problem, though?
> 
> Fernando, can you describe your use case for this?

Paired remote devices can unlock and navigate through a closed notebook without the user's current consent nor knowledge.
Shutting the system down is rarely desirable and disconnecting everything is nowhere near as quick, effective and elegant as simply closing the lid with the proposed new feature.

Even if that's not good enough for a feature, it's good to add a warning that having the lid closed doesn't mean it's permanently blocked until the lid opens.
Comment 7 Fernando M. Muniz 2025-02-27 10:00:36 UTC
This bug was marked as CONFIRMED, I've corrected it now.
Comment 8 Nate Graham 2025-02-27 23:07:56 UTC
So am I understanding that your laptop is NOT connected to an external monitor, and you've configured it to lock when you close the lid, but not also sleep. Is that correct?
Comment 9 Fernando M. Muniz 2025-02-28 00:02:28 UTC
(In reply to Nate Graham from comment #8)
> So am I understanding that your laptop is NOT connected to an external
> monitor, and you've configured it to lock when you close the lid, but not
> also sleep. Is that correct?

That depends, sometimes I connect to one with a HDMI cable, and some other times I use the internet.
I've configured to lock when closing the lid, due to the association with the icon of a closed padlock.
No. Does sleep not suspend activities such as downloads?
Comment 10 Fernando M. Muniz 2025-02-28 00:08:41 UTC
Also, how does the sleep button reacts to a keyboard's power/boot button?

The way I imagine my request is that the password's text entry box would simply not be there while the lid is closed, maybe with a padlock icon that unlocks upon opening the lid.
Comment 11 TraceyC 2025-02-28 00:11:03 UTC
I'm having trouble envisioning a real life scenario where this would be a problem. I'm starting from the described setup. Scenario:

I have a laptop, connected to an external monitor, paired with a bluetooth keyboard and mouse.
I close the laptop lid, and the session locks.
Someone else uses the keyboard / mouse to get to the login screen - how would they be able to log in without an account of their own?
If they have an account on your laptop, and can't be trusted to respect your session, it would be easier to remove the account.

Can  you describe a real scenario you have faced where the ability to bring up the lock screen on your laptop caused a problem?
Comment 12 Nate Graham 2025-02-28 00:16:41 UTC
I think what's going on here is that you have the system configured to lock when the lid is closed instead of sleep, but what you actually want is for it to *lock and sleep* when the lid is closed.

Can you describe why this doesn't solve all the problems?
Comment 13 Fernando M. Muniz 2025-02-28 00:25:18 UTC
(In reply to Nate Graham from comment #12)
> I think what's going on here is that you have the system configured to lock
> when the lid is closed instead of sleep, but what you actually want is for
> it to *lock and sleep* when the lid is closed.
> 
> Can you describe why this doesn't solve all the problems?

Can the system continue to download while sleeping? And how does it respond to a keyboard's power/boot button?
Comment 14 Nate Graham 2025-02-28 00:28:13 UTC
No, it can't continue to download while sleeping.

Pressing the power button while sleeping... typically that wakes it up IIRC.
Comment 15 Fernando M. Muniz 2025-02-28 00:35:09 UTC
(In reply to TraceyC from comment #11)
> how would they be able to log in without an account of their own?

The user could have their account set to login automatically, at least that was an option last time I installed a system other than Arch.
And you might trust them with your password with you around, but not without. Like a distant friend, for example.
Comment 16 Fernando M. Muniz 2025-02-28 00:58:09 UTC
TraceyC, There's also the chance the user didn't set or don't prefer to ask for password immediately after locking, leaving the notebook accessible for up to 15 minutes.

This feature would remove the password's text entry box while the lid is closed, and the user could open the lid after 13 minutes and not deal with a password.
Comment 17 TraceyC 2025-02-28 02:08:58 UTC
There hasn't been a practical use case for this that I've seen described. In your last scenario, anyone can walk up to that laptop, open the lid, and get access to the system. This is contrary to the stated desire to avoid having someone other than the owner get access and do things without their knowledge or permission.

There are easier mitigations to every hypothetical that has been brought up without increasing the code creation and maintenance burden. Closing as unplanned. Thanks for your understanding.