1. Checkout FreeBSD 9.1 or 9-STABLE (or HEAD): See
Handbook: Synchronizing Source.
2. Checkout a current snapshot of ports: See
Handbook: Using the Ports Collection
3. Write
Code:
WITH_KMS="YES"
WITH_NEW_XORG="YES"
into
/etc/make.conf
4. Compile and install the new version of FreeBSD that was checked out earlier:
# make -C /usr/src KERNCONF=GENERIC buildworld kernel installworld && reboot
(Or go the 'safe' way and reboot after the kernel part into safe mode to do installworld and reboot again). Before rebooting, make sure to not have any third party modules being loaded automatically into the kernel, i.e.
/boot/loader.conf contains only
x_load lines for modules x that are part of FreeBSD (but not ports) and
/etc/rc.conf loads no services that would do so either.
5. After having rebooted to the new FreeBSD installation (check the output of
uname -a to verify), rebuild all ports. Using
portmaster from
ports-mgmt/portmaster this can be done with
# portmaster -a -f
. Again, see the Handbook section on ports collection.
6. Enable all kernel modules from ports in
/boot/loader.conf that were disabled earlier again.
7. Install
x11-drivers/xf86-video-intel.
8. Recreate a new Xorg config file using
# X -configure
. Check that there is a Section for the intel card in
~/xorg.conf.new, and remove anything related to eventual vesa entries
9. Place
~/xorg.conf.new to
/usr/local/etc/X11/xorg.conf
10. Drop to your non-root user and start X.
Notes:
- Some people reported that loading drm at boot time causes the system to misbehave. That module is loaded by X on-demand, and does therefore not require being loaded (manually) at all.
- Turning off X results in a black screen. While there is no screen, the system returns to syscons and commands typed into the keyboard, i.e. it's possible to restart X11.