Ubuntu – Restarting gdm in 18.04 doesn’t work


When I try to run one of these commands:

sudo service gdm restart
sudo service gdm3 restart

the system gets stuck in a loop. It goes from the graphical interface to a black screen, then a terminal-like screen with lots of [ OK ] and then again GUI, this repeats cca every second.

It is impossible to stop this, as GUI ceases to respond to any keystrokes and tty randomly misses some of them (so that it's not possible to correctly input the password).

What is the correct procedure for restarting X then?
(I'm on a freshly installed Ubuntu 18.04 on Acer A315)

Best Answer

gdm may be buggy.

As a workaround, I use lightdm.

sudo dpkg-reconfigure lightdm

Choose lightdm as the display manager. And X restart works.

sudo service lightdm restart
Related Question