Unity Greeter has purple backgroundcolor before the background image is loaded

Bug #970024 reported by Philipp
180
This bug affects 37 people
Affects Status Importance Assigned to Milestone
unity-greeter (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

Im using Precise with the latest updates and lightdm 1.1.9-0ubuntu1.

Whenever lightdm is starting on bootup or logging out, there is a purple background shown before the real background image is loaded. I have attached a video demonstrates the problem.

Thats pretty annoying when you chose not to use the default pinky purple background image.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: lightdm 1.1.9-0ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-21.34-generic 3.2.13
Uname: Linux 3.2.0-21-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.0-0ubuntu2
Architecture: amd64
Date: Sat Mar 31 15:01:12 2012
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Alpha amd64 (20120209)
SourcePackage: lightdm
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Revision history for this message
Philipp (sacridex) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in lightdm (Ubuntu):
status: New → Confirmed
Philipp (sacridex)
Changed in unity-greeter:
status: New → Confirmed
Revision history for this message
Philipp (sacridex) wrote :

Here is patch to fix this.
unity-greeter will lookup /etc/lightdm/greeter-bottom-color.conf if it contains a valid color string(e.g. #123456).
If it does, this color will be used instead of the standard one(#2C001E)

Unfortunately, with the new unity-greeter version, the standard ubuntu background will be loaded and will fade into your custom image...

Revision history for this message
Philipp (sacridex) wrote :

Here is a newer fix, I also added a branch for it.
This fix also prevents loading the pink background image on startup.

Revision history for this message
Michael Coupet (compmastermike) wrote :

The definition of the default color in main-window.vala is responsible for the initial background color, the other one is the fallback for if opening the image specified by the configuration fails.

My question is, why is the initial background color shown at all? Why doesn't the configured image show instead? The draw function is definitely being called, as can be seen by the fact that the user-list, etc are showing on top of the initial background.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "lightdm backgroundcolor.patch" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Revision history for this message
Peter Hurley (phurley) wrote : Re: lightDM has purple backgroundcolor before the background image is loaded

As Michael Coupet points out, the bug here is that the default background is drawn at all. It's only because another size_allocate signal is received for the background that the user-configured gsettings background is drawn. Here's a clip from the attached greeter log which shows a span of 0.25 seconds between the MainWindow being shown and the correct, user-specified background being drawn (note the "Regenerating backgrounds" message):
[+1.03s] DEBUG: unity-greeter.vala:350: Showing main window
[+1.03s] DEBUG: New style for time label
[+1.03s] DEBUG: Evaluating bitmask for '%l:%M %p'
[+1.03s] DEBUG: Checking against 2 possible times
[+1.03s] DEBUG: Guessing max time width: 62
[+1.04s] DEBUG: background.vala:315: Regenerating backgrounds
[+1.04s] DEBUG: background.vala:67: Making background /usr/share/backgrounds/Winter_Morning_by_Shannon_Lucas.jpg at 1280x1024,1680x1050
[+1.04s] DEBUG: New style for time label
[+1.04s] DEBUG: Evaluating bitmask for '%l:%M %p'
[+1.04s] DEBUG: Checking against 2 possible times
[+1.04s] DEBUG: Guessing max time width: 62
[+1.05s] DEBUG: unity-greeter.vala:891: Starting main loop
[+1.05s] DEBUG: Read 8 bytes from daemon
[+1.05s] DEBUG: Read 26 bytes from daemon
[+1.05s] DEBUG: Prompt user with 1 message(s)
[+1.08s] DEBUG: unity-greeter.vala:310: starting system-ready sound
.....

[+1.29s] DEBUG: background.vala:116: Render of background /usr/share/backgrounds/Winter_Morning_by_Shannon_Lucas.jpg complete

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Closing lightdm task - this related to Unity Greeter only.

Changed in lightdm (Ubuntu):
status: Confirmed → Invalid
summary: - lightDM has purple backgroundcolor before the background image is loaded
+ Unity Greeter has purple backgroundcolor before the background image is
+ loaded
Changed in lightdm:
status: New → Invalid
Revision history for this message
Robert Ancell (robert-ancell) wrote :

I've just merged in lp:~khadgaray/unity-greeter/default-background-color which makes the background color configurable.
@Michael, correct. This color is a hack because there is a race between the X window appearing and the application being able to draw to it. This needs to be properly synchronised.

Changed in unity-greeter:
importance: Undecided → Medium
status: Confirmed → Triaged
Revision history for this message
Robert Ancell (robert-ancell) wrote :

The configuration change was done in bug 969059

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Philipp, thanks for the work on that patch. I don't see this patch solving the synchronisation issue unfortunately.
If you do get that working, the best way to propose that patch is to go to https://code.launchpad.net/~sacridex/ubuntu/precise/unity-greeter/purple-background-on-startup-fix and select "Propose for merging".

Thanks!

Revision history for this message
Philipp (sacridex) wrote :

There is no synchronisation issue.
But there is just too much stuff to be done between the initial background color and the actual background image is drawn.
There are 2 things that take longer than 0.2 seconds: launching Canberra and playing the startup sound takes about 0.26 seconds and LightDM.get_layout () (line 81 in menubar.vala) takes about 0.20 seconds.
So there was about a half second gap between those two backgrounds, unfotunately a ~0.1 second gap still remains.

The fact that the standard purple image is loaded at all, is a problem caused by appending the *other user to the user_list(which is the first user added, so the purple image is drawn) and then removing it later(which triggers a background redraw of the actual image).
But still, unity-greeter will fade from the initial background color to the actual background image, because the fade time is set and i am not able to disable it and reset it later. :(
But in my opinion that is no problem, the fade in actually looks nice.

no longer affects: lightdm
no longer affects: lightdm (Ubuntu)
affects: unity-greeter → unity-greeter (Ubuntu)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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