# Lenovo X1 Carbon Gen 9



## jbo (Sep 28, 2021)

I'm the proud owner of a Lenovo Thinkpad X1 Carbon Gen 3. I am extremely satisfied with this machine. I'm currently running FreeBSD 13.0-RELEASE on it and the overall experience is just great! Amazing battery life (more on that later), super portable, quite powerful, great (non-glare!) 2.5K display and great keyboard/trackpad/trackpoint.
Other than the well known WiFi driver issue (Intel iwm - can't get 802.11ac) pretty much everything works.

However...

The machine is getting notably "old". The biggest pressure points are:

*Battery Life:* The battery life is obviously not what it used to be. A battery swap ("non-replaceable") would be doable but at least where I live an off-brand battery would be ~250.- USD.
*RAM:* This machine has (soldered) 8GB of memory. Running out of memory more than I like.
*I/O (USB-C):* I guess I don't have to explain how not only ubiquitous but also versatile and powerful USB-C has become in recent times. This laptop only has USB 3.0 USB-A ports. There are so many nice USB-C docks and other peripherals out there. And USB-C PD: I really like this X1 Carbon Gen 3. It packs a lot of punch in a very small highly portable format. It's small (14" for the win!), light (1.3kg -ish) and very robust. Fits into pretty much any bag & situation. Yet I find myself more and more bringing the very bulky, poor battery-life Thinkpad P1 mobile workstation (Xeon, Quadro, ECC, ...) for purely one reason: It charges via USB-C PD. I don't have to bring that dedicated powersupply for just the laptop. I can bring a medium-sized USB-C PD power supply and occasionally a 100Wh power bank. I can charge my phone, headphones, the laptop, the powerbank itself - can´t deny that this is great. Even better: If I know that I have access to an USB-C power supply through othermeans I just don't bring any). But when I bring the X1 Carbon which I very much prefer for most occations that aren't "a longer stay" I have to bring a dedicated power supply (aka "the brick").
*CPU: *Not really an issue - but a CPU upgrade would be neat. 2C/4T nothing to complain about but for what I use it I´d certainly appreciate a 4C/8T upgrade with better single-core performance (linking anybody...?). Yes yes, I know, battery life...
So, I've been looking at the new X1 Carbon Gen 9. Similar form-factor (16:10 instead of 3:2), USB-C, USB-C PD, 32 GB memory, 1 TB PCIe NVMe, 11th gen i7. Available with 2.5k non-glare display, ... seems to fit the bill!

Does anybody here have had the chance to run FreeBSD on an X1 Carbon Gen 9? Do things most things work out of the box?

I've seen this wiki page which has no entry on the Gen 9 but does list some issues regarding the GPU (driver) on the Gen 8. I didn't really manage to figure out reliably whether this is still the case as of today. This of course also doesn't say much about the Gen 9.
Then there is again (or rather still) the big debacle with WiFi: There are ongoing efforts sponsored by the FreeBSD Foundation towards an 802.11ac and 802.11ax driver for intel cards. But it would also seem that the new driver will only work in FreeBSD 14.0 (HEAD). Would I really want to run FreeBSD 14.0 on my daily laptop? Probably not, eh?
Honestly I am somewhat okay with 802.11n speeds on the Gen 3. Not great, but also somewhat okay given that I don't really browse "the big popular websites". But the WiFi card in the Gen 9 is not supported at all. Could get a dongle, but really...?
There's that sneaky "trick" of running OpenWRT in bhyve, passing through the WiFi card. Some people seem to be doing that quite successfully.

Other than that I have very few requirements. Webcam would be great, but could do without. Audio via bluetooth and that's pretty much it.

So - would anybody who was kind enough to read through all of this be able to comment on this? Is the X1 Carbon Gen 9 a good pick after the very satisfying Gen 3 experience?

And yes: These are very much luxurious problems. But hey - the company offered a new laptop.


----------



## grahamperrin@ (Oct 2, 2021)

jbodenmann said:


> … Would I really want to run FreeBSD 14.0 on my daily laptop? Probably not, eh? …



You have enough technical knowledge for me to say, 14.0-CURRENT will present no challenge to you. -CURRENT has been my everyday system for years.


----------



## dave01 (Oct 2, 2021)

jbodenmann said:


> Does anybody here have had the chance to run FreeBSD on an X1 Carbon Gen 9? Do things most things work out of the box?


I can't comment directly on using FreeBSD on that model, nor do I use Lenovo kit directly myself.  But part of my job involves repairing Lenovo kit.  So I can tell you that the official Lenovo bootable diagnostics tools are a live Linux USB bootable pendrive.  This advanced diagnostics tool tests all of the the hardware, eg WiFi, WebCam, fingerprint readers, bluetooth etc., so Lenovo appear to be, at least, fully supporting Linux with drivers etc.  The only device the diags don't seem to directly support is the WLan card.  That device doesn't appear in the list whereas all the other devices do show up, greyed out when not present in the laptop.  The WLan is just...missing.

Naturally, that doesn't mean all the devices will necessarily have FreeBSD drivers, but it indicates there's a good chance that everything will work or can be made to work.  I am, of course, assuming Lenovo have released those drivers into the wild and they are not proprietary to their own diagnostics tool.


----------



## jbo (Oct 5, 2021)

grahamperrin said:


> You have enough technical knowledge for me to say, 14.0-CURRENT will present no challenge to you. -CURRENT has been my everyday system for years.


I read up a bit on -CURRENT and it seems like this is not what I would run on a daily driver. However, I see how the choice of hardware might make that necessary.
Is it technically possible to have multiple kernels "installed" on the same machine? Could I boost 14.0-CURRENT if I feel like I need some stuff I don't have in 13.0-RELEASE and keep 13.0-RELEASE as a "backup" in case things went wrong?
I assume the answer is going to be "yes". If so, are there any practical real-life experiences any of you can share doing this? I take it that it would be more like two separate installs as ports/packages would need to be compiled for each kernel? So this would basically end up being a dual boot?
If so, given that the laptop has only one internal drive, could I import a "shared" ZFS dataset in either OS for data?

I could go for a second hand Gen 7 or Gen 8 but I really have some intrinsic rejection on using somebody's previous machine. That feeling of "you never know" and "battery??"...

dave01 Thank you very much for that insight!


----------



## kpedersen (Oct 5, 2021)

jbodenmann said:


> I could go for a second hand Gen 7 or Gen 8 but I really have some intrinsic rejection on using somebody's previous machine. That feeling of "you never know" and "battery??"...


Perhaps get another Gen 9 and leave it in the box. Then as soon as the Gen 9 is supported, buy a Gen 10 and leave it in the box. This way you will always have a buffer by the time a new machine comes out and the time open-source operating systems support it.

This is possibly the only guaranteed way you can keep using "new" hardware with free operating systems.


----------



## jbo (Oct 5, 2021)

Honestly - I'm considering that. Get the Gen 9, try it out, see how well it works. If problems are present, I'll try to contribute patches, if I can't, I'll just keep using my Gen 3 whenever I need a stable experience.


----------



## grahamperrin@ (Oct 6, 2021)

jbodenmann said:


> … Is it technically possible to have multiple kernels "installed" on the same machine?



Yes.

The first screenshot under <https://forums.FreeBSD.org/threads/82319/post-535243> shows four kernels available – _without_ stepping into the Boot Environments submenu of the loader menu. For now, don't overthink this; in my estimation, you'll rarely or never need to resort to options such as `kernel.old`.



jbodenmann said:


> Could I boost 14.0-CURRENT if I feel like I need some stuff I don't have in 13.0-RELEASE and keep 13.0-RELEASE as a "backup" in case things went wrong?



Yes and no.

Visualise your one _home_ directory, which does not form part of a _boot_ environment, and files within your home that might be specific to a particular version of an application. (A user of Mac OS X might think of these files as a subset of _application support_ data.)

If the version runs on FreeBSD 14.0-CURRENT but not 13.0-RELEASE-⋯, then an application support file might be not immediately (or not easily) usable.


----------



## astyle (Oct 8, 2021)

jbodenmann said:


> If so, given that the laptop has only one internal drive, could I import a "shared" ZFS dataset in either OS for data?


Not sure if that's quite possible in a straight ZFS way (A quick look at the Handbook did *not* mention sharing 'live' datasets with other hosts), but an NFS export/mount is worth a try.


----------



## neel (Oct 8, 2021)

I get a ThinkPad X1 Yoga 3rd Gen (same generation as X1 Carbon 6th Gen) from work, which does in fact dual-boot Windows 11 and FreeBSD, but I hardly ever use FreeBSD on it. I usually run FreeBSD on an AMD Ryzen-based HP Envy, after selling an 11th Gen Intel-based HP Spectre, the latter which has the same CPU generation and Wi-Fi chip as the X1 Carbon 9th Gen.

When I had my 11th Gen Spectre, FreeBSD support was pretty rough (which is why I sold it). Things have somewhat improved since then (hopefully), since drm-kmod 5.6-wip may support TigerLake (I am not 100% sure, but someone with a Framework laptop has graphics) and there is an experimental "iwlwifi" branch for Wi-Fi support.

If TigerLake scares you, and you are willing to buy consumer HP as opposed to a Lenovo ThinkPad, the AMD Ryzen-based HP Envy x360 13" (what I have) is a good option, provided you don't dual-boot or are willing to reset the UEFI entries if you do dual-boot.


----------



## teo (Oct 19, 2021)

neel said:


> I get a ThinkPad X1 Yoga 3rd Gen (same generation as X1 Carbon 6th Gen) from work, which does in fact dual-boot Windows 11 and FreeBSD, but I hardly ever use FreeBSD on it. I usually run FreeBSD on an AMD Ryzen-based HP Envy, after selling an 11th Gen Intel-based HP Spectre, the latter which has the same CPU generation and Wi-Fi chip as the X1 Carbon 9th Gen.
> 
> When I had my 11th Gen Spectre, FreeBSD support was pretty rough (which is why I sold it). Things have somewhat improved since then (hopefully), since drm-kmod 5.6-wip may support TigerLake (I am not 100% sure, but someone with a Framework laptop has graphics) and there is an experimental "iwlwifi" branch for Wi-Fi support.
> 
> If TigerLake scares you, and you are willing to buy consumer HP as opposed to a Lenovo ThinkPad, the AMD Ryzen-based HP Envy x360 13" (what I have) is a good option, provided you don't dual-boot or are willing to reset the UEFI entries if you do dual-boot.


How will FreeBSD respond on laptops or desktops with adm ryzen 5600x processors ?


----------



## George (Oct 19, 2021)

There is a probe for the hello system for x1 gen 9 lenovos.








						Lenovo ThinkPad X1 Carbon G...
					

A database of all the hardware that works under bsd




					bsd-hardware.info


----------



## teo (Oct 19, 2021)

George said:


> There is a probe for the hello system for x1 gen 9 lenovos.
> 
> 
> 
> ...


And amd ryzen 5600x processor which generation is it?


----------



## astyle (Oct 19, 2021)

teo said:


> And amd ryzen 5600x processor which generation is it?


The very first one, from 1925.


----------



## yjqg6666 (Oct 22, 2021)

My probe: https://bsd-hardware.info/?probe=968311007e

You need compile iwlwifi driver for the kernel by yourself by far


----------



## grahamperrin@ (Oct 23, 2021)

neel said:


> an experimental "iwlwifi" branch



Is that <https://wireless.wiki.kernel.org/en/users/drivers/iwlwifi>?


----------



## yjqg6666 (Oct 23, 2021)

grahamperrin said:


> Is that <https://wireless.wiki.kernel.org/en/users/drivers/iwlwifi>?


https://wiki.freebsd.org/WiFi/Iwlwifi I tested 14-current, I am currently using 13-stable snapshot https://download.freebsd.org/ftp/sn...md64-20211007-b1cca743673-247549-memstick.img. It works and it's speed is acceptable.


----------



## jbo (Oct 23, 2021)

yjqg6666 said:


> https://wiki.freebsd.org/WiFi/Iwlwifi I tested 14-current, I am currently using 13-stable snapshot https://download.freebsd.org/ftp/sn...md64-20211007-b1cca743673-247549-memstick.img. It works and it's speed is acceptable.


Could you quantify "speed is acceptable"? To somebody who's stuck on 13.0-RELEASE 802.11n I'd argue that 30 Mbps is acceptable 
Are you able to run 802.11ac or 802.11ax on 14-current or 13-stable snapshot using the Intel card in the X1 Carbon Gen 9?


----------



## yjqg6666 (Oct 24, 2021)

jbodenmann said:


> Could you quantify "speed is acceptable"? To somebody who's stuck on 13.0-RELEASE 802.11n I'd argue that 30 Mbps is acceptable
> Are you able to run 802.11ac or 802.11ax on 14-current or 13-stable snapshot using the Intel card in the X1 Carbon Gen 9?


Just tested an intranet host using iperf3 (pkg installed):


> [ ID] Interval           Transfer     Bitrate         Retr
> [  5]   0.00-10.00  sec  3.28 MBytes  2.75 Mbits/sec   26             sender
> [  5]   0.00-10.09  sec  3.19 MBytes  2.65 Mbits/sec                  receiver



$ ifconfig


> wlan99: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
> ether 28:d0:ea:xx:xx:00
> inet6 fe80::2ad0:eaff:fecd:983a%wlan99 prefixlen 64 scopeid 0x2
> inet6 240e:398:3b9:ad70:2ad0:eaff:xxxx:xxxx prefixlen 64 autoconf
> ...


It's not working in ax mode(wifi 6 mode), recognized as 11a. By far the iwlwifi driver there has been no support for wifi 6, would be supported finally from the wiki page.

I used 14-current at first, and it worked using iwlwifi patches. Then from the wiki page: https://wiki.freebsd.org/WiFi/Iwlwifi, i saw these sentences:


> About 70 MFCs to stable/13 were done (and while main gets the latest changes stable/13 will get MFCs timely now so people can also test on stable/13, not 13.0-RELEASE)





> Q: Will you support FreeBSD 13 or 12?
> A: FreeBSD 12 will most likely not be supported any time soon. stable/13 should be in a few weeks once most of the LinuxKPI changes are merged.


So i reinstalled with 13-stable snapshot (not 13-Release). It's the current version i am working with.

From the probe you can see i am using Thinkpad X1 Carbon Gen 9. Currently its LTE-modem and bluetooth do not work, not that important by far. The others parts are working. You can see from the probe.
The same machine with different probes:
13-Stable(with iwlwifi patches): https://bsd-hardware.info/?probe=968311007e
14-Current(with iwlwifi patches): https://bsd-hardware.info/?probe=3c046e53d2
Gnu/Linux debian testing(bullseye, now is stable): https://linux-hardware.org/?probe=4aa5287a00

Hopefully the above info(s) can help others.


----------



## yjqg6666 (Nov 18, 2021)

Update: I have made the bluetooth working on stable/13 using ng_ubt driver.  Here is the HOWTO:
1. from the probe https://bsd-hardware.info/?probe=ddfd14ef31, I can get the vendor/product id: 8087:0026.
2. run `usbconfig list` and get the output:


> ugen1.1: <0x8086 XHCI root HUB> at usbus1, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=SAVE (0mA)
> ugen0.1: <0x8086 XHCI root HUB> at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=SAVE (0mA)
> ugen1.2: <Quectel Quectel EM05-CE> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)
> ugen1.3: <vendor 0x06cb product 0x00fc> at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (100mA)
> ...



From the output we know it's _*ugen1.5 *._



3. run `pkg install iwmbt-firmware` and run `iwmbtfw -d [B]ugen1.5[/B] -I`.

You may get error like:  "/usr/share/firmware/intel/ibt-19-0-4.sfi: No such file or directory".  In this case you can get ibt*.sfi file from firmware-iwlwifi as the following steps:
  3.1 Download from https://packages.debian.org/bookworm/firmware-iwlwifi (http://ftp.debian.org/debian/pool/non-free/f/firmware-nonfree/firmware-iwlwifi_20210818-1_all.deb)
  3.2  install deb2targz by `pkg install deb2targz` and convert deb file to tar.gz `deb2targz /path/to/firmware-iwlwifi*.deb`.
   3.3 untar the tar.gz file, run `mkdir -p /usr/share/firmware/intel/` and `cp -Rv lib/firmware/intel/* /usr/share/firmware/intel`.

4. run `iwmbtfw -d [B]ugen1.5[/B] -I` again and the bluetooth would be recognized.
5. run `kldload ng_ubt` to load ubt kernel module.
6. run `service bluetooth start ubt0` and you may get error like:


> /etc/rc.d/bluetooth: ERROR: Unable to setup Bluetooth stack for device ubt0


rerun the command `service bluetooth start ubt0`, it would work.


Add ng_ubt_load="YES" to /boot/loader.conf.local for loading the module automatically. After rebooting, you need run `iwmbtfw -d [B]ugen1.5[/B] -I` and `service bluetooth start ubt0` to bring the interface up.




Reference:
1. https://www.davidschlachter.com/misc/freebsd-intel-8265-bluetooth
2. https://docs.freebsd.org/en/books/handbook/advanced-networking/#network-bluetooth


----------



## yjqg6666 (Nov 20, 2021)

Update: I have got my Quectel EM05-CE LTE modem working. Here is HOWTO:
1. patch the kernel to support the modem product (QUECTEL EM05 0x0127) and to use u3g driver. Github PR.


> diff --git a/sys/dev/usb/serial/u3g.c b/sys/dev/usb/serial/u3g.c
> index fcff316d8..33e6339be 100644
> --- a/sys/dev/usb/serial/u3g.c
> +++ b/sys/dev/usb/serial/u3g.c
> ...


2. Run `make -j8 buildkernel KERNCONF=xxx` and `make installkernel KERNCONF=xxx`.  Add _


		Code:
	

u3g_load="YES"

_to /boot/loader.conf.local config file. Reboot to use the new kernel.
3. Check if u3g kernel module loaded by `kldstat |grep u3g`. Check device files exists `ls /dev/cuaU* /dev/ttyU*`
4. Configure /etc/ppp/ppp.conf file.



> u3g:
> enable echo
> set log Phase Chat LCP IPCP CCP tun command
> set device /dev/cuaU0  # REPLACE_WITH_YOUR_DEVICE_PATH
> ...



5. Enable ppp by running the following commands.


> sysrc ppp_enable="YES"
> sysrc ppp_mode="ddial"
> sysrc ppp_profile="u3g"


----------



## yjqg6666 (Nov 20, 2021)

George said:


> There is a probe for the hello system for x1 gen 9 lenovos.
> 
> 
> 
> ...


George I uploaded this probe using HelloSystem to test the hardware. The other probes I provided are reflecting the same hardware, Different versions of FreeBSD were used.


----------



## yjqg6666 (Nov 21, 2021)

Update: fix i915kms error.


> drmn0: could not load firmware image 'i915/tgl_dmc_ver2_04.bin'
> drmn0: Failed to load DMC firmware i915/tgl_dmc_ver2_04.bin. Disabling runtime power management.
> drmn0: DMC firmware homepage: https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/i915<6>[drm]



1. Clone firmware repo from Github. `git clone https://github.com/freebsd/drm-kmod-firmware.git`
2. Build and install firmware. `cd drm-kmod-firmware && make install clean`
3. Reboot to take effect.

I would constantly reply this thread if there is any update for anyone who is using this Thinkpad model.


----------



## jbo (Nov 21, 2021)

yjqg6666 said:


> I would constantly reply this thread if there is any update for anyone who is using this Thinkpad model.


Thanks, this is really appreciated.
It will probably still take a few weeks for me to receive this new laptop :/


----------



## diizzy (Nov 21, 2021)

I would also recommend looking at Fujitsu's U9-series, they're really nice and MIJ


----------



## jbo (Nov 24, 2021)

I just got the laptop delivered. Will hopefully find some time to invest into this and report back ASAP.


----------



## jbo (Nov 25, 2021)

yjqg6666 as I understand it's somewhat necessary to run 13.0-STABLE instead of 13.0-RELEASE on this machine in order to use the new wireless driver. Is that correct?


----------



## yjqg6666 (Nov 25, 2021)

jbodenmann said:


> yjqg6666 as I understand it's somewhat necessary to run 13.0-STABLE instead of 13.0-RELEASE on this machine in order to use the new wireless driver. Is that correct?


You'd better to use stable/13 from snapshot or git.  `mkdir /usr/src; cd /usr/src && git clone -b stable/13 https://git.freebsd.org/src.git .`.  From the latest commit, i see the iwlwifi patch has been merged into the branch. You may only need to apply the LTE modem patch(if your model had Quectel EM05).


----------



## jbo (Nov 25, 2021)

Thank you for providing all this valuable information. I'm currently building stable/13.

Yep, I ordered the machine with the Quectel modem. That's a very low priority for me right now tho. I'll first try to get WiFi & Bluetooth working as per your helpful posts


----------



## diizzy (Nov 25, 2021)

If you're going to build from source you probably want to at least set CPUTYPE.

Here's what I use for example however you might need LIB32 in some cases.

/etc/make.conf (CPUTYPE needs to be changed)

```
CPUTYPE?=cortex-a53
WITHOUT_DEBUG=YES
MK_PROFILE=no
# These only affects ports
OPTIONS_UNSET=DOCS EXAMPLES NLS MANPAGES TEST
OPTIONS_SET=LTO
```

/etc/src.conf

```
WITHOUT_DEBUG_FILES=1
WITHOUT_LIB32=1
WITHOUT_KERNEL_SYMBOLS=yes
WITHOUT_TESTS=yes
WITHOUT_PROFILE=yes
WITH_MALLOC_PRODUCTION=yes
WITHOUT_LLVM_ASSERTIONS=yes
WITH_EXTRA_TCP_STACKS=1
```


----------



## jbo (Nov 27, 2021)

yjqg6666 would you be able to share some information regarding the iwlwifi driver? From what I understand you have that working on 13.0-STABLE, right?

Today I compiled 13.0-STABLE which seems to be running fine. I then followed these instructions to get the iwlwifi driver: https://wiki.freebsd.org/WiFi/Iwlwifi#Getting_code

I downloaded & ran the script mentioned in the wiki under /usr/src and rebuilt the kernel. After rebooting, I tried to load the kernel module by running `kldload if_iwlwifi` but the module apparently doesn't exist.
My /usr/src is of course tracking stable/13 from https://github.com/freebsd/freebsd-src.

This is the first time I'm compiling my own kernel so I might be missing something obvious here.


----------



## bakul (Nov 28, 2021)

Check if /`boot/kernel/if_iwlwifi.ko` exists. If not, check that `/usr/src/sys/modules/iwlwifi*` exist. If not, make sure you applied the patch from https://people.freebsd.org/~bz/wireless/
Check that kernel build didn't have any errors (if you saved the make output).
Worst case, you can join freebsd-wireless and ask for help.


----------



## jbo (Nov 28, 2021)

/usr/src/sys/modules/iwlwifi* doesn't exist (and therefore also not the corresponding kernel module.

When applying the patch, I get this:

```
root@x1g9:/usr/src # ./iwlwifi.sh
Script expects to run from src/
Fetching patches and tarballs ...
20210904-linuxkpi-latest.tar                           250 kB  603 kBps    00s
20210904-iwlwifi-latest.tar                             25 MB 5134 kBps    05s
20210904-rtw88-latest.tar                             3505 kB 2913 kBps    01s
20210904-net80211-latest.diff                           13 kB   13 MBps    00s
20210904-build-latest.diff                            2878  B   40 MBps    00s
Applying changes related to net80211  ...
Reversed (or previously applied) patch detected!  Assume -R? [y] y
Reversed (or previously applied) patch detected!  Assume -R? [y] y
1 out of 2 hunks failed while patching sys/net80211/ieee80211.c
Reversed (or previously applied) patch detected!  Assume -R? [y] y
Reversed (or previously applied) patch detected!  Assume -R? [y] y
Reversed (or previously applied) patch detected!  Assume -R? [y] y
Reversed (or previously applied) patch detected!  Assume -R? [y] y
Reversed (or previously applied) patch detected!  Assume -R? [y] y
```

Is this how it works for you guys too? Or am I missing something obvious here?
I am running v0.91 of that script from the website bakul linked.

Looking at the script it would seem like it fails half way through it (while applying the patches). It doesn't even get to extract the tarballs.
What am I doing wrong here? I am on stable/13 from yesterday (and so is /usr/src).


----------



## bakul (Nov 28, 2021)

The https://people.freebsd.org/~bz/wireless/apply-wireless-latest.sh script applied fine to a tree with commit ID f8b998c73058. But that was a month or so ago. Just now I asked Zeeb and he says most of the non-driver and non-LinuxKPI changes were comitted and merged and the driver is coming very soon. First in main, then in stable/13, and then he will have clean instructions for main & stable/13. In other words, hold your horses for now! You‘re doing nothing wrong.


----------



## jbo (Nov 28, 2021)

bakul Thank you for this valuable information. How exactly can I stay up-to-date on this matter so I know when I can get the new iwlwifi driver working on my stable/13 machine?
Was Zeeb able to provide any rough guesstimation on this? Is this a matter of days, weeks or months?
I'm familiar with the process of developing something like this so I don't mean to be pushy - just so I know whether I should start investigation some alternative solutions or whether I can just sit tight.


----------



## grahamperrin@ (Nov 28, 2021)

jbodenmann said:


> … stay up-to-date on this matter …



FWIW, assuming timely updates to the wiki: 

<https://wiki.freebsd.org/action/info/WiFi/Iwlwifi?action=info>
RSS <https://wiki.freebsd.org/action/rss...on=rss_rc&unique=0&page=WiFi/Iwlwifi&ddiffs=1>


----------



## bakul (Nov 28, 2021)

Subscribe to the freebsd-wireless mailing list to stay up-to-date. And watch related commits! My guess is days but I don’t know how many projects Zeeb may be juggling at the same time or if there are further unforeseen problems. As I had suggested in an earlier message, if you need wifi connectivity _now_, buy a supported $20 intel wifi card. Running iwlwifi now is strictly for testing; you can’t make plans based on any estimates of when it will be ready.


----------



## yjqg6666 (Nov 29, 2021)

jbodenmann said:


> yjqg6666 would you be able to share some information regarding the iwlwifi driver? From what I understand you have that working on 13.0-STABLE, right?
> 
> Today I compiled 13.0-STABLE which seems to be running fine. I then followed these instructions to get the iwlwifi driver: https://wiki.freebsd.org/WiFi/Iwlwifi#Getting_code
> 
> ...


jbodenmann  When you are building the kernel, any error occurred?  When I built the kernel after the patch had applied, the introduced module rtw88 caused the build failed. So I added

```
WITHOUT_MODULES = rtw88 rtw88fw
```
 to /etc/make.conf for exclusive build and rebuild the kernel. You need to make sure the buildkernel and installkernel steps have no failure. Before installkernel, you'd better backup your original kernel by`cp -Rv /boot/kernel /boot/kernel.orig`. After the installation, there should be a file if_iwlwifi.ko in /boot/kernel.


----------



## jbo (Nov 29, 2021)

yjqg6666 The problem I am facing is that the script patching the kernel source doesn't execute completely.

Looking at the wiki history, we have this now:


> * 2021-11-28 The driver and firmware went into HEAD (detached from build)



I would assume that this means that now we don't need that patch anymore. I should be able to just `git pull` the latest `stable/13` branch and build regularly without applying any patches or executing any scripts. Is that correct?
I do assume that I'll need something like `options iwlwifi` or similar. Any ideas where to look that up?

Or am I misunderstanding this node and this is only relevant for -CURRENT (because HEAD)?


----------



## yjqg6666 (Nov 30, 2021)

jbodenmann said:


> yjqg6666 The problem I am facing is that the script patching the kernel source doesn't execute completely.
> 
> Looking at the wiki history, we have this now:
> 
> ...


I rebuilt my kernel from the latest commit, got the same result as yours. I will check later. If the tars were not extracted, how about trying to extract them manually?


----------



## jbo (Nov 30, 2021)

Zeeb answered an e-mail on the freebsd-wireless mailing list (extremely quickly btw). That the script doesn't work right now is known.
He's hoping to provide a workable solution within a few days - (quote) For appropriate values of "few". (unquote).


----------



## yjqg6666 (Nov 30, 2021)

jbodenmann said:


> yjqg6666 The problem I am facing is that the script patching the kernel source doesn't execute completely.
> 
> Looking at the wiki history, we have this now:
> 
> ...


You may also try to make LTE working to get connected.


----------



## yjqg6666 (Nov 30, 2021)

jbodenmann said:


> Zeeb answered an e-mail on the freebsd-wireless mailing list (extremely quickly btw). That the script doesn't work right now is known.
> He's hoping to provide a workable solution within a few days - (quote) For appropriate values of "few". (unquote).


jbodenmann You could also checkout the code by commit hash(my initial tested one) and apply the iwlwifi patches.
`cd /usr/src
git branch tpx1 b1cca74367374bbb9cdc881c671a9f9525dca313
git checkout tpx1
git cherry-pick 0229172a65765392f566ae1cdc730615ab504e15  #add Quectel EM05 support, merged to main.
bash -x ./apply-wireless-latest.sh
make -j9 buildworld && make -j9 kernel
shutdown -r now
cd /usr/src
make installworld
shutdown -r now
etcupdate     # see handbook`


----------



## jbo (Dec 2, 2021)

yjqg6666 while waiting for the latest iwlwifi patches/MFCs I wanted to get the Quectel LTE modem up and running.

I pulled the latest stable/13 branch and applied the patch from your PR. Then I built, installed & booted the kernel.
The u3g kernel module loaded successfully. However, I don't have a /dev/cua* or /dev/ttyU* device at all.

I checked my order and it would seem that the laptop I got has this modem: Quectel EM120R-GL 4G/LTE Cat. 12
That would be different from the EM05 that you have (and provided a patch for).

Any ideas how how easy it is to support this model?
Looking at the datasheet it would seem like this module communicates over PCIe rather than USB.
In any case I don't seem to be able to "locate the device" - neither with `usbconfig` nor `pciconf`.
I loaded up the BIOS/UEFI to check whether the device might be disabled but that doesn't seem to be the case.

Here's my probe: https://bsd-hardware.info/?probe=8f9e9ddde5
The Quectel doesn't show up there either


----------



## yjqg6666 (Dec 3, 2021)

jbodenmann said:


> yjqg6666 while waiting for the latest iwlwifi patches/MFCs I wanted to get the Quectel LTE modem up and running.
> 
> I pulled the latest stable/13 branch and applied the patch from your PR. Then I built, installed & booted the kernel.
> The u3g kernel module loaded successfully. However, I don't have a /dev/cua* or /dev/ttyU* device at all.
> ...


The product: https://www.quectel.com/product/lte-a-em120r-gl
the spec: https://www.quectel.com/wp-content/uploads/2021/03/Quectel_EM120R-GL_LTE-A_Specification_V1.0.pdf

There are two modes, USB mode and pcie-only mode. There are ECM driver, Gobinet driver and QMI_WWAN driver for Linux. Try to search these driver name + freebsd to find out relative native driver.


----------



## grahamperrin@ (Dec 4, 2021)

The blanks at <https://bsd-hardware.info/?probe=8f9e9ddde5#pci:1eac-1001-1eac-2003> are remarkable ▶ <https://bsd-hardware.info/?id=pci:1eac-1001-1eac-2003>

For `1eac:1001:1eac:2003`, <https://www.google.com/search?q=1eac:1001:1eac:2003+BSD&tbs=li:1#unfucked> finds nothing.

FWIW, from <https://forums.whirlpool.net.au/archive/3vx1k1r3-25#r69110231> (2021-05-11): 



> … freebsd (base of pfSense) can't work with mbim or qmi, …


----------



## neel (Dec 6, 2021)

I don't think modern LTE modems work on FreeBSD, even as "consumer" PCs (not just "enterprise" ones) are getting LTE/5G support. The supported

Two solutions you have:

 * If you have an Android phone, you may be able to repeat your Wi-Fi onto a USB tethering. This worked for me on both Pixel and OnePlus devices, with both stock and custom ROMs, but I don't know about other OEMs like Samsung, Huawei, or Xiaomi.

 * Get a Ralink USB Wi-Fi dongle. Ralink dongles are the only ones I tested which work on Intel TigerLake and FreeBSD. This is what I do.


----------



## yjqg6666 (Dec 30, 2021)

jbodenmann the patch script updated for the current stable/13.
https://people.freebsd.org/~bz/wireless/ and https://lists.freebsd.org/archives/freebsd-wireless/2021-December/000157.html


----------



## yjqg6666 (Jan 11, 2022)

https://lists.freebsd.org/archives/freebsd-wireless/2022-January/000176.html 
> just a quick note that all functional changes from main (HEAD) were
merged to stable/13:


----------



## jbo (Jan 11, 2022)

yjqg6666 thank you for keeping us posted.
I actually built the latest stable/13 branch yesterday and for the first time I saw the WiFi card coming up.

Unfortunately, it's not a very stable experience at the moment: I only get a link about 20% at a time. 80% of the time the WiFi turns on, doesn't get a link and times out.
I see some messages in `dmesg` regarding failure loading issues:

```
Intel(R) Wireless WiFi based driver for FreeBSD
iwlwifi0: <iwlwifi> mem 0x603d1cc000-0x603d1cffff at device 20.3 on pci0
iwlwifi0: successfully loaded firmware image 'iwlwifi-QuZ-a0-hr-b0-67.ucode'
iwlwifi0: api flags index 2 larger than supported by driver
iwlwifi0: TLV_FW_FSEQ_VERSION: FSEQ Version: 89.3.35.37
iwlwifi0: loaded firmware version 67.8f59b80b.0 QuZ-a0-hr-b0-67.ucode op_mode iwlmvm
iwlwifi0: Detected Intel(R) Wi-Fi 6 AX201 160MHz, REV=0x354
iwlwifi0: base HW address: 70:a6:cc:5c:52:7e
wlan0: Ethernet address: 70:a6:cc:5c:52:7e
iwlwifi0: lkpi_ic_getradiocaps: Adding chan 1/2412/0/0/0/0 returned error 55
iwlwifi0: lkpi_ic_getradiocaps: Adding chan 36/5180/0/0/0/0 returned error 55
wlan0: _ieee80211_crypto_delkey: NONE keyix 65535 flags 0x3 rsc 0 tsc 0 len 0
wlan0: _ieee80211_crypto_delkey: NONE keyix 65535 flags 0x3 rsc 0 tsc 0 len 0
wlan0: _ieee80211_crypto_delkey: NONE keyix 65535 flags 0x3 rsc 0 tsc 0 len 0
wlan0: _ieee80211_crypto_delkey: NONE keyix 65535 flags 0x3 rsc 0 tsc 0 len 0
wlan0: start running, 0 vaps running
wlan0: ieee80211_start_locked: up parent iwlwifi0
wlan0: ieee80211_new_state_locked: INIT -> SCAN (arg 0) (nrunning 0 nscanning 0)
wlan0: ieee80211_newstate_cb: INIT -> SCAN arg 0
wlan0: sta_newstate: INIT -> SCAN (0)
wlan0: [1e:e8:29:95:d6:65] station assoc via MLME
wlan0: ieee80211_alloc_node 0xfffffe010ad99000<1e:e8:29:95:d6:65> in station table
wlan0: node_reclaim: remove 0xfffffe014048f000<70:a6:cc:5c:52:7e> from station table, refcnt 1
wlan0: ieee80211_sta_join1 0xfffffe010ad99000<1e:e8:29:95:d6:65> -> AUTH, FC0_SUBTYPE_DEAUTH
wlan0: ieee80211_new_state_locked: SCAN -> AUTH (arg 192) (nrunning 0 nscanning 0)
wlan0: ieee80211_newstate_cb: SCAN -> AUTH arg 192
iwlwifi0: lkpi_sta_scan_to_auth: waiting for 5 quuees to be allocated by driver
iwlwifi0: lkpi_sta_scan_to_auth: waiting for 5 quuees to be allocated by driver
iwlwifi0: lkpi_sta_scan_to_auth: waiting for 5 quuees to be allocated by driver
iwlwifi0: lkpi_sta_scan_to_auth: waiting for 5 quuees to be allocated by driver
iwlwifi0: lkpi_sta_scan_to_auth: waiting for 5 quuees to be allocated by driver
iwlwifi0: lkpi_sta_scan_to_auth: waiting for 4 quuees to be allocated by driver
iwlwifi0: lkpi_sta_scan_to_auth: waiting for 4 quuees to be allocated by driver
iwlwifi0: lkpi_sta_scan_to_auth: waiting for 4 quuees to be allocated by driver
iwlwifi0: lkpi_sta_scan_to_auth: waiting for 3 quuees to be allocated by driver
iwlwifi0: lkpi_sta_scan_to_auth: waiting for 3 quuees to be allocated by driver
iwlwifi0: lkpi_sta_scan_to_auth: waiting for 3 quuees to be allocated by driver
iwlwifi0: lkpi_sta_scan_to_auth: waiting for 2 quuees to be allocated by driver
iwlwifi0: lkpi_sta_scan_to_auth: waiting for 2 quuees to be allocated by driver
iwlwifi0: lkpi_sta_scan_to_auth: waiting for 1 quuees to be allocated by driver
iwlwifi0: lkpi_sta_scan_to_auth: waiting for 1 quuees to be allocated by driver
iwlwifi0: lkpi_sta_scan_to_auth: waiting for 1 quuees to be allocated by driver
wlan0: sta_newstate: SCAN -> AUTH (192)
wlan0: ieee80211_ref_node (ieee80211_send_mgmt:2704) 0xfffffe010ad99000<1e:e8:29:95:d6:65> refcnt 4
wlan0: ni 0xfffffe010ad99000 vap 0xfffffe014048d010 mode STA state AUTH m 0xfffff8039f0ce000 status 0
wlan0: ni 0xfffffe010ad99000 mode STA state AUTH ostate 2 arg 0x2 status 0
wlan0: [1e:e8:29:95:d6:65] recv auth frame with algorithm 0 seq 2
wlan0: ieee80211_new_state_locked: AUTH -> ASSOC (arg 0) (nrunning 0 nscanning 0)
wlan0: ieee80211_newstate_cb: AUTH -> ASSOC arg 0
wlan0: sta_newstate: AUTH -> ASSOC (0)
wlan0: ieee80211_ref_node (ieee80211_send_mgmt:2704) 0xfffffe010ad99000<1e:e8:29:95:d6:65> refcnt 4
wlan0: ni 0xfffffe010ad99000 vap 0xfffffe014048d010 mode STA state ASSOC m 0xfffff8001fdbe500 status 0
wlan0: ni 0xfffffe010ad99000 mode STA state ASSOC ostate 3 arg 0x3 status 0
wlan0: [1e:e8:29:95:d6:65] assoc success at aid 3: short preamble, short slot time, QoS
wlan0: ieee80211_new_state_locked: ASSOC -> RUN (arg 16) (nrunning 0 nscanning 0)
wlan0: ieee80211_newstate_cb: ASSOC -> RUN arg 16
wlan0: sta_newstate: ASSOC -> RUN (16)
wlan0: [1e:e8:29:95:d6:65] bss node join
wlan0: link state changed to UP
wlan0: ieee80211_crypto_newkey: cipher 3 flags 0x3 keyix 65535
wlan0: ieee80211_crypto_newkey: no h/w support for cipher AES-CCM, falling back to s/w
wlan0: ieee80211_crypto_setkey: AES-CCM keyix 0 flags 0x133 mac 1e:e8:29:95:d6:65 rsc 0 tsc 0 len 16
wlan0: ieee80211_crypto_newkey: cipher 3 flags 0x6 keyix 2
wlan0: ieee80211_crypto_newkey: no h/w support for cipher AES-CCM, falling back to s/w
wlan0: ieee80211_crypto_setkey: AES-CCM keyix 2 flags 0x136 mac ff:ff:ff:ff:ff:ff rsc 0 tsc 0 len 16
iwlwifi0: No beacon heard and the session protection is over already...
wlan0: ieee80211_new_state_locked: RUN -> SCAN (arg 0) (nrunning 0 nscanning 0)
wlan0: ieee80211_newstate_cb: RUN -> SCAN arg 0
wlan0: sta_newstate: RUN -> SCAN (0)
wlan0: _ieee80211_crypto_delkey: AES-CCM keyix 0 flags 0x133 rsc 0 tsc 0 len 16
wlan0: [1e:e8:29:95:d6:65] bss node leave
wlan0: link state changed to DOWN
iwlwifi0: Couldn't drain frames for staid 0, status 0x8
iwlwifi0:
wlan0: _ieee80211_crypto_delkey: NONE keyix 65535 flags 0x3 rsc 0 tsc 0 len 0
lkpi_iv_newstate: error -5 during state transition 5 (RUN) -> 1 (SCAN)
wlan0: _ieee80211_crypto_delkey: AES-CCM keyix 2 flags 0x136 rsc 0 tsc 0 len 16
wlan0: sta_newstate: SCAN -> SCAN (0)
WARNING mvm_sta->dup_data == ((void *)0) failed at /usr/src/sys/contrib/dev/iwlwifi/mvm/rxmq.c:509
WARNING mvm_sta->dup_data == ((void *)0) failed at /usr/src/sys/contrib/dev/iwlwifi/mvm/rxmq.c:509
WARNING mvm_sta->dup_data == ((void *)0) failed at /usr/src/sys/contrib/dev/iwlwifi/mvm/rxmq.c:509
iwlwifi0: Not associated and the session protection is over already...
wlan0: ieee80211_new_state_locked: SCAN -> SCAN (arg 0) (nrunning 0 nscanning 0)
wlan0: ieee80211_newstate_cb: SCAN -> SCAN arg 0
wlan0: sta_newstate: SCAN -> SCAN (0)
wlan0: [18:e8:29:94:d6:65] station assoc via MLME
wlan0: ieee80211_alloc_node 0xfffffe00e1701000<18:e8:29:94:d6:65> in station table
wlan0: node_reclaim: remove 0xfffffe010ad99000<1e:e8:29:95:d6:65> from station table, refcnt 2
wlan0: ieee80211_sta_join1 0xfffffe00e1701000<18:e8:29:94:d6:65> -> AUTH, FC0_SUBTYPE_DEAUTH
wlan0: ieee80211_new_state_locked: SCAN -> AUTH (arg 192) (nrunning 0 nscanning 0)
wlan0: ieee80211_newstate_cb: SCAN -> AUTH arg 192
iwlwifi0: Microcode SW error detected. Restarting 0x0.
iwlwifi0: Start IWL Error Log Dump:
iwlwifi0: Transport status: 0x0000004B, valid: 6
iwlwifi0: Loaded firmware version: 67.8f59b80b.0 QuZ-a0-hr-b0-67.ucode
iwlwifi0: 0x00000071 | NMI_INTERRUPT_UMAC_FATAL   
iwlwifi0: 0x000022F0 | trm_hw_status0
iwlwifi0: 0x00000000 | trm_hw_status1
iwlwifi0: 0x004CB2DE | branchlink2
iwlwifi0: 0x004C806E | interruptlink1
iwlwifi0: 0x004C806E | interruptlink2
iwlwifi0: 0x00012CDA | data1
iwlwifi0: 0x00001000 | data2
iwlwifi0: 0x00000000 | data3
iwlwifi0: 0x00000000 | beacon time
iwlwifi0: 0xBBAE4133 | tsf low
iwlwifi0: 0x0000058D | tsf hi
iwlwifi0: 0x00000000 | time gp1
iwlwifi0: 0x006CEFB2 | time gp2
iwlwifi0: 0x00000001 | uCode revision type
iwlwifi0: 0x00000043 | uCode version major
iwlwifi0: 0x8F59B80B | uCode version minor
iwlwifi0: 0x00000351 | hw version
iwlwifi0: 0x00489004 | board version
iwlwifi0: 0x80B5FD2E | hcmd
iwlwifi0: 0x00020000 | isr0
iwlwifi0: 0x00000000 | isr1
iwlwifi0: 0x08F00002 | isr2
iwlwifi0: 0x00C3400C | isr3
iwlwifi0: 0x00000000 | isr4
iwlwifi0: 0x00370103 | last cmd Id
iwlwifi0: 0x00012CDA | wait_event
iwlwifi0: 0x000000B4 | l2p_control
iwlwifi0: 0x00000000 | l2p_duration
iwlwifi0: 0x0000000F | l2p_mhvalid
iwlwifi0: 0x00000000 | l2p_addr_match
iwlwifi0: 0x00000009 | lmpm_pmg_sel
iwlwifi0: 0x00000000 | timestamp
iwlwifi0: 0x000088CC | flow_handler
iwlwifi0: Start IWL Error Log Dump:
iwlwifi0: Transport status: 0x0000004B, valid: 7
iwlwifi0: 0x20000905 | ADVANCED_SYSASSERT
iwlwifi0: 0x00000000 | umac branchlink1
iwlwifi0: 0x80455E52 | umac branchlink2
iwlwifi0: 0x8045A3E8 | umac interruptlink1
iwlwifi0: 0x00000000 | umac interruptlink2
iwlwifi0: 0x00000000 | umac data1
iwlwifi0: 0xDEADBEEF | umac data2
iwlwifi0: 0xDEADBEEF | umac data3
iwlwifi0: 0x00000043 | umac major
iwlwifi0: 0x8F59B80B | umac minor
iwlwifi0: 0x006CEFAC | frame pointer
iwlwifi0: 0xC0885ED0 | stack pointer
iwlwifi0: 0x003C0108 | last host cmd
iwlwifi0: 0x00000000 | isr status reg
iwlwifi0: IML/ROM dump:
iwlwifi0: 0x00000003 | IML/ROM error/state
iwlwifi0: 0x00005B2C | IML/ROM data1
iwlwifi0: 0x00000080 | IML/ROM WFPM_AUTH_KEY_0
iwlwifi0: Fseq Registers:
iwlwifi0: 0x60000000 | FSEQ_ERROR_CODE
iwlwifi0: 0x80290033 | FSEQ_TOP_INIT_VERSION
iwlwifi0: 0x00090006 | FSEQ_CNVIO_INIT_VERSION
iwlwifi0: 0x0000A482 | FSEQ_OTP_VERSION
iwlwifi0: 0x00000003 | FSEQ_TOP_CONTENT_VERSION
iwlwifi0: 0x4552414E | FSEQ_ALIVE_TOKEN
iwlwifi0: 0x20000302 | FSEQ_CNVI_ID
iwlwifi0: 0x01300504 | FSEQ_CNVR_ID
iwlwifi0: 0x20000302 | CNVI_AUX_MISC_CHIP
iwlwifi0: 0x01300504 | CNVR_AUX_MISC_CHIP
iwlwifi0: 0x05B0905B | CNVR_SCU_SD_REGS_SD_REG_DIG_DCDC_VTRIM
iwlwifi0: 0x0000025B | CNVR_SCU_SD_REGS_SD_REG_ACTIVE_VDIG_MIRROR
iwlwifi0: WRT: Collecting data: ini trigger 4 fired (delay=0ms).
iwlwifi0: FW error in SYNC CMD PHY_CONTEXT_CMD
#0 0xffffffff80d3d333 at linux_dump_stack+0x23
#1 0xffffffff83233685 at iwl_trans_txq_send_hcmd+0x3d5
#2 0xffffffff831de5be at iwl_trans_send_cmd+0xce
#3 0xffffffff8321afe9 at iwl_mvm_send_cmd_pdu+0x49
#4 0xffffffff831fcb20 at iwl_mvm_phy_ctxt_apply+0x580
#5 0xffffffff831fcc16 at iwl_mvm_phy_ctxt_changed+0x66
#6 0xffffffff831f410b at iwl_mvm_change_chanctx+0x10b
#7 0xffffffff80d334ef at lkpi_sta_scan_to_auth+0x23f
#8 0xffffffff80d37268 at lkpi_iv_newstate+0x148
#9 0xffffffff80c7e5ca at ieee80211_newstate_cb+0x17a
#10 0xffffffff80b61d21 at taskqueue_run_locked+0x181
#11 0xffffffff80b63032 at taskqueue_thread_loop+0xc2
#12 0xffffffff80abd92e at fork_exit+0x7e
#13 0xffffffff80f3006e at fork_trampoline+0xe
iwlwifi0: PHY ctxt cmd error. ret=-5
iwlwifi0: Failed to send MAC context (action:2): -5
iwlwifi0: failed to update MAC 0xfffffe014048dc9aM
iwlwifi0: lkpi_iv_newstate: error -5 during state transition 1 (SCAN) -> 2 (AUTH)
wlan0: sta_newstate: SCAN -> AUTH (192)
wlan0: ieee80211_ref_node (ieee80211_send_mgmt:2704) 0xfffffe00e1701000<18:e8:29:94:d6:65> refcnt 4
iwlwifi0: No queue was found. Dropping TX
wlan0: ni 0xfffffe00e1701000 vap 0xfffffe014048d010 mode STA state AUTH m 0xfffff80003be9300 status 4543576
wlan0: ni 0xfffffe00e1701000 mode STA state AUTH ostate 2 arg 0x2 status 4543576
wlan0: vap 0xfffffe014048d010 mode STA state AUTH flags 0x42000 & 0x80
wlan0: ieee80211_new_state_locked: AUTH -> SCAN (arg 1) (nrunning 0 nscanning 0)
wlan0: ieee80211_newstate_cb: AUTH -> SCAN arg 1
wlan0: sta_newstate: AUTH -> SCAN (1)
iwlwifi0: lkpi_iv_newstate: error -5 during state transition 2 (AUTH) -> 1 (SCAN)
wlan0: sta_newstate: SCAN -> SCAN (1)
wlan0: [18:e8:29:94:d6:65] station deauth via MLME (reason: 3 (sending STA is leaving/has left IBSS or ESS))
wlan0: ieee80211_new_state_locked: SCAN -> INIT (arg 3) (nrunning 0 nscanning 0)
wlan0: ieee80211_newstate_cb: SCAN -> INIT arg 3
wlan0: sta_newstate: SCAN -> INIT (3)
wlan0: node_reclaim: remove 0xfffffe00e1701000<18:e8:29:94:d6:65> from station table, refcnt 2
wlan0: ieee80211_alloc_node 0xfffffe0164929000<70:a6:cc:5c:52:7e> in station table
wlan0: ieee80211_new_state_locked: INIT -> SCAN (arg 0) (nrunning 0 nscanning 0)
wlan0: ieee80211_newstate_cb: INIT -> SCAN arg 0
wlan0: sta_newstate: INIT -> SCAN (0)
iwlwifi0: Scan failed! ret -5
iwlwifi0: ERROR: lkpi_ic_scan_start: hw_scan returned -5
iwlwifi0: Scan failed! ret -5
iwlwifi0: ERROR: lkpi_ic_scan_start: hw_scan returned -5
iwlwifi0: Scan failed! ret -5
iwlwifi0: ERROR: lkpi_ic_scan_start: hw_scan returned -5
iwlwifi0: Scan failed! ret -5
iwlwifi0: ERROR: lkpi_ic_scan_start: hw_scan returned -5
```


----------



## grahamperrin@ (Jan 11, 2022)

(Post moved to <https://forums.freebsd.org/posts/550639>)


----------



## jbo (Jan 12, 2022)

Current status:

*FreeBSD *stable/13 2022-01-10 works pretty well
*GPU *is working more reliably after switching from graphics/drm-kmod to graphics/drm-devel-kmod (Thanks bsduck!)
*WiFi *is working using the new iwlwifi driver but we're still stuck at 802.11a (36 Mbps at best)
*Suspend/resume* is working
*Bluetooth:* Well, this is FreeBSD after all
*LTE/WAN:* Unfortunately the EM120R card I have needs some special unlocking technique - I did not investigate that yet.
With that this is pretty much everything I need to make this laptop become my daily driver. I will tweak a few more things and then write up some more formal "guide" also talking about some other aspects such as needed UEFI settings soon.


----------

