3.5 KiB
title | author | cover | lastmod | tags | categories | draft | toc | ||||
---|---|---|---|---|---|---|---|---|---|---|---|
FreeBSD quirks on the Framework laptop |
|
./cover.png | 2022-04-23T21:14:54-04:00 |
|
|
true | true |
This is primarily intended for people new to FreeBSD. If you're already familiar
with it, the wiki page will
probably tell you everything you need. I had no idea what I was doing so I had
no idea what I was looking for! I had been beating my head against a wall for
about three hours before I decided to join #freebsd
on
Libera.Chat; the people there were friendly, helpful,
and gave me tons of great advice. I highly recommend popping in if you have any
issues!
The Handbook
Open the handbook. Follow the handbook. Read the whole handbook. The developers spend a lot of time making sure it's the best resource available for learning FreeBSD. In most cases, it will have an answer for any question related to FreeBSD.
That said, the Framework laptop is so new that it's not fully supported by the
current stable release, so for now, we'll need to diverge a bit. This guide is
really only applicable until the release of FreeBSD 13.1 and until drm-kmod
hits version 5.5+. Once those two criteria are met, following the handbook
should be entirely sufficient!
The Source
In section 2.5.3 of the handbook/installer, make sure you tick the src
box to
download the FreeBSD source code. It'll be necessary for building our graphics
drivers later on.
The Graphics
This is where things are less-than-ideal at the moment. Usually, installing
graphics/drm-kmod would
be sufficient, but the version in both FreeBSD's package repos and in the ports
tree is too old. At the time of writing, it's compatible with Linux kernel 5.4
while the Framework's drivers are in Linux kernel 5.5+. We'll need to clone the
sources for graphics/drm-kmod
, check out a more recent branch, build the
drivers, and use those instead.
I'm not 100% certain whether the first step here is necessary but I don't feel like reinstalling to check.
-
Install
graphics/drm-kmod
withpkg install drm-kmod
-
Install
devel/git
withpkg install git
-
Clone
drm-kmod
's source withgit clone https://github.com/freebsd/drm-kmod
-
Check out the
5.7-stable
branch withgit checkout -b 5.7-stable --track remotes/origin/5.7-stable
-
Build the package with
make
-
Uninstall
drm-kmod
and all of its dependencies withpkg remove drm-kmod
followed bypkg autoremove
-
Install the more up-to-date drivers with
make install
-
Make sure the module works as expected with
kldload /boot/modules/i915kms.ko
-
If you suddenly see grey in your terminal, it works! Go ahead and add it to your boot config by appending the following line to
/etc/rc.conf
kld_load="/boot/modules/i915kms.ko"
-
Reboot and you should be able to start Xorg as the handbook describes!
Again all of this information is available on the FreeBSD wiki page for the
Framework laptop. The
Graphics
row in section 2 says requires DRM-KMOD 5.5 or higher. Fails to
initialize with DRM-KMOD 5.4. That's in reference to the package we just built
and installed.
Hope this helps!