Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Every time I boot my PC Ubuntu keeps dropping me to TTY 1 where I have to log in and then do

sudo lightdm start

just to log in again, which is very annoying

I have already tried removing and re-adding it to update-rc.d

update-rc.d lightdm defaults

but it just does not work. Anyone got an idea which logfiles to check or what to do get it working again?

I use Mint 12 with Gnome3.

share|improve this question
    
A couple questions, so I can help. Does it flicker before you drop to console? Is it correct when you start it manually? –  TechZilla Mar 12 '12 at 19:56
    
yes it works fine when I start manually and it does flicker for a while (stops a checking battery state and then drops me to TTY 1) –  Christian Smorra Mar 13 '12 at 12:03

3 Answers 3

You can always reconfigure lightdm and check settings or loads defaults, like this:

sudo dpkg-reconfigure lightdm

EDIT

If you don't have trouble to start lightdm manually, maybe there is a problem with your PATH on boot.

Check content of file /etc/X11/default-display-manager. If only entry is lightdm, change this to /usr/sbin/lightdm.

sudo echo "/usr/sbin/lightdm" > /etc/X11/default-display-manager
share|improve this answer
    
unfortunately I get an error dpkg-maintscript-helper: warning: environment variable DPKG_MAINTSCRIPT_NAME missing dpkg-maintscript-helper: warning: environment variable DPKG_MAINTSCRIPT_PACKAGE missing –  Christian Smorra Mar 13 '12 at 12:02
    
To resolve this, you can try to reinstall lightdm: sudo apt-get update && sudo apt-get install lightdm –  mindc Mar 13 '12 at 12:34
    
I reinstalled lightdm already and "/usr/sbin/lightdm" is my display manager –  Christian Smorra Mar 13 '12 at 15:29
1  
By the way, sudo echo foo > bar fails. Only echo will have sudo permissions while the shell doesn't, and its the shell that will open bar for writing. Try echo foo|sudo tee bar >/dev/null instead. –  Patrick Mar 17 '12 at 20:07

I have the same problem. I've installed Oneiric in 12 identical laptops. Sometimes after updating packages Lightdm will no longer start automatically; sometimes the last message is "checking battery state" and some other times something about the Plymouth server. If I log-in in a text terminal and start lightdm it runs fine. It is very annoying because I can never tell when one of the 12 laptops (used by students to log-in as guests) will get stuck on start-up.

share|improve this answer
    
hey, check my solution and please let me know if it helped –  Christian Smorra Mar 25 '12 at 23:05
up vote 0 down vote accepted

This is how I fixed this problem:

first you need to stop lightdm if it's running

sudo service lightdm stop

then you need to x server to create a fresh xorg.conf, I did this by renaming my old one

sudo mv /etc/X11/xorg.conf /etc/X11/xorg.old

then I deleted my current drivers

sudo aptitude remove --purge nvidia-current

IMPORTANT if you had or have drivers from the Nvidia site then you need to uninstall them as well. That means you will have to download them again if you dont have the .run file anymore and then do

[nvidia-installer] --uninstall

where nvidia-installer is the installer you just downloaded.

then you properly install the current drivers

sudo aptitude install nvidia-current

the next step would be to type

startx

and hope for Gnome2 (or the default window manager of your distribution) to come up which worked for me. The reason for this error seemed to be some kind of conflict with X11 and the Nvidia drivers. While on boot time I got the error that the Nvidia Kernel module could not be loaded, I still was able to start lightdm once I was in TTY1.

The cause for this might have been that I previously had the 290 version of the Nvidia drivers installed and then downgraded to nvidia-current (280) via aptitude which might caused some leftovers to remain and conflict with the older drivers (290 vs 280).

Note that you will have to reconfigure your desktop environment after applying these steps.

If you don't get a graphics accelerated UI (ie Gnome3, Unity 3D) run

sudo nvidia-xconfig

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.