Very slow login on Ubuntu Karmic

1

A few days ago I installed Ubuntu Karmic (alternate i386) on my PC. Everything is working fine, except that after I insert my password at GDM it takes ages to get to the desktop (about 16 seconds).
Since I'm using LXDE I'd think login should be quite quick.. Any hint on what I could check?

(the system itself isn't very old.. Pentium Dual-Core E5200 @ 2.50GHz, 2Gb RAM, 2 x 320Gb SATA HDs...)

Edit:
Some more info:

  • If I logout and then relogin, it still takes 16 seconds to get to the desktop
  • top during login says that CPU keeps under 10% usage, and swap isn't touched at all (0Kb used)

Joril

Posted 2009-12-03T21:20:03.177

Reputation: 1 879

Does the delay happen only when logging in graphically, or does it takes also too long when logging in text mode? – mac – 2009-12-03T22:58:06.770

Text login takes just a second. – Joril – 2009-12-05T15:03:02.337

Answers

1

This is not exactly an answer, but more of a collection of ideas on how to track down your problem. In my experience, these kind of delays happen because of one of the following:

  1. Real need for processing lots of stuff.
  2. Run out of RAM and use of swap-space.
  3. Waiting for a service that either takes time to start, either fails entirely to start (so that the computer waits for the request to time-out).

You could try to investigate more by running on a TTY (ctrl-alt-F2, for example) the programs top (show you CPU usage) to rule out #1 and mem (shows amount of used memory) to rule out #2. Of course you should do this while on the graphical console you start your GUI session.

If it's #3, then you should investigate your logs. You could use bootchart as suggested in furtelwart answer (+1) or looking at the logs directly. All relevant logs in ubuntu are under the /var/log directory. I use Gnome/GDM and my logs are stored under /var/log/gdm. Chances are yours will be under /val/log/lxde.

HTH!

mac

Posted 2009-12-03T21:20:03.177

Reputation: 1 439

In /var/log/gdm/xsplash-user.log I found a suspicious "** timeout **" line exactly after a pause of 15 seconds.. I think I'll investigate https://bugs.launchpad.net/xsplash/+bug/412455

– Joril – 2009-12-09T20:32:30.133

That did it :) I uninstalled xsplash and now login-time is down to 3 seconds.. That's the way I like it ;) Many thanks! – Joril – 2009-12-09T20:53:30.263

No worries... happy you managed to solve then! :) – mac – 2009-12-10T01:39:45.943

4

Check your Bootchart. It shows your boot behaviour including login as a PNG graphic and lets your analize possible bottlenecks.

Example from Bootchart.org

Large size

Bootchart documentation

guerda

Posted 2009-12-03T21:20:03.177

Reputation: 1 441

I didn't know Bootchart tracks post-login too.. I'll try it, thanks :) – Joril – 2009-12-08T19:05:02.727

1

Check your /etc/hosts and /etc/resolv.conf for invalid localhost entries. Remove them and the problem should fix itself.

BlackStar

Posted 2009-12-03T21:20:03.177

Reputation:

As I said in a comment above, the problem was xsplash having to wait for a timeout... Thanks for your time all the same :) – Joril – 2010-01-09T17:01:36.647