Gnome lock screen refuse my correct password. I need to reboot every time, when I get into lock screen.

I upgraded to Ubuntu 18.04. I have Russian and English layouts (maybe it's the root of problem...)

I read about 10 similar questions. I have made all commands via terminal like a

sudo chown root:shadow /etc/gshadow
sudo chown root:shadow /etc/gshadow-
sudo chown root:shadow /etc/shadow
sudo chown root:shadow /etc/shadow

But it didn't help. I am not programmer I just want to work on my computer but I can't.


I have the same issue and tried a lot of solutions offered around the internet. So far, the only work around that worked when this happens:

  1. Alt+Ctrl+F1 - switch to a different console and login as your user
  2. sudo killall gnome-screensaver - to kill the screensaver
  3. Alt+Ctrl+F7 - switch back to your X screen, there will no longer be a screensaver
  4. gnome-screensaver-command -l to lock your screen again and now unlock with your password (it should work now)

Note that if I don't do #4, the screen continue to go blank after a few minutes of being logged in, which is why I figured I needed to do #4.

Edit from 2020: Yet another alternative, inspired by EChip's answer: setup a cron script that will switch language back to English when the screen lock dialog is detected:

# Allows to avoid situation when on screen lock language other than
# English is selected.
# Set up under user's cron like this:
# * * * * * env DISPLAY=:0 /bin/bash /storage/scripts/unlock_helper.sh > /home/your_user_name/log.txt 2>&1
# Prerequisite:
# Add the following line to you .profile:

source /home/your_user_name/.DBUS_SESSION_BUS_ADDRESS

if (/usr/bin/gnome-screensaver-command -q | /bin/grep "is active");
    /usr/bin/gdbus call --session --dest org.gnome.Shell \
        --object-path /org/gnome/Shell \
        --method org.gnome.Shell.Eval \
  • I'm not positive but this sounds like the hotkey combinations for Ubuntu 16.04 not 18.04. – WinEunuuchs2Unix Dec 26 '18 at 22:29
  • This combination wilk work for both versions. – 0x4B1D Dec 27 '18 at 3:14
  • In: wiki.ubuntu.com/BionicBeaver/ReleaseNotes it says: "The login screen now uses virtual terminal 1 instead of virtual terminal 7. " – WinEunuuchs2Unix Dec 27 '18 at 3:23
  • @WinEunuuchs2Unix I won't claim that the release notes are wrong but I just confirmed I have 18.04.1 LTS and X still runs on 7. Mine is a relatively new install without customizations as far as I recall – 0x4B1D Dec 28 '18 at 5:54
  • While sudo killall gnome-screensaver release the lock, gnome-screensaver-command -l did not relock the screen in ubuntu 18.04.3 LTS. Now I have no lock screen. – havakok Jan 20 at 13:05

My alternative is to remove screensavers(gnome-screensaver, xscreensaver) at all.

I can not do remember every time when I lock pc to switch layout to US.
The punishment here is incorrect password error in lock screen of screensavers.

Steps to lock screen with Super+L without screensaver but with login screen:
1. sudo apt-get remove xscreensaver
2. Remove xscreensaver from startup applications, if you add it before
3. Go to Settings>Devices>Keyboard and disable standart command (Super+L)
4. Create new custom shortcut (Super+L) for command

dm-tool switch-to-greeter

I am almost happy now

UPD: To turn off display, we can use command:

xset dpms force off

So now to pack "switch-to-greeter" and "display off" into one shell script and link it to the "Super+L" is not a big question

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.