Bug 253982 - Display goes dead with intel_do_flush_locked failed: Input/output error on Dell XPS m1330
Summary: Display goes dead with intel_do_flush_locked failed: Input/output error on De...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 12.2-RELEASE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-x11 (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-03 15:42 UTC by Jens Grassel
Modified: 2021-11-22 16:46 UTC (History)
2 users (show)

See Also:


Attachments
Xorg logfile (4.18 KB, text/plain)
2021-03-05 11:05 UTC, Jens Grassel
no flags Details
dmesg output (10.67 KB, text/plain)
2021-03-05 11:05 UTC, Jens Grassel
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jens Grassel 2021-03-03 15:42:21 UTC
Hi,

I'm not sure where to file this bug exactly, but since I upgraded my old Dell XPS m1330 from 12.1 to 12.2 I experience weird issues with the display possibly related to OpenGL. Applications triggering this behaviour so far are: ktouch, vice, scummvm and possibly others. It seems only programs using OpenGL trigger this.

1. I start a program (i.e. ktouch)
2. after 1-2 seconds the display goes dark
3. in the error log of X is the line `intel_do_flush_locked failed: Input/output error`
4. no graphics or text console works (display is completely dead until reboot)

However the machine still runs, I can ssh into it and verify that. But display is and stays dead until reboot.

In dmesg there is this message:

```
drmn0: =======================================================
drmn0: This code is deprecated.  Install the graphics/drm-kmod pkg
drmn0: =======================================================
drmn0: Deprecated code (to be removed in FreeBSD 13): drm2 drivers
drmn0: =======================================================
drmn0: This code is deprecated.  Install the graphics/drm-kmod pkg
drmn0: =======================================================
drmn0: Deprecated code (to be removed in FreeBSD 13): drm2 drivers
drmn0: <Intel i965GM> on vgapci0
```

The package drm-kmod is installed.

Are there any ideas what could be the issue here (kernel, drm-drivers)?
And how can I help debugging/solving this?

Kind regards,

Jens
Comment 1 Jan Beich freebsd_committer freebsd_triage 2021-03-05 09:18:42 UTC
drmn0 warnings suggest you have /boot/kernel/i915kms.ko or /boot/kernel/drm2.ko loaded (check "kldstat -v" output). graphics/drm-kmod installs /boot/modules/i915kms.ko and /boot/modules/drm.ko. pkg-message (e.g., run "pkg info -xD drm-.\*kmod") actually documents you need to use kld_list="/boot/modules/i915kms.ko" in rc.conf(5) on FreeBSD < 13.0.

If after fixing the confusion drm-kmod is still not stable on i965GM (Intel Gen4) consider upgrading to FreeBSD >= 13.0 which contains numerious DRM, LinuxKPI and upstream LTS stability fixes, including for old GPUs.
Comment 2 Jens Grassel 2021-03-05 10:17:24 UTC
Thanks for the info. Indeed the wrong drivers where loaded, however: If I use the `/boot/modules/i915kms.ko` in the `kld_list` setting then I get no Xorg running at all ("No screens found").

So I guess it is either downgrading to 12.1 or upgrading to 13.0 for me. ;-)

Thanks again and kind regards,

Jens
Comment 3 Niclas Zeising freebsd_committer freebsd_triage 2021-03-05 10:30:35 UTC
(In reply to Jens Grassel from comment #2)

Do you have any xorg conf?  Can you provide the xorg log when it is not working (with /boot/modules/i915kms.ko), as well as dmesg from when you are loading that driver.
Comment 4 Jens Grassel 2021-03-05 11:04:59 UTC
(In reply to Niclas Zeising from comment #3)

Sure, here is the xorg config:

<---snip--->
Section "Device"
	Identifier 	"Card0"
	Driver		"intel"
	Option		"AccelMethod"	"uxa"
#	Option		"TearFree"	"true"
EndSection
<---snip--->

I'll attach the dmesg and Xorg.log file to the ticket.

Kind regards,

Jens
Comment 5 Jens Grassel 2021-03-05 11:05:31 UTC
Created attachment 222998 [details]
Xorg logfile
Comment 6 Jens Grassel 2021-03-05 11:05:50 UTC
Created attachment 222999 [details]
dmesg output
Comment 7 Niclas Zeising freebsd_committer freebsd_triage 2021-03-05 11:21:56 UTC
(In reply to Jens Grassel from comment #6)

It looks like /boot/modules/i915kms.ko isn't loaded.  How are you loading this module? Which version of drm-*-kmod do you have installed?
Comment 8 Jens Grassel 2021-03-05 11:51:37 UTC
(In reply to Niclas Zeising from comment #7)

Looks like it is loaded to me:

```
% sysrc kld_list
kld_list: /boot/modules/i915kms.ko sysctlinfo sysctlbyname_improved ubtbcmfw vboxdrv
% kldstat -v | grep i915
17    1 0xffffffff82b2e000   12ccb0 i915kms.ko (/boot/modules/i915kms.ko)
		530 i915kms
% pkg info | grep ^drm-
drm-fbsd12.0-kmod-4.16.g20201016_1 DRM modules for the linuxkpi-based KMS components
drm-kmod-g20190710_1           Metaport of DRM modules for the linuxkpi-based KMS components
```

Kinds regards,

Jens
Comment 9 Niclas Zeising freebsd_committer freebsd_triage 2021-03-05 13:50:53 UTC
I can't see in the dmesg you posted that it attached to any hardware.  That's most likely why xorg won't start.  When you load the driver, your screen usually flickers when it changes mode, does that happen?
Comment 10 Jens Grassel 2021-03-05 14:29:51 UTC
(In reply to Niclas Zeising from comment #9)

No flickering, just plain text console.
Comment 11 Jens Grassel 2021-03-05 14:42:17 UTC
(In reply to Jens Grassel from comment #10)

Now that you mentioned it, before (when it worked) the text console was also in higher resolution, now it sticks to 80x25.

Kind regards,

Jens
Comment 12 Niclas Zeising freebsd_committer freebsd_triage 2021-03-05 14:45:09 UTC
So the driver doesn't attach.  How have you installed the driver?  How are you loading the driver?  Which GPU?
Comment 13 Jens Grassel 2021-03-05 14:55:51 UTC
(In reply to Niclas Zeising from comment #12)

So far the i195 module was loaded (and still is via kld_list directive) and provided graphics.
However if the one from base is loaded every time OpenGL is used the display goes completely dead until reboot. This happens since the upgrade from 12.1 to 12.2.
If the i195 module from the drm-kmod package is loaded then I get no graphics at all.

According to the old logs it is a i965GM GPU.

Maybe I should take a peek into 13.0 or downgrade.

Kind regards,

Jens
Comment 14 Jens Grassel 2021-03-23 05:07:48 UTC
Hi,

I found the time to upgrade to 13-RC3 and there the issue seems solved. No display issues so far.

Thanks to everyone involved in FreeBSD land. =)

Kind regards,

Jens
Comment 15 Emmanuel Vadot freebsd_committer freebsd_triage 2021-11-22 16:46:23 UTC
Reporters says it's ok now, closing.