![Ubuntu 16.04:显示管理器无法启动](https://linux22.com/image/994249/Ubuntu%2016.04%EF%BC%9A%E6%98%BE%E7%A4%BA%E7%AE%A1%E7%90%86%E5%99%A8%E6%97%A0%E6%B3%95%E5%90%AF%E5%8A%A8.png)
重新发布来自以下作者的问题:https://unix.stackexchange.com/q/314129/193223
我最近从 Ubuntu 14.04 升级到 16.04,之后显示管理器停止工作。
假设这是由于 init 系统造成的,我尝试按照此页面上给出的说明切换回 upstart:
https://wiki.ubuntu.com/SystemdForUpstartUsers
它不起作用。
newton@gravity:~$ sudo systemctl status lightdm
● lightdm.service - Light Display Manager
Loaded: loaded (/lib/systemd/system/lightdm.service; enabled; vendor preset: enabled)
Drop-In: /lib/systemd/system/display-manager.service.d
└─xdiagnose.conf
Active: inactive (dead) (Result: exit-code) since Mon 2016-10-03 19:04:26 EDT; 13min ago
Docs: man:lightdm(1)
Process: 3533 ExecStart=/usr/sbin/lightdm (code=exited, status=1/FAILURE)
Process: 3528 ExecStartPre=/bin/sh -c [ "$(basename $(cat /etc/X11/default-display-manager 2>/dev/null))" = "lightdm" ] (code=exited, status=0/SUCCESS)
Main PID: 3533 (code=exited, status=1/FAILURE)
Oct 03 19:04:26 newton systemd[1]: lightdm.service: Failed with result 'exit-code'.
Oct 03 19:04:26 newton systemd[1]: lightdm.service: Service hold-off time over, scheduling restart.
Oct 03 19:04:26 newton systemd[1]: Stopped Light Display Manager.
Oct 03 19:04:26 newton systemd[1]: lightdm.service: Start request repeated too quickly.
Oct 03 19:04:26 newton systemd[1]: Failed to start Light Display Manager.
Oct 03 19:09:02 newton systemd[1]: Stopped Light Display Manager.
journalctl 显示 PAM kwallet 存在问题。
$ sudo journalctl -e -u lightdm
...
systemd[1]: Starting Light Display Manager...
systemd[1]: Started Light Display Manager.
lightdm[26952]: PAM unable to dlopen(pam_kwallet.so): /lib/security/pam_kwallet.so: cannot open shared object file: No such file or directory
lightdm[26952]: PAM adding faulty module: pam_kwallet.so
lightdm[26952]: PAM unable to dlopen(pam_kwallet5.so): /lib/security/pam_kwallet5.so: cannot open shared object file: No such file or directory
lightdm[26952]: PAM adding faulty module: pam_kwallet5.so
lightdm[26952]: pam_unix(lightdm-greeter:session): session opened for user lightdm by (uid=0)
systemd[1]: lightdm.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: lightdm.service: Unit entered failed state.
systemd[1]: lightdm.service: Triggering OnFailure= dependencies.
systemd[1]: lightdm.service: Failed with result 'exit-code'.
...
这是 /var/log/lightdm/lightdm.log 的内容;
[+0.00s] DEBUG: Logging to /var/log/lightdm/lightdm.log
[+0.00s] DEBUG: Starting Light Display Manager 1.18.2, UID=0 PID=26937
[+0.00s] DEBUG: Loading configuration dirs from /usr/share/lightdm/lightdm.conf.d
[+0.00s] DEBUG: Loading configuration from /usr/share/lightdm/lightdm.conf.d/50-disable-log-backup.conf
[+0.00s] DEBUG: Loading configuration from /usr/share/lightdm/lightdm.conf.d/50-greeter-wrapper.conf
[+0.00s] DEBUG: Loading configuration from /usr/share/lightdm/lightdm.conf.d/50-guest-wrapper.conf
[+0.00s] DEBUG: Loading configuration from /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf
[+0.00s] DEBUG: Loading configuration from /usr/share/lightdm/lightdm.conf.d/50-unity-greeter.conf
[+0.00s] DEBUG: Loading configuration from /usr/share/lightdm/lightdm.conf.d/50-xserver-command.conf
[+0.00s] DEBUG: Loading configuration dirs from /usr/local/share/lightdm/lightdm.conf.d
[+0.00s] DEBUG: Loading configuration dirs from /etc/xdg/lightdm/lightdm.conf.d
[+0.00s] DEBUG: Loading configuration from /etc/lightdm/lightdm.conf
[+0.00s] DEBUG: Using D-Bus name org.freedesktop.DisplayManager
[+0.00s] DEBUG: Registered seat module xlocal
[+0.00s] DEBUG: Registered seat module xremote
[+0.00s] DEBUG: Registered seat module unity
[+0.00s] DEBUG: Monitoring logind for seats
[+0.00s] DEBUG: New seat added from logind: seat0
[+0.00s] DEBUG: Seat seat0: Loading properties from config section Seat:*
[+0.00s] DEBUG: Seat seat0: Starting
[+0.00s] DEBUG: Seat seat0: Creating greeter session
[+0.00s] DEBUG: Seat seat0: Creating display server of type x
[+0.01s] DEBUG: Using VT 7
[+0.01s] DEBUG: Seat seat0: Starting local X display on VT 7
[+0.01s] DEBUG: DisplayServer x-0: Logging to /var/log/lightdm/x-0.log
[+0.01s] DEBUG: DisplayServer x-0: Writing X server authority to /var/run/lightdm/root/:0
[+0.01s] DEBUG: DisplayServer x-0: Launching X Server
[+0.01s] DEBUG: Launching process 26944: /usr/bin/X -core :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
[+0.01s] DEBUG: DisplayServer x-0: Waiting for ready signal from X server :0
[+0.01s] DEBUG: Acquired bus name org.freedesktop.DisplayManager
[+0.01s] DEBUG: Registering seat with bus path /org/freedesktop/DisplayManager/Seat0
[+0.01s] DEBUG: Loading users from org.freedesktop.Accounts
[+0.01s] DEBUG: User /org/freedesktop/Accounts/User1000 added
[+0.01s] DEBUG: User /org/freedesktop/Accounts/User1007 added
[+0.01s] DEBUG: User /org/freedesktop/Accounts/User1009 added
[+0.01s] DEBUG: User /org/freedesktop/Accounts/User1006 added
[+0.01s] DEBUG: User /org/freedesktop/Accounts/User1005 added
[+0.01s] DEBUG: User /org/freedesktop/Accounts/User1002 added
[+0.02s] DEBUG: User /org/freedesktop/Accounts/User1011 added
[+0.02s] DEBUG: User /org/freedesktop/Accounts/User1008 added
[+0.02s] DEBUG: User /org/freedesktop/Accounts/User1003 added
[+0.02s] DEBUG: User /org/freedesktop/Accounts/User1001 added
[+0.02s] DEBUG: User /org/freedesktop/Accounts/User1004 added
[+0.02s] DEBUG: User /org/freedesktop/Accounts/User1010 added
[+0.23s] DEBUG: Got signal 10 from process 26944
[+0.23s] DEBUG: DisplayServer x-0: Got signal from X server :0
[+0.23s] DEBUG: DisplayServer x-0: Connecting to XServer :0
[+0.23s] DEBUG: Seat seat0: Display server ready, starting session authentication
[+0.23s] DEBUG: Session pid=26952: Started with service 'lightdm-greeter', username 'lightdm'
[+0.25s] DEBUG: Session pid=26952: Authentication complete with return value 0: Success
[+0.25s] DEBUG: Seat seat0: Session authenticated, running command
[+0.25s] DEBUG: Session pid=26952: Running command /usr/lib/lightdm/lightdm-greeter-session /usr/sbin/unity-greeter
[+0.25s] DEBUG: Creating shared data directory /var/lib/lightdm-data/lightdm
[+0.25s] DEBUG: Session pid=26952: Logging to /var/log/lightdm/seat0-greeter.log
[+0.27s] DEBUG: Activating VT 7
[+0.27s] DEBUG: Activating login1 session c17
[+0.27s] DEBUG: Seat seat0 changes active session to c17
[+0.27s] DEBUG: Session c17 is already active
[+0.37s] DEBUG: Greeter closed communication channel
[+0.37s] DEBUG: Session pid=26952: Exited with return value 0
[+0.37s] DEBUG: Seat seat0: Session stopped
[+0.37s] DEBUG: Seat seat0: Stopping; failed to start a greeter
[+0.37s] DEBUG: Seat seat0: Stopping
[+0.37s] DEBUG: Seat seat0: Stopping display server
[+0.37s] DEBUG: Sending signal 15 to process 26944
[+0.50s] DEBUG: Process 26944 exited with return value 0
[+0.50s] DEBUG: DisplayServer x-0: X server stopped
[+0.50s] DEBUG: Releasing VT 7
[+0.50s] DEBUG: DisplayServer x-0: Removing X server authority /var/run/lightdm/root/:0
[+0.50s] DEBUG: Seat seat0: Display server stopped
[+0.50s] DEBUG: Seat seat0: Stopped
[+0.50s] DEBUG: Required seat has stopped
[+0.50s] DEBUG: Stopping display manager
[+0.50s] DEBUG: Display manager stopped
[+0.50s] DEBUG: Stopping daemon
[+0.50s] DEBUG: Exiting with return value 1
Any other debugging tips that I need to try?
答案1
我也遇到过这种情况,如果您有 gdm3,请尝试使用它。如果您有 gdm3,请转到终端并输入“sudo apt remove lightdm”,然后输入“sudo apt-get install lightdm”。