You can switch to a virtual console by pressing Ctrl-Alt-F1, enter as root and check logs for any related error messages, in particular /var/log/Xorg.0.log and /var/log/messages. Also you have to check the file $HOME/.ICEauthority of the user which cannot do X login. Check the ownership and permissions: it should something like
-rw------- 1 username group 6564 Apr 4 11:25 .ICEauthority
where username and group should be the user login name and the belonging group. If changed, reset them with chown
. Otherwise just remove the user's .ICEauthority file and it will be re-created at login.
Sometimes it happens that some graphical application launched by root gains permission to use the user's display and modify the .ICEauthority file.
Ah... in case you don't know: when you've done, you can switch back to the X console by pressing Ctrl-Alt-F7.