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: patch
Depends on:
Blocks:
 
Reported: 2021-11-12 07:47 UTC by Jan Beich
Modified: 2023-03-04 17:27 UTC (History)
4 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