Package: lightdm
Version: 1.18.3-1

Sometimes lightdm starts a tight, endless loop trying to start an X server
for the greeter on :1 (VT8) while the user's session on :0 (VT7) is locked.
The X server starts, complains about "no screens found", exits, and lightdm
immediately tries again. On the attached monitor, which is powered on, one
just sees a blinking white underscore in the top left corner. Attempts to
change to a different VT using Ctrl+Alt+Fn work (one briefly sees the console
login prompt on VT1) but are immediately overridden by a switch back to VT8,
courtesy of lightdm. The looping lightdm instance is using about 30% of the
CPU and Gigabytes of virtual address space. /var/log tends to fill up since
/var/log/lightdm/lightdm.log doesn't get rotated when it grows large.

I've seen this, sporadically, on several systems after they were upgraded
from jessie to stretch. One possible common denominator is that they have
nVidia graphics cards. (Regrettably, we need to use the proprietary drivers
for these.) I'm responding by enabling AllowEmptyInitialConfiguration in
/etc/X11/xorg.conf (a file that supposedly shouldn't be needed any more,
but how else is one to override a poor choice of default settings?), which
may be alleviating the problem (it's hard to tell for sure since I don't
know how to trigger it at will).

Would it be possible to:
-- introduce rate limiting on lightdm's attempts to start X servers?
-- rotate lightdm.log when it grows beyond a certain size?
The root cause of Xorg's failure to detect any screens probably lies
outside lightdm, but that doesn't mean one can't handle it more gracefully.

Attaching lightly sanitised copies of /var/log/Xorg.1.log and of a
representative excerpt from lightdm.log. The graphics card in this
particular instance was a
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GT218 [GeForce 
210] [10de:0a65] (rev a2)
and "cat /sys/module/nvidia/version" prints 340.106.
[+169368.13s] DEBUG: Seat seat0: Display server stopped
[+169368.13s] DEBUG: Seat seat0: Stopping session
[+169368.13s] DEBUG: Seat seat0: Session stopped
[+169368.13s] DEBUG: Seat seat0: Stopping display server, no sessions require it
[+169368.13s] DEBUG: Seat seat0: Active display server stopped, starting greeter
[+169368.13s] DEBUG: Seat seat0: Creating greeter session
[+169368.13s] DEBUG: Seat seat0: Creating display server of type x
[+169368.13s] DEBUG: Using VT 8
[+169368.13s] DEBUG: Seat seat0: Starting local X display on VT 8
[+169368.13s] DEBUG: DisplayServer x-1: Logging to /var/log/lightdm/x-1.log
[+169368.13s] DEBUG: DisplayServer x-1: Writing X server authority to 
/var/run/lightdm/root/:1
[+169368.13s] DEBUG: DisplayServer x-1: Launching X Server
[+169368.18s] DEBUG: Launching process 5480: /usr/bin/X :1 -seat seat0 -auth 
/var/run/lightdm/root/:1 -nolisten tcp vt8 -novtswitch
[+169368.18s] DEBUG: DisplayServer x-1: Waiting for ready signal from X server 
:1
[+169368.28s] DEBUG: Process 5480 exited with return value 1
[+169368.28s] DEBUG: DisplayServer x-1: X server stopped
[+169368.28s] DEBUG: Releasing VT 8
[+169368.28s] DEBUG: DisplayServer x-1: Removing X server authority 
/var/run/lightdm/root/:1
[+169368.28s] DEBUG: Seat seat0: Display server stopped
[+169368.28s] DEBUG: Seat seat0: Stopping session
[+169368.28s] DEBUG: Seat seat0: Session stopped
[+169368.28s] DEBUG: Seat seat0: Stopping display server, no sessions require it
[+169368.28s] DEBUG: Seat seat0: Active display server stopped, starting greeter
[+169368.28s] DEBUG: Seat seat0: Creating greeter session
[+169368.28s] DEBUG: Seat seat0: Creating display server of type x
[+169368.28s] DEBUG: Using VT 8
[+169368.28s] DEBUG: Seat seat0: Starting local X display on VT 8
[+169368.28s] DEBUG: DisplayServer x-1: Logging to /var/log/lightdm/x-1.log
[+169368.28s] DEBUG: DisplayServer x-1: Writing X server authority to 
/var/run/lightdm/root/:1
[+169368.28s] DEBUG: DisplayServer x-1: Launching X Server
[+169368.33s] DEBUG: Launching process 5481: /usr/bin/X :1 -seat seat0 -auth 
/var/run/lightdm/root/:1 -nolisten tcp vt8 -novtswitch
[+169368.33s] DEBUG: DisplayServer x-1: Waiting for ready signal from X server 
:1
[+169368.42s] DEBUG: Process 5481 exited with return value 1
[+169368.42s] DEBUG: DisplayServer x-1: X server stopped
[+169368.42s] DEBUG: Releasing VT 8
[+169368.42s] DEBUG: DisplayServer x-1: Removing X server authority 
/var/run/lightdm/root/:1
[+169368.42s] DEBUG: Seat seat0: Display server stopped
[+169368.42s] DEBUG: Seat seat0: Stopping session
[+169368.42s] DEBUG: Seat seat0: Session stopped
[+169368.42s] DEBUG: Seat seat0: Stopping display server, no sessions require it
[+169368.43s] DEBUG: Seat seat0: Active display server stopped, starting greeter
[+169368.43s] DEBUG: Seat seat0: Creating greeter session
[+169368.43s] DEBUG: Seat seat0: Creating display server of type x
[+169368.43s] DEBUG: Using VT 8
[+169368.43s] DEBUG: Seat seat0: Starting local X display on VT 8
[+169368.43s] DEBUG: DisplayServer x-1: Logging to /var/log/lightdm/x-1.log
[+169368.43s] DEBUG: DisplayServer x-1: Writing X server authority to 
/var/run/lightdm/root/:1
[+169368.43s] DEBUG: DisplayServer x-1: Launching X Server
[+169368.48s] DEBUG: Launching process 5482: /usr/bin/X :1 -seat seat0 -auth 
/var/run/lightdm/root/:1 -nolisten tcp vt8 -novtswitch
[+169368.48s] DEBUG: DisplayServer x-1: Waiting for ready signal from X server 
:1
[169351.183] 
X.Org X Server 1.19.2
Release Date: 2017-03-02
[169351.183] X Protocol Version 11, Revision 0
[169351.183] Build Operating System: Linux 4.9.0-4-amd64 x86_64 Debian
[169351.183] Current Operating System: Linux HOSTNAME 4.9.0-6-amd64 #1 SMP 
Debian 4.9.82-1+deb9u3 (2018-03-02) x86_64
[169351.183] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.9.0-6-amd64 
root=/dev/mapper/HOSTNAME-root ro quiet
[169351.183] Build Date: 16 October 2017  08:19:45AM
[169351.183] xorg-server 2:1.19.2-1+deb9u2 (https://www.debian.org/support) 
[169351.183] Current version of pixman: 0.34.0
[169351.183]    Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
[169351.183] Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[169351.183] (==) Log file: "/var/log/Xorg.1.log", Time: Wed Apr 18 09:38:27 
2018
[169351.183] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[169351.183] (==) No Layout section.  Using the first Screen section.
[169351.183] (==) No screen section available. Using defaults.
[169351.183] (**) |-->Screen "Default Screen Section" (0)
[169351.183] (**) |   |-->Monitor "<default monitor>"
[169351.184] (==) No monitor specified for screen "Default Screen Section".
        Using a default monitor configuration.
[169351.184] (==) Automatically adding devices
[169351.184] (==) Automatically enabling devices
[169351.184] (==) Automatically adding GPU devices
[169351.184] (==) Max clients allowed: 256, resource mask: 0x1fffff
[169351.184] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[169351.184]    Entry deleted from font path.
[169351.184] (==) FontPath set to:
        /usr/share/fonts/X11/misc,
        /usr/share/fonts/X11/100dpi/:unscaled,
        /usr/share/fonts/X11/75dpi/:unscaled,
        /usr/share/fonts/X11/Type1,
        /usr/share/fonts/X11/100dpi,
        /usr/share/fonts/X11/75dpi,
        built-ins
[169351.184] (==) ModulePath set to "/usr/lib/xorg/modules"
[169351.184] (II) The server relies on udev to provide the list of input 
devices.
        If no devices become available, reconfigure udev or disable 
AutoAddDevices.
[169351.184] (II) Loader magic: 0x561392115e00
[169351.184] (II) Module ABI versions:
[169351.184]    X.Org ANSI C Emulation: 0.4
[169351.184]    X.Org Video Driver: 23.0
[169351.184]    X.Org XInput driver : 24.1
[169351.184]    X.Org Server Extension : 10.0
[169351.185] (++) using VT number 8

[169351.185] (II) systemd-logind: logind integration requires -keeptty and 
-keeptty was not provided, disabling logind integration
[169351.185] (II) xfree86: Adding drm device (/dev/dri/card0)
[169351.185] (EE) /dev/dri/card0: failed to set DRM interface version 1.4: 
Permission denied
[169351.189] (--) PCI:*(0:1:0:0) 10de:0a65:1043:83f4 rev 162, Mem @ 
0xfa000000/16777216, 0xc0000000/268435456, 0xd0000000/33554432, I/O @ 
0x0000e000/128, BIOS @ 0x????????/131072
[169351.189] (II) LoadModule: "glx"
[169351.190] (II) Loading /usr/lib/xorg/modules/linux/libglx.so
[169351.205] (II) Module glx: vendor="NVIDIA Corporation"
[169351.205]    compiled for 4.0.2, module version = 1.0.0
[169351.205]    Module class: X.Org Server Extension
[169351.205] (II) NVIDIA GLX Module  340.106  Tue Jan  9 14:21:56 PST 2018
[169351.205] (==) Matched nouveau as autoconfigured driver 0
[169351.205] (==) Matched nv as autoconfigured driver 1
[169351.205] (==) Matched modesetting as autoconfigured driver 2
[169351.205] (==) Matched fbdev as autoconfigured driver 3
[169351.205] (==) Matched vesa as autoconfigured driver 4
[169351.205] (==) Assigned the driver to the xf86ConfigLayout
[169351.205] (II) LoadModule: "nouveau"
[169351.205] (II) Loading /usr/lib/xorg/modules/drivers/nouveau_drv.so
[169351.206] (II) Module nouveau: vendor="X.Org Foundation"
[169351.206]    compiled for 1.19.3, module version = 1.0.13
[169351.206]    Module class: X.Org Video Driver
[169351.206]    ABI class: X.Org Video Driver, version 23.0
[169351.206] (II) LoadModule: "nv"
[169351.206] (WW) Warning, couldn't open module nv
[169351.206] (II) UnloadModule: "nv"
[169351.206] (II) Unloading nv
[169351.206] (EE) Failed to load module "nv" (module does not exist, 0)
[169351.206] (II) LoadModule: "modesetting"
[169351.206] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[169351.206] (II) Module modesetting: vendor="X.Org Foundation"
[169351.206]    compiled for 1.19.2, module version = 1.19.2
[169351.206]    Module class: X.Org Video Driver
[169351.206]    ABI class: X.Org Video Driver, version 23.0
[169351.206] (II) LoadModule: "fbdev"
[169351.207] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so
[169351.207] (II) Module fbdev: vendor="X.Org Foundation"
[169351.207]    compiled for 1.19.0, module version = 0.4.4
[169351.207]    Module class: X.Org Video Driver
[169351.207]    ABI class: X.Org Video Driver, version 23.0
[169351.207] (II) LoadModule: "vesa"
[169351.207] (II) Loading /usr/lib/xorg/modules/drivers/vesa_drv.so
[169351.207] (II) Module vesa: vendor="X.Org Foundation"
[169351.207]    compiled for 1.19.0, module version = 2.3.4
[169351.207]    Module class: X.Org Video Driver
[169351.207]    ABI class: X.Org Video Driver, version 23.0
[169351.207] (II) NOUVEAU driver Date:   Tue Sep 20 00:31:06 2016 -0400
[169351.207] (II) NOUVEAU driver for NVIDIA chipset families :
[169351.207]    RIVA TNT        (NV04)
[169351.207]    RIVA TNT2       (NV05)
[169351.207]    GeForce 256     (NV10)
[169351.207]    GeForce 2       (NV11, NV15)
[169351.207]    GeForce 4MX     (NV17, NV18)
[169351.207]    GeForce 3       (NV20)
[169351.207]    GeForce 4Ti     (NV25, NV28)
[169351.207]    GeForce FX      (NV3x)
[169351.207]    GeForce 6       (NV4x)
[169351.207]    GeForce 7       (G7x)
[169351.207]    GeForce 8       (G8x)
[169351.207]    GeForce GTX 200 (NVA0)
[169351.207]    GeForce GTX 400 (NVC0)
[169351.207] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[169351.207] (II) FBDEV: driver for framebuffer: fbdev
[169351.207] (II) VESA: driver for VESA chipsets: vesa
[169351.213] (EE) [drm] Failed to open DRM device for pci:0000:01:00.0: -22
[169351.213] (WW) Falling back to old probe method for modesetting
[169351.213] (II) Loading sub module "fbdevhw"
[169351.213] (II) LoadModule: "fbdevhw"
[169351.213] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[169351.213] (II) Module fbdevhw: vendor="X.Org Foundation"
[169351.213]    compiled for 1.19.2, module version = 0.0.2
[169351.213]    ABI class: X.Org Video Driver, version 23.0
[169351.213] (EE) open /dev/fb0: No such file or directory
[169351.213] (WW) Falling back to old probe method for fbdev
[169351.213] (II) Loading sub module "fbdevhw"
[169351.213] (II) LoadModule: "fbdevhw"
[169351.213] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[169351.213] (II) Module fbdevhw: vendor="X.Org Foundation"
[169351.213]    compiled for 1.19.2, module version = 0.0.2
[169351.213]    ABI class: X.Org Video Driver, version 23.0
[169351.213] (EE) open /dev/fb0: No such file or directory
[169351.213] vesa: Ignoring device with a bound kernel driver
[169351.213] (WW) Falling back to old probe method for vesa
[169351.214] (EE) Screen 0 deleted because of no matching config section.
[169351.214] (II) UnloadModule: "modesetting"
[169351.214] (EE) Screen 0 deleted because of no matching config section.
[169351.214] (II) UnloadModule: "fbdev"
[169351.214] (II) UnloadSubModule: "fbdevhw"
[169351.214] (EE) Screen 0 deleted because of no matching config section.
[169351.214] (II) UnloadModule: "vesa"
[169351.214] (EE) Device(s) detected, but none match those in the config file.
[169351.214] (EE) 
Fatal server error:
[169351.214] (EE) no screens found(EE) 
[169351.214] (EE) 
Please consult the The X.Org Foundation support 
         at http://wiki.x.org
 for help. 
[169351.214] (EE) Please also check the log file at "/var/log/Xorg.1.log" for 
additional information.
[169351.214] (EE) 
[169351.215] (EE) Server terminated with error (1). Closing log file.

Reply via email to