从 18.04 升级到 18.10 后出现登录循环

从 18.04 升级到 18.10 后出现登录循环

症状

在 18.04 上使用 GNOME 桌面已有一段时间了,一切运行良好。昨天升级到 18.10,现在陷入了登录循环。

CTRL我可以通过+ ALT+暂时解决问题F3,登录到终端并删除我的 /home/user/.Xauthority 文件。然后使用ALT +返回到欢迎界面->并登录即可。

一旦我重新启动机器,问题又再次出现。

我尝试过什么

查看 homedir 权限一切似乎正常

$ls -lA | grep -E '.X|.ICE'
-rw-------  1 user user  1932 Oct 19 14:06 .ICEauthority
-rw-------  1 user user    52 Oct 19 14:06 .Xauthority

tmp 权限看起来没问题

$ ls -ld /tmp
drwxrwxrwt 19 root root 12288 Oct 20 08:22 /tmp

在 .xsession-errors 中没有看到任何奇怪的内容

$ cat .xsession-errors
dbus-update-activation-environment: setting DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
dbus-update-activation-environment: setting DISPLAY=:0
dbus-update-activation-environment: setting XAUTHORITY=/home/user/.Xauthority
dbus-update-activation-environment: setting GTK_MODULES=gail:atk-bridge
dbus-update-activation-environment: setting QT_ACCESSIBILITY=1
dbus-update-activation-environment: setting CLUTTER_IM_MODULE=xim
dbus-update-activation-environment: setting LANG=en_US.UTF-8
dbus-update-activation-environment: setting GDM_LANG=en_US
dbus-update-activation-environment: setting DISPLAY=:0
dbus-update-activation-environment: setting GTK2_MODULES=overlay-scrollbar
dbus-update-activation-environment: setting MANDATORY_PATH=/usr/share/gconf/ubuntu.mandatory.path
dbus-update-activation-environment: setting XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/user
dbus-update-activation-environment: setting USER=user
dbus-update-activation-environment: setting DESKTOP_SESSION=ubuntu
dbus-update-activation-environment: setting QT4_IM_MODULE=xim
dbus-update-activation-environment: setting DEFAULTS_PATH=/usr/share/gconf/ubuntu.default.path
dbus-update-activation-environment: setting QT_QPA_PLATFORMTHEME=appmenu-qt5
dbus-update-activation-environment: setting PWD=/home/user
dbus-update-activation-environment: setting HOME=/home/user
dbus-update-activation-environment: setting QT_ACCESSIBILITY=1
dbus-update-activation-environment: setting XDG_SESSION_TYPE=x11
dbus-update-activation-environment: setting XDG_DATA_DIRS=/usr/share/ubuntu:/usr/local/share:/usr/share:/var/lib/snapd/desktop:/var/lib/snapd/desktop
dbus-update-activation-environment: setting XDG_SESSION_DESKTOP=ubuntu
dbus-update-activation-environment: setting GTK_MODULES=gail:atk-bridge
dbus-update-activation-environment: setting SHELL=/bin/bash
dbus-update-activation-environment: setting XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
dbus-update-activation-environment: setting QT_IM_MODULE=ibus
dbus-update-activation-environment: setting XMODIFIERS=@im=ibus
dbus-update-activation-environment: setting IM_CONFIG_PHASE=2
dbus-update-activation-environment: setting XDG_CURRENT_DESKTOP=ubuntu:GNOME
dbus-update-activation-environment: setting GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1
dbus-update-activation-environment: setting SHLVL=1
dbus-update-activation-environment: setting LANGUAGE=en_US
dbus-update-activation-environment: setting GDMSESSION=ubuntu
dbus-update-activation-environment: setting LOGNAME=user
dbus-update-activation-environment: setting DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
dbus-update-activation-environment: setting XDG_RUNTIME_DIR=/run/user/1000
dbus-update-activation-environment: setting XAUTHORITY=/home/user/.Xauthority
dbus-update-activation-environment: setting XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session2
dbus-update-activation-environment: setting XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg
dbus-update-activation-environment: setting PATH=/home/user/bin:/home/user/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
dbus-update-activation-environment: setting GTK_IM_MODULE=ibus
dbus-update-activation-environment: setting _=/usr/bin/dbus-update-activation-environment

LightDM 重新配置/删除/安装

sudo dpkg-reconfigure lightdm
sudo apt-get purge lightdm
sudo apt-get install lightdm

查看了 lightdm 日志但也没有看到任何内容。

我从系统日志中注意到,在我登录的时候

Oct 19 14:01:27 computer systemd[1]: session-c1.scope: Killing process 2333 (lightdm) with signal SIGTERM.

不确定那是怎么回事。

我在这里没有什么主意了,所以有人可以提出更多建议来尝试一下吗?

编辑

还有一些可能有用的信息。重启/登录失败后,tty 控制台登录成功:

service lightdm status

● lightdm.service - Light Display Manager
   Loaded: loaded (/lib/systemd/system/lightdm.service; indirect; vendor preset: enabled)
  Drop-In: /lib/systemd/system/display-manager.service.d
           └─xdiagnose.conf
   Active: active (running) since Sat 2018-10-20 13:08:27 CDT; 1min 38s ago
     Docs: man:lightdm(1)
  Process: 1557 ExecStartPre=/bin/sh -c [ "$(basename $(cat /etc/X11/default-display-manager 2>/dev/null))" = "lightdm" ] (code=exited, status=0/SUCCESS)
 Main PID: 1563 (lightdm)
    Tasks: 26 (limit: 4915)
   Memory: 74.6M
   CGroup: /system.slice/lightdm.service
           ├─1563 /usr/sbin/lightdm
           ├─3530 /usr/lib/xorg/Xorg -core :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
           └─3748 lightdm --session-child 12 19

Oct 20 13:09:05 moltres lightdm[3560]: PAM unable to dlopen(pam_kwallet.so): /lib/security/pam_kwallet.so: cannot open shared object file: No such file or directory
Oct 20 13:09:05 moltres lightdm[3560]: PAM adding faulty module: pam_kwallet.so
Oct 20 13:09:05 moltres lightdm[3560]: PAM unable to dlopen(pam_kwallet5.so): /lib/security/pam_kwallet5.so: cannot open shared object file: No such file or directory
Oct 20 13:09:05 moltres lightdm[3560]: PAM adding faulty module: pam_kwallet5.so
Oct 20 13:09:05 moltres lightdm[3560]: pam_unix(lightdm-greeter:session): session opened for user lightdm by (uid=0)
Oct 20 13:09:06 moltres lightdm[3748]: PAM unable to dlopen(pam_kwallet.so): /lib/security/pam_kwallet.so: cannot open shared object file: No such file or directory
Oct 20 13:09:06 moltres lightdm[3748]: PAM adding faulty module: pam_kwallet.so
Oct 20 13:09:06 moltres lightdm[3748]: PAM unable to dlopen(pam_kwallet5.so): /lib/security/pam_kwallet5.so: cannot open shared object file: No such file or directory
Oct 20 13:09:06 moltres lightdm[3748]: PAM adding faulty module: pam_kwallet5.so
Oct 20 13:09:06 moltres lightdm[3748]: pam_succeed_if(lightdm:auth): requirement "user ingroup nopasswdlogin" not met by user "user"

答案1

我从 18.04 更新到 18.10 时遇到了同样的问题,过去一周我一直在寻找解决方案。但我没有找到。似乎有很多 Arch 用户遇到了同样的问题。

最好的解决方法是在黑屏/空白屏幕上输入密码,会话就会解锁。

我记录了一个 ubuntu 问题: https://bugs.launchpad.net/ubuntu/+source/lightdm/+bug/1802225

答案2

我遇到了类似的问题。我使用的是联想 T430,配有 nvidia 显卡、四核 i7、16GB 内存、480GB 固态硬盘和受支持的 Sierra Wireless LTE WWAN 卡。我之前在 18.04 下安装了指纹扫描仪支持,并且系统从 ZFS 格式的驱动器运行(和启动)。(我的配置非常不标准)。下面是我让它工作的方法。

我尝试了你的方法,但无济于事。当我通过 tty3 登录后尝试进入桌面时,我的电脑挂起了。

重新安装 lightdm 根本没用,因为 Ubuntu 18.10(我相信 18.04)使用 gdm3 作为默认桌面管理器。我尝试使用

sudo apt-get 清除 gdm3 sudo apt-get 安装 gdm3

这会出现一个紫色屏幕,提示我安装了两个桌面管理器,并要求我选择使用哪个。两个选项是“GDM3”和“gdm3”,一个大写,一个小写。我选择了 GDM3。它不起作用。所以我卸载并重新安装并选择了 gdm3。它仍然不起作用。

接下来我卸载了指纹读取器包。

首先安装 gnome policykit。指纹包会卸载它,因此您需要在删除指纹内容之前将其重新安装,否则您的登录会出错。(无论如何,这是错误的,但我遵循了以下程序) sudo apt-get install policykit-1-gnome 然后删除指纹内容。 sudo apt-get purge libbsapi policykit-1-fingerprint-gui finger-gui 但它不起作用。

所以我再次删除了 gdm3 内容,并确保所有价格都消失了,然后重新安装。但它不起作用。

但下面的方法确实有效。

sudo apt-get purge gdm3 sudo apt-get install --reinstall gdm3 sudo apt-get install gnome

我不确定哪个方法可以解决问题,因为我都试过了,重新启动后又登录了。我会一次尝试一个方法,看看它是否对你有用。(如果有效,请报告并留下详细信息)以便其他遇到问题的人使用。

相关内容