您尚未登录。

#1 2021-12-24 23:50:57

martinit
会员
注册时间: 2021-07-03
帖子: 41

lightdm+i3wm无法自动登录

我按照archwiki上面配的
装了lightdm和lightdm-gtk-greeter

/etc/lightdm/lightdm.conf

[Seat: *]
session-wrapper=/etc/lightdm/Xsession
autologin-user=martinit
autologin-user-timeout=0
autologin-session=i3
$ groups
autologin wheel martinit

然后还是没用,还是要密码。。。。。。
lightdm的log如下:

[+0.00s] DEBUG: Logging to /var/log/lightdm/lightdm.log
[+0.00s] DEBUG: Starting Light Display Manager 1.30.0, UID=0 PID=692
[+0.00s] DEBUG: Loading configuration dirs from /usr/share/lightdm/lightdm.conf.d
[+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: Registered seat module local
[+0.00s] DEBUG: Registered seat module xremote
[+0.00s] DEBUG: Using D-Bus name org.freedesktop.DisplayManager
[+0.00s] DEBUG: _g_io_module_get_default: Found default implementation local (GLocalVfs) for ‘gio-vfs’
[+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 has property CanMultiSession=no
[+0.00s] DEBUG: Seat seat0: Starting
[+0.00s] DEBUG: Seat seat0: Creating user session
[+0.00s] WARNING: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts was not provided by any .service files
[+0.00s] DEBUG: Loading user config from /etc/lightdm/users.conf
[+0.01s] DEBUG: User martinit added
[+0.01s] DEBUG: Seat seat0: Failed to find session configuration i3.desktop
[+0.01s] DEBUG: Seat seat0: Can't find session 'i3.desktop'
[+0.01s] DEBUG: Seat seat0: Creating greeter session
[+0.01s] DEBUG: Seat seat0: Creating display server of type x
[+0.01s] DEBUG: Could not run plymouth --ping: Failed to execute child process “plymouth” (No such file or directory)
[+0.01s] DEBUG: Using VT 7
[+0.01s] DEBUG: Seat seat0: Starting local X display on VT 7
[+0.01s] DEBUG: XServer 0: Logging to /var/log/lightdm/x-0.log
[+0.01s] DEBUG: XServer 0: Writing X server authority to /run/lightdm/root/:0
[+0.01s] DEBUG: XServer 0: Launching X Server
[+0.01s] DEBUG: Launching process 698: /usr/bin/X :0 -seat seat0 -auth /run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
[+0.01s] DEBUG: XServer 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
[+1.00s] DEBUG: Got signal 10 from process 698
[+1.00s] DEBUG: XServer 0: Got signal from X server :0
[+1.00s] DEBUG: XServer 0: Connecting to XServer :0
[+1.01s] DEBUG: Seat seat0: Display server ready, starting session authentication
[+1.01s] DEBUG: Session pid=709: Started with service 'lightdm-greeter', username 'lightdm'
[+1.02s] DEBUG: Session pid=709: Authentication complete with return value 0: Success
[+1.02s] DEBUG: Seat seat0: Session authenticated, running command
[+1.02s] DEBUG: Session pid=709: Running command /usr/bin/lightdm-gtk-greeter
[+1.02s] DEBUG: Creating shared data directory /var/lib/lightdm-data/lightdm
[+1.02s] DEBUG: Session pid=709: Logging to /var/log/lightdm/seat0-greeter.log
[+1.03s] DEBUG: Activating VT 7
[+1.03s] DEBUG: Activating login1 session c2
[+1.03s] DEBUG: Seat seat0 changes active session to c2
[+1.03s] DEBUG: Session c2 is already active
[+1.22s] DEBUG: Greeter connected version=1.30.0 api=1 resettable=false
[+1.38s] DEBUG: Greeter start authentication for martinit
[+1.38s] DEBUG: Session pid=759: Started with service 'lightdm', username 'martinit'
[+1.39s] DEBUG: Session pid=759: Got 1 message(s) from PAM
[+1.39s] DEBUG: Prompt greeter with 1 message(s)
[+8.46s] DEBUG: Continue authentication
[+10.24s] DEBUG: Session pid=759: Authentication complete with return value 7: Authentication failure
[+10.24s] DEBUG: Authenticate result for user martinit: Authentication failure
[+10.24s] DEBUG: Session pid=759: Exited with return value 1
[+10.24s] DEBUG: Seat seat0: Session stopped
[+10.25s] DEBUG: Greeter start authentication for martinit
[+10.25s] DEBUG: Session pid=799: Started with service 'lightdm', username 'martinit'
[+10.26s] DEBUG: Session pid=799: Got 1 message(s) from PAM
[+10.26s] DEBUG: Prompt greeter with 1 message(s)
[+13.06s] DEBUG: Continue authentication
[+13.08s] DEBUG: Session pid=799: Authentication complete with return value 0: Success
[+13.08s] DEBUG: Authenticate result for user martinit: Success
[+13.08s] DEBUG: User martinit authorized
[+13.11s] DEBUG: Greeter requests session i3
[+13.11s] DEBUG: Seat seat0: Stopping greeter; display server will be re-used for user session
[+13.11s] DEBUG: Terminating login1 session c2
[+13.12s] DEBUG: Session pid=709: Sending SIGTERM
[+13.15s] DEBUG: Greeter closed communication channel
[+13.15s] DEBUG: Session pid=709: Exited with return value 0
[+13.15s] DEBUG: Seat seat0: Session stopped
[+13.15s] DEBUG: Seat seat0: Greeter stopped, running session
[+13.15s] DEBUG: Registering session with bus path /org/freedesktop/DisplayManager/Session0
[+13.15s] DEBUG: Session pid=799: Running command /etc/lightdm/Xsession i3
[+13.15s] DEBUG: Creating shared data directory /var/lib/lightdm-data/martinit
[+13.15s] DEBUG: Session pid=799: Logging to .xsession-errors
[+13.29s] DEBUG: Activating VT 7
[+13.29s] DEBUG: Activating login1 session 2
[+13.29s] DEBUG: Seat seat0 changes active session to
[+13.29s] DEBUG: Seat seat0 changes active session to 2
[+13.29s] DEBUG: Session 2 is already active

有哪位大神能指点一下 多谢了!
还需要什么额外信息请跟我说

离线

#2 2021-12-25 05:17:53

xiao80
会员
注册时间: 2021-11-14
帖子: 66

Re: lightdm+i3wm无法自动登录

[+0.01s] DEBUG: Seat seat0: Failed to find session configuration i3.desktop
[+0.01s] DEBUG: Seat seat0: Can't find session 'i3.desktop'
[+0.01s] DEBUG: Seat seat0: Creating greeter session

不明白为啥你的配置文件里面是 i3,日志里却是 i3.desktop。
按理说装了 i3-wm,应该会找到的呀。

其实也可以不用配置 autologin-session,而是根据 ~/.dmrc 机制自动登录。

最近编辑记录 xiao80 (2021-12-25 05:20:27)

离线

#3 2021-12-25 13:37:02

martinit
会员
注册时间: 2021-07-03
帖子: 41

Re: lightdm+i3wm无法自动登录

xiao80 说:

[+0.01s] DEBUG: Seat seat0: Failed to find session configuration i3.desktop
[+0.01s] DEBUG: Seat seat0: Can't find session 'i3.desktop'
[+0.01s] DEBUG: Seat seat0: Creating greeter session

不明白为啥你的配置文件里面是 i3,日志里却是 i3.desktop。
按理说装了 i3-wm,应该会找到的呀。

其实也可以不用配置 autologin-session,而是根据 ~/.dmrc 机制自动登录。

哦可能是我之前写的i3.desktop 弄错了。。。。
现在我把autologin-session注释了,.dmrc中写的是Session=i3,log如下:

❯ cat lightdm.log
[+0.00s] DEBUG: Logging to /var/log/lightdm/lightdm.log
[+0.00s] DEBUG: Starting Light Display Manager 1.30.0, UID=0 PID=488
[+0.00s] DEBUG: Loading configuration dirs from /usr/share/lightdm/lightdm.conf.d
[+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: Registered seat module local
[+0.00s] DEBUG: Registered seat module xremote
[+0.00s] DEBUG: Using D-Bus name org.freedesktop.DisplayManager
[+0.01s] DEBUG: _g_io_module_get_default: Found default implementation local (GLocalVfs) for ‘gio-vfs’
[+0.01s] DEBUG: Monitoring logind for seats
[+0.01s] DEBUG: New seat added from logind: seat0
[+0.01s] DEBUG: Seat seat0: Loading properties from config section Seat:*
[+0.01s] DEBUG: Seat seat0 has property CanMultiSession=no
[+0.01s] DEBUG: Seat seat0: Starting
[+0.01s] DEBUG: Seat seat0: Creating user session
[+0.01s] WARNING: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts was not provided by any .service files
[+0.01s] DEBUG: Loading user config from /etc/lightdm/users.conf
[+0.01s] DEBUG: User martinit added
[+0.02s] DEBUG: Seat seat0: Creating display server of type x
[+0.02s] DEBUG: Could not run plymouth --ping: Failed to execute child process “plymouth” (No such file or directory)
[+0.02s] DEBUG: Using VT 7
[+0.02s] DEBUG: Seat seat0: Starting local X display on VT 7
[+0.02s] DEBUG: XServer 0: Logging to /var/log/lightdm/x-0.log
[+0.02s] DEBUG: XServer 0: Writing X server authority to /run/lightdm/root/:0
[+0.02s] DEBUG: XServer 0: Launching X Server
[+0.02s] DEBUG: Launching process 503: /usr/bin/X :0 -seat seat0 -auth /run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
[+0.02s] DEBUG: XServer 0: Waiting for ready signal from X server :0
[+0.02s] DEBUG: Acquired bus name org.freedesktop.DisplayManager
[+0.02s] DEBUG: Registering seat with bus path /org/freedesktop/DisplayManager/Seat0
[+0.79s] DEBUG: Got signal 10 from process 503
[+0.79s] DEBUG: XServer 0: Got signal from X server :0
[+0.79s] DEBUG: XServer 0: Connecting to XServer :0
[+1.16s] DEBUG: Seat seat0: Display server ready, starting session authentication
[+1.16s] DEBUG: Session pid=640: Started with service 'lightdm-autologin', username 'martinit'
[+1.22s] DEBUG: Session pid=640: Authentication complete with return value 0: Success
[+1.22s] DEBUG: Seat seat0: Session authenticated, running command
[+1.22s] DEBUG: Registering session with bus path /org/freedesktop/DisplayManager/Session0
[+1.22s] DEBUG: Session pid=640: Running command /etc/lightdm/Xsession i3
[+1.22s] DEBUG: Creating shared data directory /var/lib/lightdm-data/martinit
[+1.22s] DEBUG: Session pid=640: Logging to .xsession-errors
[+1.46s] DEBUG: Activating VT 7
[+1.46s] DEBUG: Activating login1 session 1
[+1.46s] DEBUG: Seat seat0 changes active session to 1
[+1.46s] DEBUG: Session 1 is already active
[+1.70s] DEBUG: Session pid=640: Exited with return value 1
[+1.70s] DEBUG: Seat seat0: Session stopped
[+1.70s] DEBUG: Seat seat0: Stopping display server, no sessions require it
[+1.70s] DEBUG: Sending signal 15 to process 503
[+1.72s] DEBUG: Seat seat0 changes active session to
[+2.62s] DEBUG: Process 503 terminated with signal 6
[+2.62s] DEBUG: XServer 0: X server stopped
[+2.62s] DEBUG: Releasing VT 7
[+2.62s] DEBUG: XServer 0: Removing X server authority /run/lightdm/root/:0
[+2.62s] DEBUG: Seat seat0: Display server stopped
[+2.62s] DEBUG: Seat seat0: Active display server stopped, starting greeter
[+2.62s] DEBUG: Seat seat0: Creating greeter session
[+2.64s] DEBUG: Seat seat0: Creating display server of type x
[+2.64s] DEBUG: Using VT 7
[+2.64s] DEBUG: Seat seat0: Starting local X display on VT 7
[+2.64s] DEBUG: XServer 0: Logging to /var/log/lightdm/x-0.log
[+2.64s] DEBUG: XServer 0: Writing X server authority to /run/lightdm/root/:0
[+2.64s] DEBUG: XServer 0: Launching X Server
[+2.65s] DEBUG: Launching process 666: /usr/bin/X :0 -seat seat0 -auth /run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
[+2.65s] DEBUG: XServer 0: Waiting for ready signal from X server :0
[+3.64s] DEBUG: Got signal 10 from process 666
[+3.64s] DEBUG: XServer 0: Got signal from X server :0
[+3.64s] DEBUG: XServer 0: Connecting to XServer :0
[+3.64s] DEBUG: Seat seat0: Display server ready, starting session authentication
[+3.64s] DEBUG: Session pid=690: Started with service 'lightdm-greeter', username 'lightdm'
[+3.67s] DEBUG: Session pid=690: Authentication complete with return value 0: Success
[+3.67s] DEBUG: Seat seat0: Session authenticated, running command
[+3.67s] DEBUG: Session pid=690: Running command /usr/bin/lightdm-gtk-greeter
[+3.67s] DEBUG: Creating shared data directory /var/lib/lightdm-data/lightdm
[+3.67s] DEBUG: Session pid=690: Logging to /var/log/lightdm/seat0-greeter.log
[+3.77s] DEBUG: Activating VT 7
[+3.77s] DEBUG: Activating login1 session c1
[+3.77s] DEBUG: Seat seat0 changes active session to c1
[+3.77s] DEBUG: Session c1 is already active
[+3.97s] DEBUG: Greeter connected version=1.30.0 api=1 resettable=false
[+4.13s] DEBUG: Greeter start authentication for martinit
[+4.13s] DEBUG: Session pid=749: Started with service 'lightdm', username 'martinit'
[+4.14s] DEBUG: Session pid=749: Got 1 message(s) from PAM
[+4.14s] DEBUG: Prompt greeter with 1 message(s)
[+15.31s] DEBUG: Continue authentication
[+15.32s] DEBUG: Session pid=749: Authentication complete with return value 0: Success
[+15.32s] DEBUG: Authenticate result for user martinit: Success
[+15.32s] DEBUG: User martinit authorized
[+15.36s] DEBUG: Greeter requests session i3
[+15.36s] DEBUG: Seat seat0: Stopping greeter; display server will be re-used for user session
[+15.36s] DEBUG: Terminating login1 session c1
[+15.36s] DEBUG: Session pid=690: Sending SIGTERM
[+15.40s] DEBUG: Greeter closed communication channel
[+15.40s] DEBUG: Session pid=690: Exited with return value 0
[+15.40s] DEBUG: Seat seat0: Session stopped
[+15.40s] DEBUG: Seat seat0: Greeter stopped, running session
[+15.40s] DEBUG: Registering session with bus path /org/freedesktop/DisplayManager/Session1
[+15.40s] DEBUG: Session pid=749: Running command /etc/lightdm/Xsession i3
[+15.40s] DEBUG: Creating shared data directory /var/lib/lightdm-data/martinit
[+15.40s] DEBUG: Session pid=749: Logging to .xsession-errors
[+15.56s] DEBUG: Activating VT 7
[+15.56s] DEBUG: Activating login1 session 4
[+15.56s] DEBUG: Seat seat0 changes active session to
[+15.56s] DEBUG: Seat seat0 changes active session to 4
[+15.56s] DEBUG: Session 4 is already active

能看出什么问题吗?

离线

#4 2021-12-25 15:58:37

xiao80
会员
注册时间: 2021-11-14
帖子: 66

Re: lightdm+i3wm无法自动登录

[+1.16s] DEBUG: Session pid=640: Started with service 'lightdm-autologin', username 'martinit'
[+1.22s] DEBUG: Session pid=640: Authentication complete with return value 0: Success
[+1.22s] DEBUG: Seat seat0: Session authenticated, running command
[+1.22s] DEBUG: Registering session with bus path /org/freedesktop/DisplayManager/Session0
[+1.22s] DEBUG: Session pid=640: Running command /etc/lightdm/Xsession i3
[+1.22s] DEBUG: Creating shared data directory /var/lib/lightdm-data/martinit
[+1.22s] DEBUG: Session pid=640: Logging to .xsession-errors
[+1.46s] DEBUG: Activating VT 7
[+1.46s] DEBUG: Activating login1 session 1
[+1.46s] DEBUG: Seat seat0 changes active session to 1
[+1.46s] DEBUG: Session 1 is already active
[+1.70s] DEBUG: Session pid=640: Exited with return value 1

正常的自动登录的日志是到这里的倒数第二行就截止了,不懂为啥你这里运行的怎么就多出了这最后一行又终止了 pid=640,这也太突然了。

会不会是不是 wiki 里提到的这个原因呢?
If autologin fails with a blank screen or if the login screen immediately returns, you may need to set logind-check-graphical=true.

离线

#5 2021-12-25 16:15:52

martinit
会员
注册时间: 2021-07-03
帖子: 41

Re: lightdm+i3wm无法自动登录

xiao80 说:

[+1.16s] DEBUG: Session pid=640: Started with service 'lightdm-autologin', username 'martinit'
[+1.22s] DEBUG: Session pid=640: Authentication complete with return value 0: Success
[+1.22s] DEBUG: Seat seat0: Session authenticated, running command
[+1.22s] DEBUG: Registering session with bus path /org/freedesktop/DisplayManager/Session0
[+1.22s] DEBUG: Session pid=640: Running command /etc/lightdm/Xsession i3
[+1.22s] DEBUG: Creating shared data directory /var/lib/lightdm-data/martinit
[+1.22s] DEBUG: Session pid=640: Logging to .xsession-errors
[+1.46s] DEBUG: Activating VT 7
[+1.46s] DEBUG: Activating login1 session 1
[+1.46s] DEBUG: Seat seat0 changes active session to 1
[+1.46s] DEBUG: Session 1 is already active
[+1.70s] DEBUG: Session pid=640: Exited with return value 1

正常的自动登录的日志是到这里的倒数第二行就截止了,不懂为啥你这里运行的怎么就多出了这最后一行又终止了 pid=640,这也太突然了。

会不会是不是 wiki 里提到的这个原因呢?
If autologin fails with a blank screen or if the login screen immediately returns, you may need to set logind-check-graphical=true.

尝试了一下,还是不行。。。
log如下,貌似还是一样的。。。。。

log/lightdm/lightdm.log
[+0.00s] DEBUG: Logging to /var/log/lightdm/lightdm.log
[+0.00s] DEBUG: Starting Light Display Manager 1.30.0, UID=0 PID=508
[+0.00s] DEBUG: Loading configuration dirs from /usr/share/lightdm/lightdm.conf.d
[+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: Registered seat module local
[+0.00s] DEBUG: Registered seat module xremote
[+0.00s] DEBUG: Using D-Bus name org.freedesktop.DisplayManager
[+0.01s] DEBUG: _g_io_module_get_default: Found default implementation local (GLocalVfs) for ‘gio-vfs’
[+0.01s] DEBUG: Monitoring logind for seats
[+0.01s] DEBUG: New seat added from logind: seat0
[+0.01s] DEBUG: Seat seat0: Loading properties from config section Seat:*
[+0.01s] DEBUG: Seat seat0 has property CanMultiSession=no
[+0.01s] DEBUG: Seat seat0: Starting
[+0.01s] DEBUG: Seat seat0: Creating user session
[+0.01s] WARNING: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts was not provided by any .service files
[+0.01s] DEBUG: Loading user config from /etc/lightdm/users.conf
[+0.01s] DEBUG: User martinit added
[+0.02s] DEBUG: Seat seat0: Creating display server of type x
[+0.02s] DEBUG: Could not run plymouth --ping: Failed to execute child process “plymouth” (No such file or directory)
[+0.02s] DEBUG: Using VT 7
[+0.02s] DEBUG: Seat seat0: Starting local X display on VT 7
[+0.02s] DEBUG: XServer 0: Logging to /var/log/lightdm/x-0.log
[+0.02s] DEBUG: XServer 0: Writing X server authority to /run/lightdm/root/:0
[+0.02s] DEBUG: XServer 0: Launching X Server
[+0.02s] DEBUG: Launching process 533: /usr/bin/X :0 -seat seat0 -auth /run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
[+0.02s] DEBUG: XServer 0: Waiting for ready signal from X server :0
[+0.02s] DEBUG: Acquired bus name org.freedesktop.DisplayManager
[+0.02s] DEBUG: Registering seat with bus path /org/freedesktop/DisplayManager/Seat0
[+1.05s] DEBUG: Got signal 10 from process 533
[+1.05s] DEBUG: XServer 0: Got signal from X server :0
[+1.05s] DEBUG: XServer 0: Connecting to XServer :0
[+1.24s] DEBUG: Seat seat0: Display server ready, starting session authentication
[+1.24s] DEBUG: Session pid=663: Started with service 'lightdm-autologin', username 'martinit'
[+1.30s] DEBUG: Session pid=663: Authentication complete with return value 0: Success
[+1.30s] DEBUG: Seat seat0: Session authenticated, running command
[+1.30s] DEBUG: Registering session with bus path /org/freedesktop/DisplayManager/Session0
[+1.30s] DEBUG: Session pid=663: Running command /etc/lightdm/Xsession i3
[+1.30s] DEBUG: Creating shared data directory /var/lib/lightdm-data/martinit
[+1.30s] DEBUG: Session pid=663: Logging to .xsession-errors
[+1.51s] DEBUG: Activating VT 7
[+1.51s] DEBUG: Activating login1 session 1
[+1.51s] DEBUG: Seat seat0 changes active session to 1
[+1.51s] DEBUG: Session 1 is already active
[+1.79s] DEBUG: Session pid=663: Exited with return value 1
[+1.79s] DEBUG: Seat seat0: Session stopped
[+1.79s] DEBUG: Seat seat0: Stopping display server, no sessions require it
[+1.79s] DEBUG: Sending signal 15 to process 533
[+1.80s] DEBUG: Seat seat0 changes active session to
[+2.71s] DEBUG: Process 533 terminated with signal 6
[+2.71s] DEBUG: XServer 0: X server stopped
[+2.71s] DEBUG: Releasing VT 7
[+2.71s] DEBUG: XServer 0: Removing X server authority /run/lightdm/root/:0
[+2.71s] DEBUG: Seat seat0: Display server stopped
[+2.71s] DEBUG: Seat seat0: Active display server stopped, starting greeter
[+2.71s] DEBUG: Seat seat0: Creating greeter session
[+2.73s] DEBUG: Seat seat0: Creating display server of type x
[+2.73s] DEBUG: Using VT 7
[+2.73s] DEBUG: Seat seat0: Starting local X display on VT 7
[+2.73s] DEBUG: XServer 0: Logging to /var/log/lightdm/x-0.log
[+2.73s] DEBUG: XServer 0: Writing X server authority to /run/lightdm/root/:0
[+2.73s] DEBUG: XServer 0: Launching X Server
[+2.73s] DEBUG: Launching process 691: /usr/bin/X :0 -seat seat0 -auth /run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
[+2.73s] DEBUG: XServer 0: Waiting for ready signal from X server :0
[+3.57s] DEBUG: Got signal 10 from process 691
[+3.57s] DEBUG: XServer 0: Got signal from X server :0
[+3.57s] DEBUG: XServer 0: Connecting to XServer :0
[+3.57s] DEBUG: Seat seat0: Display server ready, starting session authentication
[+3.57s] DEBUG: Session pid=700: Started with service 'lightdm-greeter', username 'lightdm'
[+3.61s] DEBUG: Session pid=700: Authentication complete with return value 0: Success
[+3.61s] DEBUG: Seat seat0: Session authenticated, running command
[+3.61s] DEBUG: Session pid=700: Running command /usr/bin/lightdm-gtk-greeter
[+3.61s] DEBUG: Creating shared data directory /var/lib/lightdm-data/lightdm
[+3.61s] DEBUG: Session pid=700: Logging to /var/log/lightdm/seat0-greeter.log
[+3.71s] DEBUG: Activating VT 7
[+3.71s] DEBUG: Activating login1 session c1
[+3.71s] DEBUG: Seat seat0 changes active session to c1
[+3.71s] DEBUG: Session c1 is already active
[+3.91s] DEBUG: Greeter connected version=1.30.0 api=1 resettable=false
[+4.10s] DEBUG: Greeter start authentication for martinit
[+4.10s] DEBUG: Session pid=743: Started with service 'lightdm', username 'martinit'
[+4.11s] DEBUG: Session pid=743: Got 1 message(s) from PAM
[+4.11s] DEBUG: Prompt greeter with 1 message(s)
[+37.91s] DEBUG: Continue authentication
[+37.93s] DEBUG: Session pid=743: Authentication complete with return value 0: Success
[+37.93s] DEBUG: Authenticate result for user martinit: Success
[+37.93s] DEBUG: User martinit authorized
[+37.96s] DEBUG: Greeter requests session i3
[+37.96s] DEBUG: Seat seat0: Stopping greeter; display server will be re-used for user session
[+37.96s] DEBUG: Terminating login1 session c1
[+37.97s] DEBUG: Session pid=700: Sending SIGTERM
[+38.00s] DEBUG: Greeter closed communication channel
[+38.01s] DEBUG: Session pid=700: Exited with return value 0
[+38.01s] DEBUG: Seat seat0: Session stopped
[+38.01s] DEBUG: Seat seat0: Greeter stopped, running session
[+38.01s] DEBUG: Registering session with bus path /org/freedesktop/DisplayManager/Session1
[+38.01s] DEBUG: Session pid=743: Running command /etc/lightdm/Xsession i3
[+38.01s] DEBUG: Creating shared data directory /var/lib/lightdm-data/martinit
[+38.01s] DEBUG: Session pid=743: Logging to .xsession-errors
[+38.10s] DEBUG: Activating VT 7
[+38.10s] DEBUG: Activating login1 session 4
[+38.10s] DEBUG: Seat seat0 changes active session to
[+38.10s] DEBUG: Seat seat0 changes active session to 4
[+38.10s] DEBUG: Session 4 is already active

离线

#6 2021-12-25 17:01:06

martinit
会员
注册时间: 2021-07-03
帖子: 41

Re: lightdm+i3wm无法自动登录

我又看到以下错误,有没有什么关系呢

❯ cat /var/log/lightdm/seat0-greeter.log
** Message: 16:57:23.338: Starting lightdm-gtk-greeter 2.0.8 (Jul  4 2020, 16:10:34)
** Message: 16:57:23.343: [Configuration] Reading file: /etc/lightdm/lightdm-gtk-greeter.conf

** (lightdm-gtk-greeter:703): WARNING **: 16:57:23.526: [PIDs] Failed to execute command: /usr/libexec/at-spi-bus-launcher

** (lightdm-gtk-greeter:703): WARNING **: 16:57:23.527: [PIDs] Failed to execute command: systemd

(lightdm-gtk-greeter:703): Gtk-WARNING **: 16:57:23.722: Drawing a gadget with negative dimensions. Did you forget to allocate a size? (node menubar owner GreeterMenuBar)

(lightdm-gtk-greeter:703): Gtk-WARNING **: 16:57:27.220: Drawing a gadget with negative dimensions. Did you forget to allocate a size? (node menubar owner GreeterMenuBar)

(lightdm-gtk-greeter:703): Gtk-WARNING **: 16:57:27.234: Drawing a gadget with negative dimensions. Did you forget to allocate a size? (node menubar owner GreeterMenuBar)

离线

#7 2021-12-25 18:05:43

xiao80
会员
注册时间: 2021-11-14
帖子: 66

Re: lightdm+i3wm无法自动登录

这个应该没啥关系吧,登录界面的日志就是这样的。

感觉现在的问题在于,明明自动登录成功后,为啥很快的以 1 退出了,又返回到登录界面了。

可以试下重启后,以密码登录后,看下 .xsession-errors.old 里有没有异常的东西,它应该记录了自动登录过程中 xsession 留下的日志。

离线

#8 2021-12-25 19:02:54

martinit
会员
注册时间: 2021-07-03
帖子: 41

Re: lightdm+i3wm无法自动登录

xiao80 说:

这个应该没啥关系吧,登录界面的日志就是这样的。

感觉现在的问题在于,明明自动登录成功后,为啥很快的以 1 退出了,又返回到登录界面了。

可以试下重启后,以密码登录后,看下 .xsession-errors.old 里有没有异常的东西,它应该记录了自动登录过程中 xsession 留下的日志。

貌似找到问题了,这是怎么个情况呢

X connection to :0 broken (explicit kill or server shutdown).
i3: Cannot open display

离线

#9 2021-12-25 19:29:00

xiao80
会员
注册时间: 2021-11-14
帖子: 66

Re: lightdm+i3wm无法自动登录

那你还有其他的session吗,试下其他的 session 能不能自动登录呢。

离线

#10 2021-12-25 19:48:29

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,384
个人网站

Re: lightdm+i3wm无法自动登录

martinit 说:
xiao80 说:

这个应该没啥关系吧,登录界面的日志就是这样的。

感觉现在的问题在于,明明自动登录成功后,为啥很快的以 1 退出了,又返回到登录界面了。

可以试下重启后,以密码登录后,看下 .xsession-errors.old 里有没有异常的东西,它应该记录了自动登录过程中 xsession 留下的日志。

貌似找到问题了,这是怎么个情况呢

X connection to :0 broken (explicit kill or server shutdown).
i3: Cannot open display

去看看你的 Xorg 是怎么了呗,日志文件应该是那个跟 lightdm 在一起的 x-0.log。

离线

#11 2021-12-25 19:59:42

martinit
会员
注册时间: 2021-07-03
帖子: 41

Re: lightdm+i3wm无法自动登录

xiao80 说:

那你还有其他的session吗,试下其他的 session 能不能自动登录呢。

怎么开。。我不太懂。。。这个机器只装了i3

离线

#12 2021-12-25 20:03:51

martinit
会员
注册时间: 2021-07-03
帖子: 41

Re: lightdm+i3wm无法自动登录

依云 说:
martinit 说:
xiao80 说:

这个应该没啥关系吧,登录界面的日志就是这样的。

感觉现在的问题在于,明明自动登录成功后,为啥很快的以 1 退出了,又返回到登录界面了。

可以试下重启后,以密码登录后,看下 .xsession-errors.old 里有没有异常的东西,它应该记录了自动登录过程中 xsession 留下的日志。

貌似找到问题了,这是怎么个情况呢

X connection to :0 broken (explicit kill or server shutdown).
i3: Cannot open display

去看看你的 Xorg 是怎么了呗,日志文件应该是那个跟 lightdm 在一起的 x-0.log。

$ cat x-0.log

X.Org X Server 1.21.1.2
X Protocol Version 11, Revision 0
Current Operating System: Linux arch 5.15.11-arch2-1 #1 SMP PREEMPT Wed, 22 Dec 2021 09:23:54 +0000 x86_64
Kernel command line: BOOT_IMAGE=/vmlinuz-linux root=UUID=898fce3b-efef-46f4-8adc-a154b61257ff rw loglevel=3 quiet

Current version of pixman: 0.40.0
	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: Sat Dec 25 19:58:06 2021
(==) Using config directory: "/etc/X11/xorg.conf.d"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(EE) event14 - Logitech MX Keys: client bug: event processing lagging behind by 11ms, your system is too slow
$ cat x-0.log.old

X.Org X Server 1.21.1.2
X Protocol Version 11, Revision 0
Current Operating System: Linux arch 5.15.11-arch2-1 #1 SMP PREEMPT Wed, 22 Dec 2021 09:23:54 +0000 x86_64
Kernel command line: BOOT_IMAGE=/vmlinuz-linux root=UUID=898fce3b-efef-46f4-8adc-a154b61257ff rw loglevel=3 quiet

Current version of pixman: 0.40.0
	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: Sat Dec 25 19:58:03 2021
(==) Using config directory: "/etc/X11/xorg.conf.d"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
Xorg: ../xorg-server-21.1.2/dix/privates.c:382: dixRegisterPrivateKey: Assertion `!global_keys[type].created' failed.
(EE)
(EE) Backtrace:
(EE) 0: /usr/lib/Xorg (xorg_backtrace+0x89) [0x557e09dbd059]
(EE) 1: /usr/lib/Xorg (0x557e09c6d000+0x15ae79) [0x557e09dc7e79]
(EE) 2: /usr/lib/libpthread.so.0 (0x7f7a5f6ff000+0x13870) [0x7f7a5f712870]
(EE) 3: /usr/lib/libc.so.6 (gsignal+0x142) [0x7f7a5f56ad22]
(EE) 4: /usr/lib/libc.so.6 (abort+0x116) [0x7f7a5f554862]
(EE) 5: /usr/lib/libc.so.6 (0x7f7a5f52e000+0x26747) [0x7f7a5f554747]
(EE) 6: /usr/lib/libc.so.6 (0x7f7a5f52e000+0x35616) [0x7f7a5f563616]
(EE) 7: /usr/lib/Xorg (0x557e09c6d000+0x9be19) [0x557e09d08e19]
(EE) 8: /usr/lib/xorg/modules/libglamoregl.so (glamor_init+0xcf) [0x7f7a5977a8cf]
(EE) 9: /usr/lib/xorg/modules/drivers/modesetting_drv.so (0x7f7a597e9000+0xf261) [0x7f7a597f8261]
(EE) 10: /usr/lib/Xorg (AddGPUScreen+0x10e) [0x557e09cea54e]
(EE) 11: /usr/lib/Xorg (0x557e09c6d000+0x18f909) [0x557e09dfc909]
(EE) 12: /usr/lib/Xorg (0x557e09c6d000+0x1aee14) [0x557e09e1be14]
(EE) 13: /usr/lib/Xorg (0x557e09c6d000+0x1d34c1) [0x557e09e404c1]
(EE) 14: /usr/lib/Xorg (0x557e09c6d000+0x1d3a90) [0x557e09e40a90]
(EE) 15: /usr/lib/Xorg (0x557e09c6d000+0x1535f1) [0x557e09dc05f1]
(EE) 16: /usr/lib/Xorg (WaitForSomething+0x1e0) [0x557e09dbb620]
(EE) 17: /usr/lib/Xorg (0x557e09c6d000+0x3c83b) [0x557e09ca983b]
(EE) 18: /usr/lib/libc.so.6 (__libc_start_main+0xd5) [0x7f7a5f555b25]
(EE) 19: /usr/lib/Xorg (_start+0x2e) [0x557e09caa75e]
(EE)
(EE)
Fatal server error:
(EE) Caught signal 6 (Aborted). Server aborting
(EE)
(EE)
Please consult the The X.Org Foundation support
	 at http://wiki.x.org
 for help.
(EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
(EE)
(II) AIGLX: Suspending AIGLX clients for VT switch
(EE) Server terminated with error (1). Closing log file.

emm这一大串backtrace不是每次开机都有的。。。

最近编辑记录 martinit (2021-12-25 20:37:57)

离线

#13 2021-12-25 21:16:43

martinit
会员
注册时间: 2021-07-03
帖子: 41

Re: lightdm+i3wm无法自动登录

折腾一圈儿,破案了。。。。。我装了nvidia专有驱动就好了。
我的笔记本是intel的核显+nv的独显,由于是老本子我就没打算用独显(MX130,跟核显差不多性能),就只安装了intel的显卡驱动,这时lspci里写的nv用的驱动是nouveau
但是,这是为啥呢

离线

#14 2021-12-25 21:27:33

xiao80
会员
注册时间: 2021-11-14
帖子: 66

Re: lightdm+i3wm无法自动登录

你说这一大串backtrace不是每次开机都有的。。。

我觉得

可能系统启动太快了,LightDM 服务在图形驱动加载前就启动了。如果是这样,将下面配置加入 lightdm.conf 文件:

   [LightDM]
   logind-check-graphical=true

设置后 LightDM 会等待图形驱动加载完成后再启动 greeters/autostarting 会话。

可能还是和这个有关。

或者尝试

/etc/mkinitcpio.conf:
MODULES=(nouveau)

离线

#15 2021-12-25 21:28:44

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,384
个人网站

Re: lightdm+i3wm无法自动登录

Xorg 的 modesetting 驱动挂了。应该是它的 bug 吧。

离线

页脚