我在 PC 上使用 Ubuntu 13.04 x64 版本,至少到目前为止它运行正常。但 lightdm 在启动过程中突然崩溃,即使我切换到另一个 tty 后尝试从终端手动启动它,它也会崩溃。
我不知道是什么原因导致了这些问题,因为我甚至没有为我的 nvidia 卡安装任何图形驱动程序(因为我多年来就知道这些问题,并且通过不安装任何驱动程序来跳过这些问题)。
全新安装和更新后,它运行了几天,但现在却不能正常工作。
切换到 gdm 确实解决了使用 gui 登录我的计算机的问题,但我想这个 lightdm 应该可以工作。
这些日志对我没有太大的帮助,但也许有人知道发生了什么?
lightdm.log
[+0.00s] DEBUG: Logging to /var/log/lightdm/lightdm.log [+0.00s]
DEBUG: Starting Light Display Manager 1.6.0, UID=0 PID=7369 [+0.00s]
DEBUG: Loaded 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: Adding default seat [+0.00s] DEBUG: Starting
seat [+0.00s] DEBUG: Starting new display for greeter [+0.00s] DEBUG:
Starting local X display [+0.00s] DEBUG: Using VT 7 [+0.00s] DEBUG:
Activating VT 7 [+0.01s] DEBUG: Logging to /var/log/lightdm/x-1.log
[+0.01s] DEBUG: Writing X server authority to /var/run/lightdm/root/:1
[+0.01s] DEBUG: Launching X Server [+0.01s] DEBUG: Launching process
7376: /usr/bin/X :1 -core -auth /var/run/lightdm/root/:1 -nolisten tcp
vt7 -novtswitch [+0.01s] DEBUG: Waiting for ready signal from X server
:1 [+0.01s] DEBUG: Acquired bus name org.freedesktop.DisplayManager
[+0.01s] DEBUG: Registering seat with bus path
/org/freedesktop/DisplayManager/Seat0 [+0.61s] DEBUG: Got signal 10
from process 7376 [+0.61s] DEBUG: Got signal from X server :1 [+0.61s]
DEBUG: Connecting to XServer :1 [+0.61s] DEBUG: Starting greeter
[+0.62s] DEBUG: Started session 7385 with service 'lightdm-greeter',
username 'lightdm' [+0.64s] DEBUG: Session 7385 authentication
complete with return value 0: Success [+0.64s] DEBUG: Greeter
authorized [+0.64s] DEBUG: Logging to /var/log/lightdm/x-1-greeter.log
[+0.64s] DEBUG: Session 7385 running command
/usr/lib/lightdm/lightdm-greeter-session /usr/sbin/unity-greeter
[+0.68s] DEBUG: Greeter closed communication channel [+0.68s] DEBUG:
Session 7385 exited with return value 1 [+0.68s] DEBUG: Greeter quit
[+0.68s] DEBUG: Failed to start greeter [+0.68s] DEBUG: Stopping
display [+0.68s] DEBUG: Sending signal 15 to process 7376 [+0.82s]
DEBUG: Process 7376 exited with return value 0 [+0.82s] DEBUG: X
server stopped [+0.82s] DEBUG: Removing X server authority
/var/run/lightdm/root/:1 [+0.82s] DEBUG: Releasing VT 7 [+0.82s]
DEBUG: Display server stopped [+0.82s] DEBUG: Stopping seat, failed to
start a display [+0.82s] DEBUG: Stopping seat [+0.82s] DEBUG: Seat
stopped [+0.82s] DEBUG: Required seat has stopped [+0.82s] DEBUG:
Stopping display manager [+0.82s] DEBUG: Display manager stopped
[+0.82s] DEBUG: Stopping daemon [+0.82s] DEBUG: Exiting with return
value 1
---
x-0-greeter.log
Error writing X authority: Failed to write X authority
/var/lib/lightdm/.Xauthority: Success
---
x-1-greeter.log
Error writing X authority: Failed to write X authority
/var/lib/lightdm/.Xauthority: Success /var/log/lightdm/x-1-greeter.log
(END)
---
x0.log
X.Org X Server 1.13.3 Release Date: 2013-03-07 X Protocol Version 11,
Revision 0 Build Operating System: Linux 3.2.0-37-generic x86_64
Ubuntu Current Operating System: Linux stefan-dev 3.8.0-30-generic
#44-Ubuntu SMP Thu Aug 22 20:52:24 UTC 2013 x86_64 Kernel command line: BOOT_IMAGE=/boot/vmlinuz-3.8.0-30-generic
root=UUID=6e9c6967-a55f-49b8-b690-7257b359ae8d ro quiet splash
vt.handoff=7 Build Date: 17 April 2013 10:43:13PM xorg-server
2:1.13.3-0ubuntu6 (For technical support please see
http://www.ubuntu.com/support) Current version of pixman: 0.28.2
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version. Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown. (==) Log file: "/var/log/Xorg.0.log", Time: Tue Sep 17 18:27:30 2013
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
Initializing built-in extension Generic Event Extension Initializing
built-in extension SHAPE Initializing built-in extension MIT-SHM
Initializing built-in extension XInputExtension Initializing built-in
extension XTEST Initializing built-in extension BIG-REQUESTS
Initializing built-in extension SYNC Initializing built-in extension
XKEYBOARD Initializing built-in extension XC-MISC Initializing
built-in extension SECURITY Initializing built-in extension XINERAMA
Initializing built-in extension XFIXES Initializing built-in extension
RENDER Initializing built-in extension RANDR Initializing built-in
extension COMPOSITE Initializing built-in extension DAMAGE
Initializing built-in extension MIT-SCREEN-SAVER Initializing built-in
extension DOUBLE-BUFFER Initializing built-in extension RECORD
Initializing built-in extension DPMS Initializing built-in extension
X-Resource Initializing built-in extension XVideo Initializing
built-in extension XVideo-MotionCompensation Initializing built-in
extension SELinux Initializing built-in extension
XFree86-VidModeExtension Initializing built-in extension XFree86-DGA
Initializing built-in extension XFree86-DRI Initializing built-in
extension DRI2 Loading extension GLX resize called 1680 1050 Server
terminated successfully (0). Closing log file.
答案1
花了我两天时间。最终解决方案:
sudo dpkg-reconfigure gdm
#选择 gdmsudo apt-get remove lightdm* --purge
sudo reboot
sudo apt-get install lightdm*
sudo dpkg-reconfigure gdm
#选择 lightdm
答案2
Lubuntu 15.x:
在lightdm-greeter
黑屏时,我切换到虚拟终端 ( Alt2),登录,然后使用 找到 的 pid lightdm-greeter
,top -b -n 1 | grep 'lightdm'
然后我尝试sudo kill -s SIGHUP [pid]
,然后再次使用top
以查看欢迎程序是否仍在运行,然后再次尝试sudo kill -s SIGTERM
并再次使用top
,但欢迎程序未运行。然后我切换回图形会话/登录。它显示一条消息,表明会话已被锁定,我将被重定向到登录。我等了大约 7 秒钟,然后出现了lightdm-greeter
。我能够登录。GUI 会话完好无损。
答案3
上周应用最新的 lightdm 补丁后,我开始遇到此问题。由于无法访问 ,欢迎程序无法启动/var/lib/lightdm/.Xauthority
,结果出现低图形模式错误,只能通过删除 来解决一个会话/var/lib/lightdm/.Xauthority
。此问题似乎是由这个新补丁引起的,它为.Xauthority
文件提供了更严格的权限(600
而不是664
)。请参阅以下内容:
lightdm (1.6.0-0ubuntu3.1) raring-security;紧急程度=低
- 安全更新:.Xauthority 文件的权限错误(LP:#1175023)
- debian/patches/07_xauthority_perms.patch:在 src/xauthority.c 中使用 g_open 而不是 g_file_set_contents。
- debian/patches/08_xauthority_fix_perms.patch:修复 src/xauthority.c 中先前版本留下的错误权限。
- CVE-2013-4331
上述建议的修复方法似乎有效了大约半小时,直到旧的行为再次出现,并且还出现了陈旧文件在用户主目录中.Xauthority
留下的权限问题,从而导致图形登录循环。600
为了解决这个问题,我创建了一个包装脚本xfce-session-logout
(我使用 XFCE),它可以.Xauthority
从用户主目录和 中删除/var/lib/lightdm
。由于此脚本必须使用sudo
来假定正确的权限才能删除/var/lib/lightdm/.Xauthority
,因此这很难说是理想的,尽管它可以工作。使用gdm
也可以避免这个问题。我的情况也比较复杂,也许是因为我通过控制台和 访问本地系统xdmcp
。
为了解决上述补丁中的安全问题,Ubuntu 需要修补其他程序(例如欢迎程序)需要访问的程序,.Xauthority
因为目前通过修复安全问题,它们实际上已经破坏了lightdm
。这不是很好。
答案4
我在 Debian Sid 上遇到了同样的问题并发现删除该.Xauthority
文件可以解决问题,虽然不是一个非常可靠的解决方案,因为每次重新启动时我都必须这样做,但这是一个使我能够回到我的 GUI 的解决方法。
将文件重命名
/var/lib/lightdm/.Xauthority
为/var/lib/lightdm/.Xauthority-BAK
sudo mv /var/lib/lightdm/.Xauthority /var/lib/lightdm/.Xauthority-BAK
使用以下命令重启 lightdm 服务
sudo service lightdm stop sudo service lightdm start