FreeBSD 8.1 on ThinkPad X60

This posting has information relating to FreeBSD 8.1 / FreeBSD 8.2 on the Lenovo Thinkpad X60 and getting things working. I will update this post as things change and new information is available.

Updated: 1-3-2011 This guide works for FreeBSD 8.2 as well.

Updated: 23-2-2011 (bluetooth disable)

Updated: 6-2-2011 (fixed sound section typo, thanks Markand + wireless update)

Updated: 27-1-2011 (card reader, wireless, power saving)

First things first. I chose the i386 netinstall .iso as I have the Core Duo CPU which doesn’t support x64. I also like newest packages, so I prefer to install from the network. I have the X6 UltraBase, so I was able to use a CD boot as opposed to worrying about a USB.

Once I fired up the CD, I chose “Custom install” as I want to know what’s going on. Under “Distributions” I chose: base, kernels, man, proflibs, src (all of it), ports, local. Of course, you may select whatever feels right to you. Commit the changes and let the installation do its thing. After it’s finished, you may want to add some packages, however, I prefer to compile from /usr/ports/ as opposed to using binaries. Your call.

I like to install vim prior to doing anything. You can get it from /usr/ports/editors/vim. Now we can begin the fun stuff. I don’t like sitting next to a router, so I configure wifi first.

ACPI

Suspend to RAM is buggy in 8. Goes to sleep but doesn’t resume. I have commented related lines. You may experiment with them.

Edit /boot/loader.conf

acpi_ibm_load=”YES”

Next, edit /etc/sysctl.conf and add the following

hw.acpi.reset_video=1
hw.acpi.power_button_state=S5
hw.acpi.verbose=1
hw.syscons.sc_no_suspend_vtswitch=0
dev.acpi_ibm.0.events=1

If you want to experiment with resume/suspend, you can also add the following to /etc/devd.conf

notify 10 {
match “system” “ACPI”;
match “subsystem” “IBM”;
match “notify” “0×04″;
action “/usr/sbin/acpiconf -s 3″;
};


Power saving

Enable CPU throttling in /boot/loader.conf

cpufreq_load=”YES”

Then in /etc/rc.conf

powerd_enable=”YES”
powerd_flags=”-a hiadaptive -b adaptive”

-a is for AC power, -b is for battery power

Sound

To get the sound to work properly, add the following module to /boot/loader.conf

snd_hda_load=”YES”

If you wish to build it directly into a custom kernel, add these lines to the kernel configuration

device sound
device snd_hda

To disable the speaker beep, add the following to /etc/sysctl.conf

hw.syscons.bell=0

Use $ mixer to see current sound settings. I like to set

$ mixer vol 90:90
$ mixer pcm 90:90

and then just control volume with hardware buttons.


Wireless

Edit the following files to get Intel PRO/Wireless 3945ABG working under FreeBSD. These examples use WPA as it is most work to setup.

# vim /etc/rc.conf

wlans_wpi0=”wlan0″
ifconfig_wlan0=”WPA DHCP

# vim /boot/loader.conf

if_wpi_load=”YES”

Next, I generate my WPA passphrase and modify the wpa_supplicant file which holds WPA configuration:

# wpa_passphrase ESSIDNAME “password” >> /etc/wpa_supplicant.conf
# vim /etc/wpa_supplicant.conf

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
ap_scan=1
fast_reauth=1

network={
ssid=”network”
scan_ssid=1
proto=WPA
psk=PREVIOUSLY_GENERATED_KEY
}

I add scan_ssid=1 because my essid is hidden (no broadcast). Wireless is now setup.


Video

My main concern was video. X60 has Intel Graphics Media Accelerator 950. Luckily, latest driver combine with FreeBSD 8.1 gives no problems. Get the driver from /usr/ports/x11-drivers/xf86-video-intel/.


Xorg

If you didn’t install Xorg during FreeBSD setup, now is the time to do it. The next sections explain how to get various things working properly. I had mostly everything working without xorg.conf file. You might have to edit the file to add things so you can generate it and edit to your preference. I didn’t have to use one, but you might want to.

# Xorg -configure
# mv /root/xorg.conf.new /etc/X11/xorg.conf

The handbook suggest you enable hal and dbus. I had to in order to get my mouse and keyboard to respond.

# vim /etc/rc.conf

hald_enable=”YES”
dbus_enable=”YES”


Trackpad scrolling

This is the easiest and fastest way to get middle button wheel emulation so you can scroll. In /etc/rc.conf

moused_enable=”YES”
moused_flags=”-V”


Fonts

I add some fonts as I like things to look nicely. In my install I added /usr/local/lib/X11/fonts/TrueType/, /usr/local/lib/X11/fonts/webfonts/, /usr/local/lib/X11/fonts/xorg-font-cyrillic/. Then I modify xorg.conf to add

Modules
Load “freetype”
Files
FontPath “/usr/local/lib/X11/fonts/webfonts/


Flash

As you know, native flash support is not available in FreeBSD still. You may speed things up by clicking on the links in the top right corner of the website to sign the petition and vote up the bug report on Adobe website.

We can get flash working with Linux emulation. My setup was straightforward. I use Opera so my setup was in this order:

/usr/ports/emulators/linux_base-f10/
/usr/ports/www/opera/
/usr/ports/www/opera-linuxplugins/
/usr/ports/www/linux-f10-flashplugin10/

I didn’t have to add any path in Opera or setup any symlinks to get flash working.

Card Reader

I was able to get get card reader working with an SD card in KDE with the following enabled in /boot/loader.conf

mmc_load=”YES”
mmcsd_load=”YES”


Bluetooth disable

I like to hardware disable bluetooth so I get longer battery life. Once IBM acpi is loaded, I can Fn+F5. It will switch on and off the bluetooth without touching wireless (I don’t know if it’s a bug or not, but this works better for me rather than shuffling through wifi as well).

Fin

Leave a Comment




two + = three