Editing Resolutions in Ubuntu.

Keitero

Golden Member
Jun 28, 2004
1,890
0
0
I have 5.04 installed, and I can't seem to change to any resolution other than 640x480@60hz.

The video card is a nVidia geForce Quadro 4Go GL 500 and the monitor is a ViewSonic A90f+
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
The resolution stuff is kept in the /etc/X11/Xorg.conf file. I'm not positive on the capitalization there, and I'm being lazy. :p
 

nweaver

Diamond Member
Jan 21, 2001
6,813
1
0
ctrl Alt F2 to get to command line, login,
sudo cp /etc/X11/xorg.config /etc/X11/backup.xorg.config
sudo xorgconfig (think that's the right command)
follow this, replacing your xorg.config file
alt F7 to get back to gui, Ctrl Alt Backspace to restart X (or reboot)
You should then have the modes you need.
 

Keitero

Golden Member
Jun 28, 2004
1,890
0
0
"sudo xorgconfig (think that's the right command) " can't use that command. Its still the same. >.>
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Originally posted by: Keitero
"sudo xorgconfig (think that's the right command) " can't use that command. Its still the same. >.>

Why can't you use that command? What's still the same?
 

Keitero

Golden Member
Jun 28, 2004
1,890
0
0
I still can't change the res.

Just broke X. T_T

Aparently its a mouse error and driver error (trying to get the nvidia drivers running)
 

nweaver

Diamond Member
Jan 21, 2001
6,813
1
0
I don't have an ubuntu box here (HD gave up the ghost yesterday, thank god for backups) to find the exact command, but it's close to that. xorg-config maybe? It is a CLI based wizard asking about things like monitor rez, and stuff like that.
 

Keitero

Golden Member
Jun 28, 2004
1,890
0
0
well i got it, it was xorgconfig and NOT Xorgconfig (force of habit of capping). Now no working X due to mouse dir /dev/mouse doesn't exist. And bad stock nvidia drivers, when I try to install the nvidia drivers, it tells me that I need a compiled kernel to do so. I don't currently have gcc or cc installed (for some reason the give me errors).
 

nweaver

Diamond Member
Jan 21, 2001
6,813
1
0
apt-get install gcc
apt-get install g++

dmesg | less to find what you mouse is being called (usually, in gentoo, it's /dev/mice, which the system links with whatever mouse you have plugged in, USB or PS2, havn't used serial)

ls /dev/mo (tab to complete) and see what you have.
 

Keitero

Golden Member
Jun 28, 2004
1,890
0
0
Re appied the backup xorg.conf file back and got X working again, but still only 640x480@60hz res.
 

TGS

Golden Member
May 3, 2005
1,849
0
0
Can you just get the nvidia-glx package? I would have to double check as well, but I think the nvidia-settings package may let you adjust the resolution as well.

Also what options are in your screen section, under modes?
 

sourceninja

Diamond Member
Mar 8, 2005
8,805
65
91
dont apt-get gcc or g++ for nvidia


apt-get nvidia-glx do not use the nvidia drivers on the nvidia website.

if you really want the website drivers then

apt-get build-essential

that will get you all you need for nvidia to compile the nvidia module. But you should use the ubuntu or ubuntu backports verson of the nvidia driver via synaptic or apt


Also, if you use apt to install the nvidia driver, you can apt-get nvidia-settings to get a control panel. This tipically will auto detect your monitors resultion and set it.

Otherwise, what resolution do you want and what monitor do you have? I'll give you an example to stick in your xorg.conf
 

Keitero

Golden Member
Jun 28, 2004
1,890
0
0
Well, I want 1600x1200@75hz since my IBM P200 supports it. But I'll go ahead and do apt-get nvidia-glx.
 

nweaver

Diamond Member
Jan 21, 2001
6,813
1
0
Originally posted by: sourceninja
dont apt-get gcc or g++ for nvidia


apt-get nvidia-glx do not use the nvidia drivers on the nvidia website.

if you really want the website drivers then

apt-get build-essential

that will get you all you need for nvidia to compile the nvidia module. But you should use the ubuntu or ubuntu backports verson of the nvidia driver via synaptic or apt


Also, if you use apt to install the nvidia driver, you can apt-get nvidia-settings to get a control panel. This tipically will auto detect your monitors resultion and set it.

Otherwise, what resolution do you want and what monitor do you have? I'll give you an example to stick in your xorg.conf

I would listen to SN, as he obviously knows more about debian/ubuntu then me.
 

sourceninja

Diamond Member
Mar 8, 2005
8,805
65
91
I wouldn't say I know more about the OS. I just work a lot with the offical "ubuntu way" of doing things. But thanks for the compliment :)

Now on to a xorg.conf

I guess I should of given the complete instructions. Anyways, you can find them here www.ubuntuguide.org But I'm going to repoduce them here anyways.

To install and enable the nvidia video driver.

sudo apt-get install nvidia-glx
sudo apt-get install nvidia-settings
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf_backup
sudo nvidia-glx-config enable
sudo gedit /usr/share/applications/NVIDIA-Settings.desktop
Insert the following lines into the new file

[Desktop Entry]
Name=NVIDIA Settings
Comment=NVIDIA Settings
Exec=nvidia-settings
Icon=
Terminal=false
Type=Application
Categories=Application;System;

That will make a new menu in Applications, System Tools, Nvidia settings

Save the file.
Restart the PC or just restart gnome by entering this command
sudo /etc/init.d/gdm restart

Now after you have done that, if you still do not have your required setting, you will need to do the following.

backup your xorg.conf
open your xorg.conf with the editor of your choice.
Find the section that looks like this.

Section "Monitor"

Identifier "My Monitor"

# HorizSync is in kHz unless units are specified.
# HorizSync may be a comma separated list of discrete values, or a
# comma separated list of ranges of values.
# NOTE: THE VALUES HERE ARE EXAMPLES ONLY. REFER TO YOUR MONITOR'S
# USER MANUAL FOR THE CORRECT NUMBERS.

HorizSync 31.5 - 50.0

# HorizSync 30-64 # multisync
# HorizSync 31.5, 35.2 # multiple fixed sync frequencies
# HorizSync 15-25, 30-50 # multiple ranges of sync frequencies

# VertRefresh is in Hz unless units are specified.
# VertRefresh may be a comma separated list of discrete values, or a
# comma separated list of ranges of values.
# NOTE: THE VALUES HERE ARE EXAMPLES ONLY. REFER TO YOUR MONITOR'S
# USER MANUAL FOR THE CORRECT NUMBERS.

VertRefresh 40-90

# Modeline "1440x900" 106.47 1440 1520 1672 1904 900 901 904 932 -HSync +Vsync

EndSection

Now, what you want to do is edit your HorizSync and VertRefresh to values supplied by your monitor manual.

From what I can find googling we want it like this

HorizSync 30.0 - 86.0
VertRefresh 50.0 - 150.0

Also you probably want Option "dpms" for power managment

so lets change it to look like this

Section "Monitor"
Identifier "ViewSonic"
HorizSync 30.0 - 86.0
VertRefresh 50.0 - 150.0
Option "dpms"
EndSection

Now, lets find a section that looks like this

# **********************************************************************
# Screen sections
# **********************************************************************

# Any number of screen sections may be present. Each describes
# the configuration of a single screen. A single specific screen section
# may be specified from the X server command line with the "-screen"
# option.
Section "Screen"
Identifier "Screen 1"
Device "GeForce FX"
Monitor "My Monitor"

# If your card can handle it, a higher default color depth (like 24 or 32)
# is highly recommended.

# DefaultDepth 8
# DefaultDepth 16
DefaultDepth 24
# DefaultDepth 32

# "1024x768" is also a conservative usable default resolution. If you
# have a better monitor, feel free to try resolutions such as
# "1152x864", "1280x1024", "1600x1200", and "1800x1400" (or whatever your
# card/monitor can produce)

Subsection "Display"
Depth 24
#Modes "1440x900" "1024x768" "800x600" "640x480"
Modes "1024x768" "800x600" "640x480"
#Modes "1600x1200"
EndSubsection

EndSection


What we will need to do is first setup this area

Section "Screen"
Identifier "Screen 1"
Device "GeForce FX"
Monitor "ViewSonic"

Make sure you use the device id for your video card, and for your monitor. So whatever you called them is what you should be using.

Next find this section

DefaultDepth 8
# DefaultDepth 16
DefaultDepth 24
# DefaultDepth 32

Make sure you have DefaultDepth 24 as your default depth (in linux there is no 32bit, just 24bit, they are the same thing)

And finally we will edit this section

Subsection "Display"
Depth 24
#Modes "1440x900" "1024x768" "800x600" "640x480"
Modes "1024x768" "800x600" "640x480"
#Modes "1600x1200"
EndSubsection

For each of your color depths (8, 16, and 24) you can set which resolutions you want to use.

so for 24 we would do this (we need to add all resoultuions you may use, even ones for video games)

Subsection "Display"
Depth 24
Modes "1600x1200" "1280x1024" "1280x960" "1024x768" "800x600" "640x480"
Depth 16
Modes "1600x1200" "1280x1024" "1280x960" "1024x768" "800x600" "640x480"
Depth 8
Modes "1600x1200" "1280x1024" "1280x960" "1024x768" "800x600" "640x480"

EndSubsection

Finally in this area

Section "ServerLayout"

Make sure you have your Screen set to the new screen we just setup (Screen 1) and you have the proper InputDevice's set.

Then restart X and give that a try. If the nvidia driver fails to load, make sure that in
Section "Module"

That Load "dri" and Load "glcore" are both commented out (put a # in front of them)
and that Load "glx" is enabled. If you followed the nvidia install instructions above that should of been done for you.
 

TGS

Golden Member
May 3, 2005
1,849
0
0
Just for anecdotal purposes, with the unbuntu drivers I was able to get a lot more performance over the nvidia supplied ones.
 

Keitero

Golden Member
Jun 28, 2004
1,890
0
0
Thank you for your imput. I'll keep you updated on the progress of it.

YES! Ohh sweet lord it works in 1600x1200 glory! I just got a new 21" monitor to use the new res so YES!


Thanks so much sourceninja and for everyone else too.
 

sourceninja

Diamond Member
Mar 8, 2005
8,805
65
91
glad to hear it worked for you!

Did the drivers fix it or did you have to edit the config file?
 

TGS

Golden Member
May 3, 2005
1,849
0
0
now type:

sudo glxinfo|grep direct

or for the people impressed by spinning wheels (me :) )

glxgears
 

magomago

Lifer
Sep 28, 2002
10,973
14
76
btw just wanted to say thanks...i always had everything installed for me properly (i just download the drivers on my own and install) but I never could get above 1024*768 to work...turns out i forgot to edit in my Horz and Vert refresh settings ;) I also use ubutnu, but totally different cards...now i'm skating at 1280*960 :D to think something that simple was the cause ;)