When I boot, I get a full black as my login screen. I can type my password and login and everything runs fine. Sometimes when I'm connected to my external monitor sometimes it does show the login screen but I can't figure out when it happens.
LightDM does not appear or monitor only displays TTY output
It may happen that your system boots so fast that LightDM service is started before your graphics drivers are properly loaded. If this is your case, you will want to add the following to your lightdm.conf file:
/etc/lightdm/lightdm.conf
[LightDM] logind-check-graphical=true
This setting will tell LightDM to wait until graphics devices are ready before spawning greeters/autostarting sessions on them.
With newer versions of LightDM, this is now the default setting. As a consequence, on some hardware, your graphics drivers may not be properly detected and LightDM may never attempt to launch a greeter–even after the system has stabilized after boot. If this occurs, setting this to false will disable the check and force LightDM to launch a greeter regardless.
This worked! However, now the system automatically logs in, it doesn't show the password screen which is a bit of a security issue. Do you know how to fix this?
Please copy and paste instead of posting a screenshot. To copy and paste from the terminal, highlight the text and "click" the middle mouse button to paste. Or, copy with Ctrl+Shift+C (and then paste to the browser as you normally would).
[Seat:*]
#
# 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=true
#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 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 = Session to load for 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-slick-greeter
#greeter-hide-users=false
#greeter-allow-guest=true
#greeter-show-manual-login=false
#greeter-show-remote-login=true
user-session=cinnamon
#allow-user-switching=true
#allow-guest=true
#guest-session=
session-wrapper=/etc/lightdm/Xsession
#greeter-wrapper=
#guest-wrapper=
#display-setup-script=
#display-stopped-script=
#greeter-setup-script=
#session-setup-script=
#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.
#
greeter-show-manual-login=false
[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
I tested if i left the pc just turn off the screen and wake up again, and it shows the login screen just fine. This issue xis consistent when waking up from suspend, hibernate or from powered off.
#%PAM-1.0
auth include system-login
-auth optional pam_gnome_keyring.so
account include system-login
password include system-login
session include system-login
-session optional pam_gnome_keyring.so auto_start
I don't think I did. But I'm not sure. Had to do 4 different linux installs of different distros over 2 days so i can't remember for sure.
When i hibernate or suspend the pc and wake it back up, no login window shows up and it automatically reenters the session. Sorry if I wasn't clear before.
That is correct but only when it wakes up from hibernation or suspension.
To add to this. When starting the pc from turned off state it still doesn’t show the login screen. It’s the same situation as when I first posted. Sorry I wasn’t thorough in checking.
Was the login screen showing, and then it stopped? Or have you never seen the login screen? The lack of information here is making the issue hard to follow.
Please post the status of:
systemctl status display-manager
It sounds like the lock screen is not enabled. Go to System Settings > Screensaver and turn on the two options related to locking the computer.
If i boot from powered off, it shows black screen and I have to type my password to login.
If I wake from suspended or hibernated states, it shows login screen as normal.
Here's the out put for systemctl status display-manager
â—Ź lightdm.service - Light Display Manager
Loaded: loaded (/usr/lib/systemd/system/lightdm.service; enabled; preset: disabled)
Active: active (running) since Fri 2023-08-18 00:42:03 WEST; 6min ago
Docs: man:lightdm(1)
Main PID: 987 (lightdm)
Tasks: 12 (limit: 18306)
Memory: 396.6M
CPU: 11.660s
CGroup: /system.slice/lightdm.service
├─987 /usr/bin/lightdm
└─994 /usr/lib/Xorg :0 -seat seat0 -auth /run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
ago 18 00:42:03 G14 systemd[1]: Starting Light Display Manager...
ago 18 00:42:03 G14 systemd[1]: Started Light Display Manager.
ago 18 00:42:04 G14 lightdm[1020]: pam_unix(lightdm-greeter:session): session opened for user lightdm(uid=964>
ago 18 00:42:20 G14 lightdm[1190]: gkr-pam: unable to locate daemon control file
ago 18 00:42:20 G14 lightdm[1190]: gkr-pam: stashed password to try later in open session
ago 18 00:42:20 G14 lightdm[1190]: pam_unix(lightdm:session): session opened for user antonio(uid=1000) by an>
ago 18 00:42:20 G14 lightdm[1190]: gkr-pam: unlocked login keyring
lines 1-19/19 (END)...skipping...
â—Ź lightdm.service - Light Display Manager
Loaded: loaded (/usr/lib/systemd/system/lightdm.service; enabled; preset: disabled)
Active: active (running) since Fri 2023-08-18 00:42:03 WEST; 6min ago
Docs: man:lightdm(1)
Main PID: 987 (lightdm)
Tasks: 12 (limit: 18306)
Memory: 396.6M
CPU: 11.660s
CGroup: /system.slice/lightdm.service
├─987 /usr/bin/lightdm
└─994 /usr/lib/Xorg :0 -seat seat0 -auth /run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
ago 18 00:42:03 G14 systemd[1]: Starting Light Display Manager...
ago 18 00:42:03 G14 systemd[1]: Started Light Display Manager.
ago 18 00:42:04 G14 lightdm[1020]: pam_unix(lightdm-greeter:session): session opened for user lightdm(uid=964) by (uid=0)
ago 18 00:42:20 G14 lightdm[1190]: gkr-pam: unable to locate daemon control file
ago 18 00:42:20 G14 lightdm[1190]: gkr-pam: stashed password to try later in open session
ago 18 00:42:20 G14 lightdm[1190]: pam_unix(lightdm:session): session opened for user antonio(uid=1000) by antonio(uid=0)
ago 18 00:42:20 G14 lightdm[1190]: gkr-pam: unlocked login keyring
If anything else is unclear please tell me so I can try to explain it a bit better.
If the LightDM service is starting before your graphics drivers are properly loaded, that can cause booting to a TTY instead of getting the greeter. This may be a long shot, but lets try loading the kernel modules for your GPU early to see if that helps bring up the greeter.
First create another config file in /etc/dracut.conf.d/ (you can also just add to the one you already have if you'd like, it doesn't matter either way):