FreeBSD Graphics Driver

By admin, 29 April, 2025

So how do you identify your processor?

If you don't know your processors name, run the following command:

% dmesg | grep CPU:
CPU: Intel(R) Core(TM) i7-4600U CPU @ 2.10GHz (2693.83-MHz K8-class CPU)

Decide Which Driver to Use

The numbering in the table below shows the Intel Core i3, Core i5 and Core i7 family of processors, including it's mobile and desktop parts:

2xxx Sandy Bridge (i915kms.ko in base)

3xxx Ivy Bridge (i915kms.ko in base)

4xxx Haswell (i915kms.ko in base)

5xxx Broadwell (i915kms.ko from ports graphics/drm-next-kmod)

6xxx Skylake (i915kms.ko from ports graphics/drm-next-kmod)

7xxx Kaby Lake (i915kms.ko from ports graphics/drm-next-kmod)

(I'm going a little deeper into, how you identify your Pentium, Celeron or Xeon processor in a minute)

First, for those who got one of the above processors and can't wait...

If your processor is supported by the i915kms.ko driver in the base system, add the following lines to /etc/rc.conf

kld_list="i915kms"

In case you have created a xorg.conf, remove it and reboot. That's it. or...

If your processor is supported by the i915kms.ko driver from the ports, add the following lines to /etc/rc.conf

kld_list="/boot/modules/i915kms.ko"

In case you have created a xorg.conf, remove it and reboot. That's it.

Example Configuration For Post Broadwell System

A common configuration is a user who has an Intel laptop with a Kabylake Intel i915 HD Graphics chip. To enable the chipset one would follow these instructions:

Install the drm-kmod package

# sudo pkg install drm-kmod

Take note of the post-install package message as it contains important information - specifically add this to your /etc/rc.conf or /etc/rc.conf.d/intel file:

kld_list="/boot/modules/i915kms.ko"

Ensure your UID is a member of the "video" group.

Restart your system; you should see the i915kms.ko get loaded and a flash on your console as we switch over to the new display driver.

Start Xorg via your usual method (i.e. startx, GDM, etc.)

Note: For systems that are able to take advantage of this updated DRM code you should not have to prepare an xorg.conf configuration file, nor should you install xf86-video-intel port. Our Xorg should autodetect the driver, and utilize the modesetting Xorg driver and glamor driver.

AMD Graphics

AMD based GPUs are also supported using the drm-kmod port or package. Unlike the i915 Intel graphics driver there are two separate modules available for AMD devices based on their generation. The modules are named:

  • amdgpu
  • radeonkms

To view the AMD graphics support matrix view this page. The Xorg project also has a great resource on decoding AMD marketing names to engineering friendly names here.

It is important to note that there is currently a conflict with both AMD drivers and the EFI frambuffer. The current workaround, when booting via UEFI on these systems, is to disable the framebuffer via /boot/loader.conf:

hw.syscons.disable=1

This will have the side effect of there being no console output until either the amdgpu or radeonkms kernel driver is loaded. Please see this Github issue for more context.

One final note - there is a patch available here that will allow you to use Vulkan, OpenCL, Xwayland and OpenMW when using Wayland.

AMD GPU

AMD GPU is the kernel module that can be used to support post-HD7000 or Tahiti GPUs. To enable graphics on these systems you would do the following:

Install the drm-kmod package

# sudo pkg install drm-kmod

Take note of the post-install package message as it contains important information - specifically add this to your /etc/rc.conf or /etc/rc.conf.d/amd file:

kld_list="/boot/modules/amdgpu.ko"

Ensure that your UID is a member of the "video" group.

Restart your system; you should see the amdgpu.ko get loaded and a flash on your console as we switch over to the new display driver.

Start Xorg via your usual method (i.e. startx, GDM, etc.)

Radeon KMS

Radeon KMS is a distinct driver intended for older AMD based GPUs that are available in pre-HD7000 or Tahiti GPUs. To enable graphics on systems with these GPUs you would do the following:

Install the drm-kmod package

# sudo pkg install drm-kmod

Take note of the post-install package message as it contains important information - specifically add this to your /etc/rc.conf or /etc/rc.conf.d/radeon file:

kld_list="/boot/modules/radeonkms.ko"

Ensure that your UID is a member of the "video" group.

Restart your system; you should see the radeonkms.ko get loaded and a flash on your console as we switch over to the new display driver.

Start Xorg via your usual method (i.e. startx, GDM, etc.)

FreeBSD Xorg Configs

Editing /usr/local/etc/X11/xorg.conf with Administration Privilege to:

In case of failures at boot to start graphical environment the following parameters can be helpful for the most built-in GPU Intel processors.

 

Section "ServerLayout"
Identifier "X.org Configured"
Screen 0 "Screen0" 0 0
EndSection
Section "Files"
ModulePath "/usr/local/lib/xorg/modules"
FontPath "/usr/local/lib/X11/fonts/misc/"
FontPath "/usr/local/lib/X11/fonts/TTF/"
FontPath "/usr/local/lib/X11/fonts/OTF/"
FontPath "/usr/local/lib/X11/fonts/Type1/"
FontPath "/usr/local/lib/X11/fonts/100dpi/"
FontPath "/usr/local/lib/X11/fonts/75dpi/"
EndSection
Section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
EndSection
Section "Device"
Identifier "Card0"
Driver "intel"
BusID "PCI:0:2:0"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
DefaultDepth 24
Option "TwinView" "0"
Option "SWCursor" "on"
Option "HWCursor" "off"
SubSection "Display"
Option "DynamicTwinView" "false"
Depth 24
EndSubSection
EndSection
Section "Extensions"
Option "Composite" "Disable"
EndSection