OpenBSD Laptop mini-HOWTO
Awhile back I wanted a fully supported laptop to use as my OpenBSD development machine. I ended up with a Lenovo u150 which has worked out great and the price was right. Along the way of setting it up, I have learned a few tricks to get OpenBSD purring on it. Wanted to share for those who come after me…
APM/ACPI Enable
APM can be easily configured to change your CPU speed based on load:
- Edit /etc/rc.conf.local and add apmd_flags=”-C__“
Suspend on Lid Closing
This can be enabled run-time or with system boot. I will outline the system boot option:
- Edit /etc/sysctl.conf
- Add or uncomment machdep.lidsuspend=1
Synaptics Touchpad Scrolling
Thanks to the great work of Alexandr Shadchin laptop users running -current (4.9 or higher) can scroll and tap-to-click! I will not cover how to grab the -current release of OpenBSD. If that sentence scared you then you should probably skip this until its merged into the tree.
- cd /tmp
- ftp http://koba.devio.us/distfiles/synaptics.diff
- cd /usr/src/sys/dev/pckbc
- patch -p0 </tmp/synaptics.diff
- The patch will ask “which file?” and most cases you can just pick the file name {pms.c,pmsreg.h}, but the last patch chunk I had to put the full path name /usr/src/sys/dev/wscons/wsconsio.h
- Build your kernel and reboot
- Install autoconf and automake from ports/pkg
- cd /tmp
- ftp http://koba.devio.us/distfiles/xf86-input-synaptics.tgz
- cd /usr/xenocara/driver
- tar zxf /tmp/xf86-input-synaptics.tgz
- cd xf86-input-synaptics
- env XENOCARA_RERUN_AUTOCONF=Yes make -f Makefile.bsd-wrapper obj build
- Next generate an xorg.conf since most installs with xrandr autogenerate at run-time. As root: Xorg -configure
- mv /root/xorg.conf.new /etc/X11/xorg.conf
- I am going to assume you want JUST the touchpad configured. If you want more than one pointing device that is outside the constraints of our little talk here
Section "InputDevice" Identifier "Mouse0" Driver "synaptics" Option "Protocol" "wsmouse" Option "Device" "/dev/wsmouse" Option "MaxTapTime" "180" Option "MaxTapMove" "220" Option "VertEdgeScroll" "true" Option "HorizEdgeScroll" "true" Option "TapButton1" "1" Option "SHMConfig" "true" EndSection
3D Graphics
Webcam
I lucked out in that my webcam was detected as uvideo0. Most of my family and friends thankfully used the semi-standards compliant Google Talk. Lets install Pidgin and Empathy with the needed packages to do video chat:
- cd /usr/ports/net/pidgin
- export FLAVORS=”audio gtkspell”
- make install clean
- cd /usr/ports/multimedia/gstreamer-0.10
- make install all
- cd /usr/ports/net/empathy
- make install clean