suspend does not lock screen Fresh Ubuntu Mate 20.04.1

Bug #1898771 reported by Richard Silver
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lightdm (Ubuntu)
New
Undecided
Unassigned

Bug Description

When suspending my freshly installed 20.04.1 system I noticed that on waking a password is not required. lightdm does not have locking enabled on suspend. A workaround I found from pszafer
 on archlinux blog.

Quoted below:

create lockscreen.sh file somewhere in your home directory with:

#!/bin/sh
XDG_SEAT_PATH="/org/freedesktop/DisplayManager/Seat0" dm-tool lock
- I've prefer just for sure creating dmlock.service file in home dir and create symlink to /etc/systemd/system.
File has to be in /etc/systemd/system/dmlock.service

[Unit]
Description=DM Lock before sleep
Before=sleep.target

[Service]
ExecStart=/home/user/dir/lockscreen.sh

[Install]
WantedBy=sleep.target
For your needs, you probably need hibernate.target.

Next run following commands:

systemctl daemon-reload
systemctl enable dmlock.service
Just for sure it is working you could run:

systemctl list-unit-files
systemctl start dmlock.service
Hope it helps you a little

Tags: focal
Norbert (nrbrtx)
tags: added: focal
removed: lightdm lock security suspend unlock
no longer affects: ubuntu-mate
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.