Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 11-06-10, 10:46 PM   #1
Vhann
Registered User
 
Join Date: Nov 2010
Posts: 3
Default How to delete a specific refresh rate from xrandr?

Hi,

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

Question
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?


Regards,
Vhann

==================
Here are my system details:
Ubuntu 9.10 Karmic Koala

$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=9.10
DISTRIB_CODENAME=karmic
DISTRIB_DESCRIPTION="Ubuntu 9.10"

$ 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

/etc/X11/xorg.conf:
Quote:
# 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"
EndSection

Section "Module"
Load "glx"
EndSection

Section "InputDevice"

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

Section "InputDevice"

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

Section "Monitor"
Identifier "IBM Monitor"
EndSection

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

Section "Screen"

#SubSection "Display"
# Modes "1024x768" "800x600"
#EndSubSection
Identifier "Default Screen"
Device "Nvidia Geforce 6200"
Monitor "IBM Monitor"
DefaultDepth 24
Option "NoLogo" "True"
SubSection "Display"
Depth 24
# Modes "nvidia-auto-select"
EndSubSection
EndSection
Vhann is offline   Reply With Quote
Old 11-07-10, 12:42 AM   #2
Vhann
Registered User
 
Join Date: Nov 2010
Posts: 3
Default 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.
Vhann is offline   Reply With Quote
Old 11-09-10, 06:11 PM   #3
thecapsaicinkid
Registered User
 
Join Date: Aug 2010
Posts: 47
Default Re: How to delete a specific refresh rate from xrandr?

Add these 2 options to your Device section in your xorg.conf and reboot
Code:
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'.

Code:
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..
Code:
xrandr
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

Code:
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.
Code:
Option "ModeValidation" "NoVesaModes,NoXServerModes,NoCustomModes,NoPredefinedModes,NoUserModes"
thecapsaicinkid is offline   Reply With Quote
Old 11-09-10, 11:44 PM   #4
Vhann
Registered User
 
Join Date: Nov 2010
Posts: 3
Default 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.

Regards,
Vhann
Vhann is offline   Reply With Quote
Old 11-10-10, 04:43 AM   #5
thecapsaicinkid
Registered User
 
Join Date: Aug 2010
Posts: 47
Default 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


http://http.download.nvidia.com/XFre...ppendix-j.html

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

http://forum.xbmc.org/showthread.php?t=70068


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

Code:
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.
thecapsaicinkid is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 03:47 AM.


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