Xvnc, Picom and GPU issue

Hi guys, after quarterly updates, Picom and VNC connection are giving me annoying issues, the screen becomes black.

Code:
# System / kernel
uname -a
freebsd-version -kru
FreeBSD gpc 15.1-RELEASE-p4 FreeBSD 15.1-RELEASE-p4 releng/15.1-n283627-db6066678b33 GENERIC amd64
15.1-RELEASE-p4

# GPU hardware
pciconf -lv | grep -A3 -i vga
vgapci0@pci0:0:2:0:	class=0x030000 rev=0x00 hdr=0x00 vendor=0x8086 device=0x46d1 subvendor=0x0301 subdevice=0x02f3
    vendor     = 'Intel Corporation'
    device     = 'Alder Lake-N [UHD Graphics]'
    class      = display
    subclass   = VGA
none0@pci0:0:10:0:	class=0x118000 rev=0x01 hdr=0x00 vendor=0x8086 device=0x467d subvendor=0x0000 subdevice=0x0000
    vendor     = 'Intel Corporation'
    device     = 'Platform Monitoring Technology'


# Graphics stack packages
pkg info | grep -iE "mesa|picom|drm|libglvnd|xorg-server|xf86-video"
drm-612-kmod-6.12.85.1501000_2 Direct Rendering Manager (DRM) GPU drivers
drm-kmod-20260508              Direct Rendering Manager (DRM) GPU drivers metaport
gpu-firmware-kmod-20260519,1   Firmware modules for the drm-kmod drivers
libdrm-2.4.134,1               Direct Rendering Manager library and headers
libglvnd-1.7.0                 GL Vendor-Neutral Dispatch library
linux-rl9-dri-25.2.7           Mesa libGL runtime libraries (Rocky Linux 9.8)
linux-rl9-libdrm-2.4.128       Rocky Linux Direct Rendering Manager runtime
linux-rl9-libglvnd-1.3.4_1     GL Vendor-Neutral Dispatch library (Rocky Linux 9.6)
mesa-demos-9.0.0               OpenGL demos distributed with Mesa
mesa-dri-26.2.2                OpenGL hardware acceleration drivers for DRI2+
mesa-libs-26.2.2               OpenGL libraries that support GLX and EGL clients
picom-13                       Lightweight X11 compositor
xf86-video-scfb-0.0.7_2        X.Org syscons display driver
xf86-video-vesa-2.6.0          X.Org vesa display driver
xorg-server-21.1.25,1          X.Org X server and related programs

# OpenGL / renderer
glxinfo | grep -E "OpenGL vendor|OpenGL renderer|OpenGL version|direct rendering"
direct rendering: Yes
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) Graphics (ADL-N)
OpenGL version string: 4.6 (Compatibility Profile) Mesa 26.2.2

# Xorg
cat /usr/local/etc/X11/xorg.conf.d/20-intel.conf
Section "Device"
	Identifier "Card0"
	Driver     "modesetting"
EndSection


# Loaded GPU kernel modules
kldstat | grep -iE "drm|i915|ttm"
10    1 0xffffffff85200000   24a410 i915kms.ko
11    2 0xffffffff8500f000    9f430 drm.ko
16    1 0xffffffff850c3000     c358 ttm.ko


# GPU hang lines
 dmesg | grep -iE "drm|gpu hang|reset"
[drm] Got Intel graphics stolen memory base 0x7c800000, size 0x3c00000
drmn0: <drmn> on vgapci0
vgapci0: child drmn0 requested pci_enable_io
vgapci0: child drmn0 requested pci_enable_io
drmn0: [drm] Found ALDERLAKE_P/ADL-N (device ID 46d1) display version 13.00 stepping D0
lkpi_iic0: <LinuxKPI I2C> on drmn0
lkpi_iic1: <LinuxKPI I2C> on drmn0
lkpi_iic2: <LinuxKPI I2C> on drmn0
lkpi_iic3: <LinuxKPI I2C> on drmn0
lkpi_iic4: <LinuxKPI I2C> on drmn0
lkpi_iic5: <LinuxKPI I2C> on drmn0
lkpi_iic6: <LinuxKPI I2C> on drmn0
lkpi_iic7: <LinuxKPI I2C> on drmn0
lkpi_iic8: <LinuxKPI I2C> on drmn0
drmn0: successfully loaded firmware image 'i915/adlp_dmc.bin'
drmn0: [drm] Finished loading DMC firmware i915/adlp_dmc.bin (v2.20)
[drm] Initialized i915 1.6.0 for drmn0 on minor 0
VT: Replacing driver "efifb" with new "drmfb".
name=drmn0 id=i915drmfb flags=0x0 stride=7680
drmn0: [drm] GPU HANG: ecode 12:1:859ffffb, in Xvnc [100896]
drmn0: [drm] Resetting rcs0 for preemption time out
drmn0: [drm] Xvnc[100896] context reset due to GPU hang
drmn0: [drm] GPU HANG: ecode 12:1:84df9ffc, in Renderer [101247]
drmn0: [drm] Resetting rcs0 for preemption time out
drmn0: [drm] Renderer[101247] context reset due to GPU hang
drmn0: [drm] GPU HANG: ecode 12:1:859ffffb, in Xvnc [100896]
drmn0: [drm] Resetting rcs0 for preemption time out
drmn0: [drm] Xvnc[100896] context reset due to GPU hang
drmn0: [drm] GPU HANG: ecode 12:1:859ffffb, in Xvnc [100896]
drmn0: [drm] Resetting rcs0 for preemption time out
drmn0: [drm] Xvnc[100896] context reset due to GPU hang
drmn0: [drm] GPU HANG: ecode 12:1:85dfffff, in picom [100900]
drmn0: [drm] Resetting rcs0 for preemption time out
drmn0: [drm] picom[100900] context reset due to GPU hang
drmn0: [drm] Resetting rcs0 for preemption time out
drmn0: [drm] Renderer[101247] context reset due to GPU hang
drmn0: [drm] GPU HANG: ecode 12:1:85dffffb, in Renderer [101247]
drmn0: [drm] Resetting rcs0 for preemption time out
drmn0: [drm] Renderer[101247] context reset due to GPU hang
drmn0: [drm] GPU HANG: ecode 12:1:85dffffb, in Renderer [101247]
drmn0: [drm] Resetting rcs0 for preemption time out
drmn0: [drm] MainThread[101148] context reset due to GPU hang
drmn0: [drm] GPU HANG: ecode 12:1:85dffdfb, in MainThread [101148]
drmn0: [drm] Resetting rcs0 for preemption time out
drmn0: [drm] MainThread[101148] context reset due to GPU hang
drmn0: [drm] GPU HANG: ecode 12:1:85dffefb, in MainThread [101148]
drmn0: [drm] Resetting rcs0 for preemption time out
drmn0: [drm] MainThread[101148] context reset due to GPU hang
drmn0: [drm] GPU HANG: ecode 12:1:85dffdfb, in MainThread [101148]
drmn0: [drm] Resetting rcs0 for preemption time out
drmn0: [drm] Renderer[102274] context reset due to GPU hang
drmn0: [drm] GPU HANG: ecode 12:1:85dffffb, in Renderer [102274]
drmn0: [drm] Resetting rcs0 for preemption time out
drmn0: [drm] Renderer[102274] context reset due to GPU hang
drmn0: [drm] GPU HANG: ecode 12:1:85dffffb, in Renderer [102274]
drmn0: [drm] Resetting rcs0 for preemption time out
drmn0: [drm] Renderer[102274] context reset due to GPU hang
drmn0: [drm] GPU HANG: ecode 12:1:85dffffb, in Renderer [102274]
drmn0: [drm] Resetting rcs0 for preemption time out
drmn0: [drm] MainThread[101030] context reset due to GPU hang
drmn0: [drm] GPU HANG: ecode 12:1:85dffdfb, in MainThread [101030]
Fence expiration time out i915-drmn0:MainThread[101030]:8!
drmn0: [drm] Resetting rcs0 for preemption time out
drmn0: [drm] MainThread[101030] context reset due to GPU hang
drmn0: [drm] GPU HANG: ecode 12:1:85dffefb, in MainThread [101030]
drmn0: [drm] GPU HANG: ecode 12:1:87cabbf2, in MainThread [101030]
drmn0: [drm] Resetting rcs0 for preemption time out
drmn0: [drm] MainThread[101030] context reset due to GPU hang
 
I've seen random crashes with drm-kmod above 61 on Intel HD 530 and UHD 630 with Xfce X11 (I use 515 on 15.1 and 61 16.0), but not sure how ADL works with lower versions.

I don't see mention of GuC firmware and might force loading it in loader.conf. preemption time out might be fixable with increasing a timeout (I'd disable it like Intel suggests but not sure on the udev part for FreeBSD)

Code:
hw.i915kms.enable_guc="1"
hw.i915kms.request_timeout_ms="200000"
hw.i915kms.enable_hangcheck="0"

Edit: dmesg showed drm warnings about clamping timeouts to 0; apparently setting it to 0 is supported but the warnings still appear (shows the following and repeats 4 times)
Code:
drmn0: [drm] Warning, clamping heartbeat_interval_ms to 0 to prevent overflow
drmn0: [drm] Warning, clamping preempt_timeout_ms to 0 to prevent overflow
drmn0: [drm] Warning, clamping stop_timeout_ms to 0 to prevent overflow
drmn0: [drm] Warning, clamping timeslice_duration_ms to 0 to prevent overflow
 
Back
Top