In the case of Ubuntu 16.04. I can download the NVIDIA driver run file and then ctrl+alt+F1 and then do the below

sudo service lightdm stop
sudo ./NVIDIA-Linux-x86_64-390.48.run

I follow on screen instructions to install and reboot and everything works.

Now I am trying to do the same thing on Ubuntu 18.04. I read that Ubuntu 18.04 switched to gdm so I tried

sudo service gdm stop
sudo gdm stop

None of them worked, after some searching I realized it could be gdm3 instead but I tried

sudo service gdm3 stop
sudo gdm3 stop

Still none of them worked, and of course sudo service lightdm stop doesn't work. When I tried to install the driver it kept telling me the x-server is still on so can't start the installation process.

What is the right way to stop gdm in Ubuntu 18.04?

6 Answers 6


Ubuntu has been using systemd for a while now. This worked for me.

sudo systemctl stop gdm3
  • 1
    It didn't work for me. I am using 18.10. Any hint on why?
    – alecive
    Commented Feb 4, 2019 at 16:54

Dropping to run-level 3 and then installing the driver worked for me. You can change run-level using: sudo telinit 3.

  • Did this work for you on Ubuntu 18.04? The concept of run level is a little redundant with systemd as init. Instead one would theoretically run something like systemctl isolate multi-user.target.
    – Zanna
    Commented Sep 27, 2018 at 19:31
  • 1
    Yes, this worked for me on Ubuntu 18.04. I haven't tried the systemctl command that you mentioned.
    – hypercube
    Commented Sep 28, 2018 at 20:41
  • This worked for me on Ubuntu 18.10. The systemctl command did not work. But I re-launched gdm3 with systemctl.
    – Yvon
    Commented Jan 23, 2019 at 4:45

You should better install the driver using: sudo apt install nvidia-graphics-drivers-384

Make sure that you updated your local repositories by using sudo apt-get update

Hope it works

  • I had bad experiences using apt to install nvidia drivers and would rather avoid it if possible. Commented Apr 27, 2018 at 15:35
  • Then try to kill xorg using killall xorg switch to TTY2 with CTRL + ALT + F2 and after that try to kill gdm.Hope it works
    – tuddyftw
    Commented Apr 27, 2018 at 15:46
  • 1
    This doesn't work for me either. I ended up booting into recovery mode and drop to root shell to install NVIDIA driver. Not the best way but I hope someone can come up with a better solution. Commented Apr 28, 2018 at 17:18

If you're using Ubuntu on wayland, just try this:

sudo killall gdm-wayland-session

That worked for me.


I faced a similar issue and was able to update my driver by following these steps -

  1. ctrl+alt+F3 (F1 and F2 don't work in ubuntu 18.04)
  2. killall gdm
  3. Find the id of Xorg process and kill -9 <process Id>
  4. run sudo ./NVIDIA*.run
  5. sudo systemctl start gdm3

If you are on Ubuntu 20.04 run this:

sudo systemctl stop gdm3
sudo systemctl stop lightdm 

You can then start them again by running

sudo systemctl stop gdm3
sudo systemctl stop lightdm 

If you have an RTX 3050, I'd recommend using lightdm

GLHF with these nvidia drivers man :')

  • Ubuntu 20.04 doesn't have lightdm.
    – Pilot6
    Commented May 11, 2022 at 12:05
  • Then what am I using? ``` systemctl status display-manager.service ``` ● lightdm.service - Light Display Manager Commented May 11, 2022 at 12:06
  • If you are using Ubuntu 20.04, then you are using GDM, unless you've changed it. They don't work at the same time.
    – Pilot6
    Commented May 11, 2022 at 12:07
  • It actually uses gdm3.... And yes, I had to change it since nvidia drivers and gdm3 don't play well together I changed my display manager from gdm3 to lightdm to fix that issue :P Commented May 11, 2022 at 12:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .