Will not auto-login and startx after update

I just ran pacli and it offered 7-8 updates which include a systemd update. I ran and install all the updates but after rebooting my system not will not autologin to my user account

It goes to the tty login screen. I now have to manually login by putting my username and password and it will startx automatically. I can still use my computer just fine just that I want to revert back on how it automatically logs in

below is the list of the updates I installed from pacli
ArchLabs_2018-11-08-16_639x190

Hi, the updates just made do not center anything with the auto-login, you should post your lightdm.conf.
I’m sure you’ll get help from those who understand.

Yeah was thinking it was not but that was the only thing I changed before the issue started… PC was off got home turned it on booted to desktop environment just fine… updated stuff via pacli, restarted and issue started.

For some reason I cannot find lightdm.conf in /etc/lightdm… there isn’t even a lightdm folder inside /etc

Were you using lightdm to auto login, or the default which is a systemd process?

I never used lightdm and I don’t think it came as default… I am using the one that came with the installation

I don’t have access to my ArchLabs install right now, but I believe the auto login files are located in /etc/systemd/system. Post the output of:

ls /etc/system/system

to see if the systemd update changed something.

Pretty sure there is another thread about this in the forum, you can search for that.

Maybe this post will help you @punksinatra:

Auto login

@sevenday4

I read that earlier but everything seems good from my end

zprofile

# automatically run startx when logging in on tty1
[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx -- vt1 &>/dev/null

xinitrc

# Session to run if none passed via startx
session=${1:-openbox}

# set environment wm for use in scripts
export WM="$session"

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

# user init scripts and settings
[ -f /etc/X11/xinit/.Xmodmap ] && xmodmap /etc/X11/xinit/.Xmodmap
[ -f ~/.Xmodmap ] && xmodmap ~/.Xmodmap
[ -f ~/.Xresources ] && xrdb -merge ~/.Xresources
[ -f ~/.xprofile ] && source ~/.xprofile

# keyring for storing passwords
if hash gnome-keyring &>/dev/null; then
    gnome-keyring-daemon --start --components=pkcs11 &
fi
# gnome polkit
if [[ -x /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 ]]; then
    /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
fi

# display timeout and sleep
xset s 3600 3600
xset dpms 3600 3700 4000

# keyboard repeat rate
xset r rate 400 50
kbdrate -d 400 -r 50

# simulate Alt+F1 with just pressing Super
if hash ksuperkey &>/dev/null; then
    ksuperkey -e 'Super_L=Alt_L|F1' &
    ksuperkey -e 'Super_R=Alt_L|F1' &
fi

# 1/1 mouse acceleration
xset m 1/1

# Do NOT put commands below the exec lines
case $session in
    i3|i3wm) exec i3 ;;
    bsp|bspwm) exec bspwm ;;
    xfce|xfce4) exec startxfce4 ;;
    openbox) exec openbox-session ;;
    awesome) exec awesome ;;
    *) exec "$1" # Unknown, try running it
esac

Not sure if any changes were made only thing I can see under /etc/systemd/system

autologin@.service

#  SPDX-License-Identifier: LGPL-2.1+
#
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.

[Unit]
Description=Getty on %I
Documentation=man:agetty(8) man:systemd-getty-generator(8)
Documentation=http://0pointer.de/blog/projects/serial-console.html
After=systemd-user-sessions.service plymouth-quit-wait.service getty-pre.target

# If additional gettys are spawned during boot then we should make
# sure that this is synchronized before getty.target, even though
# getty.target didn't actually pull it in.
Before=getty.target
IgnoreOnIsolate=yes

# IgnoreOnIsolate causes issues with sulogin, if someone isolates
# rescue.target or starts rescue.service from multi-user.target or
# graphical.target.
Conflicts=rescue.service
Before=rescue.service

# On systems without virtual consoles, don't start any getty. Note
# that serial gettys are covered by serial-getty@.service, not this
# unit.
ConditionPathExists=/dev/tty0

[Service]
# the VT is cleared by TTYVTDisallocate
# The '-o' option value tells agetty to replace 'login' arguments with an
# option to preserve environment (-p), followed by '--' for safety, and then
# the entered username.
ExecStart=-/sbin/agetty -a punksinatra %I $TERM
Type=idle
Restart=always
RestartSec=0
UtmpIdentifier=%I
TTYPath=/dev/%I
TTYReset=yes
TTYVHangup=yes
TTYVTDisallocate=yes
KillMode=process
IgnoreSIGPIPE=no
SendSIGHUP=yes

# Unset locale for the console getty since the console has problems
# displaying some internationalized messages.
UnsetEnvironment=LANG LANGUAGE LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION

[Install]
WantedBy=getty.target
DefaultInstance=tty1

@punksinatra I had the same thing happen today, here’s the steps I did to get everything back to normal.

I’m gonna assume this is your username when creating the override, if it isn’t then make sure you change it.


Now remove the autologin@.service,make an override for the default getty service, make sure the service is enabled, and reboot.

su  # go root

rm /etc/systemd/system/autologin@.service

mkdir -p /etc/systemd/system/getty@tty1.service.d

echo '[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin punksinatra --noclear %I 38400 linux
' > /etc/systemd/system/getty@tty1.service.d/autologin.conf

systemctl enable getty@

reboot

Should be all good now, I was.

Cheers

5 Likes

Hi… This fixed my issue and it is back to normal now…

Can you explain what happened please so I have an idea the next time it happens again. Thanks

Top job @natemaia .

Glad that it got fixed @punksinatra

Systemd got an update and it likely messed up something, perhaps the getty service config file settings changed, etc.

Doing it this way should avoid these issues in the future, it acts as an overlay to the default getty@tty1 service and only changes what’s needed to login the user without a password.

In the past that was the recommended way as per the wiki, however things have changed since.

You can do a bit of reading regarding systemd and autologin via console here
https://wiki.archlinux.org/index.php/Getty

1 Like