I use Ubuntu Linux exclusively on my laptop. This has created a problem in the past when I’ve needed to use it connected to a projector for presentations or demonstrations. The projector simply wouldn’t work, or if it did I’d get a resolution of 640×480 pixels, which is clearly inadequate.
Yesterday I had the opportunity to spend some time debugging the issue. Because I work at a university rooms with projectors are heavily booked, but with exams commencing some free time is beginning to open up and I took advantage of it.
The laptop I have is fitted with a video card from NVIDIA. It is reported as a NVIDIA GPU GeForce Go 7300 (G72) graphics card. I’m also running the latest NVIDIA binary drivers, nvidia-glx-new, from the Ubuntu repositories. Since upgrading to Ubuntu 7.10 (Gutsy Gibbon) I don’t need to follow my old procedure any longer.
With the data projector attached to the laptop I started the nvidia-settings application and used it to detect the display. I then looked through my Xorg log file and noticed the following entry:
(WW) NVIDIA(GPU-0): Unable to read EDID for display device CRT-0
According to Wikipedia EDID (Extended display identification data) is:
a data structure provided by a computer display to describe its capabilities to a graphics card. It is what enables a modern personal computer to know what kind of monitor is connected. EDID is defined by a standard published by the Video Electronics Standards Association (VESA). The EDID includes manufacturer name, product type, phosphor or filter type, timings supported by the display, display size, luminance data and (for digital displays only) pixel mapping data.
The conclusion to draw here is that the driver wasn’t able to determine the capabilities of the projector and so used the most basic configuration options.
With this in mind I used the nvidia-settings application to enable twinview and configured the projector, device CRT-0, to use the display resolution of 640×480 and left the Hz setting at ‘Auto’ and clicked the ‘Apply’ button.
I just happened to have the System Log Monitor application still open and noticed the following line appear in the log:
(II) NVIDIA(0): "DFP-0:1280x800@1280x800+0+0,CRT-0:nvidia-auto-select@640x480+1280+0"
To me this line meant that my laptop screen (DFP-0) was configured for 1280×800 resolution and the CRT display was configured at 640×480 resolution and was position to the right of laptop screen. The bit that caught my attention was nvidia-auto-select@640x480. I thought that this means that even though the driver didn’t get the EDID information from the projector it was willing to try to auto detect the refresh rate etc. via another mechanism.
So I used the nvidia-settings application to save the xorg.conf file. I then used Ctrl-Alt-F1 key combination to go to another terminal.
I logged into this terminal and took a look at the xorg.conf file using vi by entering this command:
sudo vi /etc/X11/xorg.conf
(enter your password when prompted)
I noticed that the nvidia-settings application had created a number of new sections including these two:
Section "Monitor"
Identifier "Monitor0"
VendorName "Unknown"
ModelName "LPL"
HorizSync 30.0 - 75.0
VertRefresh 60.0
EndSection
Section "Screen"
Identifier "Screen0"
Device "Videocard0"
Monitor "Monitor0"
DefaultDepth 24
Option "TwinView" "1"
Option "metamodes" "DFP: 1280x800 +0+0, CRT: 640x480 +1280+0"
EndSection
I assume what the first section is for a generic specification of a monitor that will accommodate a wide number of models and types. The second section specified the twinview options. I took a deep breath and changed the last line of the second section to read as follows:
Option "metamodes" "DFP: 1280x800 +0+0, CRT: 1024x768 +1280+0"
I then restarted the x server with this command:
sudo /etc/init.d/gdm restart
I was greeted with the login prompt appearing via the project via a 1024×768 screen.
This was success at last. Somehow by not specifying one of the refresh rates presented by the nvidia-settings application I was able to get the application to write a configuration file that supported the widest range of monitors and it worked with the projector. Even though it still couldn’t get the EDID information.
The last remaining issue to resolve was that I wanted the login prompt to appear on the laptop screen, not the projector. To do this I added this line to both of the device lines in the configuration file for video card:
Option "TwinViewXineramaInfoOrder" "DFP-0"
This line overrides the default setting made my laptop screen the primary screen.
At last I had the projector running and I could now do my demonstrations / presentations.
The things I learnt from this are:
- Configuring NVIDIA and twinview under Linux is still, one part logic, two parts black magic and one part luck.
- It shouldn’t be this hard to get a projector to work under Linux, but sadly it appears it is. Based on my experiences and the plethora of posts etc. on the ‘net.
- When the NVIDIA driver can’t read the EDID don’t try to specify a refresh rate, leave it at auto and change the resolution via the metamodes line manually.
- When debugging this sort of error take plenty and time and work through the problem slowly and methodically. This is something that can’t be done just before the meeting / presentation is due to start.
- Take lots of backups of the configuration files
I hope this post while adding to the plethora of other posts, proves useful to people.
The photo Office: the lobby was uploaded to Flickr by user wili_hybrid and was found using the everystockphoto.com search engine using ‘nvidia’ as the search term.






November 15, 2007 at 9:56 am
[...] Getting a projector to work under Ubuntu Linux with Nvidia drivers [...]
November 27, 2007 at 11:58 am
Thanks for your post! Helped a great deal.
Had the same problem on my Gentoo box.
It also seems that it might be possible to leave the meta
modes on auto, but definitely the monitor section is
important. I had the problem that nvidia would generate
invalid refresh rates resulting in non-working projector at
higher resolutions than 640×480.
I also found that it is quite useful to set the dpi settings
for the screen, that way sizes do not get all screwed up
when the projector settings are set. In my case:
Option “DPI” “125 x 125″
goes into Screen section.
November 27, 2007 at 12:39 pm
@Egor,
Many thanks for your comment. I’m glad the post was useful to you.
January 2, 2008 at 8:36 pm
The way it is described above works, but you have to restart the X server when you connect the projector. It is because X server does not detect the second display at the start and you have to force him to think the second display IS there. Without this, and using nvidia-settings I was able only to set the detected display at 640×480 or 320×200. My solution is to add the following options to my xorg.conf file:
Section “Device”
Identifier “Videocard0″
Driver “nvidia”
Option “ConnectedMonitor” “DFP-0,CRT-0″
Option “UseDisplayDevice” “DFP-0,CRT-0″
Option “TwinView” “true”
Option “TwinViewOrientation” “Clone”
Option “TwinViewXineramaInfoOrder” “DFP-0,CRT-0″
Option “MonitorLayout” “LFP,LFP+CRT”
Option “metamodes” “DFP-0: 1024×768 +0+0, CRT-0: 1024×768 +0+0; DFP-0: 1280×1024 +0+0, CRT-0: 1280×1024 +0+0; DFP-0: 1024×768 +0+0, CRT-0: NULL”
EndSection
Later, when the X-server is started and you connect a beamer, just activate the second screen in nvidia-settings, and it can use much more resolutions than just 640×480.
You can find my working xorg.conf for laptop + projector here:
http://www.nvnews.net/vbulletin/attachment.php?attachmentid=29600&d=1198840027
January 7, 2008 at 2:26 pm
@Pik Master,
True, the first time I did this I needed to restart the X Server. However once the changes are made, and saved, I can connect the data projector and use it at any time I want.
Thanks for your additional information.
May 6, 2008 at 10:53 am
I recently blogged about two related matters:
- Configuring the projector using xrandr without restarting X:
http://anuradha.sayura.net/2008/05/projectors-and-gnulinux.html
- Running X without an xorg.conf:
http://anuradha.sayura.net/2008/04/goodbye-xorgconf.html
Enjoy!
September 19, 2008 at 7:08 am
Anuradha: your approach only works for drivers that support RandR 1.2 but the Nvidia driver does not.