Trouble With Xorg Refresh Rate Configuration

Hi Archers,

​

I have a 1440p, 144Hz monitor that I'm trying to configure. If I run xrandr -r 144, the refresh rate does indeed go to 144Hz. After running this command, my xrandr output is as follows:

Screen 0: minimum 320 x 200, current 2560 x 1440, maximum 16384 x 16384
DisplayPort-0 connected primary 2560x1440+0+0 (normal left inverted right x axis y axis) 597mm x 336mm
   2560x1440     59.95 + 143.86*  119.88    99.95  
   1920x1200     59.95  
   1920x1080    143.85    60.00    50.00    59.94  
   1600x1200     59.95  
   1680x1050     59.95  
   1280x1024     75.02    60.02  
   1440x900      59.89  
   1280x960      60.00  
   1280x800      59.81  
   1152x864      75.00  
   1280x720      60.00    50.00    59.94  
   1024x768      75.03    70.07    60.00  
   832x624       74.55  
   800x600       72.19    75.00    60.32    56.25  
   720x576       50.00  
   720x480       60.00    59.94  
   640x480       75.00    72.81    66.67    60.00    59.94  
   720x400       70.08  

What I'm struggling with is setting this as my default configuration. I'm able to stick the xrandr -r 144 command into my xinitrc, but that causes a multi-second delay that I'm almost certain I can eliminate with a proper xorg configuration.

I ran cvt 2560 1440 144 to generate a modeline, which I then stuck into /etc/X11/xorg.conf.d/20-amdgpu.conf. Here's the contents of that configuration file:

Section "Monitor"
    Identifier "Monitor0"
    Modeline "2560x1440_ree"  808.75  2560 2792 3072 3584  1440 1443 1448 1568 -hsync +vsync
EndSection

Section "Device"
    Identifier "AMD"
    Driver "amdgpu"
EndSection

Section "Screen"
    Identifier "Screen0"
    Device "AMD"
    Monitor "Monitor0"
    SubSection "Display"
        Modes "2560x1440_ree"
    EndSubSection
EndSection

If I try to start with the above configuration, my monitor simply turns off, as if the xorg session launches into a blank screen and triggers my monitor's automatic sleep.

​

I've also noticed that, when trying to create and manually apply the modes via xrandr, I receive the following error:

$ cvt 2560 1440 144
# 2560x1440 143.91 Hz (CVT) hsync: 225.66 kHz; pclk: 808.75 MHz
Modeline "2560x1440_144.00"  808.75  2560 2792 3072 3584  1440 1443 1448 1568 -hsync +vsync
$ xrandr --newmode "2560x1440_144.00"  808.75  2560 2792 3072 3584  1440 1443 1448 1568 -hsync +vsync
$ xrandr --addmode DisplayPort-0 "2560x1440_144.00"
$ xrandr --output DisplayPort-0 --mode "2560x1440_144.00"
xrandr: Configure crtc 0 failed

​

Here's my Xorg.0.log: https://pastebin.com/4ahf0MWZ

I wasn't able to find any issues, but I'm by no means an expert at reading through these logfiles. If anyone has any idea about why this could be happening, I'd be incredibly happy to be able to put this issue behind me. Thanks in advance!

​

Edit/Additional info: I'm running with an AMD RX 580 GPU with the open source amdgpu driver. To my knowledge, I've also enabled early KMS by editing the initcpio configuration file and regenerating the initcpio image. I didn't receive any error messages, so I'm assuming the wiki's instructions were correct.

​

UPDATE: Issuse has been resolved. Rather than providing a "full" configuration file for my monitor, creating a "Monitor" section, adding the correct modeline (mine was configured with the wrong pixel clock frequency), and setting the preferred mode was adequate to make my system choose the proper refresh rate at startup.

​

Update 2 (2019-05-17): Adding `video=2560x1440@144` into my grub options forced my system to boot with appropriate settings, and eliminated the delay caused by starting up i3wm or Sway when configured for 2k@144 FPS. I believe this is the optimal solution.

Posted Apr 28, 2019, 10:36 PM UTC · edited

12
ropid•

First thing, I would try the modeline that is printed in the Xorg log file by the driver. It has a much lower pixel clock MHz than the one you got from the 'cvt' tool. It's this here:

Modeline "2560x1440"x143.9  586.00  2560 2568 2600 2640  1440 1465 1473 1543 +hsync -vsync

Try the following Xorg config file (this is supposed to be the whole config file):

Section "Monitor"
    Identifier "DisplayPort-0"
    ModeLine "2560x1440_ree" 586.00  2560 2568 2600 2640  1440 1465 1473 1543 +hsync -vsync
    Option "PreferredMode" "2560x1440_ree"
EndSection

The trick here is that "PreferredMode" option, and also that "Identifier" set to "DisplayPort-0".

This thing with the "Identifier" being set to exactly the name of an output of the GPU is not documented well in man xorg.conf. I got it from forums posts somewhere. It's supposed to tie that specific output to this monitor-section of the config, without you needing those device-section or screen-section that you currently have in your config file.

Another thing, maybe there's a way to skip the "ModeLine" in the config and just use the "PreferredMode" option? I don't know if one of the following might work to make the server use that ModeLine that it prints to the log file:

Option "PreferredMode" "2560x1440x143.9"
Option "PreferredMode" "2560x1440"x143.9

EDIT:

In man xorg.conf, they write ModeLine with upper-case L, not Modeline with lower-case L. I don't know which one of the two is correct, ModeLine or Modeline, or if maybe both work.

3
Vector-ZeroOP•

Good catch on the pixel clock thing. I'm going to make a point of figuring out what those modeline numbers actually represent. However, it appears that your recommended config file did the trick!!

For whatever reason, using the preferred modes you suggested yielded different results. "2560x1440x143.9" seemed to have no impact on the monitor's refresh rate, and "2560x1440"x143.9 prevented xorg from starting entirely. Also, it seems that the capitalization of Modeline/ModeLine is insignificant in this case.

Either way, your first suggested solution works perfectly. Thank you so much for getting me sorted out!

3