i915 'enabled/connectors mismatch' causing X server crash

Jan Kratochvil jan.kratochvil at redhat.com
Wed Jun 12 12:35:47 UTC 2019


ctrl-alt-f2 + alt-f1 always crashes X server
modeset(0): failed to set mode: No such file or directory | modeset(0): failed to set mode: Invalid argument

First I do not mind so much 'ctrl-alt-f2 + alt-f1' (*) but rather the same
problem happens when I try to resume external display from DPMS off - but that
happens only like once a week (but sometimes many times in one day). That
console switch is 100% reproducible so I have tried to fix it first - but
I admit it also may be an unrelated problem.

(*) Only a bit - when an X application grabs all the input it is useful to
    kill it from a text console and recover the X session.

The problem never happens on Lenovo X1 Carbon 6th internal display or with my
former external LG 1920x1080 display, it does happen only with X1 using
external LG 27UK650 3840x2160 display (I have laptop lid closed in such case).
Running Fedora 29 x86_64 (not F-30 yet as I have some LUKS problem there).

With i915 debugging I see that during the failed display DPMS resume there is
missing (compared to correct display DPMS resume):
	i915 0000:00:02.0: [drm] connector[86]: DP-5
	i915 0000:00:02.0: [drm]       crtc=(null)
and then the i915 driver complains:
	[drm:drm_atomic_helper_check_modeset [drm_kms_helper]] [CRTC:47:pipe A] enabled/connectors mismatch
which then returns EINVAL to X server which crashes with:
	[170654.686] (EE) modeset(0): failed to set mode: Invalid argument
	[170654.686] (EE)
	Fatal server error:
	[170654.686] (EE) EnterVT failed for screen 0
	[170654.686] (EE)
	[170654.686] (EE)
	Please consult the Fedora Project support
		 at http://wiki.x.org
	 for help.
	[170654.693] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
	[170654.693] (EE)
	[170654.693] (II) AIGLX: Suspending AIGLX clients for VT switch
	[170654.745] (EE) Server terminated with error (1). Closing log file.


I have somehow workarounded it by the attached patch as then the X server does
not crash but it just leaves the display black and I can turn off+on the
display to recover my X session. When the X server crashed+restarted the
display recovers so probably one could reinitialize the display in a more
thorough way but I do not know how. I have tried these with no effect:
	i915.enable_dp_mst=0 i915.reset=1

Jan Kratochvil
-------------- next part --------------
--- xorg-server-1.20.4/hw/xfree86/drivers/modesetting/drmmode_display.c-orig	2019-02-26 20:28:50.000000000 +0100
+++ xorg-server-1.20.4/hw/xfree86/drivers/modesetting/drmmode_display.c	2019-06-03 13:27:20.043279427 +0200
@@ -1496,13 +1496,9 @@ drmmode_set_mode_major(xf86CrtcPtr crtc,
                                crtc->gamma_blue, crtc->gamma_size);
         can_test = drmmode_crtc_can_test_mode(crtc);
-        if (drmmode_crtc_set_mode(crtc, can_test)) {
+        if (drmmode_crtc_set_mode(crtc, can_test))
             xf86DrvMsg(crtc->scrn->scrnIndex, X_ERROR,
                        "failed to set mode: %s\n", strerror(errno));
-            ret = FALSE;
-            goto done;
-        } else
-            ret = TRUE;
         if (crtc->scrn->pScreen)

More information about the xorg mailing list