Notebook monitor not detected (Ubuntu Gnome 14.04 & 346.59, GT 635M)

As many people do, I’ve had a host of problems using Ubuntu 14.04 and my optimus-enabled notebook.

I’m on an Asus notebook with a GT 635M + Intel HD-something. I use an external monitor connected through HDMI. Ubuntu Noveau drivers detected both monitors (builtin and external) fine, but HDMI output was horrible (choppy/slow refresh), so I tried my luck with the proprietary drivers.

I have had several small issues with the proprietary driver, the most annoying being the one I described in the title: only my external monitor is detected. Since nvidia-settings is supposed to generate xorg.conf, I’m guessing it is the culprit. I also can’t seem to get nvidia-settings to save the adjustments I make; each new sessions results in a clean-slate nvidia-settings.

I also have minor ghosting issues when scrolling, but I’m guessing that may be X or gdm’s fault. This is most noticeable when scrolling text (web browser, text editors).

PS. I absolutely had to manually insert the line ‘BusID “1:0:0”’ under section “Device” in xorg.conf. This line was not generated by nvidia-settings nor by the driver’s installation script. Vanilla Ubuntu 14.04 setup + downloading the driver through Nvidia’s portal and running the installation script + reboot always results in a broken X configuration (black screen(s)). After installing the driver, I had to insert the BusID line through TTY and reboot. I am able to replicate this issue.

Log: https://gist.githubusercontent.com/lbrito1/9a12054d7c6a17e2b683/raw/nvidia-log
xorg.conf: https://gist.github.com/lbrito1/9c342ee7691782d9e4ab

$ lspci | grep NVIDIA
01:00.0 VGA compatible controller: NVIDIA Corporation GF108M [GeForce GT 635M] (rev a1)

$ xrandr

Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 16384 x 16384
HDMI-0 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 477mm x 268mm
1920x1080 60.0*+
1680x1050 60.0
1280x1024 75.0 60.0
1152x864 75.0
1024x768 75.0 60.0
800x600 75.0 60.3
640x480 75.0 59.9

ftp://download.nvidia.com/XFree86/Linux-x86_64/346.72/README/optimus.html
ftp://download.nvidia.com/XFree86/Linux-x86_64/346.72/README/randr14.html