You are not logged in.

#1 2019-07-21 09:48:10

Rejem
Member
Registered: 2019-07-21
Posts: 3

[SOLVED] Slow login before startx

Hello everyone,

I noticed yesterday that login now takes around 5 seconds on my 2-weeks old arch distro when it went in the blink of an eye before. By login I refer to the act of typing my username and password and hit enter, not counting using startx to start my wm.

I tried looking at the auth log at /var/log/auth.log but it doesn't exist. Is there a config file which I could modify to start logging authentication processes? What could be the cause of a slow login action?

Obviously 5 seconds is not a big deal, but I would like to know what to do in case it became even slower smile

Thanks in advance for your help, I would be happy to provide any log file and command output required.

EDIT : I've looked at journalctl but it seems only warnings and errors end up there, so I cannot figure out what goes on whenever I login.

Last edited by Rejem (2019-07-21 14:56:07)

Offline

#2 2019-07-21 11:34:31

dockland
Member
From: Sweden
Registered: 2015-06-06
Posts: 861

Re: [SOLVED] Slow login before startx

What is your WM and if, your DE?


I possess a device, in my pocket, that is capable of accessing the entirety of information known to man.
I use it to look at funny pictures of cats and to argue with strangers.

Offline

#3 2019-07-21 12:01:30

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,442
Website

Re: [SOLVED] Slow login before startx

dockland, how would those be relevant?  The OP is logging in to a tty.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#4 2019-07-21 12:20:25

seth
Member
Registered: 2012-09-03
Posts: 49,980

Re: [SOLVED] Slow login before startx

pacman -Qkk pam

Is the behavior the same for a fresh user?

Also post the output of "sudo journalctl -b"… warnings and error might be what we're looking for here.

Online

#5 2019-07-21 14:34:24

Rejem
Member
Registered: 2019-07-21
Posts: 3

Re: [SOLVED] Slow login before startx

@dockland I'm using i3-wm if that can help at all, but as @Trilby said I'm logging in to a tty.

@seth Here is the output of pacman -Qkk pam :

~> sudo pacman -Qkk pam
[sudo] password for root: 
pam: 585 total files, 0 altered files

You can find the output of sudo journalctl -b at this address (first time I'm using a pastebin, sorry if I messed up) : https://gist.github.com/JeremyLauret/91 … 40f25ebf06

I'll try creating a new user to see if the same happens to him.

EDIT : The new user can log in very fast, I guess logging in with my user simply takes time because my config files such as .zshrc take time to be sourced.

Last edited by Rejem (2019-07-21 14:40:44)

Offline

#6 2019-07-21 14:44:11

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,442
Website

Re: [SOLVED] Slow login before startx

Rejem wrote:

... my config files such as .zshrc take time to be sourced.

Ah ... are you using OMZ?  If you are, stop now.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#7 2019-07-21 14:50:18

seth
Member
Registered: 2012-09-03
Posts: 49,980

Re: [SOLVED] Slow login before startx

This is supported by the log suggesting that the login takes less than 2 seconds (probably only few ms, limited timestamp precision) and while Trilby took the words right out of my mouth, any random call in zshrc can block for an arbitrarily long time …
You could insert some "date" calls into zshrc to narrow down the offender.

Online

#8 2019-07-21 14:55:52

Rejem
Member
Registered: 2019-07-21
Posts: 3

Re: [SOLVED] Slow login before startx

I'm using OMZ indeed. I tried changing back my default shell to bash and that solved the issue, thanks for pointing it out! I'm marking the thread as solved smile

EDIT : The true culprit was the initialization of nvm in my .zshrc :

# Slow line
source /usr/share/nvm/init-nvm.sh

Last edited by Rejem (2019-07-21 15:08:07)

Offline

#9 2019-07-21 15:16:57

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,442
Website

Re: [SOLVED] Slow login before startx

There is no need to give up on zsh - it's a fine shell.  Just Oh My Zsh is a load of ... trouble.  (edit: ah, that's node.  I feel about the same about most node(js) stuff, but there's much less concensus on that, perhaps.  OMZ is more unambiguously a bad idea).

Last edited by Trilby (2019-07-21 15:19:48)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

Board footer

Powered by FluxBB