Skip to content

Running OpenBSD on a laptop

Posted on:March 13, 2013 at 02:00 AM

I decided to give OpenBSD a try again as “personal laptop OS”. I had previously run OpenBSD on server and tried it also on desktop two years ago, but discarded it because of poor support for my hardware and Adobe Flash (Youtube etc.). The reason for the choice was that I was looking for new experiences: I have been using mostly Debian-based Linux distributions more than ten years. Thus, I wanted to learn new things and try something else.

Target computer was HP Compaq 6710b, which is rather old (bought around 2008), but it has Intel Core 2 Duo processor and 2GB of memory, so it is still very usable – at least on my standards.


The very first thing I learned was that LiveUSB-OpenBSD -project provides ready-made images for booting and installing OpenBSD from USB-stick. Last time I installed OpenBSD, I had to do some fancy tricks to make the installer boot from USB. However, now I just wrote install52.img to USB stick (in Linux, dd if=install52.img of=/dev/devicename) and the installation started when booted from USB. OpenBSD installer is actually very simple and easy to use, although it looks like a bit geeky providing only command line interface.


After the installation, OpenBSD worked pretty much “out-of-box”. During the installation, I was not able to connect to WiFi network, since the default installation image did not include the proper firmware for the device. However, during the first boot, OpenBSD automatically downloaded and installed the proper drivers and WiFi-device was ready. Short documents and description of each component:

Video /

This was easy part. Nothing needed to do, everything just worked, no need to adjust resolution.

Also VGA output works nicely, just plug the VGA connector to laptop and configure using xrandr.

xrandr --output LVDS --off --output VGA --mode 1920x1080 # manually set resolution and output screen
xrandr --auto # automatically adjust the optimal settings


Just works. Like a charm.

Touch pad

Touch pad worked out of box, including “two-finger scrolling”. I only needed to enable “tap-click” functionality and disabled the touch pad while writing with keyboard. Add following commands to X startup:

synclient TapButton1=1
syndaemon -t -k -i 2 -d


Scanning networks (my WiFi card is recognized as wpi0, modify this according to your hardware):

ifconfig wpi0 up
ifconfig wpi0 scan

To connect network (WPA-PSK):

ifconfig wpi0 nwid NETWORK wpakey PASSWORD

Once the device is connected to network, you may obtain IP address (this can be applied to ethernet interface as well):

dhclient wpi0

Suspend / Power management

Suspend/resume -functionality works properly on my laptop. System can be suspended using command zzz provided that APMD is running. Automatic suspend when laptop lid is closed can be enabled by adding line machdep.lidsuspend=1 to /etc/sysctl.conf

APMD can be configure to adapt CPU frequency according to CPU load by adding line apmd_flags="-C" to the file /etc/rc.conf

Install software

At first, set package repository URL (you may want add this to ~/.profile of root)

export PKG_PATH=`machine -a`/

After that, you may want to install some packages (my favourites here):

pkg_add -rv vim firefox youtube-dl vlc

Youtube / Flash videos

This is part where some trade-offs are required. YouTube supports HTML5 videos, which work on OpenBSD. However, playing HTML5 video elements requires quite a lot of resources, thus videos are choppy. Another option is to use youtube-dl application on command line and just download and play the videos manually.

Another online video service that I use actively is Yle Areena. I was honestly surprised to learn that there is yle-dl package for OpenBSD.

Problems / Drawbacks

Suspending the computer by closing laptop lid seems to freeze the system at times. However, suspending manually via command zzz works flawlessly. Otherwise OpenBSD runs on laptop as expected.