ubuntu / ubuntu/lightdm

logind-check-graphical=true causes lightdm in LXC container to fail to start

Open
#263 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
1k
Forks
168
PR merge metrics
No merged PRs in 30d

Description

Hello! I'm running Fedora 36 in an LXC/LXD container with NVIDIA GPU pass through. Today I upgraded LightDM from version 1.30.0 to 1.32.0. I found that Xorg didn't start, but systemctl showed that the LightDM service started successfully.

This is the LightDM log of the failed startup.
[+0.00s] DEBUG: Logging to /var/log/lightdm/lightdm.log
[+0.00s] DEBUG: Starting Light Display Manager 1.32.0, UID=0 PID=191
[+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-backup-logs.conf
[+0.00s] DEBUG: Loading configuration from /usr/share/lightdm/lightdm.conf.d/50-disable-guest.conf
[+0.00s] DEBUG: Loading configuration from /usr/share/lightdm/lightdm.conf.d/50-minimum-vt.conf
[+0.00s] DEBUG: Loading configuration from /usr/share/lightdm/lightdm.conf.d/50-run-directory.conf
[+0.00s] DEBUG: Loading configuration from /usr/share/lightdm/lightdm.conf.d/50-session-wrapper.conf
[+0.00s] DEBUG: Loading configuration from /usr/share/lightdm/lightdm.conf.d/50-user-authority-in-system-dir.conf
[+0.00s] DEBUG: Loading configuration from /usr/share/lightdm/lightdm.conf.d/50-xserver-command.conf
[+0.00s] DEBUG: Loading configuration from /usr/share/lightdm/lightdm.conf.d/60-lightdm-gtk-greeter.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:   [SeatDefaults] is now called [Seat:*], please update this configuration
[+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: Acquired bus name org.freedesktop.DisplayManager
[+0.01s] DEBUG: Loading users from org.freedesktop.Accounts
[+0.01s] DEBUG: User /org/freedesktop/Accounts/User1000 added
[+109.64s] DEBUG: Got signal 15 from process 1
[+109.64s] DEBUG: Caught Terminated signal, shutting down
[+109.64s] DEBUG: Stopping display manager
[+109.64s] DEBUG: Display manager stopped
[+109.64s] DEBUG: Stopping daemon
[+109.64s] DEBUG: Exiting with return value 0
This is the LightDM configuration.
   [Seat:*]
B  allow-guest=false
E  session-wrapper=/etc/X11/xinit/Xsession
G  xserver-command=X -core -noreset
I  greeter-session=lightdm-gtk-greeter
I  autologin-user=fedora

   [LightDM]
I  minimum-vt=8
D  run-directory=/run/lightdm
F  user-authority-in-system-dir=true
I  minimum-display-number=8

Sources:
A  /usr/share/lightdm/lightdm.conf.d/50-backup-logs.conf
B  /usr/share/lightdm/lightdm.conf.d/50-disable-guest.conf
C  /usr/share/lightdm/lightdm.conf.d/50-minimum-vt.conf
D  /usr/share/lightdm/lightdm.conf.d/50-run-directory.conf
E  /usr/share/lightdm/lightdm.conf.d/50-session-wrapper.conf
F  /usr/share/lightdm/lightdm.conf.d/50-user-authority-in-system-dir.conf
G  /usr/share/lightdm/lightdm.conf.d/50-xserver-command.conf
H  /usr/share/lightdm/lightdm.conf.d/60-lightdm-gtk-greeter.conf
I  /etc/lightdm/lightdm.conf
This is the raw.lxc configuration.
  raw.lxc: |-
    lxc.mount.entry=/dev/nvidia0 dev/nvidia0 none bind,optional,create=file
    lxc.mount.entry=/dev/nvidiactl dev/nvidiactl none bind,optional,create=file
    lxc.mount.entry=/dev/nvidia-modeset dev/nvidia-modeset none bind,optional,create=file
    lxc.cgroup.devices.allow=c 195:* rwm
    lxc.mount.entry=/dev/nvidia-uvm dev/nvidia-uvm none bind,optional,create=file
    lxc.mount.entry=/dev/nvidia-uvm-tools dev/nvidia-uvm-tools none bind,optional,create=file
    lxc.cgroup.devices.allow=c 507:* rwm
    lxc.mount.entry=/dev/dri/card0 dev/dri/card0 none bind,optional,create=file
    lxc.mount.entry=/dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file
    lxc.cgroup.devices.allow=c 226:* rwm
    lxc.mount.entry=/dev/tty15 dev/tty0 none bind,optional,create=file
    lxc.mount.entry=/dev/tty15 dev/tty8 none bind,optional,create=file
    lxc.cgroup.devices.allow=c 4:15 rwm

I compared the config changes of the two versions (diff lightdm.conf lightdm.conf.rpmnew):

24,25c24,25
< minimum-display-number=8
< minimum-vt=8
---
> #minimum-display-number=0
> #minimum-vt=7
29c29
< #logind-check-graphical=false
---
> #logind-check-graphical=true
164,167d163
< 
< [SeatDefaults]
< greeter-session=lightdm-gtk-greeter
< autologin-user=fedora

And found that logind-check-graphical is set to true by default. After changing to false, Xorg started successfully.

I don't know what this option does. It seems to prevent the system from booting so fast that LightDM starts before loading the graphics driver. But in my use case (although it may be rare), I think LightDM is not properly checking the loading status of the graphics driver. Or is my configuration wrong?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the LightDM 1.32.0 startup with logind-check-graphical=true, using the supplied LightDM log, configuration diff, and raw.lxc device mappings. Trace how the graphical readiness check interacts with the LXC/NVIDIA setup, then compare behavior with the option set to false. Done means establishing whether LightDM is incorrectly handling this environment and defining the expected startup behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux
Domain
desktop-dev, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.