I’ve been running Ubuntu 10.10 for a year or so now and there have been a few times, after installing some updates I presume, where I’ve restarted my computer and suddenly my monitor resolution isn’t recognized. Normally I run the maximum resolution (1920×1010) of my monitor, a Dell P2311H. But on these restarts, my resolution is reduced to 640×480. Very annoying. Now, from what I understand, this is not an issue with Ubuntu per se, but rather the monitor’s failure to send the proper EDID or Extended Display Identification Data for the monitor. Essentially the EDID sends information of what display settings the monitor is capable of, such as refresh rates and resolutions. The basic remedy is to manually enter these settings.
Very recently I had this issue occur to me twice for two separate issues, which is really what’s prompting me to write this post. I don’t want to have to dig through the interwebs again to solve this. So, in my case there were two separate incidents with two different resolutions.
Round 1
The first time my screen resolution was all jacked up, it was because of the “Screen” settings in my xorg.conf, which is located at /etc/X11/xorg.conf.
NOTE: be sure to make a backup of xorg.conf before making edits. You don’t want to make matters worse, and there’s no guarantee that this solution is the solution to your problem.
At the bottom of xorg.conf you should see a section labeled “Screen” or something similar to this:
Section “Screen”
Identifier “Default Screen”
Default Depth 24
EndSection
In this section you’ll want to add a subsection labeled “Display” that defines your available screen resolutions, or more importantly a Virtual resolution which appears to server as a setting for the maximum allowable resolution. Edit the “Screen” section to look something like this:
Section “Screen”
Identifier “Default Screen”
Default Depth 24
SubSection “Display”
Virtual 1920 1080
Depth 24
Modes “1920×1080 1680×1050 1344×840 1280×800″
EndSubSection
EndSection
The resolutions you enter should obviously match to available resolutions for your monitor. More importantly the Virtual entry should match you monitor’s maximum resolution, or rather the maximum resolution you intend to use, whichever is smaller.
Now restart xerver. Depending on your default display manager, you can do this by running one of the following commands:
sudo restart lightdm
or
sudo restart gdm
or
sudo restart kdm
You can find out what your default display manager is by looking at the file default-display-manager in the /etc/X11 directory.
After the restart, maybe you’re good, maybe not. On to…
Round 2
The second time my resolution went all wonky on me it was due to the refresh rates. For this edit, we’ll still be working with the xorg.conf file, but we’ll be editing the “Monitor” section. In my case, this section looked like this:
Section “Monitor”
Identifier “Monitor0″
VendorName “Dell”
ModelName “P2311H”
HorizSync 28.0 – 33.0
VertRefresh 43.0 – 72.0
DisplaySize 509.76 286.74
Option “DPMS”
EndSection
The two fields in question are the HorizSync and VertRefresh. You’ll want to change these to whatever your monitor’s refresh rates are. You’ll probably have to do a bit of Googling to figure it out. Of course you could probably just enter in these numbers I have below and see what happens. I believe the worst case scenario would be that Ubuntu would restart without any GUI in which case you’d be stuck in the terminal. So if you’re not comfortable with the Terminal it might not be worth the gamble. Also, in my case DisplaySize looked awfully suspicious and so I removed that line completely.
Again, in my case, the final section looked something like this:
Section “Monitor”
Identifier “Monitor0″
VendorName “Dell”
ModelName “P2311H”
HorizSync 30.0 – 83.0
VertRefresh 56.0 – 76.0
Option “DPMS”
EndSection
Again, restart your display manager as per the instructions from Round 1 and with any luck you should be in business.