You are not logged in.

#1 2012-04-30 04:57:38

darkfeline
Member
Registered: 2012-02-14
Posts: 94

[Solved] Login Delay on tty

I don't use any display managers, only the tty and then startx.  For some reason, it takes almost 5 seconds between entering my username until the password prompt appears and I can enter my password.  It's a bit ridiculous that it's almost slower than using a heavyweight DM to log in.  I saw an old thread about this same problem, but it doesn't seem to be solved.

Last edited by darkfeline (2012-04-30 17:52:54)

Offline

#2 2012-04-30 08:31:17

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: [Solved] Login Delay on tty

How big is your root partition?

Because the HDD's read head could be travelling too much back and forth if the system files are scattered across a large partition.


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#3 2012-04-30 16:12:22

darkfeline
Member
Registered: 2012-02-14
Posts: 94

Re: [Solved] Login Delay on tty

30G using 7G.  My / partition is ext4.  There shouldn't be fragmentation problems right? IIRC ext4 with free space should defragment itself.

Offline

#4 2012-04-30 17:30:26

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: [Solved] Login Delay on tty

Still pretty big for root. Do you use a separate /home too?

Have you tried creating a new user?

Post your /etc/inittab.


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#5 2012-04-30 17:42:51

darkfeline
Member
Registered: 2012-02-14
Posts: 94

Re: [Solved] Login Delay on tty

Yes I have separate partitions for var, home, and boot.  I haven't tried creating a new user yet.  I don't know why a big root would make logging in slower (and this is even before authentication; simply prompting for password is slow; logging in is faster (still a little slow though smile ) ), but maybe I could defragment it? Here's my inittab:

#
# /etc/inittab
#

#  Runlevels:
#    0    Halt
#    1(S)	Single-user
#    2    Not used
#    3    Multi-user
#    4    Not used
#    5    X11
#    6    Reboot

## Only one of the following two lines can be uncommented!
# Boot to console
#id:3:initdefault:
# Boot to X11
id:5:initdefault:

rc::sysinit:/etc/rc.sysinit
rs:S1:wait:/etc/rc.single
rm:2345:wait:/etc/rc.multi
rh:06:wait:/etc/rc.shutdown
su:S:wait:/sbin/sulogin -p

# -8 options fixes umlauts problem on login
c1:2345:respawn:/sbin/agetty -8 -s 38400 tty1 linux
c2:2345:respawn:/sbin/agetty -8 -s 38400 tty2 linux
#c3:2345:respawn:/sbin/agetty -8 -s 38400 tty3 linux
#c4:2345:respawn:/sbin/agetty -8 -s 38400 tty4 linux
#c5:2345:respawn:/sbin/agetty -8 -s 38400 tty5 linux
#c6:2345:respawn:/sbin/agetty -8 -s 38400 tty6 linux

# Serial Virtual Console for KVM and others VMs
#s0:2345:respawn:/sbin/agetty -8 -s 9600 ttyS0 linux

# Hypervisor Virtual Console for Xen and KVM
#h0:2345:respawn:/sbin/agetty -8 -s 38400 hvc0 linux

#ca::ctrlaltdel:/sbin/shutdown -t3 -r now

# Example lines for starting a login manager
#x:5:respawn:/usr/bin/xdm -nodaemon
#x:5:respawn:/usr/sbin/gdm -nodaemon
#x:5:respawn:/usr/bin/kdm -nodaemon
x:5:respawn:/usr/bin/slim >/dev/null 2>&1
#x:5:respawn:/usr/sbin/lxdm >/dev/null 2>&1

# End of file

Offline

#6 2012-04-30 17:52:25

darkfeline
Member
Registered: 2012-02-14
Posts: 94

Re: [Solved] Login Delay on tty

Never mind, I spotted my newbie mistake.  I forgot to change the runlevel back to 3 after removing my DM.  Now the password prompt shows up in a second.  It's still a little slow, but I guess that's a separate problem for another thread.

Offline

#7 2012-04-30 17:56:53

darkfeline
Member
Registered: 2012-02-14
Posts: 94

Re: [Solved] Login Delay on tty

Even from a tty, login is pretty slow for me, about a second after typing my username before the password prompt appears and some 5 seconds for authentication/logging in.  A quick google search yielded nothing, so here I am, asking for tips.  What steps, in order, would you suggest for speeding up login times (in order of most impact, least complexity)?

Offline

#8 2012-04-30 18:13:15

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: [Solved] Login Delay on tty

You already have a thread: Login Delay on tty

Why make a new one? ...


Did you try creating another user like I suggested?

Last edited by DSpider (2012-04-30 18:13:36)


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#9 2012-04-30 18:56:46

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [Solved] Login Delay on tty

Is automatically logging in an option?

Offline

#10 2012-04-30 19:02:36

darkfeline
Member
Registered: 2012-02-14
Posts: 94

Re: [Solved] Login Delay on tty

DSpider: That was for a separate problem.  I forgot to change the runlevel in inittab back to 3 after removing my DM, which caused the long wait.  I also wanted to speed up logging in in general, which is a different problem, so I made a new topic for it.

karol: automatic login isn't an option, I'm afraid.

Offline

#11 2012-04-30 20:41:53

Pres
Member
Registered: 2011-09-12
Posts: 423

Re: [Solved] Login Delay on tty

Speeding up the boot process you mean? If so, look into things like e4rat, backgrounding the startup of daemons, changing wait to once, etc.

https://wiki.archlinux.org/index.php/Im … erformance
https://bbs.archlinux.org/viewtopic.php?id=62518

Offline

#12 2012-04-30 21:39:21

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: [Solved] Login Delay on tty

moderator note: The difference between the two threads was too subtle. I decided it's better to merge them and let the discussion continue. darkfeline's other thread was titled "Speeding up login".


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#13 2012-05-01 00:09:53

darkfeline
Member
Registered: 2012-02-14
Posts: 94

Re: [Solved] Login Delay on tty

fsckd: sorry about that

so I optimized my mkinitcpio.  For any other newbies out there, the process is pretty simple.  I changed two lines in /etc/mkinitcpio.conf:

MODULES="reiserfs ext4"
HOOKS="base udev autodetect fsck sata"

I removed the unneeded hooks and added needed filesystem modules.  If you don't add the filesystem modules, you'll have to keep in the filesystems hook, it seems.

I recompiled my kernel with mkinitcpio -p linux, and rebooted with no problems-ish.  Although, now, before the "loading initramfs..." lines I get 3 file not found errors and after "loading initramfs" it asks me to "press any key to continue".

I didn't time it or anything, but it felt slightly faster.

Next I decided to switch to systemd.  I managed to get it partially working, and it definitely boots a lot faster than sysvinit now, but I've yet to configure it completely as I'm a little lost by the wiki entry.  Basically how would I configure the following rc.conf in systemd:

DAEMONS=(syslog-ng dbus @preload @iptables @wicd @crond @ntpd @laptop-mode @acpid @bumblebeed @pdnsd @psd)

`systemctl enable syslog-ng.service` works, but `systemctl enable dbus.service` doesn't.

$ sudo systemctl enable dbus.service
Warning: unit files do not carry install information. No operation executed.

Offline

#14 2012-05-01 14:21:43

guelfi
Member
From: /home/guelfi
Registered: 2011-07-01
Posts: 111

Re: [Solved] Login Delay on tty

You don't have to activate D-Bus when using systemd, because systemd needs D-Bus for running properly, so it is activated automatically.

For the other daemons, look in /usr/lib/systemd/system for a corresponding unit and activate it.

Offline

#15 2012-06-19 06:01:50

JohnDVD
Member
Registered: 2011-11-29
Posts: 40

Re: [Solved] Login Delay on tty

I had the same delay of about 8 seconds between login prompt and having been logged in.
The solution to me was to disable the preload daemon in rc.conf

Offline

Board footer

Powered by FluxBB