You are not logged in.

#1 2022-04-20 14:32:51

smiletolerantly
Member
Registered: 2022-04-20
Posts: 2

[SOLVED] LightDM and i3 working individually, but LDM won't start i3

I'm posting this in the Newbie Corner, because I'm 100% certain this is going to be something stupid I overlooked.

I recently moved my installation to new hardware, following the  Bottom-Up Migration Guide from the wiki. Worked perfectly. Among everything else, both i3 and LightDM worked "out of the box" after restoring their respective configs.

The only issue is: They refuse to play nice with each other. Logging in through LightDM results in a half-second of black screen, then I'm back at the login screen.

sudo systemctl enable --now lightdm enables and launches LightDM, with my chosen theme. Logging in works, and my config (located at /etc/lightdm/lightdm.conf) is definitely being used, as /var/log/lightdm/lightdm.log (posted below) confirms execution of my display-setup-script.

[+0.00s] DEBUG: Logging to /var/log/lightdm/lightdm.log
[+0.00s] DEBUG: Starting Light Display Manager 1.30.0, UID=0 PID=31149
[+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 greeter session
[+0.00s] DEBUG: Seat seat0: Creating display server of type x
[+0.00s] DEBUG: Could not run plymouth --ping: Failed to execute child process “plymouth” (No such file or directory)
[+0.00s] DEBUG: Using VT 7
[+0.00s] DEBUG: Seat seat0: Starting local X display on VT 7
[+0.00s] DEBUG: XServer 0: Logging to /var/log/lightdm/x-0.log
[+0.00s] DEBUG: XServer 0: Writing X server authority to /run/lightdm/root/:0
[+0.00s] DEBUG: XServer 0: Launching X Server
[+0.00s] DEBUG: Launching process 31155: /usr/bin/X :0 -seat seat0 -auth /run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
[+0.00s] DEBUG: XServer 0: Waiting for ready signal from X server :0
[+0.00s] DEBUG: Acquired bus name org.freedesktop.DisplayManager
[+0.00s] DEBUG: Registering seat with bus path /org/freedesktop/DisplayManager/Seat0
[+0.02s] DEBUG: Loading users from org.freedesktop.Accounts
[+0.02s] DEBUG: User /org/freedesktop/Accounts/User1000 added
[+0.74s] DEBUG: Got signal 10 from process 31155
[+0.74s] DEBUG: XServer 0: Got signal from X server :0
[+0.74s] DEBUG: XServer 0: Connecting to XServer :0
[+0.74s] DEBUG: Launching process 31185: /home/charlotte/.config/i3/mouseposition.sh
[+0.74s] DEBUG: Process 31185 exited with return value 0
[+0.74s] DEBUG: Seat seat0: Exit status of /home/charlotte/.config/i3/mouseposition.sh: 0
[+0.74s] DEBUG: Seat seat0: Display server ready, starting session authentication
[+0.74s] DEBUG: Session pid=31188: Started with service 'lightdm-greeter', username 'lightdm'
[+0.75s] DEBUG: Session pid=31188: Authentication complete with return value 0: Success
[+0.75s] DEBUG: Seat seat0: Session authenticated, running command
[+0.75s] DEBUG: Session pid=31188: Running command /usr/bin/lightdm-webkit2-greeter
[+0.75s] DEBUG: Creating shared data directory /var/lib/lightdm-data/lightdm
[+0.75s] DEBUG: Session pid=31188: Logging to /var/log/lightdm/seat0-greeter.log
[+0.81s] DEBUG: Activating VT 7
[+0.81s] DEBUG: Activating login1 session c1
[+0.81s] DEBUG: Seat seat0 changes active session to c1
[+0.81s] DEBUG: Session c1 is already active
[+1.02s] DEBUG: Greeter connected version=1.30.0 api=1 resettable=false
[+1.19s] DEBUG: Greeter start authentication for charlotte
[+1.19s] DEBUG: Session pid=31296: Started with service 'lightdm', username 'charlotte'
[+1.19s] DEBUG: Session pid=31296: Got 1 message(s) from PAM
[+1.19s] DEBUG: Prompt greeter with 1 message(s)
[+4.47s] DEBUG: Continue authentication
[+4.48s] DEBUG: Session pid=31296: Authentication complete with return value 0: Success
[+4.48s] DEBUG: Authenticate result for user charlotte: Success
[+4.48s] DEBUG: User charlotte authorized
[+4.48s] DEBUG: Greeter requests session i3
[+4.48s] DEBUG: Seat seat0: Stopping greeter; display server will be re-used for user session
[+4.48s] DEBUG: Terminating login1 session c1
[+4.48s] DEBUG: Session pid=31188: Sending SIGTERM
[+4.49s] DEBUG: Greeter closed communication channel
[+4.49s] DEBUG: Session pid=31188: Exited with return value 0
[+4.49s] DEBUG: Seat seat0: Session stopped
[+4.49s] DEBUG: Seat seat0: Greeter stopped, running session
[+4.49s] DEBUG: Registering session with bus path /org/freedesktop/DisplayManager/Session0
[+4.49s] DEBUG: Session pid=31296: Running command /etc/lightdm/Xsession i3
[+4.49s] DEBUG: Creating shared data directory /var/lib/lightdm-data/charlotte
[+4.49s] DEBUG: Session pid=31296: Logging to .xsession-errors
[+4.49s] DEBUG: Activating VT 7
[+4.49s] DEBUG: Activating login1 session 4
[+4.49s] DEBUG: Seat seat0 changes active session to 4
[+4.49s] DEBUG: Session 4 is already active
[+4.50s] DEBUG: Session pid=31296: Exited with return value 1
[+4.50s] DEBUG: Seat seat0: Session stopped
[+4.50s] DEBUG: Seat seat0: Stopping display server, no sessions require it
[+4.50s] DEBUG: Sending signal 15 to process 31155
[+4.51s] DEBUG: Seat seat0 changes active session to
[+4.81s] DEBUG: Process 31155 exited with return value 0
[+4.81s] DEBUG: XServer 0: X server stopped
[+4.81s] DEBUG: Releasing VT 7
[+4.81s] DEBUG: XServer 0: Removing X server authority /run/lightdm/root/:0
[+4.81s] DEBUG: Seat seat0: Display server stopped
[+4.81s] DEBUG: Seat seat0: Active display server stopped, starting greeter
[+4.81s] DEBUG: Seat seat0: Creating greeter session
[+4.81s] DEBUG: Seat seat0: Creating display server of type x
[+4.81s] DEBUG: Using VT 7
[+4.81s] DEBUG: Seat seat0: Starting local X display on VT 7
[+4.81s] DEBUG: XServer 0: Logging to /var/log/lightdm/x-0.log
[+4.81s] DEBUG: XServer 0: Writing X server authority to /run/lightdm/root/:0
[+4.81s] DEBUG: XServer 0: Launching X Server
[+4.81s] DEBUG: Launching process 31311: /usr/bin/X :0 -seat seat0 -auth /run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
[+4.81s] DEBUG: XServer 0: Waiting for ready signal from X server :0
[+5.48s] DEBUG: Got signal 10 from process 31311
[+5.48s] DEBUG: XServer 0: Got signal from X server :0
[+5.48s] DEBUG: XServer 0: Connecting to XServer :0
[+5.49s] DEBUG: Launching process 31330: /home/charlotte/.config/i3/mouseposition.sh
[+5.49s] DEBUG: Process 31330 exited with return value 0
[+5.49s] DEBUG: Seat seat0: Exit status of /home/charlotte/.config/i3/mouseposition.sh: 0
[+5.49s] DEBUG: Seat seat0: Display server ready, starting session authentication
[+5.49s] DEBUG: Session pid=31333: Started with service 'lightdm-greeter', username 'lightdm'
[+5.49s] DEBUG: Session pid=31333: Authentication complete with return value 0: Success
[+5.49s] DEBUG: Seat seat0: Session authenticated, running command
[+5.49s] DEBUG: Session pid=31333: Running command /usr/bin/lightdm-webkit2-greeter
[+5.49s] DEBUG: Creating shared data directory /var/lib/lightdm-data/lightdm
[+5.49s] DEBUG: Session pid=31333: Logging to /var/log/lightdm/seat0-greeter.log
[+5.50s] DEBUG: Activating VT 7
[+5.50s] DEBUG: Activating login1 session c2
[+5.50s] DEBUG: Seat seat0 changes active session to c2
[+5.50s] DEBUG: Session c2 is already active
[+5.62s] DEBUG: Greeter connected version=1.30.0 api=1 resettable=false
[+5.72s] DEBUG: Greeter start authentication for charlotte
[+5.72s] DEBUG: Session pid=31408: Started with service 'lightdm', username 'charlotte'
[+5.72s] DEBUG: Session pid=31408: Got 1 message(s) from PAM
[+5.72s] DEBUG: Prompt greeter with 1 message(s)
[+12.74s] DEBUG: Seat seat0 changes active session to
[+18.25s] DEBUG: Seat seat0 changes active session to c2
[+18.25s] DEBUG: Session c2 is already active
[+24.28s] DEBUG: Seat seat0 changes active session to
[+28.57s] DEBUG: Seat seat0 changes active session to 5
[+90.43s] DEBUG: Seat seat0 changes active session to c2
[+90.43s] DEBUG: Session c2 is already active
[+93.84s] DEBUG: Continue authentication
[+93.84s] DEBUG: Session pid=31408: Authentication complete with return value 0: Success
[+93.84s] DEBUG: Authenticate result for user charlotte: Success
[+93.84s] DEBUG: User charlotte authorized
[+93.84s] DEBUG: Greeter requests session i3
[+93.84s] DEBUG: Seat seat0: Stopping greeter; display server will be re-used for user session
[+93.84s] DEBUG: Terminating login1 session c2
[+93.84s] DEBUG: Session pid=31333: Sending SIGTERM
[+93.85s] DEBUG: Greeter closed communication channel
[+93.85s] DEBUG: Session pid=31333: Exited with return value 0
[+93.85s] DEBUG: Seat seat0: Session stopped
[+93.85s] DEBUG: Seat seat0: Greeter stopped, running session
[+93.85s] DEBUG: Registering session with bus path /org/freedesktop/DisplayManager/Session1
[+93.85s] DEBUG: Session pid=31408: Running command /etc/lightdm/Xsession i3
[+93.85s] DEBUG: Creating shared data directory /var/lib/lightdm-data/charlotte
[+93.85s] DEBUG: Session pid=31408: Logging to .xsession-errors
[+93.85s] DEBUG: Activating VT 7
[+93.85s] DEBUG: Activating login1 session 7
[+93.85s] DEBUG: Seat seat0 changes active session to 7
[+93.85s] DEBUG: Session 7 is already active
[+93.86s] DEBUG: Session pid=31408: Exited with return value 1
[+93.86s] DEBUG: Seat seat0: Session stopped
[+93.86s] DEBUG: Seat seat0: Stopping display server, no sessions require it
[+93.86s] DEBUG: Sending signal 15 to process 31311
[+93.86s] DEBUG: Seat seat0 changes active session to
[+94.19s] DEBUG: Process 31311 exited with return value 0
[+94.19s] DEBUG: XServer 0: X server stopped
[+94.19s] DEBUG: Releasing VT 7
[+94.19s] DEBUG: XServer 0: Removing X server authority /run/lightdm/root/:0
[+94.19s] DEBUG: Seat seat0: Display server stopped
[+94.19s] DEBUG: Seat seat0: Active display server stopped, starting greeter
[+94.19s] DEBUG: Seat seat0: Creating greeter session
[+94.19s] DEBUG: Seat seat0: Creating display server of type x
[+94.19s] DEBUG: Using VT 7
[+94.19s] DEBUG: Seat seat0: Starting local X display on VT 7
[+94.19s] DEBUG: XServer 0: Logging to /var/log/lightdm/x-0.log
[+94.19s] DEBUG: XServer 0: Writing X server authority to /run/lightdm/root/:0
[+94.19s] DEBUG: XServer 0: Launching X Server
[+94.19s] DEBUG: Launching process 31538: /usr/bin/X :0 -seat seat0 -auth /run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
[+94.19s] DEBUG: XServer 0: Waiting for ready signal from X server :0
[+94.89s] DEBUG: Got signal 10 from process 31538
[+94.89s] DEBUG: XServer 0: Got signal from X server :0
[+94.89s] DEBUG: XServer 0: Connecting to XServer :0
[+94.89s] DEBUG: Launching process 31557: /home/charlotte/.config/i3/mouseposition.sh
[+94.90s] DEBUG: Process 31557 exited with return value 0
[+94.90s] DEBUG: Seat seat0: Exit status of /home/charlotte/.config/i3/mouseposition.sh: 0
[+94.90s] DEBUG: Seat seat0: Display server ready, starting session authentication
[+94.90s] DEBUG: Session pid=31560: Started with service 'lightdm-greeter', username 'lightdm'
[+94.90s] DEBUG: Session pid=31560: Authentication complete with return value 0: Success
[+94.90s] DEBUG: Seat seat0: Session authenticated, running command
[+94.90s] DEBUG: Session pid=31560: Running command /usr/bin/lightdm-webkit2-greeter
[+94.90s] DEBUG: Creating shared data directory /var/lib/lightdm-data/lightdm
[+94.90s] DEBUG: Session pid=31560: Logging to /var/log/lightdm/seat0-greeter.log
[+94.91s] DEBUG: Activating VT 7
[+94.91s] DEBUG: Activating login1 session c3
[+94.91s] DEBUG: Seat seat0 changes active session to c3
[+94.91s] DEBUG: Session c3 is already active
[+95.03s] DEBUG: Greeter connected version=1.30.0 api=1 resettable=false
[+95.13s] DEBUG: Greeter start authentication for charlotte
[+95.13s] DEBUG: Session pid=31635: Started with service 'lightdm', username 'charlotte'
[+95.13s] DEBUG: Session pid=31635: Got 1 message(s) from PAM
[+95.13s] DEBUG: Prompt greeter with 1 message(s)
[+98.01s] DEBUG: Seat seat0 changes active session to 5

Here's the lightdm.conf:

#
# General configuration
#
# start-default-seat = True to always start one seat if none are defined in the configuration
# greeter-user = User to run greeter as
# minimum-display-number = Minimum display number to use for X servers
# minimum-vt = First VT to run displays on
# lock-memory = True to prevent memory from being paged to disk
# user-authority-in-system-dir = True if session authority should be in the system location
# guest-account-script = Script to be run to setup guest account
# logind-check-graphical = True to on start seats that are marked as graphical by logind
# log-directory = Directory to log information to
# run-directory = Directory to put running state in
# cache-directory = Directory to cache to
# sessions-directory = Directory to find sessions
# remote-sessions-directory = Directory to find remote sessions
# greeters-directory = Directory to find greeters
# backup-logs = True to move add a .old suffix to old log files when opening new ones
# dbus-service = True if LightDM provides a D-Bus service to control it
#
[LightDM]
#start-default-seat=true
#greeter-user=lightdm
#minimum-display-number=0
#minimum-vt=7 # Setting this to a value < 7 implies security issues, see FS#46799
#lock-memory=true
#user-authority-in-system-dir=false
#guest-account-script=guest-account
#logind-check-graphical=false
#log-directory=/var/log/lightdm
run-directory=/run/lightdm
#cache-directory=/var/cache/lightdm
#sessions-directory=/usr/share/lightdm/sessions:/usr/share/xsessions:/usr/share/wayland-sessions
#remote-sessions-directory=/usr/share/lightdm/remote-sessions
#greeters-directory=$XDG_DATA_DIRS/lightdm/greeters:$XDG_DATA_DIRS/xgreeters
#backup-logs=true
#dbus-service=true


#[Seat:*]
#
# Seat configuration
#
# Seat configuration is matched against the seat name glob in the section, for example:
# [Seat:*] matches all seats and is applied first.
# [Seat:seat0] matches the seat named "seat0".
# [Seat:seat-thin-client*] matches all seats that have names that start with "seat-thin-client".
#
# type = Seat type (local, xremote)
# pam-service = PAM service to use for login
# pam-autologin-service = PAM service to use for autologin
# pam-greeter-service = PAM service to use for greeters
# xserver-command = X server command to run (can also contain arguments e.g. X -special-option)
# xmir-command = Xmir server command to run (can also contain arguments e.g. Xmir -special-option)
# xserver-config = Config file to pass to X server
# xserver-layout = Layout to pass to X server
# xserver-allow-tcp = True if TCP/IP connections are allowed to this X server
# xserver-share = True if the X server is shared for both greeter and session
# xserver-hostname = Hostname of X server (only for type=xremote)
# xserver-display-number = Display number of X server (only for type=xremote)
# xdmcp-manager = XDMCP manager to connect to (implies xserver-allow-tcp=true)
# xdmcp-port = XDMCP UDP/IP port to communicate on
# xdmcp-key = Authentication key to use for XDM-AUTHENTICATION-1 (stored in keys.conf)
#greeter-session = lightdm-webkit2-greeter
# greeter-hide-users = True to hide the user list
# greeter-allow-guest = True if the greeter should show a guest login option
# greeter-show-manual-login = True if the greeter should offer a manual login option
# greeter-show-remote-login = True if the greeter should offer a remote login option
# user-session = Session to load for users
# allow-user-switching = True if allowed to switch users
# allow-guest = True if guest login is allowed
# guest-session = Session to load for guests (overrides user-session)
# session-wrapper = Wrapper script to run session with
# greeter-wrapper = Wrapper script to run greeter with
# guest-wrapper = Wrapper script to run guest sessions with
# display-setup-script = Script to run when starting a greeter session (runs as root)
# display-stopped-script = Script to run after stopping the display server (runs as root)
# greeter-setup-script = Script to run when starting a greeter (runs as root)
# session-setup-script = Script to run when starting a user session (runs as root)
# session-cleanup-script = Script to run when quitting a user session (runs as root)
# autologin-guest = True to log in as guest by default
# autologin-user = User to log in with by default (overrides autologin-guest)
# autologin-user-timeout = Number of seconds to wait before loading default user
# autologin-session = Session to load for automatic login (overrides user-session)
# autologin-in-background = True if autologin session should not be immediately activated
# exit-on-failure = True if the daemon should exit if this seat fails
#
[Seat:*]
#type=local
#pam-service=lightdm
#pam-autologin-service=lightdm-autologin
#pam-greeter-service=lightdm-greeter
#xserver-command=X
#xmir-command=Xmir
#xserver-config=
#xserver-layout=
#xserver-allow-tcp=false
#xserver-share=true
#xserver-hostname=
#xserver-display-number=
#xdmcp-manager=
#xdmcp-port=177
#xdmcp-key=
greeter-session=lightdm-webkit2-greeter
#greeter-hide-users=false
#greeter-allow-guest=true
#greeter-show-manual-login=false
#greeter-show-remote-login=true
user-session=/usr/bin/i3
#allow-user-switching=true
#allow-guest=true
#guest-session=
session-wrapper=/etc/lightdm/Xsession
#session-wrapper=/usr/bin/startx
#greeter-wrapper=lightdm-webkit2-greeter
#guest-wrapper=
display-setup-script=/home/charlotte/.config/i3/mouseposition.sh
#display-stopped-script=
#greeter-setup-script=
#session-setup-script=/home/charlotte/.config/i3/mouseposition.sh
#session-cleanup-script=
#autologin-guest=false
#autologin-user=
#autologin-user-timeout=0
#autologin-in-background=false
#autologin-session=
#exit-on-failure=false

#
# XDMCP Server configuration
#
# enabled = True if XDMCP connections should be allowed
# port = UDP/IP port to listen for connections on
# listen-address = Host/address to listen for XDMCP connections (use all addresses if not present)
# key = Authentication key to use for XDM-AUTHENTICATION-1 or blank to not use authentication (stored in keys.conf)
# hostname = Hostname to report to XDMCP clients (defaults to system hostname if unset)
#
# The authentication key is a 56 bit DES key specified in hex as 0xnnnnnnnnnnnnnn.  Alternatively
# it can be a word and the first 7 characters are used as the key.
#
[XDMCPServer]
#enabled=false
#port=177
#listen-address=
#key=
#hostname=

#
# VNC Server configuration
#
# enabled = True if VNC connections should be allowed
# command = Command to run Xvnc server with
# port = TCP/IP port to listen for connections on
# listen-address = Host/address to listen for VNC connections (use all addresses if not present)
# width = Width of display to use
# height = Height of display to use
# depth = Color depth of display to use
#
[VNCServer]
#enabled=false
#command=Xvnc
#port=5900
#listen-address=
#width=1024
#height=768
#depth=8

Booting to tty and manually launching i3 using startx and the following ~/.xinitrc works splendidly:

if [ -d /etc/X11/xinit/xinitrc.d ]; then
  for f in /etc/X11/xinit/xinitrc.d/*; do
    [ -x "$f" ] && . "$f"
  done
  unset f
fi

i3

Values I've tried for user-session in /etc/lightdm/lightdm.conf:

/usr/bin/i3
i3
/usr/bin/startx
startx

and probably some others I can't remember.

What really irks me: The config is copied from my previous (and up-to-date) installation, where the value was set to i3. Why isn't this working now?! To me, the logs (as well as journalctl -fu lightdm) look as if everything were working just fine, only launching i3 through LightDM was doing... nothing, whereafter lightdm decides "oh, looks like we are done with this session" and reverts back to the login screen.

Help would very much be appreciated.

Cheers!

Last edited by smiletolerantly (2022-04-20 16:24:32)

Offline

#2 2022-04-20 15:20:55

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,285

Re: [SOLVED] LightDM and i3 working individually, but LDM won't start i3

If this "only" happens on a fresh boot it could be the graphics device not entirely being ready by the time xorg starts, which can predominantly happen when booting from SSDs where everything else happens so fast that startup of the graphical session catches the graphics card in the middle of setup.  LightDM has it's own mechanism for that in https://wiki.archlinux.org/title/LightD … TTY_output the more general mechanism would be enabling early KMS by adding the modules for your graphics card to the initramfs: https://wiki.archlinux.org/title/Kernel … _KMS_start

Maybe you'd also want to post the resulting /var/log/Xorg.0.log and your ~/.xsession-errors from such a failed attempt

Last edited by V1del (2022-04-20 15:23:24)

Offline

#3 2022-04-20 16:08:18

smiletolerantly
Member
Registered: 2022-04-20
Posts: 2

Re: [SOLVED] LightDM and i3 working individually, but LDM won't start i3

Hah! Thanks for the super quick reply - this pointed me in the right direction.

The error indeed always happended, even after booting to tty -> login -> startx -> enable LightDM -> logout -> login with LDM. Enabling amdgpu in initramfs and enabling logind-check-graphical did not help. /var/log/Xorg.0.log was clean. ~/.xsession-errors contained a single line:

/home/charlotte/.profile: line 1: /home/charlotte/.cargo/env: No such file or directory

stemming from .profile:

. "$HOME/.cargo/env"

which... does not exist. Because I did not move it over with the backup. Sigh.

Commenting the line out solved the problem. Thank you for pointing me to this error file.

Offline

#4 2022-04-20 16:16:59

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,285

Re: [SOLVED] LightDM and i3 working individually, but LDM won't start i3

Ah then I misinterpreted the fourth sentence to mean it started to work if invoked manually from the TTY. But yes checking startup setup files can always help.

Please mark as [SOLVED] by editing the title in your first post, though you may have to shorten it a little.

Offline

Board footer

Powered by FluxBB