Lockscreen not working after update to 21.10

Ah … missing single quotes

pkill -9 -f  '/usr/bin/gjs /usr/share/gnome-shell/org.gnome.ScreenSaver'
1 Like

Will give this a try. I’m new to the Linux structure but should be capable of pasting this into terminal. again thanks! Will let you know if it also works on 20.04.

1 Like

Open gedit, copy the following and paste it into gedit, save it as screensaver-autorun.sh in a place where you’re not gonna move it. Then in the menu search for ‘Startup Applications’, click add, give it a name and in ‘Command’ click ‘Browse’ and select screensaver-autorun.sh.

That should do it

1 Like

Note to all … if you don’t use gnome-shell then this solution is easier and quicker to do

[UPDATED] I have been struggling with the same issue stemming from the same update. These instructions worked perfectly for me. Thank you all for this.


(the original post mentioned an issue with the ‘x’ key on my laptop which has since been determined to be unrelated)

Lockscreen broke for me too - but that script didn’t work for me so I modified it to work.

if ! pgrep -f gnome-screensaver &> /dev/null 2>&1; then
  echo "gnome-screensaver is not running"
  echo "starting gnome-screensaver ..."
  pkill -9 -f  '/usr/bin/gjs /usr/share/gnome-shell/org.gnome.ScreenSaver'
  sleep 3
  echo "gnome-screensaver already running"

Also when adding it to autostart I needed to delay it from running for like 5 seconds so or it’d fail.

/bin/bash -c "/usr/bin/sleep 5;/home/rreaves/lockfix.sh&"

I use this script to solve the same problem but it doesn’t work, any suggestions!

Make sure you are using slick-greeter not gdm3.

If you don’t want to use gnome-shell then removing this package will make the lock screen work

sudo apt purge gnome-shell-common

Many thanks! problem solved.

@fossfreedom Amazing hint for that apt purge gnome-shell-common trick, finally my lock shortcut (& lock command in general) is working again. Why does removing that package help with this specific problem?

gnome-shell installs an autostart file that also runs when you login. It is that autostart file that prevents gnome-screensaver working correctly. By uninstalling gnome-shell-common, that autostart file and the accompanying application (called gjs) is removed. Thus gnome-screensaver works correctly.

1 Like

But first what triggered here the installation of gnome-shell-common ?

×buntu are not made to use many DE on a same installation, furthermore if different DE get used by only one and same user.

Most DE being « forks » from Gnome components and using Gtk, they use same files for storing their different parameters, ending up in - no other word - mess.

That’s the purpose of each variant, each integrates one DE.

By install GDM3 this installs gnome-shell-common as well as gnome-shell.

Likewise, as you mentioned, people who started of on “Ubuntu” with gnome-shell and then installed budgie.

Then is a new installation of Ubuntu 22. 04 the right way?

Can you please explain the order of the commands that lead to a working Budgie interface after reinstalling and perfect update?

Because I want to continue participating in the test program and share my experiences

@samlane is looking at some last minute raspi issues - we’ll be then releasing a beta 22.04 raspi image to test with.

1 Like

Fine, fine, then I wait with the further test, and then with pleasure
22. 04 Budgie for Raspi to be able to test.

Thank you for this message.

updated to 22.04 but the problem persists. The solution with bash script seems to work but it always break “show time” applet in raven. I use multiple screen and this applet always disappear after lock - unlock. I though that new LTS version will repair this but it doesnt :frowning: so any idea how to make lockscreen work and does not break applet?

You cannot use gdm3 as your login screen and you must uninstall the package described in the link above

I’m having this problem since upgrading to 22.04 and these solutions don’t work for me (can’t get my lock screen to appear).

I tried the scripts (killing and restarting gnome-screensaver) but that doesn’t seem to matter. I also checked gnome-screensaver is running.

I ran sudo apt purge gnome-shell-common too, and restarted, which removed some options from the login screen, but the problem persists (not sure how those others got there, I’ve only ever used Ubuntu Budgie).

I confirmed I’m using lightdm, and /etc/lightdm/lightdm.conf says greeter-session=slick-greeter.

journalctl doesn’t seem to show anything at all when I click the lock button or press WIN+L.

Any other ideas?

I fixed my problem, so I’ll share the solution just in case it helps anyone.

I enabled gnome-screensaver debugging by doing this:

pkill gnome-screensaver
gnome-screensaver --no-deamon --debug 2>&1 | tee ~/g-ss.log

Then in the log file, I noticed it was saying Locking disabled by the administrator whenever I tried to lock.

I found these two settings:

gsettings get org.gnome.desktop.screensaver lock-enabled
gsettings get org.gnome.desktop.lockdown disable-lock-screen

Both of these were true, but I reckon the second one should be false, so I changed it with set instead of get.
Now everything works fine - none of the other fixes mattered in my situation.

I have no idea why the upgrade would’ve changed that variable to disable the lock screen, but hey-ho, fixed now!

1 Like