Codebase for my homepage.
git clone git://vcs.sapka.me/michal-sapka-me
Log | Files | Refs

commit 6ffc8ac9e25de041d66ee36d8f3d054e4e63bded
parent 7289e99c468171b0b69a773dd5766af976340e30
Author: mms <michal@sapka.me>
Date:   Thu,  3 Aug 2023 09:50:58 +0200

feat: replace wifi on thibkpad

Aassets/content_images/intel-ac9260.jpg | 0
Acontent/2023/fixing-thinkpad-x1-wifi-on-freebsd.md | 42++++++++++++++++++++++++++++++++++++++++++
2 files changed, 42 insertions(+), 0 deletions(-)

diff --git a/assets/content_images/intel-ac9260.jpg b/assets/content_images/intel-ac9260.jpg Binary files differ. diff --git a/content/2023/fixing-thinkpad-x1-wifi-on-freebsd.md b/content/2023/fixing-thinkpad-x1-wifi-on-freebsd.md @@ -0,0 +1,42 @@ +--- +title: "Fixing ThinkPad X1 Wifi on Freebsd" +category: "bsd" +abstract: replacing a wificard fixes everything +date: 2023-08-03T09:35:36+02:00 +year: 2023 +draft: false +tags: +- ThinkPad +- FreeBSD +- Intel +- WiFi +--- +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[^wifiart], the firmware is yet to be properly reverse-engineered, and the card is still unsupported[^lies]. The team can't simply copy the Linux driver due to BSD/GPL license incompabilities[^openbsd], so the work needs to continue. +[^wifiart]: Vide [FreeBSD on modern Intel WiFi cards and resume](/2023/freebsd-on-modern-intel-wifi-cards-and-resume/) +[^lies]: technically [it is](https://wiki.freebsd.org/WiFi/Iwlwifi), but no real use case is feasable. +[^openbsd]: The OpenBSD team had no such problems, and the drivers are downloaded during installation and work out of the box. + +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[^spark] 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![^battery] +[^spark]: don't be a moron like me and disable the internal battery in BIOS before randomly poking the motherboard with a metal screwdriver. +[^battery]: 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. + +{{<img-center "intel-ac9260.jpg" "Sitting and working nicely">}} + +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[^systemd] 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. +[^reinstall]: 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. +[^systemd]: Which is one of the few good things about [systemd](https://michal.sapka.me/2023/systemd-is-fast/) + +With this, I am now a two BSD[^golang] 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[^pf] 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. +[^golang]: I could have learned to Go, but I chose a totally unmarketable skill for a programmer. I think it makes it even cooler. +[^pf]: I am currently reading "[The Book of PF](https://nostarch.com/pf3)" so I can have any benefit. Great book. Would recommend.