Bug 282304

Summary: After 13.3 -> 14.1 Intel GPU hangs
Product: Base System Reporter: ml
Component: miscAssignee: freebsd-bugs (Nobody) <bugs>
Status: New ---    
Severity: Affects Only Me Keywords: regression
Priority: ---    
Version: 14.1-RELEASE   
Hardware: Any   
OS: Any   

Description ml 2024-10-24 16:18:00 UTC
Hello.

I've got a Starlite laptop which has always worked flawlessly (at least WRT graphics).
# pciconf -lvb
vgapci0@pci0:0:2:0:     class=0x030000 rev=0x06 hdr=0x00 vendor=0x8086 device=0x3184 subvendor=0x0000 subdevice=0x0000
    vendor     = 'Intel Corporation'
    device     = 'GeminiLake [UHD Graphics 605]'
    class      = display
    subclass   = VGA
    bar   [10] = type Memory, range 64, base rx90000000, size 16777216, enabled
    bar   [18] = type Prefetchable Memory, range 64, base rx80000000, size 268435456, enabled
    bar   [20] = type I/O Port, range 32, base rx1000, size 64, enabled 

However, after upgrading from 13.3 to 14.1, it started giving troubles.
1-3 times a day, during normal desktop work, it either:
_ starts showing screen tearing (which often fixes itself after a while);
_ hangs completely (and I have to press Ctrl-Alt-Backspace and start over).

I've seen the following in the console in one occasion (please forgive any little mistake, as I need to rewrite it from a picture):
drmn0: [drm] GPU HANG: ecode 9:1:85dffdfb, in MainThread [100791]
drmn0: [drm] Resetting rcs0 for preemption time out
drmn0: [drm] Xorg[100791] context reset due to GPU hang 

In another occasion:
drmn0: [drm] Resetting rcs0 for CS error
drmn0: [drm] MainThread[100791] context reset due to GPU hang
drmn0: [drm] GPU HANG: ecode 9:1:00280001, in MainThread [100791]
drmn0: [drm] GPU HANG: ecode 9:1:85dfffff, in MainThread [100791]
drmn0: [drm] Resetting rcs0 for preemption time out
drmn0: [drm] Xorg[100791] context reset due to GPU hang 

Or, again:
Oct  7 09:15:14 kernel: drmn0: [drm] *ERROR* Atomic update failure on pipe A (start=8394 end=8395) time 1675 us, min 1073, max 1079, scanline start 1001, end 1109
Oct  7 09:17:14 kernel: drmn0: [drm] *ERROR* Atomic update failure on pipe A (start=14986 end=14987) time 2280 us, min 1073, max 1079, scanline start 980, end 1090
Oct  7 09:18:14 kernel: drmn0: [drm] *ERROR* Atomic update failure on pipe A (start=18846 end=18847) time 1864 us, min 1073, max 1079, scanline start 962, end 1089
Oct  7 09:19:05 kernel: drmn0: [drm] *ERROR* Atomic update failure on pipe A (start=22251 end=22252) time 1625 us, min 1073, max 1079, scanline start 999, end 1108 



I'm using updated 2024Q4 packages, so:
# pkg info|grep -E "(drm|xorg)"
drm-61-kmod-6.1.92             DRM drivers modules
drm-kmod-20220907_3            Metaport of DRM modules for the linuxkpi-based KMS components
gpu-firmware-kmod-20240401,1   Firmware modules for the drm-kmod drivers
libdrm-2.4.123,1               Direct Rendering Manager library and headers
xorg-server-21.1.13,1          X.Org X server and related programs