I tried to connect a second display to my machine. I had Compiz as my window manager. Since it didn't work, I removed the monitor. Then after login, i get a black screen with cursor. I changed WM to Marco (Compton) and it fixed the issue. But every other WM seems to be broken.
Also, if I press hotkeys to switch to one of the virtual terminals (Ctrl + Alt + F2) and switch back to display, it seems to fix the issue.
What could be the reason for this?. I tried resetting compiz settings and display settings but it didnt work.