download

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:

  1. 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:

  1. Edit /etc/sysctl.conf
  2. 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.

  1. cd /tmp
  2. ftp http://koba.devio.us/distfiles/synaptics.diff
  3. cd /usr/src/sys/dev/pckbc
  4. patch -p0 </tmp/synaptics.diff
  5. 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
  6. Build your kernel and reboot
  7. Install autoconf and automake from ports/pkg
  8. cd /tmp
  9. ftp http://koba.devio.us/distfiles/xf86-input-synaptics.tgz
  10. cd /usr/xenocara/driver
  11. tar zxf /tmp/xf86-input-synaptics.tgz
  12. cd xf86-input-synaptics
  13. env XENOCARA_RERUN_AUTOCONF=Yes make -f Makefile.bsd-wrapper obj build
  14. Next generate an xorg.conf since most installs with xrandr autogenerate at run-time. As root: Xorg -configure
  15. mv /root/xorg.conf.new /etc/X11/xorg.conf
  16. 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

If you are using a non-Sandy Bridge Intel graphics card there is a good chance you have 3D already! ATI and Nvidia both are very much unsupported. You can verify your 3D prowess by typing glxinfo

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:

  1. cd /usr/ports/net/pidgin
  2. export FLAVORS=”audio gtkspell”
  3. make install clean
  4. cd /usr/ports/multimedia/gstreamer-0.10
  5. make install all
  6. cd /usr/ports/net/empathy
  7. make install clean

One thought on “OpenBSD Laptop mini-HOWTO”

Comments are closed.