Lenovo X1 Carbon Gen 9

jbo@

Developer
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.
 
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.
 
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!
 
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.
 
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.
 
… 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.

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.
 
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.
 
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.
 
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 ?
 
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 :p
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?
 
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 :p
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
inet 192.168.1.249 netmask 0xffffff00 broadcast 192.168.1.255
groups: wlan
ssid ** channel 157 (5785 MHz 11a) bssid 50:d2:f5:xx:xx:xx
regdomain ROW country ** authmode WPA2/802.11i privacy ON
deftxkey UNDEF AES-CCM 2:128-bit txpower 23 bmiss 7 mcastrate 6
mgmtrate 6 scanvalid 60 wme roaming MANUAL
parent interface: iwlwifi0
media: IEEE 802.11 Wireless Ethernet OFDM/36Mbps mode 11a
status: associated
nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
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.
 
Last edited:
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)
ugen1.4: <Chicony Electronics Co.,Ltd. Integrated Camera> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)
ugen1.5: <vendor 0x8087 product 0x0026> 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
 
Last edited:
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
@@ -496,6 +496,7 @@ static const STRUCT_USB_HOST_ID u3g_devs[] = {
U3G_DEV(QUANTA, Q101, 0),
U3G_DEV(QUANTA, Q111, 0),
U3G_DEV(QUECTEL, EC25, 0),
+ U3G_DEV(QUECTEL, EM05, 0),
U3G_DEV(SIERRA, AC402, 0),
U3G_DEV(SIERRA, AC595U, 0),
U3G_DEV(SIERRA, AC313U, 0),
diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs
index b3cf80be0..383849f5a 100644
--- a/sys/dev/usb/usbdevs
+++ b/sys/dev/usb/usbdevs
@@ -3944,6 +3944,7 @@ product QUANTA RW6815R 0xf003 HP iPAQ rw6815 RNDIS

/* Quectel products */
product QUECTEL EC25 0x0125 LTE modem
+product QUECTEL EM05 0x0127 LTE modem

/* Quickshot products */
product QUICKSHOT STRIKEPAD 0x6238 USB StrikePad
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
set speed 115200
set phone <REPLACE_WITH_PHONE>
set authname <LOGIN_USERNAME>
set authkey <LOGIN_PASSWORD>
set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \
\"\" AT OK-AT-OK \
AT+CGDCONT=1,\\\"IP\\\",\\\"<REPLACE_WITH_YOUR_APN>\\\" OK \
ATDT*99# TIMEOUT 30 CONNECT"
set timeout 180
set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0
enable dns
disable ipv6cp # disable ipv6
add default HISADDR # Add a (sticky) default route

5. Enable ppp by running the following commands.
sysrc ppp_enable="YES"
sysrc ppp_mode="ddial"
sysrc ppp_profile="u3g"
 
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.
 
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 :/
 
I just got the laptop delivered. Will hopefully find some time to invest into this and report back ASAP.
 
Back
Top