You are not logged in.

#1 2020-01-20 19:01:47

ralph_13
Member
Registered: 2015-02-06
Posts: 73

Xrandr can't set 640x240 resolution: configure crtc 1 failed

Ok so, first off, I want this resolution because it's what mame looks the best on my 71Khz VGA CRT. This works on another laptop that has an AMD GPU. This one's got Intel Sandy Bridges.

% xrandr --output LVDS-1 --off
% cvt 640 240 120
# 640x240 118.53 Hz (CVT) hsync: 30.94 kHz; pclk: 24.75 MHz
Modeline "640x240_120.00"   24.75  640 664 720 800  240 243 253 261 -hsync +vsync
% xrandr --newmode "640x240_120.00"   24.75  640 664 720 800  240 243 253 261 -hsync +vsync
% xrandr --addmode VGA-1 "640x240_120.00"
% xrandr --output VGA-1 --mode "640x240_120.00"
xrandr: Configure crtc 1 failed

The Xorg log confirms the error with "(EE) modeset(0): failed to set mode: Invalid argument": https://pastebin.com/JxiJJwdT

I'm not gonna post my whole dmesg to avoid exposure, but I can grep for something specific anyone needs to know. Anyway, it expands on the issue with the following info:

[ 3731.687340] [drm:ironlake_crtc_compute_clock [i915]] *ERROR* Couldn't find PLL settings for mode!

I have found mentions of this error on the web, but they seem to be old bugs that have since been solved. Also, setting this mode on LVDS works, it's just VGA that doesn't.

Thanks a lot for any help.

Offline

#2 2020-01-20 19:16:07

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: Xrandr can't set 640x240 resolution: configure crtc 1 failed

ralph_13 wrote:

71Khz VGA CRT

I am exceptionally jealous.

ralph_13 wrote:
% cvt 640 240 120

Does it work if you omit the refresh rate argument?

Offline

#3 2020-01-20 20:37:27

ralph_13
Member
Registered: 2015-02-06
Posts: 73

Re: Xrandr can't set 640x240 resolution: configure crtc 1 failed

Head_on_a_Stick wrote:

I am exceptionally jealous.

You should get one while you still can, they're getting rarer by the minute. And to think I only paid around the equivalent of 10US$ for this 2008 17" beauty.

Anyway, it doesn't work as well if the refresh rate is omitted in cvt. For the record, I can get other non standard modelines to work, such as 640x480@120hz (for some awesome quake action), it only seems to not work when the resolution is smaller than... Well, I just tested it, and for some weird reason, it works with anything above 240 lines. Seriously:

% cvt 640 241 120
# 640x241 119.27 Hz (CVT) hsync: 31.25 kHz; pclk: 25.00 MHz
Modeline "640x241_120.00"   25.00  640 664 720 800  241 244 254 262 -hsync +vsync

% xrandr --newmode "640x241_120.00"   25.00  640 664 720 800  241 244 254 262 -hsync +vsync

% xrandr --addmode VGA1 "640x241_120.00"                             

% xrandr --output VGA1 --mode "640x241_120.00" --verbose
crtc 0: disable
screen 0: 640x241 159x59 mm 102.13dpi
crtc 0: 640x241_120.00 119.27 +0+0 "VGA1"

% xrandr --output VGA1 --mode "640x240_120.00" --verbose
crtc 0: disable
screen 0: 640x240 156x58 mm 103.75dpi
crtc 0: 640x240_120.00 118.53 +0+0 "VGA1"
xrandr: Configure crtc 0 failed
crtc 0: disable
crtc 1: disable
crtc 2: disable
screen 0: revert
crtc 0: revert
crtc 1: revert
crtc 2: revert

This works for me, since mame only uses 224 lines anyway and I just overscan the rest. I'm not sure if I should mark as solved, since this works for me but the actual issue is still there. I can still follow up on testing this, but to me it's solved.

Thanks a lot for the insight.

EDIT: Since I remembered there's groovymame which has its own custom 240p modelines that also run into this issue, I'm still interested in fixing this. Or fixing groovymame's modelines to work at 241p (lol).

Last edited by ralph_13 (2020-01-20 20:53:09)

Offline

#4 2020-01-20 22:19:08

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,394

Re: Xrandr can't set 640x240 resolution: configure crtc 1 failed

It is probably a chipset limitation and the driver avoids modelines that can hit it.
I've had similar weird results trying to drive a 15khz crt with an intel gpu, where the ati worked well.

...Just overscan the picture and calculate new modelines if needed, it is simpler than hacking the video driver smile

Last edited by kokoko3k (2020-01-20 22:21:58)


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#5 2020-01-21 11:13:42

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,920

Re: Xrandr can't set 640x240 resolution: configure crtc 1 failed

% cvt 640 240 120
# 640x240 118.53 Hz (CVT) hsync: 30.94 kHz; pclk: 24.75 MHz

Check the specifications of your vga monitor.
If it supports EDID you should have lines like these in xorg log :

[    83.755] (II) AMDGPU(0): Serial No: FE30923001399
[    83.755] (II) AMDGPU(0): Monitor name: Philips 240PW
[    83.755] (II) AMDGPU(0): Ranges: V min: 48 V max: 85 Hz, H min: 24 H max: 94 kHz, PixClock max 175 MHz

For my monitor any resultion with hsync between 24 KHz - 94 KHz and a pixelclock below 175 Mhz should work.

I used to have a 1600x1200 crt monitor around 2001 and do remember it's hsync range was rather limited , something like 40 Khz to 56 Khz.
This blocked many resoutions.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

Board footer

Powered by FluxBB