FreeBSD and Intel Video Cards

Information on the wiki seems out of date (and also didn't work for me.)

As of FreeBSD-11.2-RELEASE, it is much simpler to get later Intel cards working as there is now a drm-next-kmod package. There is also a drm-stable-kmod, but I haven't tried it.

The drm-next-kmod (and drm-stable-kmod) won't be in 11.1. 11.1 is scheduled to go EOL (End Of Life) towards the fall of 2018

FreeBSD's Intel video support is less up to date than Linux's. Therefore, many newer laptops won't work with the FreeBSD Intel driver and are very slow with the vesa driver. This is how I got it to work with the Intel driver on a Yoga2, with a Haswell ULT video card. Once installed, I can install X with pkg.
pkg install xorg-server rxvt-unicode openbox xf86-input-mouse
xf86-input-keyboard xinit xauth 

The above is an example. It will pull in some fonts, and various other necessities for running X. The reader can choose their own favorite terminal, fonts, window manager or desktop environment, and so on.

Don't install xf86-video-intel or vesa.

It wasn't available as a package when I tried it. If it is by the time you see this, and it works, great. In my case, at least once in CURRENT, the package didn't work, giving errors of
KLD i915kms.ko; depends on drmn -not available or version mismatch
linker_load_file:  /boot/modules/i915kms.ko -unsupported file type;

found by rebooting and running dmseg |grep i915.

The user can try the package first, but if it isn't available or doesn't work, use the port. In 11.2-BETA, the port was the only option.

Before installing from ports, you will have to checkout the source code with svnlite as the port requires the source code to build.

svnlite co https://svn0.us-east.freebsd.org/base/head /usr/src
cd /usr/ports/graphics/drm-next-kmod;make install clean

That's the server I use, as I'm on the east coast of the US. The reader should use a server close to them. Once you've checked out source, you can install it with your favorite port tool, for example, cd /usr/ports/graphics/drm-next-kmod;make install clean

Its pkg-message gives instructions. If you need to review the pkg-message you can do so with
pkg info -D drm-next-kmod

The instructions tell you to add any users needing X to the video group and add the following to /etc/rc.conf.
kld_list="/boot/modules/i915kms.ko"

To add a user to the video group, if your username is john, the command is
pw groupmod video -M john

On my yoga2, which has a high resolution screen, using the drm-next port makes fonts in console tiny to the point of being unreadable. So, on the advice of this article from lme.postach.io I add the following to /boot/loader.conf.
kern.vt.fb.default_mode="800x600

You can reboot and try startx at this point. If it worked, upon reboot, you should see the machine console font change to using framebuffer shortly after the boot begins.

This method lets me use FreeBSD on laptops with newer Intel cards. I have only tested it on the yoga2, where it's given me very good performance. (for other issues with the yoga2 and FreeBSD, see my yoga2 page).