I've got the following to work:
- SD card reader
- play DVDs and audio CDs from an external optical drive
- check battery status
Things that don't work as expected include:
- set the screen brightness via keys
- set the volume via keys
- use any of the acpi sleep modes
Things that I'd expect to work (according to dmesg) but can't test due to the lack of equipment or applications accessing the stuff:
At first, let's review the components of my box. The 8371 is sold in a couple of configurations, so please don't just blindly follow the instructions before making sure your box has the same bits and pieces inside as mine does. The full name of the laptop is Acer TravelMate TM8371-944G50n. According to a sticker on the palmrest (which I removed right after typing this), there is an Intel Core 2 Duo processor SU9400, an Intel GMA4500MHD graphics chip, 4GB of memory, a 500GB HDD, an Acer Nplify 802.11a/b/g/n WLAN chip, and Bluetooth 2.1+EDR, whatever that is. We'll see shortly that the WLAN is nothing to be afraid of, as pciconf knows it better than the sticker.
First one hint about the installation procedure which I forgot to mention last time. The current version (8.1-RELEASE) creates too small a / partition if you use the auto-layout feature of the partition editor. Make sure to have at least 1GB here, as you'll run out disk space with the default (500MB) as soon as you build a custom kernel - and you will have to. I've filed a bug report, but apparently this problem has already been fixed for the next release.
The first file to edit is /boot/loader.conf. This is the place to stick in things that should be loaded or set right at boot time.
verbose_loading="YES" # print verbose loader output during boot
wlan_scan_ap_load="YES" # load wlan stuff
wlan_scan_sta_load="YES" # load wlan stuff
coretemp_load="YES" # intel temp sensor support
hw.psm.synaptics_support="1" # improved touchpad support
Next is /etc/rc.conf, the system configuration file. This file contains two configurations for Ethernet (which I use most of the time) and WLAN (which I enable whenever I need it).
moused must be told which mouse to use. I set it to an external USB mouse as I was not able to use the touchpad under X if moused grabs it as a sysmouse here. Downside is that I don't have a console mouse if there is no USB mouse attached, but this not a high price to pay.
powerd is told to use hiadaptive mode when plugged in and adaptive mode when running on battery. This is to extend battery life as much as possible without sacrificing much speed.
devfs support needs to be added in order to support using an external USB optical drive. The ruleset mentioned here is defined in /etc/devfs.rules (see below)
linux support must be enabled for flashplugin - who wouldn't like to watch paint dry once in a while :-)
# -- sysinstall generated deltas -- # Sat Nov 13 20:42:02 2010
# Created: Sat Nov 13 20:42:02 2010
# Enable network daemons for user convenience.
# Please make all changes to this file, not to /etc/defaults/rc.conf.
# This file now contains just the overrides from /etc/defaults/rc.conf.
powerd_enable="YES" # Run powerd to lower our power usage.
powerd_flags="-a hiadaptive -b adaptive -i 90" # Flags to powerd (if enabled).
/etc/devfs.rules is modified to allow access to an external USB optical drive for everyone. The name of the ruleset must match the one used in rc.conf.
# devfs(8) rules for devices not available at boot time
add path 'cd*' mode 0666
add path 'xpt*' mode 0666
add path 'pass*' mode 0666
/etc/fstab needs an additional entry for the flashplugin to work.
linproc /usr/compat/linux/proc linprocfs rw 0 0
One of my favourite pastimes is to build a custom kernel. Here it is actually necessary in order to support some of the hardware. As always, you should familiarize yourself with building custom kernels by reading the appropriate chapter in the FreeBSD handbook. I've removed a few things which aren't required obviously, although I wasn't really zealous. I'm sure you could dump even more. However, the lazy among you can get away with copying the GENERIC kernel configuration and adding the following lines:
# Intel Wireless support
# SMBus support
The first entry is an interesting one. As mentioned previously, the palmrest sticker claimed there is an Acer Nplify WLAN on board. However, pciconf -lv reports this:
iwn0@pci0:1:0:0: class=0x028000 card=0x13018086 chip=0x42328086 rev=0x00 hdr=0x00
vendor = 'Intel Corporation'
device = 'Carte Intel WiFi Link 5100 AGN (Intel WiFi Link 5100)'
class = network
re0@pci0:2:0:0: class=0x020000 card=0x02831025 chip=0x816810ec rev=0x02 hdr=0x00
vendor = 'Realtek Semiconductor'
device = 'Gigabit Ethernet NIC(NDIS 6.0) (RTL8168/8111/8111c)'
class = network
subclass = ethernet
So there's a plain ol' Intel chip. This is good for us as the Intel chip is supported, the Acer one apparently not (unless they're the same under the hood).
Finally, graphics need to be configured as well. Although xorg does a great job at just working out of the box these days, I needed to tweak a few things. I started by creating an xorg.conf from the xorg defaults (run this as root):
This will generate /root/xorg.conf which you should copy to /etc/X11/.
I'll list only those sections that were added or changed:
Option "AllowEmptyInput" "off"
Identifier "X.org Configured"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Synaptics_Touchpad" "AlwaysCore"
InputDevice "Keyboard0" "CoreKeyboard"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "us,de"
Option "XkbOptions" "grp:lwin_toggle,grp_led:scroll"
Option "XkbVariant" "nodeadkeys"
Option "Protocol" "auto"
Option "Device" "/dev/sysmouse"
Option "ZAxisMapping" "4 5 6 7"
Option "Protocol" "psm"
Option "Device" "/dev/psm0"
Option "SendCoreEvents" "true"
Option "ZAxisMapping" "4 5 6 7"
Option "FingerLow" "26"
Option "FingerHigh" "31"
Option "HorizEdgeScroll" "1"
Option "MinSpeed" "0.1"
Option "MaxSpeed" "0.15"
Option "RTCornerButton" "2"
Option "RBCornerButton" "3"
Option "TapButton2" "2"
Option "TapButton3" "3"
The ServerFlags section must be inserted in order to get mouse and keyboard input to work at all. It is still a mystery to me why xorg defaults to not letting the user interact with it by means of a keyboard or a mouse. Does it expect to be yelled at?
The ServerLayout section receives an additional line that includes the touchpad. Make sure to use the "AlwaysCore" option, not a second "CorePointer" option as with the mouse. Xorg will be upset if you do this.
We'll have to load the synaptics module in order to get improved touchpad support. I tested the builtin touchpad support of the mouse driver as well, but I found it buggy as it inserted random additional mouse events like scroll or left click whenever I used the right touchpad button.
The keyboard is configured for two layouts. I prefer the US layout for programming tasks, but I need to keep the DE layout around for German texts and mails. As you can see, I finally found a way to make use of that apparently superfluous key with that weird Windoze logo on it: now it toggles my keyboard layouts :-)
The final sections set up the touchpad. I've arrived at the settings empirically, using the synclient(1) tool to change them on the fly. From top to bottom, I've made the touchpad slightly less sensitive, switched on horizontal scrolling, and limited the maximum speed to a value that avoids nausea. The last four lines add a middle mouse button at the top right corner and a right mouse button to the bottom right corner. This is convenient e.g. for opening new tabs in Firefox without having to move to the mechanical touchpad buttons.
That's about it. From here, everything else should work just as with your regular desktop in terms of configuration.
How to configure FreeBSD on an Acer TravelMate 8371
I've got the following to work: