FreeBSD on Fujitsu LifeBook E746

Recently, I wanted to use FreeBSD in bare-metal environment. I had been looking for a decent second-hand Lenovo ThinkPad like T480, on a nearby online mall. But I realised Fujitsu LifeBook is less expensive, even if I ship it from USA…

In my work, I had been educated that Fujitsu LifeBook E7 series is a sturdy workhorse for people who care performance and durability but not weight. It comes with metal frame and a metal keyboard rest, which are comfortable to be luxury desktop replacement.

So I ordered two Fujitsu LifeBook E746. I guess it is the last model of E7. Next time, I will switch to LifeBook U749, when second-hand products turn out available.

Booting The Installer

The boot loader worked once I disabled Secure Boot and chose to boot from the USB flash drive. But once the loader had finished its job, the system ran into garbage screen in text mode. After trying quite a few combinations, I found that the way is to change the display mode with the boot loader:

Hit [Enter] to boot immediately, or any other key for command prompt.

Type '?' for the list of commands, 'help' for more detailed help.
OK mode 2
OK boot

After this, the text became larger, the screen fell back to a fail-safe resolution. I could use the installer uneventfully. I rebooted, and used the same steps to get into the installed system. A proper fix would be found later.

Packages and Minimal GUI

My goal is not to set up a full-blown GUI environment. I just want something good enough for running FreeBSD Jails, Bhyve, and VNC, etc. So I installed minimal amount of packages and their dependencies:

pkg install vim-console tmux xorg xsm xdm drm-fbsd12.0-kmod intel-backlight bastille tigervnc-viewer
  • vim-console: console-only visual text editor
  • tmux: terminal multiple
  • xorg: X.org distribution
  • xsm: X session manager
  • xdm: X display manager
  • drm-fbsd12.0-kmod: direct rendering modules for FreeBSD
  • intel-backlight: Backlight control for Intel GPU systems
  • tigervnc-viewer: VNC viewer from TigerVNC

I do not know how to use the X session manager, but it is required by the default script of the X display manager. For context of not modifying the default script (I am lazy), I install one more application. In order to switch to graphical mode, additional DRM modules are needed. The system cannot use generic graphical once it is in the EFI frame buffer mode.

The boot loader configuration /boot/loader.conf are as follows. I enabled modules for wifi, and increased the touchpad sensitivity (because my touchpad is a bit worn out). More important, I set the EFI resolution, and this fixed the problem of corrupted screen. It became no more necessary to call mode 2 on every boot.

if_iwm_load="YES"
iwm8265fw_load="YES"
iwm8000Cfw_load="YES"
ums_load="YES"
efi_max_resolution="1920x1080"
hw.psm.synaptics_support=1
hw.psm.synaptics.max_width=15
hw.psm.synaptics.max_pressure=255
hw.psm.synaptics.min_pressure=8
kern.racct.enable=1

The resource control configuration /etc/rc.conf are as follows. I enabled Wifi modules, XDM display manager, enabled NTP daemon to correct clock drift, enabled mouse, PF firewall.

hostname="******"
dumpdev="NO"
wlans_iwm0="wlan0"
ifconfig_wlan0="WPA DHCP"
xdm_enable="YES"
ntpd_enable="YES"
moused_enable="YES"
pf_enable="YES"
kld_list="/boot/modules/i915kms.ko"

And minimal rules for the firewall, at /etc/pf.conf:

set skip on lo
pass out quick modulate state

Personalisation

I did little personalisation for the default TWM. In paritcular, I changed the menu layout, and set a red title bar to match the red line on the E746. The system-wide configuration is on file /usr/local/share/X11/twm/system.twmrc. Primarily, I changed the colour rgb:2/a/2 to rgb:a/2/2. It changes from green to a soft red color that matches the keyboard quite well.

Final Result

This is how it looks like finally. The keyboard rest is metallic and reflective. It is difficult to find a nice angle and take a nice photo of the computer. Sorry for the shabby photo.

Leave a comment