FreeBSD Install
May 2023
After some time exploring FreeBSD in a virtual machine, I looked forward to getting it installed on my newest laptop which has a Realtek 8821CE wifi card. I searched the man pages for a wifi driver matching this card and found that the card was only supported in FreeBSD 14.0 (the development branch); I did not feel comfortable enough with the system to brave running the current in development version. However, the 13.2 RELEASE would have the driver available when it came out in April 2023. So I set my aim aside while I waited for the 13.2 Release Anouncement. Meanwhile, I went back to the virtual machine to explore some more and hone my system managment skills.
In late April, once 13.2 had been released, I proceeded to install FreeBSD. I chose the USB memstick image and installed the system. During the install process I went with the defaults. The only option I chose to add was ntpd
, the Network Time Protocol daemon, to keep the clock automatically in sync. Everything went well and my wireless card was recognized and connected to the network. I noticed at the end of the install instructions in the FreeBSD Handbook that the X Windows System is not installed automatically. I shortly had X installed and then rebooted. Once running it seemed that everthing was working fine, until I tried a test with X's twm
Window Manager.
Attempts to run startx twm
were giving me an error. A quick trip to the handbook told me that I needed to download and install the graphics package to get firmware for my AMD graphics card. I got the video card name using the command pciconf -lv | grep -B4 VGA
. Running pkg install drm-kmod
got the job done. I watched as the firmware downloaded and saw my video card name pass by. Then I ran the command sysrc kld_list+=amdgpu
which added an entry to /etc/rc.conf
causing the module to load during boot. Next I added my username (and root) to the video group. After rebooting, I executed startx twm
and X started twm
successfully.
I downloaded jwm
to use as my window manager, created an .xinitrc
file, added entries to load some settings when X starts, and then added exec jwm
to the end of the file. Voila, the jwm
Window Manager starts with startx
and no errors. Next I installed some packages and edited the jwmrc
file to alter some aspects of jwm
and added menu entries for manually installed applications.
Once the Window Manager started the screen had way too much brightness and could not be adjusted by use of the brightness keys on the keyboard. I had to add the kernel module acpi_video
in /etc/rc.conf
by editing the line kld_list="amdgpu"
to read kld_list="amdgpu acpi_video"
for the brightness keys to work. The brightness setting was reset to full brightness upon reboot however. At this point I am not sure how to make the lowered brightness setting return at the next boot.
Unfortunatly, suspend to RAM causes a system freeze when trying to awaken. Since this is a laptop, this is a major bummer. Fixing this is beyond my present knowledge. Hopefully, this will sort itself out in the future with an update.
The volume keys also did not work. Issuing the beep
command confirmed that the sound card was recognized and that it worked. I installed the volumeicon
package from the audio
section to get an icon in the system tray area to adjust volume.
I can't help but wonder if I need to set up fonts at some point. The fonts section of the handbook is kind of confusing to me with its multiple ways to accomplish font configuration. I'm not sure which method is best or if setting up fonts is even necessary. But I did install the urwfonts
package as suggested. So at present, I've not delved very far into configuring fonts.
The information in the FreeBSD Handbook was very helpful in getting the system up and running.
FreeBSD Install Update 1
August 2023
There are two problems that I have had since the install. Hopefully these will be address by an update or upgrade in the not too distant future.
Wifi works, but is not reliable. After a period of use, it seems to hang and these hangs occur often enough to be irritating. When hanging the interface will remain associated with the router but pinging the gateway address is unsuccessful. The netstat
command shows nothing for a while then lists output and closes. It appears that the interface drops to a very slow connection speed transfering a few bytes, then pausing..., then tranfering a few bytes, then pausing..., repeatedly. Per the rtw88
man page, I added compat.linuxkpi.skb.mem_limit="1"
to /boot/loader.conf
to see if this will help the issue. This setting is supposed to be for systems with more than 4GB of memory. My system has 4GB of memory; with the desktop running the system reports sysctl hw.realmem 4294967296
and sysctl hw.physmem 4136509440
.
At present wifi is working more reliably after adding this setting. Even so, wifi still stops working occasionally and I have to issue a doas service netif restart
command. This is easy enough not to present a major problem at this time; it is merely inconvenient. Since this is a newly added driver to the FreeBSD ecosystem, I expect this issue to get better as development continues.
Once in a while the system reboots for page fault panics that seem to be associated with the graphics kernel module. I am not real sure about this and do not know where to begin to address this problem.
As a test I decided to switch Window Managers to see if this would help with the graphics issue. After installing and loading Openbox, it did not alleviate the problem.
FreeBSD Install Update 2
January 2024
I upgraded from 13.2-RELEASE to 14.0-RELEASE in early December. Shortly thereafter I started having problems. One of the two CPU's will max out at 100% while the second will jump up to about 25%. This does not abate and causes the normally passive CPU fan to ramp up to full speed. The network will no longer work and trying to restart networking hangs, also the wpa_supplicant
process will not respond to the kill -9
command. At this time I also cannot switch to any virtual console or start an application with a keyboard shortcut. The cursor is movable but will not respond to click events. Eventually I have to power off by holding down the power button.
When I started the upgrade I followed the instructions in the FreeBSD Handbook, but it is possible that I could have missed something. For a while I considered that I might have an issue with the SSD drive; however, if I boot to the console and refrain from starting X the system works without problems. So this is probably a problem with the amdgpu
kernel module even though pkg info
shows that the latest version of drm-kmod
is installed.
The graphics card is an AMD Stoney Ridge. I also had a problem on another HP laptop with the same card while running Linux Mint after an upgrade to a newer 5.10 series Linux kernel. The screen went black right after login as reported on this Linux Mint Forum page. Booting with each previously installed kernel in the 5.10 series on that laptop produced the same problem. An upgrade to the 6.2 kernel solved the issue for me as it did for those reporting on the forum. Since the FreeBSD drm-kmod
is based on the Linux kernel this could be the root cause of this problem.
I see three options since I don't want to give up running FreeBSD. The first two: I could install directly from the 14.0-RELEASE media or go back to the 13.2-RELEASE. For now I'll take the third and watch for a new drm-kmod
to arrive; until then I will be running a console only system in order to remain on FreeBSD.
FreeBSD Install Update 3
January 2024
Several day ago I applied an update which included a new drm-kmod
version and also an update to the package for my AMD Stoney graphics chip. After the install I rebooted and everything was fine for several days over multiple hours of use, but today I experienced another system freeze. This time when it froze I was using Firefox while playing a javascript
based crossword puzzle. I could not move the cursor, change to a virtual console, or open a application with a keyboard shortcut; I had no option except powering off with the power button. The clock was the only thing updating in my conky
instance; my network graphs were not updating at all. Upon reboot and subsequent usage I had one instance where wifi stopped working and I had to issue doas service netif restart
to continue. This is the same wifi issue I have encountered before and it is not really much more than an occasional, frustrating inconvenience.
After a few days I was using Firefox and again CPU usage surged with the fan ramping up to full speed. Quickly closing Firefox did not release the CPU. Running top
revealed X to be the process using all the CPU cycles. I exited Openbox to return to the console and the screen went black with the fan still running full. There was no ability to switch to a virtual console; I could see no option but to hold down the power button to reset.
I did not have any issues while running a console only system during the interim before this update was applied. I no longer think that this is related to the drm-kmod
code. Whatever it is will remain a mystery for the time being. And while I am happy to be using FreeBSD with my window manager again, I will keep an eye out to try and pick up on what triggers the graphics freezing problem.
FreeBSD Update 4
March 2024
Unfortunately, using my FreeBSD system did not last very long. I still had system freezes so I tried to use the system in console only mode for a while because I had no freezes while not running X before the updates were applied. This did not last very long either. Freezes started happening while in the console.
I pretty much stopped using FreeBSD because the freezes became so frequent that it was frustrating to continue use. For now I wait for the next upgrade to show up.
FreeBSD Update 5
July 2024
FreeBSD 14.1 came out early in June and I upgraded my system to the new release as soon as I could. After around a month of testing and usage I have had no further problems with system freezes. I feel pretty sure that the update to the wireless driver included in the upgrade was the awaited fix.