__/\\\\\\\\\\\\\\\__/\\\\\\\\\\\\\\\__/\\\________/\\\___________________/\\\\\\\___________/\\\\\\\\\\\\_____/\\\\\\\\\\\\\\\_        
 _\///////\\\/////__\///////\\\/////__\///\\\____/\\\/__________________/\\\/////\\\________\/\\\////////\\\__\/\\\///////////__       
  _______\/\\\_____________\/\\\_________\///\\\/\\\/___________________/\\\____\//\\\_______\/\\\______\//\\\_\/\\\_____________      
   _______\/\\\_____________\/\\\___________\///\\\/_______/\\\____/\\\_\/\\\_____\/\\\_______\/\\\_______\/\\\_\/\\\\\\\\\\\_____     
    _______\/\\\_____________\/\\\_____________\/\\\_______\//\\\__/\\\__\/\\\_____\/\\\_______\/\\\_______\/\\\_\/\\\///////______    
     _______\/\\\_____________\/\\\_____________\/\\\________\//\\\/\\\___\/\\\_____\/\\\_______\/\\\_______\/\\\_\/\\\_____________   
      _______\/\\\_____________\/\\\_____________\/\\\_________\//\\\\\____\//\\\____/\\\________\/\\\_______/\\\__\/\\\_____________  
       _______\/\\\_____________\/\\\_____________\/\\\__________\//\\\______\///\\\\\\\/____/\\\_\/\\\\\\\\\\\\/___\/\\\\\\\\\\\\\\\_ 
        _______\///______________\///______________\///____________\///_________\///////_____\///__\////////////_____\///////////////__

Lenovo Z50-70 Configuration

A while ago I received a Lenovo Z50-70 via the donations team of the FreeBSD project. On this page you find detailed instructions on how to configure FreeBSD 13.2-RELEASE for this kind of notebook. In general everything is supported, even bluetooth with some firmware tricks. See below.

/boot/loader.conf configuration

# Load ZFS and encryption modules at boot time
zfs_load="YES"
aesni_load="YES"
ichsmb_load="YES"

# Load modules for temperature monitoring at boot time
coretemp_load="YES"
cpuctl_load="YES"

# Load modules for WiFi WPA PSK at boot time
wlan_ccmp_load="YES"
wlan_tkip_load="YES"

# Load the current Intel microcode, this will not only
# prevent side channel attacks it also make the system
# feel way more snappier. The firmware can be installed
# via 'pkg install devcpu-data'
cpu_microcode_load="YES"
cpu_microcode_name="/boot/firmware/intel-ucode.bin"

vfs.zfs.prefetch_disable="0"

# Disable kernel boot messages and show a nice FreeBSD logo
# at boot time. Kernel messages can be shown by utilizing
# dmesg(8).
boot_mute="YES"

# Power down devices without attached drivers.
hw.pci.do_power_nodriver=3

/etc/rc.conf system configuration

# Set the hostname and the keyboard layout
hostname="binky.ttyv0.de"
keymap="de.kbd"

# Standard Daemons
local_unbound_enable="YES"
sshd_enable="YES"
ntpd_enable="YES"
auditd_enable="YES"
zfs_enable="YES"
syslogd_flags="-ss"

# Network Setup
ifconfig_re0="DHCP"
ifconfig_re0_ipv6="inet6 accept_rtadv"
ifconfig_re0_alias1="inet6 fec0:XXXX:X::X prefixlen 64"
ipv6_privacy="YES"
  
# WiFi Setup, regdomain settings are necessary to use the correct
# WiFi channels in a particular country.
ifconfig_wlan0="WPA SYNCDHCP"
wlans_ath0="wlan0"
create_args_wlan0="ecm regdomain ETSI country DE"
  

# Power Management settings, keep the rate per default at minimum
# to save power and keep the coolers quiet.
powerd_enable="YES"
powerd_flags="-a adaptive -b min"
  
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
  
# Use in-memory tmpfs, see /etc/fstab for the configuration
tmpfs="YES"
clear_tmp_enable="YES"
  
# Use only a local sendmail for mbox delivery of cron mails
sendmail_enable="NO"
sendmail_submit_enable="YES"
sendmail_msp_queue_enable="YES"
  
# Enable system accounting and enable the linux emulation layer,
# aka linuxulator.
accounting_enable="YES"
linux_enable="YES"

# Load the drm-kmod Intel HD graphics support
kld_list="i915kms"

Bluetooth support

Bluetooth in general is supported, but the port which downloads the firmware files disappeared from the ports tree due to a lack of a maintainer. However it is still possible to enabled it. First the following file have to be created with the following entry. devd(8) will do the rest. The description on how to retrieve the firmware files is descripted below.

/etc/devd/ath3k.conf

  notify 100 {
    match "system"		"USB";
    match "subsystem"	"DEVICE";
    match "type"		"ATTACH";
    match "vendor"		"0x0cf3";
    match "product"		"(0x0036|0x3004|0x3005|0x3008|0x311d|0x311e|0x311f|0x3121|0x817a|0x817b|0xe003|0xe004|0xe005|0xe006)";
    action "/usr/sbin/ath3kfw -d $cdev -f /usr/local/lib/firmware";
  };

BT firmware location /usr/local/lib/firmware/ar3k/

You first have to checkout the linux-firmware git repository with the following command.

git checkout https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git

Afterwards you copy the following files to firmware location mentioned in the header of that section. After a reboot the bluetooth supported should be working. See the end of the dmesg output, device ubt0.

   -rw-r--r--  1 gbe  wheel  uarch 55244 Mar 23 15:35 AthrBT_0x01020001.dfu
 -rw-r--r--  1 gbe  wheel  uarch 40724 Mar 23 15:35 AthrBT_0x01020200.dfu
 -rw-r--r--  1 gbe  wheel  uarch 48188 Mar 23 15:35 AthrBT_0x01020201.dfu
 -rw-r--r--  1 gbe  wheel  uarch 36828 Mar 23 15:35 AthrBT_0x11020000.dfu
 -rw-r--r--  1 gbe  wheel  uarch 46852 Mar 23 15:35 AthrBT_0x11020100.dfu
 -rw-r--r--  1 gbe  wheel  uarch 40652 Mar 23 15:35 AthrBT_0x31010000.dfu
 -rw-r--r--  1 gbe  wheel  uarch 37796 Mar 23 15:35 AthrBT_0x31010100.dfu
 -rw-r--r--  1 gbe  wheel  uarch 31500 Mar 23 15:35 AthrBT_0x41020000.dfu
 -rw-r--r--  1 gbe  wheel  uarch  1224 Mar 23 15:35 ramps_0x01020001_26.dfu
 -rw-r--r--  1 gbe  wheel  uarch  1274 Mar 23 15:35 ramps_0x01020200_26.dfu
 -rw-r--r--  1 gbe  wheel  uarch  1204 Mar 23 15:35 ramps_0x01020200_40.dfu
 -rw-r--r--  1 gbe  wheel  uarch   264 Mar 23 15:35 ramps_0x01020201_26.dfu
 -rw-r--r--  1 gbe  wheel  uarch   264 Mar 23 15:35 ramps_0x01020201_40.dfu
 -rw-r--r--  1 gbe  wheel  uarch  1796 Mar 23 15:35 ramps_0x11020000_40.dfu
 -rw-r--r--  1 gbe  wheel  uarch  1802 Mar 23 15:35 ramps_0x11020100_40.dfu
 -rw-r--r--  1 gbe  wheel  uarch  1926 Mar 23 15:35 ramps_0x31010000_40.dfu
 -rw-r--r--  1 gbe  wheel  uarch  1922 Mar 23 15:35 ramps_0x31010100_40.dfu
 -rw-r--r--  1 gbe  wheel  uarch  1820 Mar 23 15:35 ramps_0x41020000_40.dfu
  

dmesg output

Copyright (c) 1992-2021 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
  The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 13.2-RELEASE-p2 GENERIC amd64
FreeBSD clang version 14.0.5 (https://github.com/llvm/llvm-project.git llvmorg-14.0.5-0-gc12386ae247c)
VT(efifb): resolution 1920x1080
CPU: Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz (2394.59-MHz K8-class CPU)
  Origin="GenuineIntel"  Id=0x40651  Family=0x6  Model=0x45  Stepping=1
  Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
  Features2=0x7fdafbbf<SSE3,PCLMULQDQ,DTES64,MON,DS_CPL,VMX,EST,TM2,SSSE3,SDBG,FMA,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,MOVBE,POPCNT,TSCDLT,AESNI,XSAVE,OSXSAVE,AVX,F16C,RDRAND>
  AMD Features=0x2c100800<SYSCALL,NX,Page1GB,RDTSCP,LM>
  AMD Features2=0x21<LAHF,ABM>
  Structured Extended Features=0x27ab<FSGSBASE,TSCADJ,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,NFPUSG>
  Structured Extended Features3=0x9c000600<MCUOPT,MD_CLEAR,IBPB,STIBP,L1DFL,SSBD>
  XSAVE Features=0x1<XSAVEOP>
  VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID
  TSC: P-state invariant, performance statistics
real memory  = 8589934592 (8192 MB)
avail memory = 8139239424 (7762 MB)
CPU microcode: updated from 0x1c to 0x26
Event timer "LAPIC" quality 600
ACPI APIC Table: <LENOVO CB-01   >
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
FreeBSD/SMP: 1 package(s) x 2 core(s) x 2 hardware threads
random: registering fast source Intel Secure Key RNG
random: fast provider: "Intel Secure Key RNG"
random: unblocking device.
ioapic0 <Version 2.0> irqs 0-39
Launching APs: 1 3 2
random: entropy device external interface
kbd1 at kbdmux0
efirtc0: <EFI Realtime Clock>
efirtc0: registered as a time-of-day clock, resolution 1.000000s
smbios0: <System Management BIOS> at iomem 0xaaebef98-0xaaebefb6
smbios0: Version: 2.7, BCD Revision: 2.7
aesni0: <AES-CBC,AES-CCM,AES-GCM,AES-ICM,AES-XTS>
acpi0: <LENOVO CB-01>
acpi0: Power Button (fixed)
ACPI Error: No handler for Region [ERAM] (0xfffff8000197c900) [EmbeddedControl] (20201113/evregion-290)
ACPI Error: Region EmbeddedControl (ID=3) has no handler (20201113/exfldio-428)
ACPI Error: Aborting method \134_SB.PCI0.LPCB.EC0.BAT0._STA due to previous error (AE_NOT_EXIST) (20201113/psparse-689)
cpu0: <ACPI CPU> on acpi0
hpet0: <High Precision Event Timer> iomem 0xfed00000-0xfed003ff on acpi0
Timecounter "HPET" frequency 14318180 Hz quality 950
Event timer "HPET" frequency 14318180 Hz quality 550
Event timer "HPET1" frequency 14318180 Hz quality 440
Event timer "HPET2" frequency 14318180 Hz quality 440
Event timer "HPET3" frequency 14318180 Hz quality 440
Event timer "HPET4" frequency 14318180 Hz quality 440
atrtc0: <AT realtime clock> port 0x70-0x77 irq 8 on acpi0
atrtc0: Warning: Couldn't map I/O.
atrtc0: registered as a time-of-day clock, resolution 1.000000s
Event timer "RTC" frequency 32768 Hz quality 0
attimer0: <AT timer> port 0x40-0x43,0x50-0x53 irq 0 on acpi0
Timecounter "i8254" frequency 1193182 Hz quality 0
Event timer "i8254" frequency 1193182 Hz quality 100
Timecounter "ACPI-fast" frequency 3579545 Hz quality 900
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x1808-0x180b on acpi0
acpi_ec0: <Embedded Controller: GPE 0x7> port 0x62,0x66 on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
vgapci0: <VGA-compatible display> port 0x4000-0x403f mem 0xc0000000-0xc03fffff,0xb0000000-0xbfffffff irq 16 at device 2.0 on pci0
vgapci0: Boot video device
hdac0: <Intel Haswell HDA Controller> mem 0xc0610000-0xc0613fff irq 16 at device 3.0 on pci0
xhci0: <Intel Panther Point USB 3.0 controller> mem 0xc0600000-0xc060ffff irq 16 at device 20.0 on pci0
xhci0: 32 bytes context size, 64-bit DMA
usbus0: waiting for BIOS to give up control
xhci0: Port routing mask set to 0xffffffff
usbus0 on xhci0
usbus0: 5.0Gbps Super Speed USB v3.0
pci0: <simple comms> at device 22.0 (no driver attached)
hdac1: <Intel Lynx Point-LP HDA Controller> mem 0xc0614000-0xc0617fff irq 22 at device 27.0 on pci0
pcib1: <ACPI PCI-PCI bridge> irq 18 at device 28.0 on pci0
pci1: <ACPI PCI bus> on pcib1
re0: <RealTek 8168/8111 B/C/CP/D/DP/E/F/G PCIe Gigabit Ethernet> port 0x3000-0x30ff mem 0xc0504000-0xc0504fff,0xc0500000-0xc0503fff irq 18 at device 0.0 on pci1
re0: Using 1 MSI-X message
re0: ASPM disabled
re0: Chip rev. 0x50800000
re0: MAC rev. 0x00100000
miibus0: <MII bus> on re0
rgephy0: <RTL8251/8153 1000BASE-T media interface> PHY 1 on miibus0
rgephy0:  none, 10baseT, 10baseT-FDX, 10baseT-FDX-flow, 100baseTX, 100baseTX-FDX, 100baseTX-FDX-flow, 1000baseT-FDX, 1000baseT-FDX-master, 1000baseT-FDX-flow, 1000baseT-FDX-flow-master, auto, auto-flow
re0: Using defaults for TSO: 65518/35/2048
re0: Ethernet address: 28:d2:44:85:f2:03
re0: netmap queues/slots: TX 1/256, RX 1/256
pcib2: <ACPI PCI-PCI bridge> irq 19 at device 28.3 on pci0
pci2: <ACPI PCI bus> on pcib2
ath0: <Qualcomm Atheros AR9565> mem 0xc0400000-0xc047ffff irq 19 at device 0.0 on pci2
ath0: WB335 2-ANT card detected
ath0: Bluetooth Antenna Diversity card detected
ar9300_flash_map: unimplemented for now
Restoring Cal data from DRAM
Restoring Cal data from EEPROM
Restoring Cal data from Flash
Restoring Cal data from Flash
Restoring Cal data from OTP
ar9300_hw_attach: ar9300_eeprom_attach returned 0
ath0: [HT] enabling HT modes
ath0: [HT] enabling short-GI in 20MHz mode
ath0: [HT] 1 stream STBC receive enabled
ath0: [HT] 1 RX streams; 1 TX streams
ath0: QCA9565 mac 704.1 RF5110 phy 1638.6
ath0: 2GHz radio: 0x0000; 5GHz radio: 0x0000
ehci0: <Intel Lynx Point-LP USB 2.0 controller> mem 0xc061c000-0xc061c3ff irq 23 at device 29.0 on pci0
usbus1: EHCI version 1.0
usbus1 on ehci0
usbus1: 480Mbps High Speed USB v2.0
isab0: <PCI-ISA bridge> at device 31.0 on pci0
isa0: <ISA bus> on isab0
ahci0: <Intel Lynx Point-LP AHCI SATA controller> port 0x4088-0x408f,0x4094-0x4097,0x4080-0x4087,0x4090-0x4093,0x4060-0x407f mem 0xc061b000-0xc061b7ff irq 19 at device 31.2 on pci0
ahci0: AHCI v1.30 with 4 6Gbps ports, Port Multiplier not supported
ahcich0: <AHCI channel> at channel 0 on ahci0
ahcich1: <AHCI channel> at channel 1 on ahci0
ahcich2: <AHCI channel> at channel 2 on ahci0
ahcich3: <AHCI channel> at channel 3 on ahci0
ichsmb0: <Intel Lynx Point-LP SMBus controller> port 0x4040-0x405f mem 0xc0619000-0xc06190ff irq 18 at device 31.3 on pci0
acpi_acad0: <AC Adapter> on acpi0
acpi_lid0: <Control Method Lid Switch> on acpi0
acpi_button0: <Power Button> on acpi0
atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: [GIANT-LOCKED]
WARNING: Device "psm" is Giant locked and may be deleted before FreeBSD 14.0.
psm0: model Elantech Touchpad, device ID 0
battery0: <ACPI Control Method Battery> on acpi0
orm0: <ISA Option ROM> at iomem 0xcf000-0xcffff pnpid ORM0000 on isa0
coretemp0: <CPU On-Die Thermal Sensors> on cpu0
est0: <Enhanced SpeedStep Frequency Control> on cpu0
Timecounter "TSC-low" frequency 1197228438 Hz quality 1000
Timecounters tick every 1.000 msec
ZFS filesystem version: 5
ZFS storage pool version: features support (5000)
hdacc0: <Intel Haswell HDA CODEC> at cad 0 on hdac0
hdaa0: <Intel Haswell Audio Function Group> at nid 1 on hdacc0
pcm0: <Intel Haswell (HDMI/DP 8ch)> at nid 3 on hdaa0
hdacc1: <Conexant CX20751/2 HDA CODEC> at cad 0 on hdac1
hdaa1: <Conexant CX20751/2 Audio Function Group> at nid 1 on hdacc1
pcm1: <Conexant CX20751/2 (Analog)> at nid 23 and 26 on hdaa1
pcm2: <Conexant CX20751/2 (Right Analog)> at nid 22 and 25 on hdaa1
smbus0: <System Management Bus> on ichsmb0
ugen0.1: <Intel XHCI root HUB> at usbus0
ugen1.1: <Intel EHCI root HUB> at usbus1
uhub0 on usbus0
uhub0: <Intel XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus0
uhub1 on usbus1
uhub1: <Intel EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus1
Trying to mount root from ufs:/dev/ada0p5 [rw]...
(aprobe0:ahcich0:0:0:0): SETFEATURES ENABLE SATA FEATURE. ACB: ef 10 00 00 00 40 00 00 00 00 02 00
(aprobe0:ahcich0:0:0:0): CAM status: ATA Status Error
(aprobe0:ahcich0:0:0:0): ATA status: 51 (DRDY SERV ERR), error: 04 (ABRT )
(aprobe0:ahcich0:0:0:0): RES: 51 04 00 00 00 40 00 00 00 02 00
(aprobe0:ahcich0:0:0:0): Retrying command, 0 more tries remain
(aprobe0:ahcich0:0:0:0): SETFEATURES ENABLE SATA FEATURE. ACB: ef 10 00 00 00 40 00 00 00 00 02 00
(aprobe0:ahcich0:0:0:0): CAM status: ATA Status Error
(aprobe0:ahcich0:0:0:0): ATA status: 51 (DRDY SERV ERR), error: 04 (ABRT )
(aprobe0:ahcich0:0:0:0): RES: 51 04 00 00 00 40 00 00 00 02 00
(aprobe0:ahcich0:0:0:0): Error 5, Retries exhausted
ada0 at ahcich0 bus 0 scbus0 target 0 lun 0
ada0: <ST1000LM024 HN-M101MBB 2BA30001> ATA8-ACS SATA 3.x device
ada0: Serial Number S30YJ9HF401674
ada0: 600.000MB/s transfers (SATA 3.x, UDMA5, PIO 8192bytes)
ada0: Command Queueing enabled
ada0: 953869MB (1953525168 512 byte sectors)
cd0 at ahcich1 bus 0 scbus1 target 0 lun 0
cd0: <HL-DT-ST DVDRAM GUA0N AL00> Removable CD-ROM SCSI device
cd0: Serial Number KYME48F3455
cd0: 150.000MB/s transfers (SATA 1.x, UDMA6, ATAPI 12bytes, PIO 8192bytes)
cd0: Attempt to query device size failed: NOT READY, Medium not present - tray closed
uhub0: 13 ports with 13 removable, self powered
uhub1: 2 ports with 2 removable, self powered
ugen0.2: <HOLTEK USB Keyboard> at usbus0
ukbd0 on uhub0
ukbd0: <HOLTEK USB Keyboard, class 0/0, rev 2.00/4.01, addr 1> on usbus0
kbd2 at ukbd0
Root mount waiting for: usbus0 usbus1
ugen1.2: <vendor 0x8087 product 0x8000> at usbus1
uhub2 on uhub1
uhub2: <vendor 0x8087 product 0x8000, class 9/0, rev 2.00/0.04, addr 2> on usbus1
ugen0.3: <Generic USB2.0-CRW> at usbus0
uhub2: 8 ports with 8 removable, self powered
ugen0.4: <Generic Lenovo EasyCamera> at usbus0
ugen0.5: <vendor 0x0cf3 product 0x3004> at usbus0
drmn0: <drmn> on vgapci0
vgapci0: child drmn0 requested pci_enable_io
vgapci0: child drmn0 requested pci_enable_io
[drm] Unable to create a private tmpfs mount, hugepage support will be disabled(-19).
[drm] Got stolen memory base 0xaba00000, size 0x4000000
sysctl_warn_reuse: can't re-use a leaf (hw.dri.debug)!
[drm] Initialized i915 1.6.0 20200917 for drmn0 on minor 0
VT: Replacing driver "efifb" with new "fb".
start FB_INFO:
type=11 height=1080 width=1920 depth=32
pbase=0xb0000000 vbase=0xfffff800b0000000
name=drmn0 flags=0x0 stride=7680 bpp=32
end FB_INFO
wlan0: Ethernet address: b8:ee:65:5b:32:59
lo0: link state changed to UP
re0: link state changed to DOWN
wlan0: link state changed to UP
uhid0 on uhub0
uhid0: <HOLTEK USB Keyboard, class 0/0, rev 2.00/4.01, addr 1> on usbus0
ugen0.5: <vendor 0x0cf3 product 0x3004> at usbus0 (disconnected)
Accounting enabled
ugen0.5: <vendor 0x0cf3 product 0x3004> at usbus0
ubt0 on uhub0
ubt0: <vendor 0x0cf3 product 0x3004, class 224/1, rev 1.10/0.02, addr 5> on usbus0
WARNING: attempt to domain_add(bluetooth) after domainfinalize()
WARNING: attempt to domain_add(netgraph) after domainfinalize()
Security policy loaded: MAC/ntpd (mac_ntpd)  

Last modified on: May 28, 2023.