Diff for "FixVideoResolutionHowto"


Differences between revisions 1 and 63 (spanning 62 versions)
Revision 1 as of 2005-05-28 21:03:55
Size: 5706
Editor: adsl-213-190-44-43
Comment: imported from the old wiki
Revision 63 as of 2008-10-31 10:28:26
Size: 7664
Editor: c122-108-27-22
Comment: Hoary!? I think not.
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
= FixVideoResolutionHowto = ||<tablestyle="float:right; font-size: 0.9em; width:40%; background:#F1F1ED; margin: 0 0 1em 1em;" style="padding:0.5em;"><<TableOfContents>>||
Line 4: Line 4:
This Howto is intended for those who have installed or upgraded to Hoary, and
their screen resolution is very low
. A possible reason for this is that your
hardware (video adapter/monitor) may not have been detected properly. There
are several fixes that I have seen in the forum and in the IRC support channel.

One solution will work for one person and another solution will work for 
This Howto is intended for those who have problems with resolution or
screen refresh rate (flickerin
g), regardless of how they got to this
situation
. A possible reason for this is that your
hardware (video adapter/monitor) may not have been detected properly.

One solution will work for one person and another solution will work for
Line 14: Line 15:
== Run the Autodetect Script Again ==
I'm not sure that this is the solution that works for the most people actually,
but it most certainly is the quickest and easiest one. All we're doing is
running the same script that tried to detect your video hardware when you
initially installed. Sometimes this does help. Run the following command.
{{{
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.custom
sudo sh -c 'md5sum /etc/X11/xorg.conf > /var/lib/xfree86/xorg.conf.md5sum'
sudo dpkg-reconfigure xserver-xorg
}}}
After completion, close any open windows or programs you have running on your
desktop and press {{{CTRL-ALT-Backspace}}} to restart X. You will be asked
to log into your GNOME session again and hopefully everything will be fixed.
If not, try the next solution.
For ATI Users I recommend reading the ATI - Refresh Rate & Resolution Quickfix
part on the bottom of this Page.

== Desktop Setting ==
First step that most people miss is to run 'System', 'Preferences', 'Screen Resolution'. Be sure to
pick your preferable resolution and refresh rate for your desktop. From there, click the option that states
'Make default for desktop only'. Now, restart and login again.
If that doesn't work, look below.
Line 30: Line 25:
Open the file {{{/etc/X11/xorg.conf}}} in your favourite text editor. I'll assume
you are using {{{nano}}} for an editor as it is fairly straight forward.
{{{
Open the file {{{/etc/X11/xorg.conf}}} in your favorite text editor. I'll assume
you are using {{{nano}}} for an editor as it is fairly straight forward: {{{
Line 35: Line 29:
Line 36: Line 31:
this section, look at the lines of text between {{{Section "Monitor"}}}  this section, look at the lines of text between {{{Section "Monitor"}}}
Line 38: Line 33:
words {{{HorizSync}}} and {{{VertRefresh}}}. If those lines don't appear there
then don't worry. There is a good chance that we've found the problem already!
words {{{HorizSync}}} and {{{VertRefresh}}}. If those lines don't appear there,
don't worry. There is a good chance that we've found the problem already!
Line 42: Line 37:
from your User's Manual or from online. We need the horizontal sync frequency
(usually measured in kHz) and the vertical refresh rate (usually in Hz).
Finding these values usually just involves searching [http://www.google.com Google]
with the model of your monitor. Both of these values are typically given in a
range such as "30-98 kHZ" or "50-160 Hz". Write those values down, or
otherwise keep them handy.
from your Monitor User's Manual, the command line, or from online.
Finding these values usually just involves searching [[http://www.google.com|Google]]
with the model of your monitor. One extensive list is at the
[[http://forum.linux-sevenler.org/index.php/topic,866.0.html?PHPSESSID=238b3fe295b404d31020ac23777c8a6f|Lapis forum]]

We need the horizontal sync frequency
(usually measured in kHz) and the vertical refresh rate (usually in Hz).
Both of these values are typically given in a
range such as "30-98 kHZ" or "50-160 Hz".

Alternatively, if your monitor supports it, you can just run
the following command (install the 'xresprobe' package if the command is not available): {{{
sudo ddcprobe | grep monitorrange
}}}

The first two values returned are your HorizSync rates, the second pair is your VertRefresh values.
Line 50: Line 55:
is to run the following commands which will regenerate the file and ask you 
for the values in the process.
{{{
is to run the following commands which will regenerate the file and ask you
for the values in the process: {{{
Line 54: Line 58:
sudo sh -c 'md5sum /etc/X11/xorg.conf > /var/lib/xfree86/xorg.conf.md5sum' md5sum /etc/X11/xorg.conf |sudo tee /var/lib/xfree86/xorg.conf.md5sum
Line 60: Line 64:
case an error is made.
{{{
case an error is made: {{{
Line 65: Line 68:
Editing this file so that it works
involves adding two extra lines to the {{{Section "Monitor"}}} section of that
file. For example, mine is shown below. 
Editing this file so that it works involves adding two extra lines to the {{{Section "Monitor"}}} section of that file. For example, mine is shown below.
Line 69: Line 70:
''NOTE:'' Don't __change__ anything that
is written in the file for now. Just add the two lines. The snippet from my file
is just an example and may not apply to your hardware.
Line 80: Line 78:

||<tablestyle="text-align: justify; width:100%; " style="border:none;" 5%>{{attachment:IconsPage/PicDocs.png}} ||<style="padding:0.5em; border:none;"> ''Don't __change__ anything that is written in the file for now. Just add the two lines. The snippet from my file is just an example and may not apply to your hardware. More importantly if your monitor is not detectable, the Identifier will be called `Generic Monitor`. In which case, don't change the Identifier to anything else otherwise X will fail to load and report that it can't find the a Monitor.''||
Line 84: Line 85:
== Incorrect DefaultDepth ==
Sometimes the automatic X configuration sets the colour depth to a value
higher than some hardware can properly handle. To see if this is the case for
you, first backup your {{{/etc/X11/xorg.conf}}} file.
(Note: If you do not want to shut down your current applications and at the same time enjoy a safer way of trying out your new configuration, you can try the advice on this page: http://ubuntuforums.org/showthread.php?p=4211618)

||<tablestyle="text-align: justify; width:100%; " style="border:none;" 5%>{{attachment:IconsPage/PicDocs.png}} ||<style="padding:0.5em; border:none;"> ''If you are using XFree86 then you needed to edit {{{/etc/X11/XF86Config-4}}}.||

(See this [[https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/3731|launchpad bug about low resolutions when horizontal/vertical sync frequencies are incorrect/missing]] for details about why this can happen and future work being done to prevent this problem in later versions of Ubuntu)

Also if you have an issue where only 800x600 is available in the dropdown for screen resolution, then modifying the ''Modes'' line within the section in that file called {{{Section "Monitor"}}} and adding the required resolution could solve this.
Line 89: Line 93:
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup         SubSection "Display"
                Depth 24
                Modes "1024x768" "800x600" "640x480"
        EndSubSection
Line 91: Line 98:
Now open the file in your favourite text editor. I'll assume you'll use {{{nano}}}
for now since it is relatively simple to use, but you can use whatever text
editor you like.

== GDM uses a different Resolution than my Desktop ==
This problem is easily solvable; to fix it do the following:

1) Make a Backup of your xorg.conf
{{{
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak
}}}

2) Open xorg.conf
Line 97: Line 111:
Search for the word {{{DefaultDepth}}} (notice it is one word) in that file.
The default colour depth set by Hoary is typically "24", but as mentioned,
some hardware may not be able to use a value that high. It's pretty safe to
change it to something like "16" just to test whether it solves your video
problems or not. If this change does not solve anything, it is just as simple
to change it back the way it was.
Line 104: Line 112:
Once the value of {{{DefaultDepth}}} is changed, save the file, close all open
windows on your desktop, and press {{{CTRL-ALT-Backspace}}} to restart X. Assuming
all goes well, you will be prompted to log into GNOME again, hopefully at a
higher resolution.
3) Locate your Screen Entry
{{{
Section "Screen"
}}}
Line 109: Line 117:
== The End ==
So far, this is all of the possible solutions I've collected for this problem.
If none of the above corrected your situation, consider posting your question
in the [http://www.ubuntuforums.org Ubuntu Support Forum] or in the #ubuntu
IRC support channel on the {{{irc.freenode.net}}} network.
You will find multiple entries similar to:
{{{
 SubSection "Display"
  Depth 24
  Modes "1280x1024" "1024x768"
 EndSubSection
}}}
Line 115: Line 125:
The First Entry in the "Modes" Line is what GDM will use, so change it to something lower/higher
(Please make sure you know that your monitor and Graphic Card BOTH support this Resolution). Save the file.
Line 116: Line 128:
Close all running applications, restart GDM (/etc/init.d/gdm restart). Another way is just to log out your ubuntu session and press Ctrl-Alt-Backspace in the login screen. Look if everything went fine.
Line 117: Line 130:
From nikolaosaidinidis Wed May 4 18:18:27 +0100 2005
From: nikolaos aidinidis
Date: Wed, 04 May 2005 18:18:27 +0100
Subject: video cards
Message-ID: <20050504181827+0100@www.ubuntulinux.org>
If the specified display resolution - "1280x1024" in the case above - differs from the used virtual screen resolution, add a respective line in the Display subsection of xorg.conf:
{{{
Virtual 1280 1024
}}}

If these changes did not help, you can always use:
{{{
sudo cp /etc/X11/xorg.conf.bak /etc/X11/xorg.conf
}}}

to restore your system to the previous state.

== Problem related to DVI-Interface ==

After I upgraded my machine to Ubuntu 8.04 I was stucked with a maximum screen resolution of 800x600. No matter what I tried, nothing helped. I worked through suggestions on this page, but nothing helped. Finally I stumbled over another site where this problem was discussed and a user there described the same issue that I had. His solution was to connect the monitor cable not to the DVI port but to the VGA port of the card. I tried it and immediately my problem was gone. :-)

(I'm using a BNC cable to connect my monitor to the computer. Maybe this is the reason why the monitor modes could not be recognized by Ubuntu on the DVI port.)

----
CategoryCleanup

Introduction

This Howto is intended for those who have problems with resolution or screen refresh rate (flickering), regardless of how they got to this situation. A possible reason for this is that your hardware (video adapter/monitor) may not have been detected properly.

One solution will work for one person and another solution will work for someone else. I hope to provide several different solutions here, ranked in decending order from what I have seen to be the most popular and successful solution to those solutions that have helped only a few. This way, hopefully it will provide an answer for everyone. Let's start with the most popular fix.

For ATI Users I recommend reading the ATI - Refresh Rate & Resolution Quickfix part on the bottom of this Page.

Desktop Setting

First step that most people miss is to run 'System', 'Preferences', 'Screen Resolution'. Be sure to pick your preferable resolution and refresh rate for your desktop. From there, click the option that states 'Make default for desktop only'. Now, restart and login again. If that doesn't work, look below.

Undetected Monitor Specs

Open the file /etc/X11/xorg.conf in your favorite text editor. I'll assume you are using nano for an editor as it is fairly straight forward:

sudo nano /etc/X11/xorg.conf

Now look for a section in that file called Section "Monitor". Once you find this section, look at the lines of text between Section "Monitor" and EndSection. There should be two lines in there that begin with the words HorizSync and VertRefresh. If those lines don't appear there, don't worry. There is a good chance that we've found the problem already!

You will need to gather two bits of information for your monitor now, either from your Monitor User's Manual, the command line, or from online. Finding these values usually just involves searching Google with the model of your monitor. One extensive list is at the Lapis forum

We need the horizontal sync frequency (usually measured in kHz) and the vertical refresh rate (usually in Hz). Both of these values are typically given in a range such as "30-98 kHZ" or "50-160 Hz".

Alternatively, if your monitor supports it, you can just run the following command (install the 'xresprobe' package if the command is not available):

sudo ddcprobe | grep monitorrange

The first two values returned are your HorizSync rates, the second pair is your VertRefresh values.

There are two ways to enter your monitor information into the file. One way is to run the following commands which will regenerate the file and ask you for the values in the process:

sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.custom
md5sum /etc/X11/xorg.conf |sudo tee /var/lib/xfree86/xorg.conf.md5sum
sudo dpkg-reconfigure -plow xserver-xorg

The second way is to simply add those values to our /etc/X11/xorg.conf file with a text editor. But first, lets make a backup of that file just in case an error is made:

sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup

Editing this file so that it works involves adding two extra lines to the Section "Monitor" section of that file. For example, mine is shown below.

Section "Monitor"
     Identifier         "FLATRON 995F"
     Option             "DPMS"
     HorizSync          30-96
     VertRefresh        50-160
EndSection

Don't change anything that is written in the file for now. Just add the two lines. The snippet from my file is just an example and may not apply to your hardware. More importantly if your monitor is not detectable, the Identifier will be called Generic Monitor. In which case, don't change the Identifier to anything else otherwise X will fail to load and report that it can't find the a Monitor.

Now save the file, close all open applications, and press CTRL-ALT-Backspace to restart X. Assuming all goes well, you will be prompted to log into your session again.

(Note: If you do not want to shut down your current applications and at the same time enjoy a safer way of trying out your new configuration, you can try the advice on this page: http://ubuntuforums.org/showthread.php?p=4211618)

If you are using XFree86 then you needed to edit /etc/X11/XF86Config-4.

(See this launchpad bug about low resolutions when horizontal/vertical sync frequencies are incorrect/missing for details about why this can happen and future work being done to prevent this problem in later versions of Ubuntu)

Also if you have an issue where only 800x600 is available in the dropdown for screen resolution, then modifying the Modes line within the section in that file called Section "Monitor" and adding the required resolution could solve this.

        SubSection "Display"
                Depth           24
                Modes           "1024x768" "800x600" "640x480"
        EndSubSection

GDM uses a different Resolution than my Desktop

This problem is easily solvable; to fix it do the following:

1) Make a Backup of your xorg.conf

sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak

2) Open xorg.conf

sudo nano /etc/X11/xorg.conf

3) Locate your Screen Entry

Section "Screen"

You will find multiple entries similar to:

        SubSection "Display"
                Depth     24
                Modes    "1280x1024" "1024x768"
        EndSubSection

The First Entry in the "Modes" Line is what GDM will use, so change it to something lower/higher (Please make sure you know that your monitor and Graphic Card BOTH support this Resolution). Save the file.

Close all running applications, restart GDM (/etc/init.d/gdm restart). Another way is just to log out your ubuntu session and press Ctrl-Alt-Backspace in the login screen. Look if everything went fine.

If the specified display resolution - "1280x1024" in the case above - differs from the used virtual screen resolution, add a respective line in the Display subsection of xorg.conf:

Virtual 1280 1024 

If these changes did not help, you can always use:

sudo cp /etc/X11/xorg.conf.bak /etc/X11/xorg.conf

to restore your system to the previous state.

After I upgraded my machine to Ubuntu 8.04 I was stucked with a maximum screen resolution of 800x600. No matter what I tried, nothing helped. I worked through suggestions on this page, but nothing helped. Finally I stumbled over another site where this problem was discussed and a user there described the same issue that I had. His solution was to connect the monitor cable not to the DVI port but to the VGA port of the card. I tried it and immediately my problem was gone. Smile :-)

(I'm using a BNC cable to connect my monitor to the computer. Maybe this is the reason why the monitor modes could not be recognized by Ubuntu on the DVI port.)


CategoryCleanup

FixVideoResolutionHowto (last edited 2011-11-04 22:07:48 by ckimes)