nV News Forums


nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   NVIDIA Linux (http://www.nvnews.net/vbulletin/forumdisplay.php?f=14)
-   -   How to delete a specific refresh rate from xrandr? (http://www.nvnews.net/vbulletin/showthread.php?t=156870)

Vhann 11-06-10 10:46 PM

How to delete a specific refresh rate from xrandr?

Problem description
I'm trying to play Windows games on my GNU/Linux machine. Some of these games try to change the resolution from 1024x768 to 640x480 (for example). But the problem is that when the games do that, all I get is a blank screen with a flashing LED (indicating some kind of error).

Also, when I switch to a terminal and issue 'DISPLAY=:0.0 xrandr -s 0' to get a working resolution back, all I get is GDM (login prompt).

I have found by doing tests that issuing 'xrandr --output default --mode "640x480" ' gets me the flashing LED and blank screen while 'xrandr --output default --mode "640x480" --rate 62' gets me a working 640x480 resolution. I can also play the game in Wine's virtual desktop (so I know everything works correctly).

Tried solutions
-Tried using 'nvidia-xconfig', it doesn't solve the problem.
-Tried using 'nvidia-settings -r', it doesn't work;
-Tried asking #xorg on freenode, but they don't support the closed-source nVidia driver

So my question is: is there a way to make 62 Hertz the 'preferred 640x480 refresh rate'? Or delete specific refresh rates? Or, even, is there a better way to fix my problem I could have missed?


Here are my system details:
Ubuntu 9.10 Karmic Koala

$ cat /etc/lsb-release

$ dpkg --get-selections | grep nvidia
nvidia-185-kernel-source install
nvidia-185-libvdpau install
nvidia-common deinstall
nvidia-glx-173 deinstall
nvidia-glx-185 install
nvidia-settings install


# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig: version 1.0 (buildmeister@builder63) Fri Aug 14 17:54:58 PDT 2009

Section "ServerLayout"
Identifier "Default Layout"
Screen "Default Screen" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"

Section "Module"
Load "glx"

Section "InputDevice"

# generated from default
Identifier "Keyboard0"
Driver "keyboard"

Section "InputDevice"

# generated from default
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/psaux"
Option "Emulate3Buttons" "no"
Option "ZAxisMapping" "4 5"

Section "Monitor"
Identifier "IBM Monitor"

Section "Device"
Identifier "Nvidia Geforce 6200"
Driver "nvidia"

Section "Screen"

#SubSection "Display"
# Modes "1024x768" "800x600"
Identifier "Default Screen"
Device "Nvidia Geforce 6200"
Monitor "IBM Monitor"
DefaultDepth 24
Option "NoLogo" "True"
SubSection "Display"
Depth 24
# Modes "nvidia-auto-select"

Vhann 11-07-10 12:42 AM

Re: How to delete a specific refresh rate from xrandr?
Ok, I got something working using the metamodes (copied from the 'preview' of nvidia-settings). I checked again and finally, it might be monitor-related.

Oh well, problem solved I guess.

thecapsaicinkid 11-09-10 06:11 PM

Re: How to delete a specific refresh rate from xrandr?
Add these 2 options to your Device section in your xorg.conf and reboot

Option  "DynamicTwinView"    "false"
Option  "ModeDebug"          "true"

Run this in a terminal, this will save a file listing all the available modes your X server has created, the 'mode pool'.


sed -n '/- Modes/,/- End/p' /var/log/Xorg.0.log | sed 's/.*(0)://g' > $HOME/Desktop/modes.txt
Add the name off the modes you want to your Screen section of xorg.conf, like you posted in the Subsection part. This might be trial and error because you obviously have modes in your modepool which your tv doesn't like.

If you reboot and now run..

This should list all the modes you've just specified, basically what you see here is what modes a game would see are available to it. Make sure you can switch to each e.g


xrandr -s 1024x768 -r 60
Something else you could try if that doesn't work, add the following to your Screen section of Xorg.conf, this should only allow modes originating from information read from the EDID chip in your screen, this might stop you ending up with invalid modes in the pool.

Option "ModeValidation" "NoVesaModes,NoXServerModes,NoCustomModes,NoPredefinedModes,NoUserModes"

Vhann 11-09-10 11:44 PM

Re: How to delete a specific refresh rate from xrandr?
Thanks thecapsaicinkid, this is valuable information.

Though, as I said, the monitor was at fault: it doesn't display interlaced frames and the driver used '60 Hertz Double Scan' as the "default frequency" for 640x480. I just copied the "metamodes 640x480_75 +0+0" or something from nvidia-settings into xorg.conf and it works.

Thanks for all the info though, it is valuable nonetheless.


thecapsaicinkid 11-10-10 04:43 AM

Re: How to delete a specific refresh rate from xrandr?
No problem, mode creation is all a bit confusing I find.

Some useful links for anyone else struggling with modes;

How X generates its modepool


How to ensure your system is picking the correct modes/refresh rate


Also, this snippet is quite important (xrandr 'lies' about available refresh rates)


Option "DynamicTwinView" "boolean"

    Enable or disable support for dynamically configuring TwinView on this X screen. When DynamicTwinView is enabled (the default), the refresh rate of a mode (reported through XF86VidMode or XRandR) does not correctly report the refresh rate, but instead is a unique number such that each MetaMode has a different value. This is to guarantee that MetaModes can be uniquely identified by XRandR.

    When DynamicTwinView is disabled, the refresh rate reported through XRandR will be accurate, but NV-CONTROL clients such as nvidia-settings will not be able to dynamically manipulate the X screen's MetaModes. TwinView can still be configured from the X config file when DynamicTwinView is disabled.

    Default: DynamicTwinView is enabled.

All times are GMT -5. The time now is 10:51 AM.

Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.