Jumping off from my previous post about using OpenBSD as one’s daily workstation operating system, I’d like to explore another member of the BSD family, FreeBSD. Note that this will be less of a guide and more of a review.
A little personal history is in order before I continue. I’ve never had a good experience in the past with trying to use FreeBSD whether on a server or as a desktop OS. I don’t know if that was due to my previous unfamiliarity with BSD in general compared to Linux. Regardless, after having spent several years learning to use OpenBSD I thought it might be worth another shot at the bigger, more popular BSD in the family. I had read good things about version 14.0, quality of life improvements and just general praise. Never one to judge a project based on my own missteps, I decided to give the just released 14.1 version a spin on my ASRock DeskMini A300 (Ryzen 2400G, 16GB DDR4 3200 RAM, WD 512GB NVMe SSD (initially, Crucial P4 2TB later)). This is my current daily driver machine, and until now was running Void Linux perfectly fine and extremely performant, especially compared to OpenBSD that was on it previously.
The installation of FreeBSD is just about as easy as OpenBSD; answer some questions, set up networking, choose a partitioning scheme, create a user, and reboot to a bare terminal. Unlike OpenBSD’s line-by-line series of questions, FreeBSD uses a curses-like text based dialog interface to ask many similar questions. Choose your network connection type and enter any details necessary, choose your storage target and your file system (I went with UFS for simplicity’s sake but the handbook has a detailed guide on setting up a complicated ZFS scheme), and choose any optional packages you want installed. When it comes time to create your user account, make sure you add your user to the wheel and video groups at the very least. I do like that one of the panels asks if you want to enable any “security hardening” options, making this kind of thing easier on the casual user to explore if they wish. This is in contrast to OpenBSD which has all the security mitigations dialed up to 11 by default and it’s on the user to modify them back down for performance and ease of use as a desktop/workstation system. I don’t feel that either approach is more correct than the other, though with FreeBSD I’ve found that there’s less tinkering overall to get to a working desktop system, just leave all the hardening options turned off.
Installing binary packages is extremely similar to OpenBSD but the syntax is a bit simpler. Instead of separate commands like pkg_add, pkg_info, and so on, you have the pkg command with functions like install, search, info, delete etc. The first time you try to run pkg you will actually invoke a bootstrap script that downloads, installs, and configures pkg for you. After that a simple pkg update will update the repositories, and pkg search <string> will return a list of matching packages. Use pkg install to install a package, pkg info to learn more about a package, and pkg delete to remove any unneeded packages. There are more advanced options like auditing and locking, I won’t get into those here but the FreeBSD Handbook has a helpful page dedicated to it. I also won’t go into ports and compiling packages from source, those are advanced topics that deserve an article on their own.
Getting a desktop environment or just a window manager on FreeBSD starts with installing Xorg itself. As previously mentioned, you’ll want to make sure your user is in the video group, and if you didn’t do that at user creation you can do it now:
# pw groupmod video -m username
You can use this command to add yourself to any other groups in the future. Once you’re part of the video group, install Xorg:
# pkg install xorg
Next you will need to enable the correct KMS driver for your GPU. For modern Intel and AMD GPUs, this is drm-kmod. For Nvidia users it’s the proprietary Nvidia driver, aptly named nvidia-driver. In my case it’s AMD:
# pkg install drm-kmod
Then, add the driver module to rc.conf using one of the following commands appropriate to your system:
(AMD) # sysrc kld_list+=amdgpu (Intel) # sysrc kld_list+=i915kms (Nvidia) # sysrc kld_list+=nvidia-modeset
And that’s pretty much it for Xorg, unless you have rare or finicky hardware that requires manual configuration. Now, on to the desktop environment. Personally I prefer Xfce these days, especially on the BSDs, as there are currently no workarounds needed for Wayland dependencies. Speaking of Wayland, it does have some initial support in FreeBSD (moreso than the other BSDs) but I personally prefer the simplicity and familiarity of Xorg. Once Wayland has matured some more, I’ll be sure to check it out.
To install Xfce, you guessed it: It’s a simple pkg install away!
# pkg install xfce
Note that you will need to manually add a proc entry in /etc/fstab like so:
# Device Mountpoint FStype Options Dump Pass# proc /proc procfs rw 0 0
You will also need to enable the D-BUS daemon (installed as a dependency of Xfce):
# sysrc dbus_enable="YES"
And to start Xfce I used the lightdm display manager:
# pkg install lightdm lightdm-gtk-greeter # sysrc lightdm_enable="YES"
After doing all the above you can reboot and you’ll be able to log in as your regular user.
There’s no need to install a separate xfce-extras or xfce-goodies package, as the FreeBSD version has almost everything under the one meta-package. One exception to this is I installed the xfce4-wm-themes package so I would have my favorite theme, Today. I do, however, need to install some essential packages for my day to day activities.
# pkg install firefox terminus-font terminator pinta inkscape geany openshot cups hplip vlc xournalpp blender PrusaSlicer libreoffice
I actually prefer Cura for STL slicing, but the version available in packages is old and unmaintained, and I have not yet gotten it to build properly from source.
So let’s talk about performance. I am, quite simply, astounded at the level of performance of FreeBSD on this hardware compared to any other operating system. It’s not a slow machine but it’s also not a bleeding edge workstation, and some OSes can reflect this. Windows 10 in particular is fast enough for daily use, and though I don’t actually use that OS on it I can gauge other OSes using Windows as a baseline. So, most Linux distros I’ve tried on this hardware are slightly peppier and more performant than Windows, with the exception of Pop!_OS which seemed to have performance issues when moving windows around on the desktop and launching apps. Of course, OpenBSD was slower overall than the other OSes, but that’s a given with OpenBSD on the desktop and is an acceptable tradeoff for the security and correctness of the operating system. With that said, my needs exceed what OpenBSD offers at the moment, so I had settled on Void Linux, my favorite Linux distro by far and also one of the most performant even on really old hardware. On Void, most apps launch in under a second, there is no noticeable lag in the windowing system or in Firefox, and everything is generally great and rock solid. My monitor is a Gigabyte 1440p with a maximum vertical refresh rate of 170Hz, and apart from Void inexplicably setting it back to 60Hz after waking from sleep, it helps to lock in that buttery smooth feeling in that OS. Watching videos on Youtube is also fairly smooth, with zero dropped frames per second at 1080p60, only a few dropped frames at 1440p60, and more severe stuttering at 4Kp60.
Now let’s compare FreeBSD. Well, quite frankly, there is no comparison! FreeBSD just feels snappier and more responsive on the desktop; at the same 170Hz refresh it actually feels like 170Hz. Void Linux always felt fast enough and I thought it had no lag at all at that refresh rate, but comparing them side by side (FreeBSD installed on the NVMe drive, Void running from a USB 4 SSD with similar performance), FreeBSD is smooth as glass and I started noticing just the slightest lag/stutter on Void. The same holds true for Firefox; I use smooth scrolling and on FreeBSD it really is perfectly smooth. Similarly, Youtube performance is unreal, with no dropped frames at any resolution all the way up to 4Kp60, and the videos look so much smoother!
Raw desktop performance aside, FreeBSD is actually fairly simple to configure under the hood. One example: When I made the decision to keep FreeBSD as my new daily driver OS, I decided I wanted to upgrade the 512GB SSD in my system with a 2TB Crucial P4 I had left over from a cancelled project. While my system won’t take advantage of the PCIe 4.0 speeds on the new drive, I can definitely use the extra storage space, and as a bonus I wanted to try swapping the 512GB drive into my Dell Latitude laptop to see if it would boot and run without reinstalling (more on that in a future post). Anyway, this meant I had to clone the old drive to the new drive. For simplicity’s sake I just used Clonezilla for this as I’m already familiar with it, and indeed it worked just fine using a USB 4 to NVMe adapter. Once I had booted from the 2TB drive, as expected the remaining free space on the drive was not in use and the root partition was still just under 500GB in size. I knew about FreeBSD’s growfs command from my past attempts to use the OS, so I gave it a shot. Since I had the original 512GB drive as a backup I felt confident to ignore the warning about backing up my filesystem before resizing. A simple growfs /dev/nda0p2 instantly got me 1.6TB free space on the root partition without the need to reboot. I call that an absolute win!
I am eager to explore more of FreeBSD over the coming weeks and months, especially on my Dell laptop which may end up replacing my MacBook Air depending on how well I can integrate FreeBSD into my music creation workflow. Finding FOSS replacements for the macOS based apps I normally use (especially GarageBand) will be a challenge, but I love to tinker and experiment and I’m not a professional musician, I just do it as a hobby, so it is bound to be an adventure worth writing about!