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?

  • 1
    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 Moldovan Jul 18 '13 at 13:02
  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!

  • 4
    That's exactly what I did except halfway through #3 I was stopped with an error message. – Mysteriousness Jul 16 '13 at 13:59
  • 3
    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

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)

  • 4
    I think this is a bit dangerous. You could kill the RAID software manager (mdadm). – Spiros Mar 17 '17 at 15:42

Try running sudo service gdm stop.

The reason your command may be resulting in that output is because lightdm isn't your Display Manager.

In addition to gdm, also try xdm and kdm.


You will need the help of htop or top. Write down the PID number of the process you want to kill (in this case, Xorg). Once you have the PID, run the below command in a root shell (sudo -s):

kill -9 <PID>

For example:

kill -9 1234

You should then be able to install the NVidia drivers.

  • 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?

  • They're outdated, the NVIDIA website always has the most recent drivers. – Mysteriousness Jul 16 '13 at 14:00

Ok had the GTX 970 installation Problem under Ubuntu 14.04 too. Sometime i was able to start Ubuntu with the standart drivers and sometime not.

However, this should hopefully fix the Problem: After switching from IGP (I7 4770 with HD4600) to GTX970 in Biosi got an error with some Xorg Gui.

However you can not install the Nvidia-Driver while X is running: -> sudo killall Xorg solves the problem

Then -> sudo ./NVIDIA-x68xxx.run

After the first Driver Install (orig. Nvidia 352.xx) i had a blank screen. Then i run the Nvidia Driver Installer again -> sudo ./NVIDIA-x68xxx.run This second install told me some kind of noveu driver is running and should be disabled. The driver asked me if it should disable noveu -> Yes disable noveu

After restart: Et Voila lighdm is running again :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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