Adding a widescreen monitor in Linux
Recently I purchased a 23" wide screen monitor for my primary desktop PC. I had a feeling there would be a bit of an issue when I plugged it into my Elive Compiz installation that isn't as user-friendly as, say, a Ubuntu installation.
When I did plug it in it wasn't horrible. The biggest problem I had was the new aspect ratio of the monitor (16:9) was causing everything on the screen to seem stretched with the previous resolution (1280x1024).
The monitor itself was reporting that the ideal resolution was 1920x1080, so I figured it was just a matter of adding the correct mode to the "Screen" section of my /etc/X11/xorg.conf file (see more about this in my article "Get to know Linux: Understanding the xorg.conf file"). It wasn't that easy.
The first attempt
Normally, when I needed to change a resolution, or just hard-code a resolution, I would add a sub section in the xorg.conf file like:
Modes "1920x1080" "1440x900" "1600x1200" "1440x1440" "1280x1024"Â Â Â Â Â "1280x960" "1280x800" "1152x864" "1024x768" "832x624" "800x600" "720x400" "640x480"
Normally this would work, picking up the 1920x1080 mode first. In this instance, however, this did not work. I will tell you that I am working with an NVidia Geforce 8800 chipset, so support in Linux is quite good. I know this isn't an issue with the video card.Â But no matter what resolution I used I was having no luck fighting the aspect ratio. The screen was either stretched too far horizontally, cropped at the bottom, or cropped all around.
I remembered there was an application that would gather information about my monitor and report it back. Maybe that was the key. The application is ddcprobe will give you the following information:
- Monitor name
- Monitor VertRefresh values and HorizSync rates range
To install this application issue the command:
sudo apt-get install xresprobe
and you are ready to check. To do this issue the command
which will return something like this:
vbe: VESA 3.0 detected.
vendor: BuildÂ Â Â 070809.2
product: MCP67 - mcp68-02 Chip Rev
Notice the edidfail at the end. What happens is sometimes hardware will not respond properly when the EDID is queried. If this happens try to probe a few more times, you should get more information. In my case, the Samsung 2333sw would never report the full information.
Back to square one.
Remember I mentioned I was using an NVidia GeForce chipset? That's a good thing because there is a handy application called nvidia-settings that I had used with much success before. The only reason I hadn't automatically tried this was because I have had issues with the Elive Compiz distribution and X when trying to use tools not standard to the distribution. And besides the Elive resolution tool wasn't picking up the new monitor so there was no hope there.
Installing the new tool was as simple as issuing:
sudo apt-get install nvidia-settings
Running the tool was equally as easy by issuing the command:
When this application starts you will see a number of sections in the left pane (see Figure 1) that you can click on. Click on the X Server Display Configuration and you will then see a button for Detect Displays. Click on that and the new resolution should appear. The next step is to click the Save to X Configuration File which will write your changes.Finally click the Quit button to finish up.
In order to actually have the changes take effect you have to log out of X and log back in. Once you do you should see your new wide screen monitor in action.
What did it write?
The results of the nvidia-settings change to the xorg.conf file surprised me. It completely rewrote the "Screen" section of the Xorg configuration file. Here is the "Screen" section:
IdentifierÂ Â Â Â "Screen0"
DeviceÂ Â Â Â Â Â Â Â "Videocard0"
MonitorÂ Â Â Â Â Â Â "Monitor0"
DefaultDepthÂ Â Â 24
OptionÂ Â Â Â Â Â Â Â "TwinView" "0"
OptionÂ Â Â Â Â Â Â Â "TwinViewXineramaInfoOrder" "CRT-0"
OptionÂ Â Â Â Â Â Â Â "metamodes" "1920x1080 +0+0; 1440x900 +0+0; 1280x1024 +0+0; 1280x960 +0+0; 1280x800 +0+0; 1024x768 +0+0; 800x600 +0+0; 640x480 +0+0"
SubSectionÂ Â Â Â "Display"
DepthÂ Â Â Â Â Â 24
The TwinView option is usually used for dual head displays. In order for Xorg to get the 16:9 aspect ration it must use it and splice the two images together.
Linux has come such a long way. But when you are attempting to configure a distribution that isn't especially made to be Noobie-friendly don't expect for tasks like attaching a widescreen monitor to be an out of the box experience. The good news is that there are plenty of tools to help you out of little situations such as this.
In the end the new monitor works and is as beautiful a display as I have seen.Advertisement