tcreech.com

I recently bought a refurbished Lenovo Thinkpad X270. This is a nice machine which I chose for the following unique features:

FreeBSD setup

This works pretty well with FreeBSD 11.2-RELEASE. I run i3 with an OpenAFS client, although I haven’t been brave enough to use a HOME in /afs yet.

The main drawback to using FreeBSD over Linux on this machine right now is that the WiFi is slow – only 802.11abg. I tried OpenBSD 6.3 too and the story was similar. For what it’s worth, OpenBSD 6.3 supports a lot of things on this machine very nicely too, but I do not have a working OpenAFS client on OpenBSD.

/boot/loader.conf

Here’s the /boot/loader.conf I’m using:

# Tell the iGPU to go into deepest sleeps.
compat.linuxkpi.enable_rc6=7
compat.linuxkpi.semaphores=1
# Default is LAPIC for whatever reason; try HPET.
#kern.eventtimer.timer=HPET
# ^^ didn't help much. Going back to LAPIC, since the kernel chose it.
# Unclear if kern.hz=100 does much of anything; used to be recommended for older kernels
kern.hz=100
# Save power on devices that we don't know about
hw.pci.do_power_nodriver="3"
hint.ahcich.1.pm_level="5"
# Enable fancy trackpad support
hw.psm.synaptics_support=1
# Enable trackpoint support
hw.psm.trackpoint_support=1

# boot faster
autoboot_delay="2"

# these values need to be bumped up a bit for desktop usage
kern.maxproc="100000"
kern.ipc.shmseg="1024"
kern.ipc.shmmni="1024"

/etc/sysctl.conf

Here are some /etc/sysctl.conf tweaks:

# Sleep on lid close
hw.acpi.lid_switch_state=S3
# Increase sound latency to reduce hda interrupts.
# According to "systat -vmstat 1", this reduces the interrupt rate by a factor
# of 3 or so.
hw.snd.latency=7

# LCD panel brightness defaults
hw.acpi.video.lcd0.economy=15
hw.acpi.video.lcd0.fullpower=100

# make desktop more responsive under high CPU load
kern.sched.preempt_thresh=224

/etc/rc.conf

And finally, some /etc/rc.conf modifications:

kld_list="/boot/modules/i915kms.ko if_iwm iwm8265fw acpi_video coretemp"
wlans_iwm0="wlan0"
ifconfig_wlan0="WPA DHCP powersave"
sshd_enable="YES"
ntpd_enable="YES"
powerd_enable="NO"
dumpdev="AUTO"
zfs_enable="YES"
slim_enable="YES"
moused_enable="YES"
dbus_enable="YES"
moused_flags="-VH"
powerdxx_enable="YES"
uptimed_enable="YES"
linux_enable="YES"