LightDM fails to start after nvidia-current or nvidia-current-updates are installed (upstart job issue)

Bug #873495 reported by Carl Richell on 2011-10-13
206
This bug affects 43 people
Affects Status Importance Assigned to Milestone
Light Display Manager
Undecided
Unassigned
lightdm (Ubuntu)
Medium
Unassigned
Precise
High
Unassigned

Bug Description

Occurs reliably on fast Sandy Bridge hardware with a fast GPU - GTX 485M, GTX 560M or GTX 580M.

Appears to be a race condition. LightDM attempts to start before /dev/nvidiactrl is created. As a workaround add "sleep 1 && service lightdm start" to /etc/rc.local to start the service.

### This workaround is insufficient. Some users have reported that their systems do not start after initial user setup. Deleting the contents of /var/run/dbus/* resolves the issue in these cases. ###

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: xorg 1:7.6+7ubuntu7
ProcVersionSignature: Ubuntu 3.0.0-12.20-generic 3.0.4
Uname: Linux 3.0.0-12-generic x86_64
NonfreeKernelModules: nvidia
.proc.driver.nvidia.gpus.0: Error: [Errno 21] Is a directory: '/proc/driver/nvidia/gpus/0'
.proc.driver.nvidia.registry: Binary: ""
.proc.driver.nvidia.version:
 NVRM version: NVIDIA UNIX x86_64 Kernel Module 280.13 Wed Jul 27 16:53:56 PDT 2011
 GCC version: gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3)
.tmp.unity.support.test.0:

ApportVersion: 1.23-0ubuntu3
Architecture: amd64
CompizPlugins: [core,bailer,detection,composite,opengl,decor,regex,snap,animation,resize,place,vpswitch,mousepoll,workarounds,gnomecompat,compiztoolbox,move,grid,imgpng,wall,fade,expo,session,unitymtgrabhandles,ezoom,scale,unityshell]
CompositorRunning: compiz
Date: Thu Oct 13 11:05:18 2011
DistUpgraded: Fresh install
DistroCodename: oneiric
DistroVariant: ubuntu
DkmsStatus: nvidia-current, 280.13, 3.0.0-12-generic, x86_64: installed
ExtraDebuggingInterest: Yes, whatever it takes to get this fixed in Ubuntu
GpuHangFrequency: Continuously
GpuHangReproducibility: Yes, I can easily reproduce it
GpuHangStarted: Immediately after installing this version of Ubuntu
GraphicsCard:
 nVidia Corporation Device [10de:0e31] (rev a1) (prog-if 00 [VGA controller])
   Subsystem: CLEVO/KAPOK Computer Device [1558:5102]
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
JockeyStatus:
 xorg:nvidia_current - NVIDIA accelerated graphics driver (Proprietary, Enabled, In use)
 xorg:nvidia_current_updates - NVIDIA accelerated graphics driver (post-release updates) (Proprietary, Disabled, Not in use)
MachineType: System76, Inc. Serval Professional
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.0.0-12-generic root=UUID=79434c5f-d3ca-4224-98f2-06e7b36fbe32 ro quiet splash vt.handoff=7
SourcePackage: xorg
Symptom: display
Title: Xorg freeze
UpgradeStatus: No upgrade log present (probably fresh install)
XorgConf:
 Section "Device"
  Identifier "Default Device"
  Option "NoLogo" "True"
 EndSection
dmi.bios.date: 01/18/2011
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 4.6.4
dmi.board.asset.tag: Not Applicable
dmi.board.name: Serval Professional
dmi.board.vendor: System76, Inc.
dmi.board.version: serp7
dmi.chassis.asset.tag: Not Applicable
dmi.chassis.type: 10
dmi.chassis.vendor: System76, Inc.
dmi.chassis.version: serp7
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr4.6.4:bd01/18/2011:svnSystem76,Inc.:pnServalProfessional:pvrserp7:rvnSystem76,Inc.:rnServalProfessional:rvrserp7:cvnSystem76,Inc.:ct10:cvrserp7:
dmi.product.name: Serval Professional
dmi.product.version: serp7
dmi.sys.vendor: System76, Inc.
version.compiz: compiz 1:0.9.6+bzr20110929-0ubuntu3
version.ia32-libs: ia32-libs N/A
version.libdrm2: libdrm2 2.4.26-1ubuntu1
version.libgl1-mesa-dri: libgl1-mesa-dri 7.11-0ubuntu3
version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
version.libgl1-mesa-glx: libgl1-mesa-glx 7.11-0ubuntu3
version.nvidia-graphics-drivers: nvidia-graphics-drivers N/A
version.xserver-xorg: xserver-xorg 1:7.6+7ubuntu7
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev 1:2.6.0-1ubuntu13
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:6.14.99~git20110811.g93fc084-0ubuntu1
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.15.901-1ubuntu2
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:0.0.16+git20110411+8378443-1

Carl Richell (carlrichell) wrote :
bugbot (bugbot) on 2011-10-16
affects: xorg (Ubuntu) → nvidia-graphics-drivers (Ubuntu)
summary: - Xorg freeze on boot when installed in OEM mode after nvidia-current or
- nvidia-current-updates are installed
+ LightDM fails to start when installed in OEM mode after nvidia-current
+ or nvidia-current-updates are installed
description: updated
description: updated
Changed in nvidia-graphics-drivers (Ubuntu):
assignee: nobody → Canonical Desktop Team (canonical-desktop-team)

We've found that adding "sleep 2" above "exec lightdm" in /etc/init/lightdm.conf also resolves the booting issue (though we need to test more cold boots). sleep 1 was adequate on reboots but failed on some cold boots.

Doesn't explain why this only occurs in OEM mode.

Ara Pulido (apulido) wrote :

Was this working in 11.04?

David Overcash (funnylookinhat) wrote :

Yes - this worked fine in 11.04 - as far as we can tell the issue appears to be with LightDM ( which was not present in 11.04 ).

Ara Pulido (apulido) on 2011-10-27
tags: added: regression-release
Changed in lightdm (Ubuntu):
assignee: nobody → Canonical Desktop Team (canonical-desktop-team)
Changed in lightdm (Ubuntu):
assignee: Canonical Desktop Team (canonical-desktop-team) → Robert Ancell (robert-ancell)
importance: Undecided → Medium
status: New → Triaged
Launchpad Janitor (janitor) wrote :

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

Changed in nvidia-graphics-drivers (Ubuntu):
status: New → Confirmed
Edrin (edrin17) wrote :

Same bug on Asus G53S Laptop ( Core i-7 2630QM + nVidia 460 GTX M)

I confirm adding "sleep 2" above "exec lightdm" in /etc/init/lightdm.conf fixes the bug.

Sebastien Bacher (seb128) wrote :

Discussing with Robert we think that somebody who knows upstart better than us should have a look to that, reassigning to the team

Changed in lightdm (Ubuntu):
assignee: Robert Ancell (robert-ancell) → Canonical Desktop Team (canonical-desktop-team)
manatlan (manatlan) wrote :

same bug !

manatlan (manatlan) wrote :

except the workarounds doesn't works for me ;-(

Frank Ball (frizzen) wrote :

The workaround does not work for me either.
sleep 5 in /etc/init/lightdm.conf still didn't work, but if I put "service lightdm start" in rc.local that works.
Intel i3-550, geforce GT 430, single monitor, Ubuntu 11.10, nvidia-current 280.13-0ubuntu

This looks like bug 865768.

Does not seem to be restricted to OEM mode, I've got the same problem here for a regular Oneiric installation. (i5-2500K, GTX 560 Ti, nvidia-current 280.13-0ubuntu6.)

While the sleep workaround works for me, this really needs a proper fix.

Willi Janssen (ubuntumedien) wrote :

Same bug here on my box with fresh install, Intel i7, GTX460. This drives me nuts ...

Enabling Pre-released updates (oneiric-proposed) and updating seems to have solved this issue for me.

Today it has stopped to work again.

Adding "sleep 1" above "exec lightdm" in /etc/init/lightdm.conf fixed it but put "service lightdm start" in rc.local don't.

tags: added: blocks-hwcert-enablement
AceLan Kao (acelankao) wrote :

Hi, I'm wondering if this issue still happened while using Precise(12.04) kernel.
From what I heard, this issue might result from that kernel didn't send out the drm ready event.
So, it's possible that this issue is fixed by the newer kernel.

Jesse Sung (wenchien) wrote :

Running precise on a laptop with i7 and nvidia display, and does not have this issue. Possibly it's already fixed.

AceLan Kao (acelankao) wrote :

Great, I just cherry-picked some patches and built a new kernel
Could you guys try to see if those patches fix the issue?
Thanks

http://people.canonical.com/~acelan/bugs/lp873495/

Carl Richell (carlrichell) wrote :

AceLan, we are experiencing some issues with nVidia in OEM mode on 12.04. At this time, we have not determined if it's the same bug. We're investigating and will follow up with additional information.

Carl Richell (carlrichell) wrote :

Acelan,

We are still experiencing the bug in Ubuntu 11.10 with your test kernel. Please note, we are no longer shipping or testing OEM mode for Ubuntu 11.10 as of this week.

The bug is present in OEM mode on Ubuntu 12.04.

summary: - LightDM fails to start when installed in OEM mode after nvidia-current
- or nvidia-current-updates are installed
+ LightDM fails to start after nvidia-current or nvidia-current-updates
+ are installed (upstart job issue)
Changed in lightdm (Ubuntu Precise):
importance: Undecided → High
status: New → Triaged
milestone: none → precise-updates

Also affecting me. The following points may be of interest:

1. Graphics: NVIDIA GeForce G210M with 512MB DDR Dedicated Memory.
  2. Machine: Lenovo G550 NTDF3UK (Laptop)
  3. Previously I upgraded (on the standard driver) from 11.10 to 12.04 and this issue did not occur.
  4. I erased and reinstalled my entire OS (for fun) and then the issue started. I have tried with the default driver and also with the proprietary driver in 'Additional Drivers' and both exhibit the same issue.
  5. If I keep rebooting my machine it eventually recovers and logs me into the desktop. Sometime it logs me in first time, other times it takes around2-3 reboots and then it is fine again until the next time.
  6. I've attached my output from SysInfo in case anything in there is of interest (GM_SysInfo).

Launchpad Janitor (janitor) wrote :

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

Changed in nvidia-graphics-drivers (Ubuntu Precise):
status: New → Confirmed

Upgrading to Precise seems to have fixed the problem for me (nvidia-current 295.40-0ubuntu1, lightdm 1.2.1-0ubuntu1).

Johan Ferner (johan-ferner) wrote :

This continues to be an issue and just occured again on my home machine. My *feeling* is that it is a race condition triggered when some module needs compiling or some other attention the boot following an upgrade of some X related packages. So it is hard to know if it is fixed or not.
Usually I just reboot and everything is OK. But I've seen cases at work where it is much more persistent.
This is driving my userbase at work mad and is giving 12.04 a bad rep there. People refuse to upgrade.
Please try to fix this.

I no longer have this issue as a result of some system modifications. I changed my laptop disk arrangement so that I have two SSDs configured as RAID0. This has had the sum effect of slightly slowing down boot time from my previous configuration of just the one SSD. I do not use the proprietary NVIDIA driver on my system (NVIDIA GeForce G210M ) and I did a complete reinstall of 12.04. Obviously I'm not saying this is somethnig everyone should do - I needed this particularly setup and as a knock-on effect it stopped the low graphics mode error occurring. I am adding this result here as it *might* indicate something useful to someone in the know. I suspect my resolution here is as a direct result of the boot time slow down which would corroborate with the OP's supposition that this is a race condition.

glycylalanin (genewsky) wrote :

I encountered the same bug with a previous 12.04 kernel version (probably 3.2.0-25) and could fix it with the workaround (adding "sleep 1 && service lightdm start" in /etc/rc.local).
However after updating to 3.2.0-30 this workaraound actually CAUSED a lot of problems during startup:
Like 'Low graphics issue' & 'Hang on Checking Battery State' & 'Unable to shutdown with shutdown button+fallback to login screen'
I running a brand new i7-3770K with the system on an SSD without further graphic cards.

After deleting the rc.local entry everthings seems fine!

Thank You!

glycylalanin

John Calla (jwcalla1) wrote :

I still hit this bug on a routine basis. I'm quite surprised it hasn't been raised to a higher priority. Are users who are not geeks expected to know how to handle this when their machine boots to a tty console? The bug was reported in 2011? I'm just dumbfounded.

Alberto Milone (albertomilone) wrote :

Is this still a problem?

fjgaude (tanzen) wrote :

Seems to be not an issue with wither 13.04 or
13.10.

Thanks to those who fixed it.

frank

On 10/16/2013 04:30 AM, Alberto Milone wrote:
> Is this still a problem?
>

Bruno Munoz (bruno-bmunoz) wrote :

Le 16/10/2013 13:30, Alberto Milone a écrit :
> Is this still a problem?
>

not anymore on my side
thanks for the fix

Carl Richell (carlrichell) wrote :

Yes, this bug still occurs and has expanded to include very fast Haswell hardware with Intel graphics. This seems to be race condition where X is not ready for lightDM to start. We suspect an upstart bug or lightdm.conf config file issue. This fix works consistently:

-
We've found that adding "sleep 2" above "exec lightdm" in /etc/init/lightdm.conf also resolves the booting issue
-

System76 is packing and distributing it's own LighDM with this fix so that updates don't wipe it out and then cause failed boots for our users.

John Calla (jwcalla1) wrote :

Just had this happen ~4-5 times in a row on Sunday. I just kept rebooting until it finally worked.

12.04.3.

no longer affects: nvidia-drivers-ubuntu
Alberto Milone (albertomilone) wrote :

@Carl: so this has probably very little to do with the nvidia driver itself if you can reproduce it with intel.

I think I need more information to understand where the problem lies (lightdm could probably run some checks before starting X).

Can you reproduce the problem and attach the content of the following directory, please? (you might need root privileges)

/var/log/lightdm

You can do something like the following:

1) reproduce the problem
2) type this from the command line:
sudo cp -a /var/log/lightdm ~/
3) tar the directory and attach the resulting file.

no longer affects: nvidia-graphics-drivers (Ubuntu)
no longer affects: nvidia-graphics-drivers (Ubuntu Precise)
Carl Richell (carlrichell) wrote :

@Alberto: We'll pull together logs. The team is busy with saucy this week but we'll dedicate cycles next week.

I actually haven't seen this in 13.10. However; every release we don't apply the fix and start shipping we get nailed. Thanks for looking at this one. We'll help narrow it down!

Carl Richell (carlrichell) wrote :

@Alberto: We are not seeing this bug in 13.10. We're hoping upstart work through the S cycle has resolved it. We will know within a couple weeks and report appropriately.

Alberto Milone (albertomilone) wrote :

@Carl: ok, let's keep this bug report updated either way.

dino99 (9d9) on 2013-10-21
tags: added: i386 nouveau saucy
removed: oneiric
dino99 (9d9) wrote :

Here are my bad experiences on Saucy i386:

- have made 2 fresh installations on a desktop (old one with bios) via the saucy'netinstall iso this weekend
- one used as "saucy" with "nouveau" works as expected
- the other"saucy" ready for a "trusty" dist-upgrade, only display a black screen after having popped "boot in low graphic mode"

- have also made a dist-upgrade from raring i386 (which was working) to saucy (no ppa around) and also get that issue failing to a black screen. This is on an old laptop (bios) with "radeon", even "vesa" fails

note: maybe that discussion can help (i will investigate it)
http://askubuntu.com/questions/346738/13-04-lightdm-crashing-black-screen-flashing-cursor

dino99 (9d9) wrote :

Wonder if that new black screen issue is due to that kernel trouble:
- regression in recent kernels not displaying X output, so cant see lightdm login

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1195483

I started seeing this bug one hour ago in my xubuntu saucy amd64, and the "sleep 2" fix doesn't resolve the bug.

There is the log.

Alberto Milone (albertomilone) wrote :

@Jaime: I think something is trying to call numlockx but it can't find it, so lightdm stops the session:

"Error executing child process /usr/bin/numlockx: No such file or directory"

Maybe try installing the package:
sudo apt-get install numlockx

@dino99: please attach the content of the /var/log/lightdm directory and your /var/log/Xorg.0.log so that I can see what's going on

Thank you very much Alberto for your prompt answer.

Indeed, the problem was numlockx. It wasn't installed. And I don't want to install it, because the tune tip won't work, since I log in with a password, and I don't have a separate numeric keyboard, according to the 2.6th recommended action from this site. https://sites.google.com/site/easylinuxtipsproject/first

So, when I deleted that line at /etc/lightdm/lightdm.conf, the problem was PARTIALLY resolved, because the guests and root account log in, but my principal account still doesn't.

In addition of that, the first blue image that shows after the grub neither appears in the nvidia-319 driver, but it does when I activate the X.Org X server driver, xserver-xorg-video-nouveau, so I would like to know why it occurs. Before it happened, I had to shut down my laptop by force (on/off button), because the shut down process had friezed, and it didn't shut down by itself.

I suspect that there are several problems with X.Org... So I've tar'ed the /var/log/lightdm directory and /var/log/Xorg.0.log at the same tar.

Is it necessary to reset my principal account? Is there something that I could do for repair it?

Thank you very much for all.

In the last login, I tried to log in with my principal account, and I couldn't. Then, I tried to log in with the root account, and it worked. That should be at the log files.

Alberto Milone (albertomilone) wrote :

@Jaime: for some reason your user session fails to authenticate:

"Session: Failed during authentication"

I don't know why this happens and I'm not familiar with Xubuntu.

Also I don't know what you mean by "blue screen" after grub. The boot splash will change if you use nvidia (plymouth text mode) instead of nouveau (plymouth graphics mode).

One thing is certain: you're not experiencing the problem this bug report is about.

Thank you very much again for all.

Do you know someone/somewhere that could help me with that problem?

Indeed, I was talking about the boot splash.

Best regards.

It is normal that the folder /usr/share/lightdm/ doesn't exist?

** (lightdm-gtk-greeter:17733): WARNING **: Failed to open sessions directory: Falló al abrir el directorio «/usr/share/lightdm/sessions»: No existe el archivo o el directorio

** (lightdm-gtk-greeter:17733): WARNING **: Failed to open sessions directory: Falló al abrir el directorio «/usr/share/lightdm/remote-sessions»: No existe el archivo o el directorio

Bruno Produit (bruno-produit) wrote :

I am using a Lenovo W520, and my workaround is to use gdm instead of lightdm.
The bug doesn't seem to affect gdm.
The bug appeared only since my upgrade to 14.10

dino99 (9d9) wrote :

is it still an issue ?

Changed in lightdm (Ubuntu Precise):
status: Triaged → Incomplete
Changed in lightdm (Ubuntu):
status: Triaged → Incomplete
Changed in lightdm:
status: New → Incomplete
Bruno Produit (bruno-produit) wrote :
Download full text (5.2 KiB)

Hello yes it is actually!
Le 10 sept. 2015 06:11, "dino99" <email address hidden> a écrit :

> is it still an issue ?
>
> ** Changed in: lightdm (Ubuntu Precise)
> Status: Triaged => Incomplete
>
> ** Changed in: lightdm (Ubuntu)
> Status: Triaged => Incomplete
>
> ** Changed in: lightdm
> Status: New => Incomplete
>
> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (993579).
> https://bugs.launchpad.net/bugs/873495
>
> Title:
> LightDM fails to start after nvidia-current or nvidia-current-updates
> are installed (upstart job issue)
>
> Status in Light Display Manager:
> Incomplete
> Status in lightdm package in Ubuntu:
> Incomplete
> Status in lightdm source package in Precise:
> Incomplete
>
> Bug description:
> Occurs reliably on fast Sandy Bridge hardware with a fast GPU - GTX
> 485M, GTX 560M or GTX 580M.
>
> Appears to be a race condition. LightDM attempts to start before
> /dev/nvidiactrl is created. As a workaround add "sleep 1 && service
> lightdm start" to /etc/rc.local to start the service.
>
> ### This workaround is insufficient. Some users have reported that
> their systems do not start after initial user setup. Deleting the
> contents of /var/run/dbus/* resolves the issue in these cases. ###
>
> ProblemType: Bug
> DistroRelease: Ubuntu 11.10
> Package: xorg 1:7.6+7ubuntu7
> ProcVersionSignature: Ubuntu 3.0.0-12.20-generic 3.0.4
> Uname: Linux 3.0.0-12-generic x86_64
> NonfreeKernelModules: nvidia
> .proc.driver.nvidia.gpus.0: Error: [Errno 21] Is a directory:
> '/proc/driver/nvidia/gpus/0'
> .proc.driver.nvidia.registry: Binary: ""
> .proc.driver.nvidia.version:
> NVRM version: NVIDIA UNIX x86_64 Kernel Module 280.13 Wed Jul 27
> 16:53:56 PDT 2011
> GCC version: gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3)
> .tmp.unity.support.test.0:
>
> ApportVersion: 1.23-0ubuntu3
> Architecture: amd64
> CompizPlugins:
> [core,bailer,detection,composite,opengl,decor,regex,snap,animation,resize,place,vpswitch,mousepoll,workarounds,gnomecompat,compiztoolbox,move,grid,imgpng,wall,fade,expo,session,unitymtgrabhandles,ezoom,scale,unityshell]
> CompositorRunning: compiz
> Date: Thu Oct 13 11:05:18 2011
> DistUpgraded: Fresh install
> DistroCodename: oneiric
> DistroVariant: ubuntu
> DkmsStatus: nvidia-current, 280.13, 3.0.0-12-generic, x86_64: installed
> ExtraDebuggingInterest: Yes, whatever it takes to get this fixed in
> Ubuntu
> GpuHangFrequency: Continuously
> GpuHangReproducibility: Yes, I can easily reproduce it
> GpuHangStarted: Immediately after installing this version of Ubuntu
> GraphicsCard:
> nVidia Corporation Device [10de:0e31] (rev a1) (prog-if 00 [VGA
> controller])
> Subsystem: CLEVO/KAPOK Computer Device [1558:5102]
> InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64
> (20111012)
> JockeyStatus:
> xorg:nvidia_current - NVIDIA accelerated graphics driver (Proprietary,
> Enabled, In use)
> xorg:nvidia_current_updates - NVIDIA accelerated graphics driver
> (post-release updates) (Proprietary, Disabled, Not in use)
> MachineType: System76, In...

Read more...

dino99 (9d9) wrote :

@Bruno

14.10 is no more a supported release; please upgrade to 15.04 (there is no lightdm trouble with it)

dino99 (9d9) on 2015-11-08
Changed in lightdm (Ubuntu):
assignee: Canonical Desktop Team (canonical-desktop-team) → nobody
Launchpad Janitor (janitor) wrote :

[Expired for lightdm (Ubuntu) because there has been no activity for 60 days.]

Changed in lightdm (Ubuntu):
status: Incomplete → Expired
dino99 (9d9) on 2016-01-12
Changed in lightdm:
status: Incomplete → Invalid
Changed in lightdm (Ubuntu Precise):
status: Incomplete → Invalid
To post a comment you must log in.