Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Every time I try to kill the x-server,

sudo service lightdm stop

so that I can install the latest Nvidia drivers, I get an error message.

stop: Unknown instance:

What am I doing wrong?

share|improve this question
that depends on which DM you are using: sudo service lightdm stop --> Ubuntu with Unity; sudo service kdm stop --> Kubuntu; sudo service gdm stop ..; –  Rodislav Jul 18 '13 at 13:02

4 Answers 4

  1. Use ctrl+alt+F1 to switch to terminal,
  2. login
  3. run sudo service lightdm stop, lightdm and xserver should be stopped now (check with ctrl+alt+F7, which is your current xorg session, it should not show any desktop now)
  4. do your things
  5. run sudo service lightdm start to start lightdm and xorg again.

Good Luck!

share|improve this answer
That's exactly what I did except halfway through #3 I was stopped with an error message. –  Mysteriousness Jul 16 '13 at 13:59
That sounds mysterious ;) my best guess is that lightdm is not runnig at all and you are using some other Display manger... With cat /etc/X11/default-display-manager, you can find out which Display Manager you are currently using, with sudo service --status-all you can find out which services are currently running. Maybe that helps to find out why there is no lightdm instance and what Diplay manager runs instead.. –  mondjunge Jul 16 '13 at 14:16

Had this problem too ! - You need a bit help of top or of htop. Write down the PID number of concerning process you want to kill.

Then simply type ( in protected mode as root ):

kill -9 PID here-number-of-pid

( it looks then like e.g.: kill -9 PID 2023 )

Then you should be able to proceed with installation of nvidia-drivers.

share|improve this answer
Thanks! actually realized this and started typing while you answered. –  Mysteriousness Jul 16 '13 at 14:25
Do you have nvidia-card with CUDA ? - for this case there is special driver - you can read all this at my post here : askubuntu.com/questions/311151/… –  dschinn1001 Jul 16 '13 at 14:29

/etc/init.d/lightdm stop maybe? And why you can't install nvidia drivers from software center?

share|improve this answer
They're outdated, the NVIDIA website always has the most recent drivers. –  Mysteriousness Jul 16 '13 at 14:00
up vote 1 down vote accepted

I did a little more digging around and found that I could just use pgrep to find its PID and then kill it.

pgrep dm -l

sudo kill (insert PID here)

share|improve this answer

Your Answer


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.