Ubuntu 10.04 Dual Monitor with nVidia Driver 14
Solved – Ubuntu 10.04 Dual Monitor with nVidia Driver
With every Ubuntu OS version update, we risk losing our dual monitor support. Through a cockpit error, I found myself performing a fresh install of Ubuntu this week. After getting all the important things working, it was time to correct the dual monitor issue.
If you are running any version of Lucid Lynx with X/Windows, these instructions should work. There is nothing specific to Gnome or KDE or any other environment here. Heck, they may work for older releases too.
My Setup
- LDXE Ubuntu 10.04 (Lucid Lynx) x64 – ok, really, I installed Ubuntu Server x64, then added the ldxe-desktop later.
- nVidia GeForce 7600 GS video Adapter with DVI and VGA outputs.
- VGA goes into a KVM switch for keyboard, mouse and the main wide screen LCD monitor (0).
- DVI goes directly into the 4:3 LCD (1)
- Main Monitor – 0 – Gateway 24" LCD connected via VGA – 1920×1200 native resolution
- Secondary Monitor – 1 – Dell 1905FP 19" LCD connected via DVI – 1280×1024 native resolution
Make all your physical connections.
Packages, Drivers, ETC
With this OS release, Ubuntu decided to replace the nVidia proprietary drivers for some open source drivers. That’s nice, but I don’t have time to figure this out now. Dual monitor support, now.
Install all that you need.
sudo apt-get install nvidia-185-kernel-source nvidia-current nvidia-glx-185 nvidia-kernel-common nvidia-settings
You may need to install build-essentials first.
Reboot and hopefully you’ll see the nVidia graphics icon start on the main screen as X starts up.
/etc/X11/xorg.conf
On my system, this file, /etc/X11/xorg.conf, didn’t exist even with X/Windows running.
Clicking the menus to get to any nvidia program has never worked well for me since those menus don’t include a sudo before running the program. Basically, you end up with a read-only program, not what you want. You’ll need to create a generic X config file to start.
sudo /usr/bin/nvidia-xconfig
That’s it. No GUI, no interface at all. Mine had nvidia-auto-select modes for everything. You may need to restart X/Windows to get the nVidia Driver activated. If the next step tells you the nVidia driver isn’t loaded, reboot.
Next run the NVIDIA X Server Settings program. This will have a GUI.
sudo /usr/bin/nvidia-settings
On the X Server Display Configuration tab, you should see 2 monitors. One of them is “disabled.” To enable it,
- click on the disabled monitor in the diagram
- click on the “Configure” button to open a popup.
- In the popup, select “TwinView”, then “ok”
- click on the main monitor (gateway in my situation)
- click on “Configure” button to open a popup.
- In the popup, select “TwinView”, then “ok”
- Set the native resolution for your main monitor – 1920×1200.
- Select the other monitor (CRT-1 / Dell) in the diagram
- Set the native resolution for your 2nd monitor – 1280×1024. This resolution wasn’t available to me, so Auto was all I could select at this point.
- Verify the “Position” is reasonable – Absolute – +1920+0 in my case.
- click the “Save to X Configureation File” button.
- restart X (however you like)
After restart, go back into the last program
sudo /usr/bin/nvidia-settings
Check that your previous settings took and that the 2nd monitor is working. Do not select Xinemara. If you are happy with the resolutions, then you’re done. My 2nd monitor was running at 1024×768 while in “auto” mode, so I was not happy. To manually edit the resolutions in /etc/X11/xorg.conf
sudo vi /etc/X11/xorg.conf
Go to the bottom of the file and find the line that looks like this:
Option "metamodes" "CRT-0: 1920x1200 +0+0, CRT-1: nvidia-auto-select +1920+0; CRT-0: nvidia-auto-select +0+0, CRT-1: nvidia-auto-select +1920+0"
Replace it with your desired settings. Mine became this:
Option "metamodes" "CRT-0: 1920x1200 +0+0, CRT-1: 1280x1024 +1920+0; CRT-0: nvidia-auto-select +0+0, CRT-1: nvidia-auto-select +1920+0"
Restart X and life was good, for me at least.
What Really Happened
Just so you don’t think that I magically knew exactly what to do, I’ll admit there were a few frustrations. The “reload config” never worked. The old kill X keystrokes (cntl-alt-backspace) don’t work anymore either. I originally found myself rebooting (OUCH!) to get settings to show up, before recalling that I could just kill the process with “X” and it would respawn.
At the same time, recall the system was just installed, so my settings, common applications, uncommon apps aren’t available until after I install them. I was side tracked for a few hours getting some of those working too.
The first attempts always had the 2nd monitor with 800×600 resolution. I knew it was 1280×1024. The nVidia X-Server Settings program wasn’t helping. Once it decided 800×600, that resolution stuck. The only way out was to delete the /etc/X11/xorg.conf file and reboot to wipe all the settings. After that, I even had to rerun
sudo /usr/bin/nvidia-xconfigto get the nVidia driver setup again.
I hope this is helpful to someone.
Trackbacks
Use the following link to trackback from your own site:
https://blog.jdpfu.com/trackbacks?article_id=631
Here’s another article with screen shots that may be helpful for some.
The Ubuntu Guide is also available as a reference, but wasn’t useful to me.
i was the some in the frustration!
-keith
This is the only solution that worked first try for me.
—
Intel P35 board
Core II Duo
nVidia 7600
My two monitors are now working! Thanks John!
Thx!
any chance for the rotation of 2nd display? (not using xinerama that disables 3d effects)
Rotating a screen
Davy, It appears you already found the xorg setting for rotation, but didn’t like that it disables HW acceleration. I don’t use Xinerama according to the settings in my /etc/X11/xorg.conf.
For the others still interested in rotation, a quick web search on “xorg.conf rotation” found this: http://www.×.org/archive/X11R6.8.0/doc/rendition5.html. Seems pretty easy to rotate, but I didn’t test it. There is a downside. Enabling rotation disables acceleration.
Option "Rotate" CW
or
Option "Rotate" CCW
This reference was for X11R6.8, so you version may have a different settings. On my system, the file you need to edit is
/etc/X11/xorg.conf
. Please make a backup of your existing file before you attempt any changes. Common sense, I know.Thanks John, just had to re-install and was scratching my head with this for a while before remembering to run nvidia-xconfig thanks to your post :)
I was having trouble until I found this, thanks a lot! Running Nvidia config in admin mode was all I needed.
Closing current user session and login again works nicely to restart X. At least, it gets me exactly the same as rebooting…
Thx, this sort of fixed things for me too. I say sort of, since I have two external monitors (DVI) in addition to the laptop. In Windows this works so out of the box, but Ubuntu is giving me a hard time (as usual when it comes to these things). Anyway, thanks man. I guess one external monitor is better than none. I really hope they can fix stuff like this soon.
There is very little that you cannot accomplish using raw X/Windows, provided you are willing to leave the GUI setting world behind. I recall running multiple instances of window managers on Dec Alpha machines with 3 monitors attached around ‘93. Sorry that I don’t recall the number of X/Windows instances that we ran. Here’s an image with showing them in action.

Thx man ! Works perfect now !
But I do get an error message on the second screen saying that the resolution is not supported by x (I took 800×600 for that monitor). But everything seems to be working so it’s not really a problem.
Worked like a charm; thanks for your input sir. You have my gratitude. :)
All worked fine so far, thanks for the in depth help. My problem is my second monitor comes on when I boot up, goes through all the booting then my mouse cursor appears in my main monitor at which point the desktop loads and the second monitor loses signal and goes off…
This happened previously to me but I did end up fixing it, since then though I had a hard drive fail on me and am on a new install of ubuntu 10.04 (64 bit)
I just can’t get things working this time but I do seem to think I had to opt for the older nVidia driver not the latest. I can’t remember how i was able to go back to an older driver however :O(
Monitor Setup: 23" 1920×1080 with a 19" 1280×1024 off to the right
Both worked fine together with the default drivers after installing Ubuntu but I wanted some of the eye candy not available with the basic drivers :O(