1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
+++
title = "FreeBSD: Fixing ThinkPad X1 Wifi"
author = ["Michał Sapka"]
date = 2023-08-03T21:40:00+02:00
categories = ["bsd"]
draft = false
weight = 3003
primary_menu = "bsd"
image_dir = "bsd"
image_max_width = 600
abstract = "replacing a wificard fixes everything"
[menu]
[menu.bsd-thinkpad]
weight = 3003
identifier = "freebsd-fixing-thinkpad-x1-wifi"
name = "Fixing WiFi for good"
+++
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:
1. WiFi speeds up to WiFi 2,
2. inability of the system to resume after suspend
3. occasional kernel panics
Long story short[^fn:1], the firmware is yet to be properly reverse-engineered, and the card is still unsupported[^fn:2].
The team can't simply copy the Linux driver due to BSD/GPL license incompabilities[^fn:3], 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](https://www.intel.com/content/www/us/en/products/sku/99445/intel-wirelessac-9260/specifications.html).
Have I mentioned that ThinkPads are still good devices? Replacing the WiFi adapter was sparkly[^fn:4] 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![^fn:5]
{{< image class="centered" alt="Opened laptop with a screwdrive on top" file="intel-ac9260.jpg" >}}
Sitting and working nicely
{{< /image >}}
Then, with a single reinstall[^reinstall] 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 speed[^fn:6] 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 BSD[^fn:7] guy: [OpenBSD](/2023/moved-to-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 PF[^fn:8] 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.
[^fn:1]: Vide [FreeBSD on modern Intel WiFi cards and resume](_2023/freebsd-on-modern-intel-wifi-cards-and-resume_)
[^fn:2]: technically [it is](<https://wiki.freebsd.org/WiFi/Iwlwifi>), but no real use case is feasable.
[^fn:3]: The OpenBSD team had no such problems, and the drivers are downloaded during installation and work out of the box.
[^fn:4]: don't be a moron like me and disable the internal battery in BIOS before randomly poking the motherboard with a metal screwdriver.
[^fn:5]: 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.
[^fn:6]: Which is one of the few good things about [systemd](<https://michal.sapka.me/2023/systemd-is-fast/>)
[^fn:7]: I could have learned to Go, but I chose a totally unmarketable skill for a programmer. I think it makes it even cooler.
[^fn:8]: I am currently reading _[[The Book of PF](https://nostarch.com/pf3)_ so I can have any benefit. Great book. Would recommend.
|