37

I'm on Ubuntu 18.04 and since today whenever I lock my system and try to log back in using my password, it shows the 'in progress' spinner for few seconds then I get the error message "Authentication error". I can successfully log in on the first start though.

I have tried to force disable Wayland by uncommenting the line #WaylandEnable=false to WaylandEnable=false in /etc/gdm3/custom.conf but it had no effect. I was originally using Xorg as well.

I've checked for any available system updates in hope of getting a fix but none are available. What can I do to investigate into and fix this error?

Update: I re-installed Ubuntu 18.04 to get rid of the issue.

Harshil Sharma
  • 533
  • 2
  • 5
  • 10

9 Answers9

14

The sudo dpkg-reconfigure gnome-shell command did not work for me.

What did work was changing fs.inotify.max_user_watches. I used this solution (also here).

Temporary solution

sudo sysctl -w fs.inotify.max_user_watches=524288  # sysctl - configure kernel parameters at runtime

or

sudo -i
echo 1048576 > /proc/sys/fs/inotify/max_user_watches
exit

Permanent solution

Modifying /etc/sysctl.conf:

sudo echo "fs.inotify.max_user_watches=524288" >> /etc/sysctl.conf

Related

Pablo Bianchi
  • 15,657
slimbob
  • 141
  • it seems like an update has been provided by Canonical having fs.inotify.max_user_watches=1048576 setting inside the /etc/sysctl.d/99-sysctl.conf file. unfortunately up to date the problem hasn't been solved with this update yet – Oleg Kokorin Jul 04 '18 at 15:19
  • It works like a charm! –  Sep 13 '18 at 13:17
  • Glad you found this. It has been driving me crazy! – Dashdrum Oct 16 '18 at 19:58
  • Can you inline the steps here? the page https://ask.fedoraproject.org/en/question/115963/gnome-authentication-error-when-logging-in-after-lock/ is not found. i installed 18.10 fresh today. – tgkprog May 11 '19 at 10:52
  • from https://medium.com/@at15/ubuntu-change-fs-inotify-max-user-watches-for-idea-f5f5d6651e7f edit /etc/sysctl.conf to add/ edit the line:
    fs.inotify.max_user_watches=524288
    – tgkprog May 11 '19 at 10:56
  • Works on Ubuntu 22 – jave.web Mar 28 '23 at 09:26
  • @slimbob - could you elaborate why is this an issue in the first place and why does this solution fix it? – jave.web Mar 28 '23 at 09:28
14

You can unlock the screen from terminal and command line, avoiding reboot. This is a temporary solution while you work on a permanent one.

On the login screen, Press Ctrl + Alt + F3 to open a terminal, or use SSH to access from another computer. To unlock all sessions, type sudo loginctl unlock-sessions. Then press Ctrl + Alt + F2, for example, to go back to your (now unlocked) session.

For more details, please see Unlock login screen using command line

This does not solve the underlying problem, but lets you quickly get back to your session to save your work and try configuration changes, without having to reboot.

Pablo Bianchi
  • 15,657
saeng
  • 261
11

I had the same problem. After running the following I can re-login from the lock screen.

sudo dpkg-reconfigure gnome-shell
  • I ultimately re-installed Ubuntu 18.04 to get rid of the issue. – Harshil Sharma May 12 '18 at 07:45
  • I came across my solution because you re-installed. I was looking for other ways than a full re-install. I thought I might re-install Gnome only since Gnome handles the login screen now. And a comment on a post (some other Gnome weirdness from a while ago) about re-installing Gnome was a suggestion to use dpkg to reconfigure. So I tried that, and my lock screen issue went away. – Philip Weiss May 12 '18 at 22:47
  • not worked for me – Ankur Loriya Mar 08 '19 at 12:36
  • 2
    works like a charm – Vishal Yadav Mar 27 '19 at 07:54
  • Worked for me!!!. My question is, why this happened? Before that, I just reinstalled the system python. (I don't believe, that it should be connected) – Michael D Dec 29 '20 at 10:18
4

In order to resolve this issue open /etc/sysctl.conf file as root user in your favourite text edior. Now add fs.inotify.max_user_watches = 524288 at the bottom of the file and save it. Run sudo sysctl -p command in terminal to persist the changes you made in sysctl. And its done !

user34567
  • 141
3

I experienced the same issue and by heading into a new terminal (Ctrl+Alt+F3) I ran sudo service gdm restart which switched back to a graphical login. Logging in didn't work and the warning on the terminal said a warning about not being able to watch the file system, not enough disk space. The fix was increasing the max_user_watches as found in this article.

Dav
  • 463
  • 5
  • 10
  • Yes it is worked for me... thank you for the solution. – Ankur Loriya Mar 08 '19 at 12:36
  • Fantastic. It got rid of a persistent (uncancelable) 'Authentication required to perform file operations' dialog at the top left of the screen for me. However, it does close all applications, so it is not unlike a logout/login without any questions to save work. Careful; you will loose work if you have not saved things. – Roel Van de Paar Jun 09 '20 at 23:04
2

Got this problem in Ubuntu 20, none of the solutions worked and I cannot even see the login screen after reboot....
Have to jump to the console by Ctrl+Alt+F1 to login through tty.

I solved this problem by reinstall gnome and ubuntu desktop in tty:

sudo apt-get install --reinstall ubuntu-desktop
sudo apt-get install --reinstall gnome-shell
zx485
  • 2,426
  • The reason for this is that somehow gdm3 got uninstalled or deactivated. In my case the Ubuntu switched over to lightdm, but logging in was impossible. – JulianWgs Aug 01 '21 at 13:44
1

The gnome reconfigure command worked for me even after a completely clean reinstall failed. I had also tried to use the wayland log in and got stuck in a log in loop and had also tried to purge upstart which was apparently causing issues for some users.

1

I had similar issue. I ran the following to ensure all my packages were up to date

  1. sudo apt update & apt upgrade

The above displayed a message "6 packages to upgrade" I then ran the following to do an upgrade.

  1. sudo apt full-upgrade

Then reboot my desktop.

  1. sudo reboot

After reboot, the login screen should allow you to enter the password.

0

In my case, gnome wasn't proper. my error was dpkg: unrecoverable fatal error, aborting: unknown group 'geoclue' in statoverride file

So I had to go to statoverride and groupadd geoclue But still whatever files were there in statoverride file they were showing the same error, I had to groupadd all the groups, then sudo apt-get install --reinstall gnome-session ubuntu-desktop that's it. Took me almost whole day but it did work.

123boo
  • 1