Fixing ThinkPad X1 Wifi on Freebsd
As much as I like FreeBSD, my laptop has mostly sat dormant for the last few weeks. It rocked an AX200, an excellent WiFi adapter unless you want to use it in FreeBSD. There were three reasons for this, with one primary cause:
- WiFi speeds up to WiFi 2,
- inability of the system to resume after suspend
- occasional kernel panics
Long story short1, the firmware is yet to be properly reverse-engineered, and the card is still unsupported2. The team can’t simply copy the Linux driver due to BSD/GPL license incompabilities3, so the work needs to continue.
Luckily, ThinkPads are still good laptops, and the card was not soldered. So, there was a way: buy a better-supported card and just replace it.
Unfortunately, Lenovo is not a good company. You can’t simply buy any random card matching the port and be sure it will work. The BIOS has a whitelist of supported hardware, and if it detects anything outside of this list, the machine won’t boot.
Lenovo’s support proved itself useless. I tried to contact them and get the list of whitelisted WiFi adapters, but at first, they had no idea what am I talking about, and when we finally got on the same page, they started to ignore me. After a few nags met with silence, I just gave up and ordered a used Intel AC 9260.
Have I mentioned that ThinkPads are still good devices? Replacing the WiFi adapter was sparkly4 but easy. Just pop the two antenna connectors, unscrew a single screw, remove the card, and do the same in reverse for the new one. Try to do that with a MacBook!5
Then, with a single reinstall6 of the system, everything started working. I’m still limited to WiFi 2, but it works over 5GHz. It’s a small problem because my system can finally suspend and resume. I no longer need to power off/power on all the time because it’s no longer necessary. I no longer need to be annoyed by the booting speed7 because it will no longer be a constant sight for me. I also have a (not backed by any analysis) feeling that the laptop runs colder.
With this, I am now a two BSD8 guy: OpenBSD on the server and FreeBSD on the computer. Why not go fully into one? Mostly, BSDs are cool, and it’s nice to get to know each other. But also each of them has its strengths and weaknesses. OpenBSD is secure, has httpd/relayd and modern PF9 but a smaller number of ported software, no ZFS, and finding answers on the information highway is more difficult. For a server, those are non-issues, as I have no intention of installing random crap there. But for my computer, I want to experiment more. I will break the system so ZFS will be a great addition. And having more applications ready to
pkg install will make it this much nicer.
The OpenBSD team had no such problems, and the drivers are downloaded during installation and work out of the box. ↩︎
don’t be a moron like me and disable the internal battery in BIOS before randomly poking the motherboard with a metal screwdriver. ↩︎
or with battery. I’m replacing mine in a few days. If I went with Apple, I would need to go to a service station as my ungluing skills are nonexistent. ↩︎
I’m a simple bare metal guy and was toying with OpenBSD. I don’t know if a reinstall would be required if I had a working FreeBSD. ↩︎
I could have learned to Go, but I chose a totally unmarketable skill for a programmer. I think it makes it even cooler. ↩︎