Re: Problem Report: i915 driver most probably causing freezes on FreeBSD 13.1-RELEASE

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Wed, 21 Sep 2022 19:00:13 UTC
(Disclaimer: I'm on wlroots (Wayland), so can't help much with Xorg (X11) issues)

Beñat Dagorret <lists@nrd.fr> writes:

> Hello,
>
> I'm having an issue with the i915kms driver on a fresh FreeBSD
> 13.1-RELEASE install. The system boots and shows the Display Manager
> (LightDM) without any problem, but after logging in, X crashes leaving
> a black screen and a dead keyboard. The crash occurs always about 3
> seconds after user login, no matter there was any user activity. I
> need to shutdown the system remotely from my laptop through ssh.

Can you trigger OpenGL crash via graphics/kmscube or glmark2-drm from
benchmarks/glmark2 when running under console?

> vgapci0@pci0:0:2:0:	class=0x030000 rev=0x06 hdr=0x00 vendor=0x8086 device=0x0402 subvendor=0x103c subdevice=0x21d0
>     vendor     = 'Intel Corporation'
>     device     = 'Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller'
>     class      = display
>     subclass   = VGA
>     bar   [10] = type Memory, range 64, base 0xf7800000, size 4194304, enabled
>     bar   [18] = type Prefetchable Memory, range 64, base 0xe0000000, size 268435456, enabled
>     bar   [20] = type I/O Port, range 32, base 0xf000, size 64, enabled
>     cap 05[90] = MSI supports 1 message enabled with 1 message
>     cap 01[d0] = powerspec 2  supports D0 D3  current D0
>     cap 13[a4] = PCI Advanced Features: FLR TP

0x0402 is Haswell, so OpenGL is driven by either i965 or crocus. In graphics/mesa-dri
crocus is currently disabled by default unless MESA_LOADER_DRIVER_OVERRIDE=crocus, see
https://gitlab.freedesktop.org/mesa/mesa/-/commit/988762679ccf

src/loader/meson.build:
  _prefer_crocus = get_option('prefer-crocus')
  if _prefer_crocus == 'auto'
    _prefer_crocus = 'false'
  endif

Maybe try crocus from graphics/mesa-devel. i965 is gone upstream (Mesa >= 22.0.0).

> [    11.994] 
> X.Org X Server 1.20.14
> X Protocol Version 11, Revision 0

Try upgrading xorg-server to 21.1.4 by switching to /latest package repo.
1.20.14 on /quarterly will be unsupported after 2022Q3 branch EOL around
2022-10-01 (~1 week from now).

> [    12.593] (II) event5  - Logitech USB Optical Mouse, class 0/0, rev 2.00/72.00, addr 3: is tagged by udev as: Mouse
> [    12.594] (II) event5  - Logitech USB Optical Mouse, class 0/0, rev 2.00/72.00, addr 3: device is a pointer

Looking at the end of Xorg.log I don't see anything suspicious. Is it
really the log from when Xorg crashed and not from a separate instance
run by the Display Manager?