Software & AppsOperating SystemLinux

How To Stop GDM on Ubuntu 18.04 to Install NVIDIA Driver

Ubuntu 16

In this article, we will guide you through the process of stopping GDM (GNOME Display Manager) on Ubuntu 18.04 to install the NVIDIA driver. This is a necessary step when installing the NVIDIA driver because it requires that the X server is not running. GDM is the display manager responsible for the login screen and the user session management on Ubuntu 18.04.

Quick Answer

To stop GDM on Ubuntu 18.04 and install the NVIDIA driver, you can use the systemctl command, telinit command, or killall command. Once GDM is stopped, you can proceed to install the NVIDIA driver using the downloaded driver file. Remember to reboot your system after installation.

What is GDM?

GDM, or GNOME Display Manager, is the default display manager for the Ubuntu 18.04 operating system. A display manager is a graphical login manager which starts a session, simply put, it manages user logins and graphic display servers.

Why do we need to stop GDM?

When installing NVIDIA drivers, it is necessary to stop GDM because the NVIDIA driver installer will fail if the X server is running. Stopping GDM ensures that the X server is not running.

How to stop GDM on Ubuntu 18.04

There are several methods to stop GDM on Ubuntu 18.04. Below, we will outline three of the most common methods.

Method 1: Using systemctl

The systemctl command is used to control the systemd system and service manager. In this case, we will use it to stop the GDM service.

  1. Open a terminal. You can do this by pressing Ctrl + Alt + T.
  2. Enter the following command:
sudo systemctl stop gdm3

This command will stop the GDM service and allow you to install the NVIDIA driver.

Method 2: Using telinit

The telinit command is used to change the system runlevel. In this case, we will change the runlevel to 3, which is a non-graphical mode, and stop the GDM service.

  1. Open a terminal.
  2. Enter the following command:
sudo telinit 3

You can then proceed to install the NVIDIA driver.

Method 3: Using killall

The killall command is used to kill processes by name. In this case, we will use it to forcefully terminate the GDM process.

  1. Open a terminal.
  2. Enter the following command:
sudo killall gdm3

This command will forcefully terminate the GDM process and stop the service. After that, you can install the NVIDIA driver.

Installing the NVIDIA Driver

After stopping GDM, you can proceed to install the NVIDIA driver. You can download the latest NVIDIA driver from the official NVIDIA website.

Once you have downloaded the driver, you can install it by running the following command in the terminal:

sudo sh NVIDIA-Linux-x86_64-XXX.XX.run

Replace XXX.XX with the version number of the driver you have downloaded.

Conclusion

Stopping GDM on Ubuntu 18.04 to install the NVIDIA driver might seem like a daunting task, but with the right commands, it’s a straightforward process. Remember to reboot your system after installing the NVIDIA driver to apply the changes. Always ensure that you download the latest version of the driver from the official NVIDIA website to get the best performance and support.

Can I use a different display manager instead of GDM?

Yes, you can use a different display manager instead of GDM. Some popular alternatives include LightDM and SDDM. To install and use a different display manager, you can follow the instructions specific to that display manager. Make sure to stop the current display manager (GDM) before installing and configuring the new one.

Leave a Comment

Your email address will not be published. Required fields are marked *