Screen resolution & refresh rate problem

Compiz, KDE, Gnome, Fluxbox, etc...

Moderator: Moderators

Screen resolution & refresh rate problem

Postby newbie » Sat Feb 27, 2010 13:37

Hi,

I had installed Sabayon 5.1 two days ago, then I upgraded it and reboot. From this moment I can't force Sabayon to use [email protected] as default resolution. I have to change it every time in KDE control panel. I've tried to edit xorg.conf, but no effects. It's still using [email protected] as default.

Monitor: [CRT] Iiyama Vision Master Pro 450.
Graphic Card: Radeon HD4870
Kernel: 2.6.32-sabayon

My xorg.conf file:
Code: Select all
Section "Module"
    SubSection  "extmod"
       Option    "omit xfree86-dga"
    EndSubSection
    Load    "i2c"
    Load    "ddc"
    Load    "vbe"
    Load    "dri"
    Load    "glx"
    Load    "synaptics"
EndSection

Section "ServerFlags"
     Option    "AllowMouseOpenFail"    "true"
EndSection

Section "Monitor"
    Identifier    "Generic Monitor"
    VertRefresh    43 - 60
    HorizSync      28 - 80
  # 1280x1024 @ 75.00 Hz (GTF) hsync: 80.17 kHz; pclk: 138.54 MHz
  Modeline "1280x1024_75.00"  138.54  1280 1368 1504 1728  1024 1025 1028 1069  -HSync +Vsync

EndSection


Section "Device"

    Identifier  "SabayonVga0"
    Driver      "fglrx"
    #BusID    "PCI:01:00"
    #Option "RenderAccel" "on"
    #Option "XAANoOffscreenPixmaps"
    #Option "BusType" "PCI"
    #Option "ColorTiling" "on"
    #Option "EnablePageFlip" "on"
    Option "UseEvents" "True"
    Option "LogoPath" "/usr/share/backgrounds/sabayonlinux-nvidia.png"

EndSection
   


Section "Screen"

    Identifier    "Screen 0"
    Device        "SabayonVga0"
    Monitor       "Generic Monitor"
    #Option       "AddARGBGLXVisuals" "true"

    DefaultDepth 24

    SubSection "Display"
        Depth      8
        ViewPort   0 0
        #Modes      "1024x768" "800x600" "640x480"
    EndSubsection

    SubSection "Display"
        Depth           16
        ViewPort        0 0
        #Modes      "1024x768" "800x600" "640x480"
    EndSubsection

    SubSection "Display"
        Depth           24
        ViewPort        0 0
        Modes      "1280x1024_75.00" "800x600" "640x480"
    EndSubsection

EndSection


Section "DRI"
    Mode 0666
EndSection

Section "ServerLayout"
    Identifier   "Main Layout"
    Screen 0    "Screen 0"
EndSection

Section "Extensions"
  Option "Composite" "Enable"
EndSection
newbie
Baby Hen
 
Posts: 1
Joined: Sat Feb 27, 2010 13:30

Re: Screen resolution & refresh rate problem

Postby Fitzcarraldo » Sat Feb 27, 2010 19:04

The xrandr command by itself in a Konsole/Terminal window will tell you what screen is connected, what resolutions are possible and what refresh rates are possible with your hardware. For example, on my laptop the output is:

Code: Select all
$ xrandr
Screen 0: minimum 320 x 200, current 1680 x 1050, maximum 1680 x 1680
VGA-0 disconnected (normal left inverted right x axis y axis)
LVDS connected 1680x1050+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1680x1050      60.6*+
   1400x1050      60.0     60.0
   1280x1024      59.9     60.0
   1440x900       59.9
   1280x960       60.0     59.9
   1280x854       59.9
   1280x800       59.8
   1280x720       59.9
   1152x768       59.8
   1024x768       60.0     59.9
   800x600        60.3     59.9
   640x480        59.9     59.4
DVI-0 disconnected (normal left inverted right x axis y axis)


Try the following command (I'm assuming your monitor is VGA-0. If not, replace accordingly) to change resolution and refresh rate:

Code: Select all
xrandr --output VGA-0 --mode 1280x1024 --refresh 75

Google will provide further information on the use of the xrandr command. Alternatively, the following commands can be used for additional information on the command:

Code: Select all
xrandr --help

and

Code: Select all
man xrandr

If you get it working to your satisfaction then you could put the command in a Desktop Config File in the Autostart folder, which would launch it automatically when you log-in. Alternatively it should be possible to put the command in an ~/.xinitrc script to achieve the same thing. EDIT (Sept 21, 2012): Actually, if xdm is being used to start the X session then ~/.xinitrc is ignored, so ignore my comment about putting the command in ~/.xinitrc.
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7998
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Screen resolution & refresh rate problem

Postby doobydave » Wed Feb 02, 2011 17:01

Apologies for the slight necroposting, and for being a Sabayon noob.

I have always had problems in linux with my Iiyama Vision Master Pro 510. It never seems to get detected properly and I rarely get to be able to choose appropriate resolutions and refresh rates. This is a shame, as the monitor is fantastic (albeit 10 years old..)
Ubuntu now completely refuses to play ball now, due to it's 'failsafe' X implementation.

Code: Select all
~ $ xrandr
xrandr: Failed to get size of gamma for output default
Screen 0: minimum 320 x 175, current 1280 x 1024, maximum 2048 x 1536
default connected 1280x1024+0+0 0mm x 0mm
   2048x1536      50.0     51.0     52.0 
   1920x1440      53.0     54.0     55.0 
   1856x1392      56.0     57.0 
   1792x1344      58.0     59.0 
   1600x1200      60.0     61.0     62.0     63.0     64.0     65.0 
   1400x1050      66.0     67.0 
   1280x1024      68.0     69.0     70.0*
   1280x960       71.0     72.0 
   1152x864       73.0 
   1024x768       74.0     75.0     76.0     77.0     78.0 
   832x624        79.0 
   800x600        80.0     81.0     82.0     83.0     84.0 
   720x400        85.0 
   700x525        86.0     87.0 
   640x480        88.0     89.0     90.0     91.0     92.0     93.0 
   640x400        94.0 
   640x350        95.0 
   512x384        96.0     97.0     98.0 
   400x300        99.0 
   320x240       100.0    101.0 
   320x175       102.0 


It's picked up the correct resolutions, but the refresh rates are way off. Here are some specs of the monitor.
http://www.dealtime.co.uk/Iiyama-Vision-Master-Pro-510-22-in/prices

If anyone can help, it'd be much appreciated.
Using Sabayon 5.5 64bit

Edited to add xorg.conf
Code: Select all
Section "Module"
    SubSection  "extmod"
       Option    "omit xfree86-dga"
    EndSubSection
    Load    "i2c"
    Load    "ddc"
    Load    "vbe"
    Load    "dri"
    Load    "glx"
    Load    "synaptics"
EndSection

Section "ServerFlags"
     Option    "AllowMouseOpenFail"    "true"
EndSection

Section "Monitor"
    Identifier    "Generic Monitor"
    VertRefresh    43 - 60
    HorizSync      28 - 80
EndSection


Section "Device"

    Identifier  "SabayonVga0"
    Driver      "nvidia"
    #BusID    "PCI:01:00"
    #Option "RenderAccel" "on"
    #Option "XAANoOffscreenPixmaps"
    #Option "BusType" "PCI"
    #Option "ColorTiling" "on"
    #Option "EnablePageFlip" "on"
    Option "UseEvents" "True"
    Option "LogoPath" "/usr/share/backgrounds/sabayonlinux-nvidia.png"

EndSection
   


Section "Screen"

    Identifier    "Screen 0"
    Device        "SabayonVga0"
    Monitor       "Generic Monitor"
    Option       "AddARGBGLXVisuals" "true"

    DefaultDepth 24

    SubSection "Display"
        Depth      8
        ViewPort   0 0
        #Modes      "1024x768" "800x600" "640x480"
    EndSubsection

    SubSection "Display"
        Depth           16
        ViewPort        0 0
        #Modes      "1024x768" "800x600" "640x480"
    EndSubsection

    SubSection "Display"
        Depth           24
        ViewPort        0 0
        #Modes      "1024x768" "800x600" "640x480"
    EndSubsection

EndSection


Section "DRI"
    Mode 0666
EndSection

Section "ServerLayout"
    Identifier   "Main Layout"
    Screen 0    "Screen 0"
EndSection

Section "Extensions"
   #Option "Composite" "Enable"
EndSection
doobydave
Young Hen
 
Posts: 32
Joined: Wed Feb 02, 2011 16:49

Re: Screen resolution & refresh rate problem

Postby Fitzcarraldo » Wed Feb 02, 2011 18:40

I don't believe the horizontal sync figures given on the page you linked to ("Synchronization Range - Horizontal 160 - 130 kHz "). I'd check your monitor's manual if I were you. In my comments below I've used sensible values for the horizontal sync range, which Google gave me for your model.

You will probably need to add a Modeline to the Monitor section in xorg.conf. To create this, use KDE's Kickoff > System Settings > Display & Monitor > Size & Orientation to set the resolution and refresh rate you want (if you're using GNOME or another DE then use that DE's tool to do it). Then run an old (but still useful) X.Org utility named xvidtune from a Konsole/Terminal window under your normal user account. You will probably need to install xvidtune first. Click 'OK' in the WARNING pop-up window, and click on 'Show' (bottom row) in the xvidtune pop-up window. That will output a current modeline in the Konsole/Terminal window. Then you just need to add it to the Monitor section in xorg.conf:

Code: Select all
Section "Monitor"
    Identifier "iiyama Vision Master 510" # Make sure it matches Monitor identifier in Section "Screen".
    HorizSync 30.0 - 130.0 # Optional, so you can also try it commented out.
    VertRefresh 50.0 - 160.0 # Optional, so you can also try it commented out.
    ModeLine <output from xvidtune>
EndSection
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7998
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Screen resolution & refresh rate problem

Postby doobydave » Wed Feb 02, 2011 19:33

Thanks for the reply. I am using GDM and the 'configure display settings' allows only those values that appear in the xrandr output. I am assuming this will not produce an improved modeline. Would this be correct?



Edit - Using the correct specs for the monitor (thanks for pointing that out) and this webpage http://xtiming.sourceforge.net/cgi-bin/xtiming.pl
I have generated a modline for the max resolution, however no difference is noted in the resolution, or resolution options, after changing xorg.conf.

I have tried both with the vertical and horizontal rate specified and commented out.

My current xorg.conf
Code: Select all
Section "Module"
    SubSection  "extmod"
       Option    "omit xfree86-dga"
    EndSubSection
    Load    "i2c"
    Load    "ddc"
    Load    "vbe"
    Load    "dri"
    Load    "glx"
    Load    "synaptics"
EndSection

Section "ServerFlags"
     Option    "AllowMouseOpenFail"    "true"
EndSection

Section "Monitor"
    Identifier    "Iiyama Vision Master Pro 510"
    #VertRefresh    56.0 - 160.0
    #HorizSync      30.0 - 130.0
    Modeline "[email protected]" 534.75 2048 2080 4112 4144 1536 1564 1584 1613
EndSection


Section "Device"

    Identifier  "SabayonVga0"
    Driver      "nvidia"
    #BusID    "PCI:01:00"
    #Option "RenderAccel" "on"
    #Option "XAANoOffscreenPixmaps"
    #Option "BusType" "PCI"
    #Option "ColorTiling" "on"
    #Option "EnablePageFlip" "on"
    Option "UseEvents" "True"
    Option "LogoPath" "/usr/share/backgrounds/sabayonlinux-nvidia.png"

EndSection
   


Section "Screen"

    Identifier    "Screen 0"
    Device        "SabayonVga0"
    Monitor       "Iiyama Vision Master Pro 510"
    Option       "AddARGBGLXVisuals" "true"

    DefaultDepth 24

    SubSection "Display"
        Depth      8
        ViewPort   0 0
        #Modes      "1024x768" "800x600" "640x480"
    EndSubsection

    SubSection "Display"
        Depth           16
        ViewPort        0 0
        #Modes      "1024x768" "800x600" "640x480"
    EndSubsection

    SubSection "Display"
        Depth           24
        ViewPort        0 0
        #Modes      "1024x768" "800x600" "640x480"
    EndSubsection

EndSection


Section "DRI"
    Mode 0666
EndSection

Section "ServerLayout"
    Identifier   "Main Layout"
    Screen 0    "Screen 0"
EndSection

Section "Extensions"
   #Option "Composite" "Enable"
EndSection
doobydave
Young Hen
 
Posts: 32
Joined: Wed Feb 02, 2011 16:49

Re: Screen resolution & refresh rate problem

Postby Fitzcarraldo » Wed Feb 02, 2011 22:45

I see from your xorg.conf that you are using the NVIDIA closed-source driver. I'm no expert on NVIDIA, but Google is telling me that the NVIDIA closed-source driver does not provide full support for xrandr (see e.g. http://forums.nvidia.com/index.php?showtopic=175147 ). Do you know any more about that?

Anyway, have a look in /var/log/Xorg.0.log to see if there is any EDID information there regarding your monitor. From http://www.freebsd.org/doc/en_US.ISO885 ... onfig.html Web page:

Simply look for information resembling this:

(II) MGA(0): Supported additional Video Mode:
(II) MGA(0): clock: 146.2 MHz Image Size: 433 x 271 mm
(II) MGA(0): h_active: 1680 h_sync: 1784 h_sync_end 1960 h_blank_end 2240 h_border: 0
(II) MGA(0): v_active: 1050 v_sync: 1053 v_sync_end 1059 v_blanking: 1089 v_border: 0
(II) MGA(0): Ranges: V min: 48 V max: 85 Hz, H min: 30 H max: 94 kHz, PixClock max 170 MHz

This information is called EDID information. Creating a ModeLine from this is just a matter of putting the numbers in the correct order:

ModeLine <name> <clock> <4 horiz. timings> <4 vert. timings>

So that the ModeLine in Section "Monitor" for this example would look like this:

Section "Monitor"
Identifier "Monitor1"
VendorName "Bigname"
ModelName "BestModel"
ModeLine "1680x1050" 146.2 1680 1784 1960 2240 1050 1053 1059 1089
Option "DPMS"
EndSection


Google also shows me the following for your model of monitor, so you might also like to try that as an experiment, adjusting the modeline if required:

Code: Select all
Section "Monitor"
    Identifier "Iiyama Vision Master Pro 510"
    Option "DPMS"
    #VendorName "Iiyama"
    #ModelName "Iiyama A201HT, VisionMaster Pro 510"
    #HorizSync 30.0-130.0
    #VertRefresh 50.0-160.0
    Modeline "1600x1200_75" 202.50 1600 1664 1856 2160 1200 1201 1204 1250 +hsync +vsync [email protected] Hz
    Modeline "1600x1200_85" 229.50 1600 1664 1856 2160 1200 1201 1204 1250 +hsync +vsync # 85 Hz
    #Option "TargetRefresh" "85"
    Option "PreferredMode" "1600x1200_85"
EndSection
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7998
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Screen resolution & refresh rate problem

Postby doobydave » Thu Feb 03, 2011 13:27

I see from your xorg.conf that you are using the NVIDIA closed-source driver. I'm no expert on NVIDIA, but Google is telling me that the NVIDIA closed-source driver does not provide full support for xrandr (see e.g. http://forums.nvidia.com/index.php?showtopic=175147 ). Do you know any more about that?


No, I'm far too nooby, sorry. Sounds eminently plausible though..

Is there a reason for seeing "+vsync +hsync" or " at the end of the modeline sometimes?
Also, sometime the refresh rate is expressed with a "@" and sometimes with a "_" Should both of these work, or do different distros use different syntax.
I am also assuming the word "Modeline" should not need a capital "L"


And I could not find any info in Xorg.0.log pertaining to the EDID info you mention.

Thanks again for you help.
doobydave
Young Hen
 
Posts: 32
Joined: Wed Feb 02, 2011 16:49

Re: Screen resolution & refresh rate problem

Postby Fitzcarraldo » Thu Feb 03, 2011 21:37

The vsync and hsync at the end are explained on the following page: Modeline Calculator which, as its title suggests, is... a modeline calculator, and the instructions for how to use it are given on that page. It actually has a good explanation of your problem too, as your GPU is also not getting EDID information from your monitor. Perhaps you can use the online calculator on that page to come up with a modeline that will work. (You might also want to take a look at the X.Org Wiki FAQVideoModes). AFAIK, the uppercase/lowercase thing does not matter and they are parsed either way, but I like the way the Modeline Caclulator page does it, so I'd try that if I were you. I'm not sure about the interchangeability of the "@" and "_", to be honest, but I suspect both are valid. I have a crude approach: I try all the options I can find and see if any works.
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7998
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Screen resolution & refresh rate problem

Postby doobydave » Fri Feb 04, 2011 13:46

It would appear that nothing I do to xorg.conf makes any difference at all. Perhaps the nvidia driver is controlling it, and refusing to let go.
doobydave
Young Hen
 
Posts: 32
Joined: Wed Feb 02, 2011 16:49

Re: Screen resolution & refresh rate problem

Postby Fitzcarraldo » Fri Feb 04, 2011 14:54

Which resolutions does the NVIDIA Settings GUI tool show?

Image
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7998
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Next

Return to 3D Desktops and Window Managers

Who is online

Users browsing this forum: No registered users and 1 guest