PDA

View Full Version : [ubuntu] notes on frequency resolution of nvidia cards, refresh rates - xrandr



Claus7
February 10th, 2011, 03:37 PM
Hello,

issue:
we want to set the desirable resolution and frequency (refresh rate) using a nvidia card on ubuntu 8.04.4 hardy heron.

lspci | grep VGA

01:00.0 VGA compatible controller: nVidia Corporation NV44A [GeForce 6200] (rev a1)
[I know this is old stuff, yet some things apply still now and there are a lot of people using such kind of cards].

what will follow:
some notes of what I have figured out, so I'll gather them on one place. I do know that it won't be so much detailed, yet it will save a lot of time someone who wants to experiment more.

In order for this card to work we need to install the drivers from ubuntu (I did not use drivers from nvidia's website). The packages I have installed concerning nvidia from synaptic are:

jockey-common
jockey-gtk
linux-restricted-modules-2.6.24-27-generic
linux-restricted-modules-2.6.24-28-generic (using this one)
nvidia-glx-new
nvidia-kernel-common
smartdimmer (this has to do with the brightness adjustment via software for 6200 cards)
xserver-xorg-video-nv

and


nvidia-settings

After the installation of all these packages I went to System -> Administration -> Hardware Drivers and enabled my proprietary driver.

Since my system changed ubuntu flavor and graphics card I do not remember exactly the initial configurations. What I do remember is that in the old days the command:

sudo dpkg-reconfigure xserver-xorg
was working and was enough for someone to create a descent xorg.conf file with all the available resolutions. Now, the only thing I was able to configure was everything apart from resolution itself.

So using this command I was able to make create some options for xorg.conf file. In the end, also taking into account the monitor I was using I came out with this xorg.conf file:

# xorg.conf (xorg X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the xorg.conf manual page.
# (Type "man xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
# sudo dpkg-reconfigure -phigh xserver-xorg

Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "us,gr"
Option "XkbVariant" ","
Option "XkbOptions" "grp:alt_shift_toggle,grp_led:scroll"
EndSection

Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ImPS/2"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "true"
EndSection

Section "Device"
Identifier "nVidia Corporation NV44A [GeForce 6200]"
Driver "nvidia"
Busid "PCI:1:0:0"
Option "AddARGBVisuals" "True"
Option "AddARGBGLXVisuals" "True"
Option "NoLogo" "True"
EndSection

Section "Monitor"
Identifier "Generic Monitor"
Vendorname "Acer"
Modelname "Acer AL1716"
Option "DPMS"
Horizsync 30-80
Vertrefresh 60-75
EndSection

Section "Screen"
Identifier "Default Screen"
Device "nVidia Corporation NV44A [GeForce 6200]"
Monitor "Generic Monitor"
Defaultdepth 24
SubSection "Display"
Modes "1280x1024" "1024x768" "800x600" "640x480"
EndSubSection
EndSection

Section "ServerLayout"
Identifier "Default Layout"
screen "Default Screen"
Inputdevice "Generic Keyboard"
Inputdevice "Configured Mouse"
EndSection

Section "Module"
Load "glx"
EndSection

The resolution settings for horizontal and vertical refresh rates were found from an acer's manual S.G_AL1716v_BOOK.pdf (just google it). It is wise to find yours from the manual of your monitor.

With this xorg.conf file I had a refresh rate of 50 and 54 Hz and not the desired one which is 60 using resolution of 1280x1024.

Using ubuntu forums, I installed later the package nvidia settings. From there:
System->Administration->Nvidia X Server Settings
as root I was able to save or merge the options created with the ones I had created myself. The problem was that no matter was I was not able to have a 60Hz frequency. Choosing this option I was able to have less than 60 (50 I guess), and choosing 75 I was able to have 91! The auto option was giving me (and still gives) the 54 Hz refresh rate which is the best I can have. In case I was not root I was not able (which is normal) to save those settings under /etc/X11)

xrandr (http://www.thinkwiki.org/wiki/Xorg_RandR_1.2):
So I decided to use this command. Having more or less the same xorg.conf file as above the xrandr command was giving:

Screen 0: minimum 320 x 240, current 1280 x 1024, maximum 1280 x 1024
default connected 1280x1024+0+0 0mm x 0mm
1280x1024 50.0* 54.0
1024x768 51.0 59.0 60.0
800x600 52.0 65.0 66.0 67.0 68.0 69.0
640x480 53.0 74.0 75.0 76.0
1280x960 55.0
1280x800 56.0
1280x768 57.0
1152x864 58.0
960x600 61.0
896x672 62.0
840x525 63.0
832x624 64.0
800x512 70.0
720x450 71.0
640x512 72.0 73.0
640x400 77.0
640x384 78.0
576x432 79.0
512x384 80.0 81.0 82.0
416x312 83.0
400x300 84.0 85.0 86.0 87.0
320x240 88.0 89.0 90.0


Using the System->Preferences->Screen resolution I was able to choose the option 54Hz. It was that time that the 54Hz option was set as default, even on booting and was close to the desired 60Hz.

By installing the nvidia-settings and making apply to the 75Hz option, the xrandr output was like this:

Screen 0: minimum 320 x 240, current 1280 x 1024, maximum 1280 x 1024
default connected 1280x1024+0+0 0mm x 0mm
1280x1024 50.0 54.0 91.0*
1024x768 51.0 59.0 60.0
800x600 52.0 65.0 66.0 67.0 68.0 69.0
640x480 53.0 74.0 75.0 76.0
1280x960 55.0
1280x800 56.0
1280x768 57.0
1152x864 58.0
960x600 61.0
896x672 62.0
840x525 63.0
832x624 64.0
800x512 70.0
720x450 71.0
640x512 72.0 73.0
640x400 77.0
640x384 78.0
576x432 79.0
512x384 80.0 81.0 82.0
416x312 83.0
400x300 84.0 85.0 86.0 87.0
320x240 88.0 89.0 90.0

It means that the option 91 was added and used as default. By doing so, I was not able to adjust the resolution from the settings above, yet I was able to adjust it back to 54, from nvidia-settings!

Here there are some things that do not coincide:


Nvidia Settings | Crt-1 refresh rate | xrandr
Auto | 75 | 54
60 | 60 | 50
75 | 75 | 91

which means that I do not know what to believe.

Using xrandr to add new mode
(http://newtoubuntu.wordpress.com/2010/07/17/ubuntu-10-04-fixing-the-monitor-resolution-with-xrandr/):
both

cvt 1280 1024
and

cvt 1280 1024 60

give

# 1280x1024 59.89 Hz (CVT 1.31M4) hsync: 63.67 kHz; pclk: 109.00 MHz
Modeline "1280x1024_60.00" 109.00 1280 1368 1496 1712 1024 1027 1034 1063 -hsync +vsync

In order to add this mode typed:

xrandr --newmode "1280x1024_60.00" 109.00 1280 1368 1496 1712 1024 1027 1034 1063 -hsync +vsync

and in order to use it:

xrandr --addmode default 1280X1024_60.00

watch out the -default- string and the big X. Everything else was producing an output error.

The output was:

Screen 0: minimum 320 x 240, current 1280 x 1024, maximum 1280 x 1024
default connected 1280x1024+0+0 0mm x 0mm
1280x1024 50.0* 54.0 91.0
1024x768 51.0 59.0 60.0
800x600 52.0 65.0 66.0 67.0 68.0 69.0
640x480 53.0 74.0 75.0 76.0
1280x960 55.0
1280x800 56.0
1280x768 57.0
1152x864 58.0
960x600 61.0
896x672 62.0
840x525 63.0
832x624 64.0
800x512 70.0
720x450 71.0
640x512 72.0 73.0
640x400 77.0
640x384 78.0
576x432 79.0
512x384 80.0 81.0 82.0
416x312 83.0
400x300 84.0 85.0 86.0 87.0
320x240 88.0 89.0 90.0
1280X1024_60.00 [*1] 59.9 [*2]

The star sing did not seem to choose the 59.9 Hz option while using the command:

xrandr -r 60

Also here I have to say, that before using the command for the output successfully, in the [*1] section was a parenthesis with an f inside and in the [*2] section there was some other strings.

Following this:
http://askubuntu.com/questions/18058/xrandr-cant-add-new-mode

I guess that the right resolution comes from nvidia-settings.


Note: the virtual thing has to do with resolution that is not supported by your screen, so you can see only a portion of your desktop every time, and you can move around to go to every corner.

Regards!