Bug 249922 - graphics/drm-kmod is not stable with "AccelMethod" "sna" (Intel GM45 Express Chipset)
Summary: graphics/drm-kmod is not stable with "AccelMethod" "sna" (Intel GM45 Express...
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)
Depends on:
Reported: 2020-09-26 18:33 UTC by jakub_lach
Modified: 2021-02-01 09:12 UTC (History)
2 users (show)

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


Note You need to log in before you can comment on or make changes to this bug.
Description jakub_lach 2020-09-26 18:33:42 UTC
Just FYI, some occasional image corruption in LibreOffice/Firefox and occasional gpu_hang/frozen display. Only occurs if "AccelMethod"  "sna" is set, so the default is probably uxa.
Comment 1 Niclas Zeising freebsd_committer 2020-09-26 18:48:58 UTC
Which version of FreeBSD, which version of drm-*-kmod?
What happens if you use modesetting instead of xf86-video-intel?
Comment 2 Jan Beich freebsd_committer 2020-09-26 19:32:33 UTC
Also, try upgrading to -CURRENT because drm-fbsd11.2-kmod and drm-fbsd12.0-kmod are unlikely to be fixed unless you provide a patch.

According to the manpage SNA stands for Sandybridge's New Acceleration. GM45 (Gen4) predates Sandybridge (Gen6). Upstream has a lot of code to support gen4 and gen >= 045 in particular. However, bug 214593 disabled SNA by default due to crashes on pre-Sandybridge. If drm-kmod made SNA work but has graphical glitches then it's an improvement. This is why trying newer DRM drivers (i915kms, radeonkms, etc) even on old handware is important.
Comment 3 jakub_lach 2020-09-27 08:32:33 UTC
(In reply to Niclas Zeising from comment #1)

In reply to Jan Beich from comment #2)

Sorry for the missing info, 

FreeBSD 12.2-STABLE #0 r366183 amd64

$ pkg info *kmod*                                                       

$ pkg info *intel*                                                      

SNA was very much usable for me (ioquake3 and glxgears ran fine, glxgears quite faster) since trying newer driver (thanks!), but graphical glitches in Firefox (file save menu) and LibreOffice just proved to be too much in the long run. 

I will try SNA with graphics/drm-current-kmod, thoght iirc it was the same behaviour. 

Regarding modesetting, should I just set Driver "modesetting"? If I understand correctly, it does not use intel driver, so what I would achieve by that? Should I test that?
Comment 4 Niclas Zeising freebsd_committer 2020-09-27 08:36:18 UTC
Are you using packages or compiling drm-fbsd12.0-kmod locally?  If you are using the official packages, please try to compile it locally instead.

You can change the driver to modesetting, or simply remove xf86-video-intel.

This snippet should work:

Section "Device"
        Identifier              "card0"
        Driver                  "modesetting"

drm-current-kmod is only for use on FreeBSD current, so you need to update to that as well.
Comment 5 jakub_lach 2020-09-27 09:50:17 UTC
(In reply to Niclas Zeising from comment #4)

Compiling. I reckon there was a time you could install current kmod on top? Sadly, this is not a system I can upgrade to -CURRENT (thought it was -CURRENT, long time ago).
Comment 6 Niclas Zeising freebsd_committer 2020-09-28 07:14:05 UTC
(In reply to jakub_lach from comment #5)

There has never been any posibility to install drm-current-kmod on systems not running CURRENT.
Comment 7 jakub_lach 2020-09-28 17:51:19 UTC
(In reply to Niclas Zeising from comment #6)

Maybe I've thought of /usr/ports/graphics/mesa-devel then or drm-next-kmod
Comment 8 jakub_lach 2021-02-01 09:10:29 UTC
After upgrade from 12-STABLE to 13-STABLE, I am yet to experience any graphical glitches.
Comment 9 jakub_lach 2021-02-01 09:12:18 UTC
FreeBSD 13.0-ALPHA3 #0 stable/13-bb8fa72da

$ pkg info *kmod*                                        

$ pkg info *intel*                                       

$ pkg info *drm*