Intel Skylake i5-6200U graphics driver in FreeBSD 14.5-RC1

Computer has become slower in writing text in terminal. Characters are not rendered anymore as in the following image:

Rendering fonts, resized screen capture


It looks like that the graphics driver does not work anymore. The OS version is 14.5-RC1.

As AI assisted, command glxinfo -B prints "llvmpipe" and "Accelerated: no" :
Bash:
...
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Mesa (0xffffffff)
    Device: llvmpipe (LLVM 19.1.7, 256 bits) (0xffffffff)
    Version: 26.1.3
    Accelerated: no
    ...

The computer has: CPU: Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz (2400.00-MHz K8-class CPU) as in dmesg(). Text "Intel Skylake" prints in multiple locations.

Intel Skylake i915 computers have had graphics driver support from graphics/drm-next-kmod as in URL . It has been important in what order the kernel modules were loaded. A good order was for example:
kldload /boot/modules/i915kms.ko
kldload /boot/modules/drm.ko
kldload /boot/kernel/iic.ko
kldload /boot/kernel/linuxkpi_hdmi.ko
kldload /boot/modules/dmabuf.ko
kldload /boot/kernel/lindebugfs.ko
kldload /boot/modules/ttm.ko


This module seems to be outdated today and at least the handbook instructs to:
pkg install drm-kmod
sysrc kld_list+=i915kms


This leads to the previously mentioned problem.

A working solution previously before update to 14.4 and 14.5-RC1 was to just:
cd /usr/ports/graphics/drm-515-kmod
make reinstall


I've updated the ports -tree to the 14.5-RC1 and reinstalled the graphics/drm-515-kmod and graphics/drm-kmod and graphics/gpu-firmware-intel-kmod separately testing them after a reboot without good results, then run pkg update; pkg upgradewithout any significant change. The graphics/gpu-firmware-intel-kmod updated a new version of some firmware. It did not fix the problem. As in the link after the post, "Panel Shift Refresh" setting did not change anything either.

How to fix the Intel i5-6200U graphics driver?

Interesting how /boot/defaults/loader.conf has module_blacklist="drm drm2 radeonkms i915kms amdgpu if_iwlwifi if_rtw88 if_rtw89" in it.

escape


Some other intertesting links:
https://www.gaelanlloyd.com/blog/fix-freebsd-lag-issues-intel-i915/
https://[do not visit]_www_freebsdsoftware_org_[do not visit ]/graphics/gpu-firmware-intel-kmod-skylake/
(Forum adds the "do not visit" automatically - why, not known)
 
I've updated the ports -tree to the 14.5-RC1
Ports tree is the same for ALL versions of FreeBSD.

(Forum adds the "do not visit" automatically - why, not known)
It's a fake website, avoid it.
 
As just remembered, sometimes it was an issue to update to a RELEASE after the CURRENT. The graphics driver support dropped there as well, it could have been at FreeBSD 12 or older, not remembered anymore. Not a current issue. This is not some license issue?
 
sometimes it was an issue to update to a RELEASE after the CURRENT.
Major version upgrades are always problematic, especially when it comes to 'external' (from ports/packages) kernel modules. They need to be specifically compiled for your running kernel version. DRM drivers are notoriously finicky due to the fast paced development cycle of LinuxKPI in the FreeBSD kernel (the DRM drivers rely heavily on it). Minor version upgrades are less impacted, but could still pose problems with LinuxKPI features added. Lots of things changed between 15.0 and 15.1 for example. Not sure about the changes with regards to the legacy 14 branch though.

The graphics driver support dropped there as well, it could have been at FreeBSD 12 or older, not remembered anymore.
FreeBSD 12 (and before) indeed had an Intel and AMD graphics driver included. They've been removed with 13 onward and replaced with graphics/drm-kmod. But you might find references to it in old posts and/or howtos.
 
escape like SirDice said, pre-release and the 3 months after are a funny period for external kmods..

Anyway some points, you don't need to install drm-kmod, that's just a meta package that installs drm-xyz-kmod and gpu-firmware-kmod. For 14.x you can use drm-515-kmod or drm-61-kmod and install the firmware for your card.
You also don't need to manually load the modules, just follow the handbook and do # sysrc kld_list+="i915kms", that will load the i915kms kernel module and all necessary modules (including linuxkpi and firmware modules), so you probably need to remove those modules from the blacklist.
Now, back to modules, the binary packages are probably broken right now, so may need to:
  1. make sure /usr/src is synced with the releng/14.5 branch (i.e. # git fetch --all && git checkout releng/14.5) or, if using pkgbase, install FreeBSD-src-sys
  2. make sure /usr/ports is synced to main (ie. # git checkout main && git pull)
  3. # cd /usr/ports/graphics/drm-515-kmod (or # cd /usr/ports/graphics/drm-61-kmod)
  4. # make package && pkg install work/pkg/*.pkg
  5. # pkg install -r FreeBSD-ports-kmod gpu-firmware-intel-kmod-skylake (specifiying the repository is important because otherwise you may get the package for 14.0 from FreeBSD-ports, you have to make sure you have it correctly configured, see here and here). If the kmods repo for 14.5 does not have the firmware packages you may be able to use the 14.4 package otherwise install from ports (graphics/gpu-firmware-intel-kmod using the kabylake flavour)
  6. To avoid issues testing, remove the i915kms module from /etc/rc.conf with # sysrc kld_list-="i915kms" and reboot (if you use a graphical login manager, I suggest disabling it's service also)
  7. After rebooting, do a # kdload i195kms, if you don't get a kernel panic, you should be alright, re-enable i915kms on /etc/rc.conf (# sysrc kld_list+="i915kms") and the graphical login manager if you disabled it before.
  8. On the other hand if this gets you a kernel panic, please say here and provide the output of dmesg from the boot that went sour and maybe we can help, otherwise check the drm-kmod github issues and/or bugzilla
If you are not using pkgbase, replace make package with make install.

Hope this helps.

edit: updated firmware package name to match hardware requirements.
 
Ah, forgot to say, that if everything goes really south, you can still use X11 with either the scfb (uefi) or the vesa (bios/csm) driver and get a working graphical session. Just remember to disable compositing if you are using a DE that uses it.
You may also need to set the gop mode on the loader to match your screen resolution as the framebuffer drivers don't allow resizing.
 
Is the kabylake driver different comparing to skylake driver? Are they compatible? Why are they in a different driver package?

An edit later: The old case about the 12-STABLE is found from this URL. The firmware refused to load. This time the firmware loaded and still the acceleration is not available. Here is another interesting case when using i386, URL (not relevant here, this one is x64) .
 
Is the kabylake driver different comparing to skylake driver? Are they compatible? Why are they in a different driver package?
The version of DRM dictates which graphics cards are supported. The DRM drivers depend on LinuxKPI support that's built into the FreeBSD kernel.

 
escape actually your firmware should be skylake not kabylake. in doubt install the entire intel gpu firmware package, check which one is loaded and remove afterwards the ones not used.
and yes, the firmware package matters as the intel drm driver will try to load specific binary files for the hardware (if you wish you can check the i915_driver.c file on the drm-kmod repo for more information).
 
Back
Top