How can I stop GDM on Ubuntu 18.04 Desktop in order to install NVIDIA Driver?
Solution 1
Ubuntu has been using systemd for a while now. This worked for me.
sudo systemctl stop gdm3
Solution 2
Dropping to run-level 3 and then installing the driver worked for me. You can change run-level using: sudo telinit 3
.
Related videos on Youtube
user3667089
Updated on September 18, 2022Comments
-
user3667089 over 1 year
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?
-
user3667089 about 6 yearsI had bad experiences using apt to install nvidia drivers and would rather avoid it if possible.
-
tuddyftw about 6 yearsThen try to kill xorg using
killall xorg
switch to TTY2 with CTRL + ALT + F2 and after that try to kill gdm.Hope it works -
user3667089 about 6 yearsThis 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.
-
Zanna over 5 yearsDid 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 likesystemctl isolate multi-user.target
. -
hypercube over 5 yearsYes, this worked for me on Ubuntu 18.04. I haven't tried the
systemctl
command that you mentioned. -
Yvon over 5 yearsThis worked for me on Ubuntu 18.10. The
systemctl
command did not work. But I re-launched gdm3 withsystemctl
. -
alecive over 5 yearsIt didn't work for me. I am using 18.10. Any hint on why?