I'm using a fresh install Ubuntu 13.04 on a laptop, and I use it often but not always with an external HDMI monitor, but I get weird behavior whenever I use dual screen. If I have the cable plugged in as the login screen shows up, it goes into low-graphics mode and the mouse is gone. I can plug the cable after login and configure the display, but then the mouse pointer on the laptop monitor flickers, and the external monitor only seems to refresh a small area for some time, so I get mouse trails and the likes.
I was told these problems would be gone after installing the NVIDIA drivers, but the list in Additional Drivers is empty, and if I try to install the drivers through other means, it just stops detecting the monitor, even with xrandr. The couple of times I've tried, I've had to reinstall the OS because the monitor wouldn't work even after purging the driver packages and I couldn't find any other way.
Is this a bug? Do I need to install something?
In case it matters, running
lspci | grep VGA gives:
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09) 01:00.0 VGA compatible controller: NVIDIA Corporation GF108M [GeForce GT 540M] (rev ff)