LightDM KDE Greeter loads the desktop half a minute after login

Bug #1069183 reported by Elias Kouskoumvekakis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Light Display Manager
Invalid
Undecided
Unassigned
lightdm-kde (Ubuntu)
In Progress
Undecided
Unassigned

Bug Description

I just did a fresh install of Kubuntu 12.10 on my workstation.

After I input my password and press enter instead of instantly loading the desktop, I must wait almost half a minute before the KDE icons appear and then the desktop loads normally. Log-in used to take just 2-3 seconds while showing the KDE icons.

Here's my lightdm.log:
http://lupo.teamdac.com/lightdm.log

You can see that it takes about 25 seconds for the greeter to start loading my desktop
...
[+9.24s] DEBUG: Greeter start authentication for lupo
[+9.25s] DEBUG: Started session 1711 with service 'lightdm', username 'lupo'
[+9.25s] DEBUG: Session 1711 got 1 message(s) from PAM
[+9.25s] DEBUG: Prompt greeter with 1 message(s)
[+9.25s] DEBUG: Continue authentication
[+9.28s] DEBUG: Session 1711 authentication complete with return value 0: Success
[+9.28s] DEBUG: Authenticate result for user lupo: Success
[+9.30s] DEBUG: User lupo authorized
[+35.28s] DEBUG: Greeter requests default session
[+35.28s] DEBUG: Using session kde-plasma
[+35.28s] DEBUG: Stopping greeter
[+35.28s] DEBUG: Session 1318: Sending SIGTERM
[+35.34s] DEBUG: Greeter closed communication channel
[+35.34s] DEBUG: Session 1318 exited with return value 0
[+35.34s] DEBUG: Greeter quit
...

Also lightdm writes the file x-0-greeter.log which might contain info about the problem:
http://lupo.teamdac.com/x-0-greeter.log

This bug doesn't happen if I enable autologin from the System Settings->Login Screen->General tab. In this case autologin is very fast without any delays and no x-0-greeter.log file is generated at all. Here's my lightdm.log when autologin is enabled:
http://lupo.teamdac.com/lightdm_autologin.log

description: updated
description: updated
description: updated
summary: - Desktop loads half a minute after login in the LightDM KDE Greeter
+ LightDM KDE Greeter loads the desktop half a minute after login
Revision history for this message
Harald Sitter (apachelogger) wrote :

Please attach the logs to the report.

Revision history for this message
Harald Sitter (apachelogger) wrote :

Also please try to manually select a session in the drop down and see if that changes anything.

Changed in lightdm-kde (Ubuntu):
status: New → Incomplete
Revision history for this message
Elias Kouskoumvekakis (eliaskousk) wrote :
Revision history for this message
Elias Kouskoumvekakis (eliaskousk) wrote :
Revision history for this message
Elias Kouskoumvekakis (eliaskousk) wrote :
Revision history for this message
Elias Kouskoumvekakis (eliaskousk) wrote :

I can't select another session as KDE Plasma is the only one listed below the Username/Password textboxes.

I have also tried without success:

1) Both included themes (Classic & User Bar)
2) Login from a console (tty1) before I login in the LightDM
3) Login from a console, kill and then restart the account service (/usr/lib/accountsservice/accounts-daemon)

Revision history for this message
Elias Kouskoumvekakis (eliaskousk) wrote :

I managed to reduce and almost eliminate the delay by removing the background image. Now the lightdm logfile reports a 3 second delay which I believe is acceptable. Maybe this bug has to do with the deallocation of the memory it allocated for the background image?

I also reproduced this behavior to my laptop that I just upgraded (12.04 -> 12.10). Strangely, although the laptop has a slow 4200rpm HDD instead of an SSD and a slower cpu, the mentioned lag is less than two seconds with the same settings...

Revision history for this message
David Edmundson (david.edmundson) wrote :

Thanks for all the detailed logs.
There's definitely something weird going on.

Between auth complete and login the following happens:
  - There's an animation
  - We take a snapshot of the screen, and run an app to set the X root background image
  - We start the session

The delay is almost certainly something going wrong in this second stage. It's a bit of a hack that all display managers do to solve a black flicker between login and ksplash starting.

I don't see how the choice of background could make a difference as it's sending a screenshot of the screen to lightdm-kde-greeter-rootimage, I don't see how what's in the image could make a difference.

Could you set the background image again, and see if it's reproducible?
Do you get the delay with a different background file?

Revision history for this message
Elias Kouskoumvekakis (eliaskousk) wrote :

Hi David, thanx for replying. You are doing great work on LightDM KDE Greeter, thank you!

After some testing with various backgrounds it seems that the delay is always specific to each background image and I was unlucky enough to select the worst of them which is the one with the wafer/processors (third one below @ 2560x1440).

Some of the images I tried are the following (from simplest to most complex):

http://wallpaperswide.com/ubuntu_desktop_blue-wallpapers.html
1280x720 - 220KB - 3sec delay
1600x900 - 333KB - 3.1sec delay
2560x1440 - 990KB - 3.5sec delay

http://wallpaperswide.com/white_wolves_2-wallpapers.html
1280x720 - 298KB - 3.7sec delay
1600x900 - 465KB - 3.9sec delay
2560x1440 - 1.1MB - 4.2sec delay

http://wallpaperswide.com/processors-wallpapers.html
1280x720 - 369KB - 13.9sec delay
1600x900 - 525KB - 17.2sec delay
2560x1440 - 1.1MB - 25.9sec delay

As we expected, a bigger resolution and/or file size produces a bigger delay. However the last wafer/processors images have something unique that causes this huge delay. Maybe it's my PC that's getting old (AMD X2 4400+, 2GB RAM, made in 2005) so it would be nice if we could test those last background images on a faster pc.

P.S Do you happen to know why after the login and before ksplash loads the icons, a black X cursor appears for about a second? Is this normal X behavior? I haven't seen this cursor for quite some time :P

Revision history for this message
David Edmundson (david.edmundson) wrote :

That should be everything I need to test this.

I suspect a one line change (to turn off smooth scaling on the background image) will fix everything. I now have the images and can test. Alternately I could maybe cache a scaled png version. I'll see how well this first fix works.

Actually when I first went through benchmarking LightDM having a JPEG background (1920x1280) caused the processor to spend as much time decoding the JPEG as it did doing everything else. (JPEG can have up to ~6000 CPU calculations for each block of 8x8 pixels. My day-job is about image compression, I could go on for hours) . It'l be slowing down your load time too.

Thanks again for the extensive investigation.

Tracking on KDE's bugzilla here: https://bugs.kde.org/show_bug.cgi?id=308738

Changed in lightdm-kde (Ubuntu):
status: Incomplete → In Progress
Revision history for this message
Robert Ancell (robert-ancell) wrote :

(Closing lightdm task as the information here seems to indicate it is a greeter problem)

Changed in lightdm:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.