Once I rebooted my laptop, and then it has never loaded in GUI mode after that. I can use only tty 1-6, tried reinstall gdm3, lightdm, sddm, purged nvidia drivers and reinstalled. Always as I try to start gui( startx, xinit, systemctl start gdm3) it appears for only severel seconds and crashes. Log file in Xorg is clear, without (EE). I also reinstalled ubuntu-gnome-desktop, installed new 4.18.0-16-generic, reinstalled Xorg. Nothing. Is there someone, who can help?
1 Answer
This kind of problem is not simple to solve. There is a lot of knowledge about X necessary to solve this kind of situation. I suggest the following procedure to start a diagnosis:
1 - If it is a driver issue, then you will see no graphic window showing.
If you see some graphical, then the driver is working and the problem is
other (I think this is your case). If it is a graphic card issue, do
lspci
and see what VGA board you have and try to see the best driver
to that. You cited that your video board is Nvidia, so usually install
the package "nvidia-driver" will do the trick. When finished,
modprobe nividia
as root, or reboot the system. The driver probably
will be inserted at boot (lsmod | grep nv
as root will show it).
2 - Try to log-in as user and simply run Xorg
without any
parameters. This should show you a grey pattern screen. If this happens,
the Xorg is working (without a Window Manager X and Xorg does nothing).
Ctrl+Alt+Backspace can shutdown Xorg. Or Crtl+Alt+F1 (to -F6) to change
to a text terminal ps
and kill
Xorg manually.
3 - Do cat
to the file /etc/X11/default-display-manager. It will show
the default display manager, usually the login manager (lightdm, gdm,
kdm, etc. ). If it is not installed or points to the wrong executable,
then the display will crash and X will close. It looks like you problem,
so see if the value is right and and correct it if needed.
I am using Xfce and so the value in default-display-manager for me is:
/usr/sbin/lightdm
In your case it could be /usr/sbin/gdm3 (or something like that).
4 - The command /usr/bin/startx is a script. There are a lot of user files referenced by that script. See if one of that has some weird value. Usually the files are in user directory and are .x(something) or .X(something) . Be carefull, because there are .x(something) files not related to Xorg.
If you have Gnome installed, you can try to start it using startgnome
script (startgnome3, startkde or startxfce4, or something like this
depending on what you have installed). I remember the graphical interfaces
are packed with this scripts to help. If the interface enters, the problem
is with the login manager or other file.
The config files for X are in the /etc/X11
directory. Special attention to
/etc/X11/xinit/xinitrc
and /etc/X11/Xsession
.
If there are X or Xorg errors when you enter the user space, you can see the errors in user directory in the file .xsession-errors .
This text does not show how to solve your problem, but is a start to diagnose it.
Graphic interfaces are very complex, there are a lot of problems that are system wide (your problem for instance) and a lot of problems that are user space specific (configuration files in user space problems, Display Manager behavior because user space config problems and so on).
Different of many commercial software, Linux enables you to dig the problem til the scripts (and til the source code if you really need). The task is huge, but do not get discouraged by that. You can learn everything that happens in your system if you want. But to do that you need to be pacient and stubborn enough to study, try and try again til it works.
I hope you can find the solution of your problem.
Ric.