Having trouble finding the correct settings for my monitor with xrandr

This is in Arch Linux (as per my norm). Linux 4.8.13-1-ARCH x86_64 GNU/Linux

I have a Pixio PX277 1440p 144hz monitor connected via DVI-D. At the moment, I'm just trying to use it as a general purpose monitor. Not for gaming. I realize DVI-D will not support 1440p at 144hz. I just want 60Hz.

xrandr doesn't automatically recognize the monitor's modes, so I have to manually add mine. Here is what I've added:

xrandr --newmode "2560x1440_59.96" 312.25 2560 2752 3024 3488 1440 1443 1448 1493 -hsync +vsync

I obtained those values using cvt:

cvt 2560 1440 60

# 2560x1440 59.96 Hz (CVT 3.69M9) hsync: 89.52 kHz; pclk: 312.25 MHz
Modeline "2560x1440_60.00" 312.25 2560 2752 3024 3488 1440 1443 1448 1493 -hsync +vsync

Then I did the following:

xrandr --addmode DVI-D-1 "2560x1440_59.96"
xrandr --output DVI-D-1 --mode "2560x1440_59.96" --right-of VGA-1

And that got the display on. However, it doesn't look right. Here is an example:

It appears to be doing a striping type thing where the first is displayed, the second isn't, the third is, etc etc.

How would I find the correct settings for my monitor for xrandr?

Are there any messages in your system logs?

check dmesg, journal and xorg session log.

does xrandr give you a message when you run any commands?

1 Like

None that I've seen.

I believe I'm using the wrong xrandr sync settings. From the Arch Wiki:

The intel driver part isn't important. The important bit is that it lists what each number represents in the xrandr settings. I am just using what cvt gives me, and according to the wiki page:

Adding undetected resolutions
Due to buggy hardware or drivers, your monitor's correct resolutions may not always be detected by xrandr. For example, the EDID data block queried from the monitor may be incorrect. However, we can add the desired resolutions to xrandr.
First we run gtf or cvt to get the Modeline for the resolution we want.

I presume what it gives are just defaults that usually work.

My friend owns an X34 UW 1440p monitor, and in Radeon Settings, he has the display information, as shown here:

It shows the values he would need to do what I'm doing. However, my monitor doesn't seem to have that button for info.

So I'm assuming the xrandr settings are wrong and that's causing this issue. But I'm not sure how I'd find the correct values, as the manual doesn't list them and googling has failed me.

I have emailed support for the monitor, so I am hoping for a reply that would allow me to do this.

Customer service was able to give me some settings for the monitor at 60 and 144hz.

Now, how would I translate those into the needed values, given that I need them in this format:

xrandr --newmode "2560x1440_59.96" 312.25 2560 2752 3024 3488 1440 1443 1448 1493 -hsync +vsync

Given that each number for those are represented like this:

clock: 241.5 MHz
h_active: 2560 h_sync: 2752 h_sync_end 3024 h_blank_end 3488 h_border: 0
v_active: 1440 v_sync: 1443 v_sync_end 1448 v_blanking: 1493 v_border: 0

Presumably the -hsync and +vsync would need to be +hsync and -vsync according to that screenshot. And instead of 312.25, the pixel clock would be 241.50 (even though I'm not 100% on if the values in the greyed out boxes are correct, the Actuals show the 1st grey box to be correct, so I presume the 2nd would be).

Then I have the obvious of 2560 and 1440 for the h_active and v_active. But the sync, sync_end, and blanking are the ones that I'm not sure on. Maybe I just add. i.e. 2560+32 for h_sync, but then what would sync_end be?

Hmmm....

Edit After thinking about it, I came up with this: xrandr --newmode "2560x1440_59.95" 241.50 2560 2608 2640 2720 1440 1443 1448 1481 +hsync -vsync.

Looking at that image, Total Pixels = Active + Blanking. So it should be the last value of h_blank_end and v_blank. The v_ settings match the defaults given by cvt of 1443 to 1448 for v_sync and v_sync_end, so I kept those.

And using that logic, I did what those did for vertical settings to horizontal settings, so I just got h_sync and h_sync_end by adding Front porch to Active then adding Sync width to that result.

I figure blanking is the entire amount (i.e. Front Porch + Sync Width + Back Porch), and since Total is just Active + Blanking, that should be my h_blank_end and v_blanking.

Now, we test it.

Edit 2:

Well, that fixed the striping issue. However, the font looks terrible. It looks fine on my primary 1080p monitor though.

Hmm, that may be a Linux font issue. :c

Edit 3:

Well, no. It's doing the same thing to images. :S

Edit 4:

Well, the monitor is reporting that it is in 1280 x 1440 @ 60Hz mode.... :|

xrandr reports the following:
HDMI-1 disconnected 2560x1440+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
2560x1440_59.95 59.95*

Mode 2560x1440 on HDMI-1 is the following:
241.50 2560 2608 2640 2720 1440 1443 1448 1481 +hsync -vsync

So, I have no idea why it's doing that. I do see it still says connected. I'm not sure why xrandr can't see the extra monitor correctly :/

Glad to hear. Sorry I haven't been much help until now.

Regarding edit 4, what GPU and driver are you using? Depending on your kernel version and drivers, there may be an issue. You said above you're on linux 4.8. That should eliminate most amdgpu and i915 driver issues, but again, I'm going to need your exact drivers to give you advice.

It's fine. People are busy. :) I understand.

Kernel is reporting the driver being used as radeon. It's an R7 240.

I looked into DPI scaling since I had considered that as a problem. I'm using xrandr to get the display working, but I've edited my /etc/X11/xorg.d.conf/10-monitor.conf to contain a Monitor section where it has the size set to it's dimensions in millimeters (579 by 386 or so IIRC).

Unfortunately, setting that up along with telling it to use the radeon driver and my GPU (even though they were working fine before) has caused it to not launch Xorg correctly and be stuck looking for the display. I'll fix it when I get back to work by going into an Arch install environment and just editing the file back to what it was.

I tried using xrandr --output HDMI-1 --size 579x386 and xrandr --output HDMI-1 --dpi 120 as the actual DPI of this monitor is 107.89 or something close to that (27 inch diagonal at 1440p).

Neither fixed it. But yeah. The monitor's OSD menu is saying it's actually 1280x1440 and not 2560x1440. That sounds..... like an interlacing issue? I don't know as I forget what interlacing means beyond interweaving two striped sets of frames (IIRC).

Not entirely sure on that one. Honestly, I don't understand what is wrong with this monitor. it seems like it's not sending a signal to the GPU saying "hey, I'm here." I'm not sure on the protocols for that, but it works fine on Windows, so I'm not sure. Even using HDMI. Works fine with PS3/PS4 as well. It's weird.

Sorry for the long delay, but the R7 240 should have amdgpu support. see here. radeon is depreciated, so you're absolutely going to want to use amdgpu. that should be able to be done using /etc/modprobe.d.

I'm probably less knowledgeable on modesetting than you've become, so it's more or less the blind leading the blind.

I'm thinking it's a driver issue, which is why I'm recommending trying out amdgpu.

1 Like

Hmm, installing amdgpu's package didn't fix my issue. Boot sequence would hang when it got to the Display Manager if I blacklisted the radeon driver.

On that gentoo wiki page you linked, I noticed the following:

  • 3 Experimental, optional support added since kernel 4.9-rc1

I'm on kernel 4.8.13 atm:
$ uname -a
Linux hostname 4.8.13-1-ARCH

Here:

https://wiki.archlinux.org/index.php/Xorg#AMD

It shows the following:

Here:

It says the following:
A GPU implementing Graphics Core Next 1 (Southern Islands) is found on R9 270, 270X, 280, 280X, R7 240, 250, 250X, 265, and R5 240 branded products.

So, AMDGPU doesn't support the R7 240 based on those things, until I get to kernel 4.9. Presumably.

I see that now. Apologies.

So, AMDGPU doesn't support the R7 240 based on those things, until I get to kernel 4.9. Presumably.

Uh, theoretically. I'm not an expert on AMDGPU. @FaunCB may have more information on the drivers, as he's been the one safeguarding the AMDGPU news/info thread.

2 Likes

So freakie thing happened. I let my computer go to sleep -> I came back and woke it up some time later -> The monitor works fine now.

We shall see if it can repeat that behavior tomorrow. xrandr is saying the HDMI-1 cable is connected after that happens, so presumably it being on and receiving a signal, then toggled through sleep, allowed the GPU or the driver to recognize the connection.

Weeeird.

Odd. I can't explain that. Definitely keep me in the loop though.

1 Like

R7 240 is GCN 1 I believe? Or its the direct chip before that / some were some weren't. Can't hurt to try. I know the XFX 240's are similar in drivers in a lot of places with the 250X's and those cards are supported. Try it out I guess?

1 Like

Arch is on kernel 4.9.5 now, so this shouldn't be an issue even with GCN 1.0 cards, the default driver should be AMDGPU. If it works in Fc25, it surely works in Arch.

1 Like

Kernel package 4.9.5-1 is in testing for Arch. It hasn't been pushed downstream yet.

https://www.archlinux.org/packages/core/x86_64/linux/

And now the new kernel update has been pushed to stable branch.

Time for some testing.

Edit: Hmm, I rebooted and it seems to have still loaded the radeon driver.

cat /var/log/Xorg.0.log | grep radeon
[ 12.726] (II) LoadModule: "radeon"
[ 12.727] (II) Loading /usr/lib/xorg/modules/drivers/radeon_drv.so
[ 12.729] (II) Module radeon: vendor="X.Org Foundation"
[ 12.997] (II) RADEON(0): [DRI2] DRI driver: radeonsi
[ 12.997] (II) RADEON(0): [DRI2] VDPAU driver: radeonsi
[ 13.062] (II) AIGLX: Loaded and initialized radeonsi

Edit 2: Blacklisting radeon driver makes it use amdgpu driver, but when it gets to loading my Graphical Interface, it stops and I have to switch to tty2 to fix the radeon.conf file and reboot.

Check your kernel config. Is CONFIG_DRM_AMDGPU_CIK set to yes?

Checking /proc/config.gz:
cat config | grep CONFIG | grep DRM | grep CIK
CONFIG_DRM_AMDGPU_CIK=y

So yeah.

Edit: After manually creating /etc/X11/xorg.conf.d/20-amdgpu.conf with the following:

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

And rebooting, dmesg shows this:

[ 2.962166] [drm] amdgpu kernel modesetting enabled.
[ 2.967998] fb: switching to amdgpudrmfb from VESA VGA
[ 2.969187] amdgpu 0000:01:00.0: Invalid PCI ROM header signature: expecting 0xaa55, got 0xffff
[ 2.971378] amdgpu 0000:01:00.0: VRAM: 2048M 0x0000000000000000 - 0x000000007FFFFFFF (2048M used)
[ 2.971379] amdgpu 0000:01:00.0: GTT: 8006M 0x0000000080000000 - 0x000000027462A7FF
[ 2.971410] [drm] amdgpu: 2048M of VRAM memory ready
[ 2.971411] [drm] amdgpu: 8006M of GTT memory ready.
[ 2.989069] amdgpu 0000:01:00.0: PCIE GART of 8006M enabled (table at 0x0000000000040000).
[ 2.989156] amdgpu 0000:01:00.0: amdgpu: using MSI.
[ 2.989190] [drm] amdgpu: irq initialized.
[ 2.989674] [drm] amdgpu: dpm initialized
[ 2.990830] amdgpu 0000:01:00.0: fence driver on ring 0 use gpu addr 0x0000000080000010, cpu addr 0xffff88045a445010
[ 2.990878] amdgpu 0000:01:00.0: fence driver on ring 1 use gpu addr 0x0000000080000020, cpu addr 0xffff88045a445020
[ 2.990911] amdgpu 0000:01:00.0: fence driver on ring 2 use gpu addr 0x0000000080000030, cpu addr 0xffff88045a445030
[ 2.990954] amdgpu 0000:01:00.0: fence driver on ring 3 use gpu addr 0x0000000080000040, cpu addr 0xffff88045a445040
[ 2.990995] amdgpu 0000:01:00.0: fence driver on ring 4 use gpu addr 0x0000000080000050, cpu addr 0xffff88045a445050
[ 3.199297] fbcon: amdgpudrmfb (fb0) is primary device
[ 3.213868] amdgpu 0000:01:00.0: fb0: amdgpudrmfb frame buffer device
[ 3.522056] [drm] Initialized amdgpu 3.8.0 20150101 for 0000:01:00.0 on minor 0

Strange, and if you grep drm in dmesg, does it list radeon as the KMS instance or amdgpu?

1 Like

Sorry, was editing my post. It seems it is using AMDGPU now.

Great, just saw tyour edit of the previous post, it worked then, congrats

1 Like