Sometimes, after login, it goes to a black screen without any hard disk activity while mouse cursor works.
I login to the terminal by pressing
F4 and restart the X server using this command
sudo restart lightdm
Then login screen appears again and this time it goes to desktop after login.
How can I find the problem? I looked at system log but couldn't find any special thing.