Login screen doesn't show

Hello!

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.

garuda-inxi bellow:

System:
  Kernel: 6.4.10-zen2-1-zen arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
    root=UUID=8b5dad39-7bad-4f79-8a48-361ffb45159c rw rootflags=subvol=@
    quiet quiet rd.udev.log_priority=3 vt.global_cursor_default=0
    resume=UUID=a6f142fa-98ba-4663-8088-23273caf01e8 loglevel=3 ibt=off
  Desktop: Cinnamon v: 5.8.4 tk: GTK v: 3.24.38 wm: muffin vt: 7 dm: LightDM
    v: 1.32.0 Distro: Garuda Linux base: Arch Linux
Machine:
  Type: Laptop System: ASUSTeK product: ROG Zephyrus G14 GA401QM_GA401QM
    v: 1.0 serial: <superuser required>
  Mobo: ASUSTeK model: GA401QM v: 1.0 serial: <superuser required>
    UEFI: American Megatrends LLC. v: GA401QM.412 date: 08/30/2022
Battery:
  ID-1: BAT0 charge: 31.9 Wh (56.1%) condition: 56.9/76.0 Wh (74.9%)
    power: 21.0 W volts: 15.8 min: 15.8 model: ASUSTeK ASUS Battery type: Li-ion
    serial: N/A status: discharging
CPU:
  Info: model: AMD Ryzen 9 5900HS with Radeon Graphics bits: 64 type: MT MCP
    arch: Zen 3 gen: 4 level: v3 note: check built: 2021-22
    process: TSMC n7 (7nm) family: 0x19 (25) model-id: 0x50 (80) stepping: 0
    microcode: 0xA50000C
  Topology: cpus: 1x cores: 8 tpc: 2 threads: 16 smt: enabled cache:
    L1: 512 KiB desc: d-8x32 KiB; i-8x32 KiB L2: 4 MiB desc: 8x512 KiB
    L3: 16 MiB desc: 1x16 MiB
  Speed (MHz): avg: 1330 high: 3300 min/max: 1200/4679 boost: enabled
    scaling: driver: acpi-cpufreq governor: schedutil cores: 1: 1200 2: 3300
    3: 1200 4: 1200 5: 1200 6: 1200 7: 1198 8: 1200 9: 1198 10: 1200 11: 1200
    12: 1198 13: 1198 14: 1200 15: 1198 16: 1200 bogomips: 105407
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
  Vulnerabilities: <filter>
Graphics:
  Device-1: NVIDIA GA106M [GeForce RTX 3060 Mobile / Max-Q] vendor: ASUSTeK
    driver: nvidia v: 535.98 alternate: nouveau,nvidia_drm non-free: 535.xx+
    status: current (as of 2023-07) arch: Ampere code: GAxxx
    process: TSMC n7 (7nm) built: 2020-22 pcie: gen: 1 speed: 2.5 GT/s
    lanes: 8 link-max: gen: 4 speed: 16 GT/s lanes: 16 ports: active: none
    empty: DP-1 bus-ID: 01:00.0 chip-ID: 10de:2520 class-ID: 0300
  Device-2: AMD Cezanne [Radeon Vega Series / Radeon Mobile Series]
    vendor: ASUSTeK driver: amdgpu v: kernel arch: GCN-5 code: Vega
    process: GF 14nm built: 2017-20 pcie: gen: 3 speed: 8 GT/s lanes: 16
    link-max: gen: 4 speed: 16 GT/s ports: active: eDP-1 empty: HDMI-A-1
    bus-ID: 04:00.0 chip-ID: 1002:1638 class-ID: 0300 temp: 43.0 C
  Display: x11 server: X.Org v: 21.1.8 driver: X: loaded: amdgpu,nvidia
    dri: radeonsi gpu: amdgpu display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x286mm (20.00x11.26")
    s-diag: 583mm (22.95")
  Monitor-1: eDP-1 mapped: eDP-1-0 model: Sharp LQ140M1JW49 built: 2020
    res: 1920x1080 dpi: 158 gamma: 1.2 size: 309x174mm (12.17x6.85")
    diag: 355mm (14") ratio: 16:9 modes: max: 1920x1080 min: 640x480
  API: OpenGL v: 4.6.0 NVIDIA 535.98 renderer: NVIDIA GeForce RTX 3060
    Laptop GPU/PCIe/SSE2 direct-render: Yes
Audio:
  Device-1: NVIDIA GA106 High Definition Audio vendor: ASUSTeK
    driver: snd_hda_intel v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 8
    link-max: gen: 4 speed: 16 GT/s lanes: 16 bus-ID: 01:00.1
    chip-ID: 10de:228e class-ID: 0403
  Device-2: AMD Renoir Radeon High Definition Audio driver: snd_hda_intel
    v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16 link-max: gen: 4
    speed: 16 GT/s bus-ID: 04:00.1 chip-ID: 1002:1637 class-ID: 0403
  Device-3: AMD ACP/ACP3X/ACP6x Audio Coprocessor vendor: ASUSTeK
    driver: N/A alternate: snd_pci_acp3x, snd_rn_pci_acp3x, snd_pci_acp5x,
    snd_pci_acp6x, snd_acp_pci, snd_rpl_pci_acp6x, snd_pci_ps,
    snd_sof_amd_renoir, snd_sof_amd_rembrandt pcie: gen: 3 speed: 8 GT/s
    lanes: 16 link-max: gen: 4 speed: 16 GT/s bus-ID: 04:00.5
    chip-ID: 1022:15e2 class-ID: 0480
  Device-4: AMD Family 17h/19h HD Audio vendor: ASUSTeK
    driver: snd_hda_intel v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16
    link-max: gen: 4 speed: 16 GT/s bus-ID: 04:00.6 chip-ID: 1022:15e3
    class-ID: 0403
  API: ALSA v: k6.4.10-zen2-1-zen status: kernel-api with: aoss
    type: oss-emulator tools: N/A
  Server-1: PipeWire v: 0.3.77 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: MEDIATEK MT7921 802.11ax PCI Express Wireless Network Adapter
    vendor: AzureWave driver: mt7921e v: kernel pcie: gen: 2 speed: 5 GT/s
    lanes: 1 bus-ID: 02:00.0 chip-ID: 14c3:7961 class-ID: 0280
  IF: wlp2s0 state: up mac: <filter>
Bluetooth:
  Device-1: IMC Networks Wireless_Device driver: btusb v: 0.8 type: USB
    rev: 2.1 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 3-4:3 chip-ID: 13d3:3563
    class-ID: e001 serial: <filter>
  Report: bt-adapter ID: hci0 rfk-id: 2 state: up address: <filter>
Drives:
  Local Storage: total: 476.94 GiB used: 216.89 GiB (45.5%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung
    model: MZVLQ512HBLU-00B00 size: 476.94 GiB block-size: physical: 512 B
    logical: 512 B speed: 31.6 Gb/s lanes: 4 tech: SSD serial: <filter>
    fw-rev: FXM7201Q temp: 36.9 C scheme: GPT
Partition:
  ID-1: / raw-size: 460.11 GiB size: 460.11 GiB (100.00%)
    used: 216.89 GiB (47.1%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 576 KiB (0.2%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
  ID-3: /home raw-size: 460.11 GiB size: 460.11 GiB (100.00%)
    used: 216.89 GiB (47.1%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-4: /var/log raw-size: 460.11 GiB size: 460.11 GiB (100.00%)
    used: 216.89 GiB (47.1%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-5: /var/tmp raw-size: 460.11 GiB size: 460.11 GiB (100.00%)
    used: 216.89 GiB (47.1%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
Swap:
  Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: partition size: 16.53 GiB used: 0 KiB (0.0%)
    priority: -2 dev: /dev/nvme0n1p3 maj-min: 259:3
  ID-2: swap-2 type: zram size: 15.03 GiB used: 414.9 MiB (2.7%)
    priority: 100 dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 55.0 C mobo: N/A
  Fan Speeds (RPM): cpu: 2900
  GPU: device: nvidia screen: :0.0 temp: 41 C device: amdgpu temp: 44.0 C
Info:
  Processes: 425 Uptime: 4h 13m wakeups: 8 Memory: total: 16 GiB note: est.
  available: 15.03 GiB used: 4.79 GiB (31.9%) Init: systemd v: 254
  default: graphical tool: systemctl Compilers: gcc: 13.2.1 Packages:
  pm: pacman pkgs: 1601 libs: 505 tools: pamac,paru Shell: fish v: 3.6.1
  default: Bash v: 5.1.16 running-in: gnome-terminal inxi: 3.3.28
Garuda (2.6.16-1):
  System install date:     2023-08-03
  Last full system update: 2023-08-15 ↻
  Is partially upgraded:   No
  Relevant software:       snapper NetworkManager dracut nvidia-dkms
  Windows dual boot:       No/Undetected
  Failed units:  
1 Like

Hi @Douradinho, check and see if you have this option enabled in /etc/lightdm/lightdm.conf:

https://wiki.archlinux.org/title/LightDM#LightDM_does_not_appear_or_monitor_only_displays_TTY_output

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.

1 Like

Check arandr too, I think your log in window is on the other, not connected, display.

1 Like

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?

In that same file (/etc/lightdm/lightdm.conf), look for this line:

autologin-user=*username*

Delete that line, or comment it out by putting a # in front like this:

#autologin-user=*username*

They were already commented. What should i change?

Let's take a look at the whole file.

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).

Here's the entire file

[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

Okay, let’s take a look at this config. I believe it will be at /etc/lightdm/slick-greeter.conf.

Here's the slick-greeter.conf file. Seems very small with no authentication.

[Greeter]
background=/usr/share/wallpapers/garuda-wallpapers/background.jpg
theme-name=Sweet-Dark
icon-theme-name=Beautyline
font-name='Fira Sans 12'
activate-numlock=true
cursor-theme-name=Sweet-cursors
keyboard=onboard
reader=orca

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.

Can you show /etc/pam.d/lightdm?

Did you check "enable autologin" in the installer?

lightdm file:

#%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.

Hmm, it may be I am not understanding what is happening here.

Can you describe more specifically what you are seeing? The login screen shows up and…what do you see? What information needs to be entered?

It is sounding like you boot up your system, and you are able to get all the way to the desktop without entering your password once. Is that right?

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.

1 Like

The lock screen was indeed disabled.

Here's the current state:

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.

We can do this by adding modules to a dracut config file, the same as we did for setting up hibernation in your other topic. Here is the reference for this step: https://wiki.archlinux.org/title/Dracut#Early_kernel_module_loading

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):

sudo micro /etc/dracut.conf.d/early_kms.conf

Paste in this line to add the modules:

force_drivers+=" nvidia nvidia_modeset nvidia_uvm nvidia_drm " 

Notice this config will use force_drivers (instead of add_dracutmodules). Don't forget the padding spaces.

Save and exit, then rebuild the initramfs:

sudo dracut-rebuild

Reboot, and test again. :crossed_fingers:

1 Like

Nothing changed with that process. I still get a black screen when booting up

1 Like

Too bad, in that case you can scrap that dracut config if you’d like and rebuild the initramfs to get it back how it was.

Let’s give this a shot:

Edit /etc/lightdm/lightdm.conf once more, and under the [LightDM] section add a line that says logind-check-graphical=false.

[LightDM]
logind-check-graphical=false
1 Like