Bug 259791 - x11-drivers/xf86-video-intel: enable SNA by default
Summary: x11-drivers/xf86-video-intel: enable SNA by default
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-x11 (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-12 07:47 UTC by Jan Beich
Modified: 2025-01-05 12:02 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (x11)


Attachments
v1 (SNA for FreeBSD 13+) (1.50 KB, patch)
2021-11-12 07:47 UTC, Jan Beich
no flags Details | Diff
v2 (SNA always) (1.34 KB, patch)
2021-11-12 07:52 UTC, Jan Beich
no flags Details | Diff
LibreOffice artifacts typical with SNA/GM45 case 1 (24.17 KB, image/png)
2022-02-12 00:07 UTC, jakub_lach
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer freebsd_triage 2021-11-12 07:47:11 UTC
Created attachment 229439 [details]
v1 (SNA for FreeBSD 13+)

drm-kmod on FreeBSD >= 13.0 should be way more stable to gracefully fall back to UXA on unsupported hardware with old Intel iGPUs, partially via upstream LTS branch and partially due to numerious FreeBSD-specific bug fixes to DRM itself and LinuxKPI. FreeBSD 12.* seems to be build-fixes-only abandonware at this point.
Comment 1 Jan Beich freebsd_committer freebsd_triage 2021-11-12 07:52:25 UTC
Created attachment 229440 [details]
v2 (SNA always)

xf86-video-intel is no longer maintained upstream, unlike modesetting DDX. If users experience issues they can force UXA via xorg.conf(5). However, with drm-legacy-kmod gone in ports 05e4043ade53 and in-base-system drm2 deprecated in FreeBSD 12.* (unsupported for mesa-dri) bug 214593 shouldn't be an issue.
Comment 2 jakub_lach 2022-02-11 14:39:55 UTC
I've previously experienced artifacts with SNA (Option      "AccelMethod"  "sna") in LibreOffice and Firefox, making those programs unusable at times.


vgapci0@pci0:0:2:0:     class=0x030000 rev=0x07 hdr=0x00 vendor=0x8086 device=0x2a42 subvendor=0x1                                                                              7aa subdevice=0x20e4                                                                                                                                                               
    vendor     = 'Intel Corporation'                                                                                                                                               
    device     = 'Mobile 4 Series Chipset Integrated Graphics Controller'                                                                                                          
    class      = display                                                                                                                                                           
    subclass   = VGA                                                                                                                                                               
vgapci1@pci0:0:2:1:     class=0x038000 rev=0x07 hdr=0x00 vendor=0x8086 device=0x2a43 subvendor=0x1                                                                              7aa subdevice=0x20e4                                                                                                                                                               
    vendor     = 'Intel Corporation'                                                                                                                                               
    device     = 'Mobile 4 Series Chipset Integrated Graphics Controller'                                                                                                          
    class      = display

Will check later if it is still true, currently -

FreeBSD 13.0-STABLE #0 stable/13-720580980 amd64

$ pkg info *kmod* 
drm-fbsd13-kmod-5.4.144.g20220128
drm-kmod-g20190710_1
gpu-firmware-kmod-g20210330

$ pkg info *intel* 
devcpu-data-intel-20220207
libva-intel-driver-2.4.1_1
xf86-video-intel-2.99.917.916_1,1

$ pkg info *drm*
drm-fbsd13-kmod-5.4.144.g20220128
drm-kmod-g20190710_1
libdrm-2.4.109,1
Comment 3 Jan Beich freebsd_committer freebsd_triage 2022-02-11 15:16:28 UTC
Artifacts are likely due to bugs in mesa-dri or drm-kmod. If Xorg doesn't crash and there're no errors near the end of /var/log/Xorg.0.log then SNA works fine.

Before blaming SNA try testing modesetting (part of xorg-server) and wlroots (sway, wayfire, etc). UXA (default) is more resilent to driver bugs but also slower than modesetting.
Comment 4 jakub_lach 2022-02-11 15:38:46 UTC
(In reply to Jan Beich from comment #3)

Just a moment ago - 

[    15.895]    compiled for 1.20.13, module version = 0.30.0
[    15.895]    Module class: X.Org XInput Driver
[    15.895]    ABI class: X.Org XInput driver, version 24.1
[    15.895] (II) Using input driver 'libinput' for 'System mouse'
[    15.895] (**) System mouse: always reports core events
[    15.895] (**) Option "Device" "/dev/input/event0"
[    15.896] (**) Option "_source" "server/udev"
[    15.908] (II) event0  - System mouse: is tagged by udev as: Mouse
[    15.910] (II) event0  - System mouse: device is a pointer
[    15.912] (II) event0  - System mouse: device removed
[    15.913] (**) Option "config_info" "udev:/dev/input/event0"
[    15.913] (II) XINPUT: Adding extended input device "System mouse" (type: MOUSE, id 6)
[    15.913] (**) Option "AccelerationScheme" "none"

<...>

[    16.092] (II) event6  - TPPS/2 IBM TrackPoint: is tagged by udev as: Mouse
[    16.096] (II) event6  - TPPS/2 IBM TrackPoint: device is a pointer
[  3115.339] (EE) event0  - System mouse: client bug: event processing lagging behind by 13ms, your system is too slow
[  5978.235] (II) event0  - System mouse: Enabling spurious button debouncing, see https://wayland.freedesktop.org/libinput/doc/1.19.1/button-debouncing.html for details
[ 47724.692] (EE) event0  - System mouse: client bug: event processing lagging behind by 21ms, your system is too slow
[ 47820.662] (EE) event0  - System mouse: client bug: event processing lagging behind by 14ms, your system is too slow
[ 51105.375] (EE) event0  - System mouse: client bug: event processing lagging behind by 11ms, your system is too slow
[ 51108.867] (EE) event0  - System mouse: client bug: event processing lagging behind by 14ms, your system is too slow
[ 59451.449] (EE) event1  - System keyboard multiplexer: client bug: event processing lagging behind by 21ms, your system is too slow
[ 59644.892] (II) event0  - System mouse: SYN_DROPPED event - some input events have been lost.
[ 59653.095] (EE) intel(0): Detected a hung GPU, disabling acceleration.
[ 59653.095] (EE) intel(0): When reporting this, please include i915_error_state from debugfs and the full dmesg.

<...>

Feb 11 16:18:37 Thinkpad kernel: drmn0: GPU HANG: ecode 4:1:0xcecffffb, in MainThread [100079], hang on rcs0
Feb 11 16:18:37 Thinkpad kernel: drmn0: Resetting chip for hang on rcs0
Comment 5 jakub_lach 2022-02-12 00:07:35 UTC
Created attachment 231765 [details]
LibreOffice artifacts typical with SNA/GM45 case 1
Comment 6 Jan Beich freebsd_committer freebsd_triage 2024-11-27 11:40:06 UTC
(In reply to jakub_lach from comment #4)
Can you reproduce on a recent FreeBSD version? If possible test drm-61-kmod as drm-515-kmod is affected by bug 274770 and similar instability.
Comment 7 jakub_lach 2024-11-28 22:11:39 UTC
(In reply to Jan Beich from comment #6)

I currently use modesetting, but will try to reproduce. I've got some weird restarts with firefox lately, but they ceased after switching to librewolf.

Nov 28 23:07:46 Thinkpad kernel: drmn0: [drm] *ERROR* CPU pipe A FIFO underrun (no ill effect)

FreeBSD 14.2-STABLE #0 stable/14-6890e1e793 amd64

$ pkg info *kmod* 
drm-61-kmod-6.1.92_2

$ pkg info *intel* 
cpu-microcode-intel-20241112
libva-intel-driver-2.4.1_3
xf86-video-intel-2.99.917.923_1,1

$ pkg info *drm*
drm-61-kmod-6.1.92_2
libdrm-2.4.123,1
Comment 8 jakub_lach 2024-11-29 00:06:13 UTC
(In reply to jakub_lach from comment #7)

Nov 29 01:04:32 Thinkpad kernel: pid 4761 (librewolf), jid 0, uid 1001, was killed: failed to reclaim memory
Nov 29 01:04:57 Thinkpad kernel: drmn0: [drm] GPU HANG: ecode 4:1:85fffbfd, in MainThread [100716]
Nov 29 01:04:57 Thinkpad kernel: drmn0: [drm] Resetting chip for stopped heartbeat on rcs0
Nov 29 01:04:57 Thinkpad kernel: drmn0: [drm] Xorg[100716] context reset due to GPU hang

(no crash)
Comment 9 jakub_lach 2025-01-03 14:42:24 UTC
(In reply to jakub_lach from comment #8)

Crashed X (but not OS) after trying to run xcalc -

[ 16562.408] (EE)
Fatal server error:
[ 16562.408] (EE) Caught signal 6 (Abort trap). Server aborting
[ 16562.408] (EE)
[ 16562.408] (EE)
Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.
[ 16562.408] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[ 16562.411] (EE)
[ 16562.412] (II) AIGLX: Suspending AIGLX clients for VT switch
[ 16562.443] (EE) Server terminated with error (1). Closing log file.

<...>

Jan  3 15:29:12 Thinkpad devd[689]: notify_clients: send() failed; dropping unresponsive client
Jan  3 15:29:12 Thinkpad kernel: drmn0: [drm] GPU HANG: ecode 4:1:fa8ffbfd, in MainThread [100718]
Jan  3 15:29:12 Thinkpad kernel: drmn0: [drm] Resetting chip for stopped heartbeat on rcs0
Jan  3 15:29:12 Thinkpad kernel: drmn0: [drm] MainThread[100718] context reset due to GPU hang
Jan  3 15:29:12 Thinkpad kernel: pid 1034 (Xorg), jid 0, uid 0: exited on signal 6 (no core dump - bad address)
Jan  3 15:29:12 Thinkpad devd[689]: notify_clients: send() failed; dropping unresponsive client

<...>

Jan  3 15:29:12 Thinkpad devd[689]: notify_clients: send() failed; dropping unresponsive client
Jan  3 15:29:12 Thinkpad kernel: drmn0: [drm] GPU HANG: ecode 4:1:fa8ffbfd, in MainThread [100718]
Jan  3 15:29:12 Thinkpad kernel: drmn0: [drm] Resetting chip for stopped heartbeat on rcs0
Jan  3 15:29:12 Thinkpad kernel: drmn0: [drm] MainThread[100718] context reset due to GPU hang
Jan  3 15:29:12 Thinkpad kernel: pid 1034 (Xorg), jid 0, uid 0: exited on signal 6 (no core dump - bad address)
Jan  3 15:29:12 Thinkpad devd[689]: notify_clients: send() failed; dropping unresponsive client