This page lists and links to pages about laptops, notebooks, and portable computers that work well with NetBSD, are of interest to developers, and are standardized or easy to find.

This page references lots of different device drivers. All of them are built-in to GENERIC kernels and you don't need to load them.


Generic laptop support

Graphics

NetBSD 9.0 supports Intel integrated graphics up to (including) Kaby Lake, Nvidia graphics up to Maxwell, and AMD graphics up to GCNv1. NetBSD 10.0 supports Intel integrated graphics up to Tiger Lake and Nvidia graphics up to Pascal.

Anything newer than this will work, but will use llvmpipe instead of hardware acceleration for OpenGL.

The support includes connecting external monitors over HDMI, DisplayPort, and DisplayPort over USB-C.

For the Intel driver, there may be slight graphical corruptions when using X11 without a compositor. Xfce/MATE include their own compositors, but lightweight window managers can benefit from having picom running.

CPU frequency adjustment

On most ACPI and some non-ACPI laptops, the sysutils/estd package can be used to automatically adjust the CPU frequency depending on system load, and potentially prolong battery life. This modifies the frequency variables exposed by sysctl(8).

Suspend

On ACPI systems, suspend-to-RAM is supported through sysctl hw.acpi.sleep.state=3. This can be triggered through various events (such as lid close) with powerd(8).

Suspend on NetBSD currently seems to work best on ThinkPads.

Input

Many x86 laptops use Synaptics touchpads over an emulated PS/2 interface, which is supported through pms(4), with various adjustable Synaptics-specific sysctl variables.

WiFi

Many x86 laptops with Intel processors will have WiFi cards supported by the iwm(4) driver, or iwn(4) for older models. Atheros 11n miniPCIe cards are supported by the athn(4) driver.

See the afterboot(8) man page for details on connecting to WiFi networks.

USB 11n WiFi adapters such as urtwn(4) and run(4) can also be used, and most/all generic USB ethernet adapters are also well supported. For a fairly complete list, see usb(4).

Unfortunately, WiFi hardware is not particularly standardized compared to most other aspects of modern laptops.

Audio

Essentially all modern x86 laptops use the hdaudio(4) driver.

In the case that switching between speakers and the headphone port is not handled automatically by the hardware, the dacsel mixerctl(1) variable can be modified.

Sensors

Regardless of whether the system is ACPI, NetBSD will expose all sensors (e.g. for temperature and battery) via envstat(8).


IBM / Lenovo

The thinkpad(4) driver provides support for various ThinkPad-specific sensors and function keys.

A number of NetBSD developers use ThinkPads to hack on NetBSD and for everyday usage.

ThinkPad X1 Carbon (Ivy Bridge, i7)

Installled with Coreboot and TianoCore (UEFI) firmware.

Destroy the GPT data with gpt destroy wd0 before installing to the entire disk.

Hardware support is basically perfect aside from the fingerprint reader, for which no driver exists.

  • GPU acceleration works.
  • WiFi is supported through the iwn(4) driver.
  • SD card reader is supported through the sdhc(4) driver.
  • Suspend/resume works.

ThinkPad T22

Works perfect (sound, display, all devices, infrared port not tested).

ThinkPad X60s

Everything works.

ThinkPad X41

Works fine (sound, display, all devices, bluetooth, modem not tested).

ThinkPad X61s

Everything works. Requires PCI_BUS_FIXUP and PCI_ADDR_FIXUP options(4).

ThinkPad X220

  • Video acceleration works, but when using xf86-video-intel (the default), it's advisable to set Option "AccelMethod" "uxa" in xorg.conf.
  • Ethernet is supported through the wm(4) driver.
  • WiFi is supported through the iwn(4) driver.
  • Suspend and resume work.

ThinkPad X230

  • Accelerated graphics.
  • Ethernet is supported through the wm(4) driver.
  • WiFi is supported through the iwn(4) driver.

ThinkPad X250

  • Accelerated graphics.
  • Connecting externals displays works with the miniDP and VGA ports.
  • SD card reader is supported through the rtsx(4) driver.
  • Ethernet is supported through the wm(4) driver.
  • WiFi is supported through the iwm(4) driver.
  • Extra trackpoint buttons: run at least 9.0_STABLE for fixes to the Synaptics driver.
  • Brightness buttons do not work in 9.0 by default. You can bind them to xrandr in your window manager.
  • Webcam will depend on upcoming xhci isochronous pipe support.
  • To record from the internal mic, set mixerctl -w record.source=ADC02
  • Some spam from hdaudio(4) on some reboots, the chip doesn't seem to reset properly. Disappears and boots normally after a few seconds. PR #51734
  • Suspend and resume work.

ThinkPad X260

  • Accelerated graphics.
  • SD card reader is supported through the rtsx(4) driver.
  • Ethernet is supported through the wm(4) driver.
  • WiFi is supported through the iwm(4) driver.
  • Extra trackpoint buttons: run at least 9.0_STABLE for fixes to the Synaptics driver.
  • Webcam will depend on upcoming xhci isochronous pipe support.
  • Suspend and resume work.
  • Bluetooth works.

Asus

Eee PCs were previously very popular hardware, so they're widely available cheaply, tend to work quite well, and what works is documented.

EeePC 701

GPU WiFi SD card reader Ethernet Audio Webcam Suspend/Resume
Supported Supported Supported Supported Supported Supported Supported

EeePC 900

GPU WiFi SD card reader Ethernet Audio Webcam Suspend/Resume
Supported Supported Supported Supported Supported Supported Supported

EeePC 901

GPU WiFi SD card reader Ethernet Audio Webcam Suspend/Resume
Supported Supported Supported Supported Supported Supported Supported

EeePC 1000HA

GPU WiFi SD card reader Ethernet Audio Webcam Suspend/Resume
Supported Supported Supported Supported Supported Supported Supported

PINE64

A number of NetBSD developers use Pinebooks to hack on NetBSD and for everyday usage.

Pinebook and Pinebook Pro do not use ACPI, so certain aspects are different compared to x86 laptops.

Pinebook (Allwinner A64)

  • Support for the display and HDMI output is provided through the Allwinner Display Engine driver. This provides kernel modesetting and a full-resolution video framebuffer, however, the 3D acceleration features of the GPU are not yet accessible - Mesa llvmpipe is used instead.
  • The CPU frequency can be adjusted automatically with estd or with sysctl machdep.cpufreq.*.
  • uvideo(4) webcam works.
  • External WiFI adapters can be used. Support for the internal WiFi - after WiFi system rework?

Pinebook Pro (Rockchip RK3399)

  • Support for the display output is provided through the Rockchip DRM driver. This provides kernel modesetting and a full-resolution video framebuffer, however, the 3D acceleration features of the GPU are not yet accessible - Mesa llvmpipe is used instead. Currently, you can't connect external displays through USB-C.
  • The CPU frequency can be adjusted automatically with estd or with sysctl machdep.cpufreq.*.
  • uvideo(4) webcam works.
  • External WiFI adapters can be used. Support for the internal WiFi - after WiFi system rework? Internal Broadcom WiFi is supported via the bwfm(4) driver in -current. However, external adapters may still be more stable.
  • The display backlight can be adjusted with sysctl.

Pinebook Pro CPU affinity

After setting security.models.extensions.user_set_cpu_affinity=1 in /etc/sysctl.conf, you can run an intensive command on only the "big" CPUs:

$ schedctl -A 4,5 make package

Posted Thursday evening, March 10th, 2011

Pre-made AMIs

The following AMIs are publicly available. You can use them to start a NetBSD instance quickly.

They come with src and pkgsrc bundled under /usr/src/ and /usr/pkgsrc/ respectively, or a bootstrap script to help fetch them when necessary. The bootstrap script can also be used to set up binary packages support using pkgin(1).

Starting with the NetBSD 7.0 AMIs, the images have a very small disk by default. If you launch it with a larger disk, it will resize the root file system on initial boot (through /etc/rc.d/resize_root), expanding it to the full size of your primary disk. The 6.x AMIs default to a 5GB root file system, and do not currently auto-expand.

Note: these AMIs send an email to the maintainer on first launch, to help gauge usage.

amd64 (x86_64) -- 64 bit AMIs

The following AMIs are for 64 bit instances.

NetBSD version us-east-1
(Virginia)
us-west-1
(N. California)
us-west-2
(Oregon)
eu-central-1
(Frankfurt)
eu-west-1
(Ireland)
ap-southeast-1
(Singapore)
ap-southeast-2
(Sydney)
ap-northeast-1
(Tokyo)
sa-east-1
(Sao Paulo)
NetBSD 6.0.6 ami-ee229a86 ami-ab5a4fee ami-43e2ae73 - ami-c62d81b1 ami-6e98be3c ami-c3402df9 ami-7decda7c ami-5fa61242
NetBSD 6.1.5 ami-bc2c94d4 ami-415a4f04 ami-6ffbb75f - ami-f253ff85 ami-989bbdca ami-63402d59 ami-51e2d450 ami-f1a511ec
NetBSD 7.0 ami-bc8fc8d6 ami-7b0b621b ami-9c9f8ffd ami-32e6f45e ami-ac983ddf ami-c8ea2bab ami-8a89d0e9 ami-d7eeccb9 ami-51d0553d

i386 -- 32 bit AMIs

The following AMIs are for 32-bit instances.

Note: eu-central-1 (Frankfurt) does not have instances capable of running 32-bit PV AMIs.

NetBSD version us-east-1
(Virginia)
us-west-1
(N. California)
us-west-2
(Oregon)
eu-west-1
(Ireland)
ap-southeast-1
(Singapore)
ap-southeast-2
(Sydney)
ap-northeast-1
(Tokyo)
sa-east-1
(Sao Paulo)
NetBSD 6.0.6 ami-62249c0a ami-7945503c ami-ede2aedd ami-302e8247 ami-3498be66 ami-1d432e27 ami-b7eadcb6 ami-73a6126e
NetBSD 6.1.5 ami-b618a0de ami-3d5a4f78 ami-3be2ae0b ami-aa2c80dd ami-5a98be08 ami-fd402dc7 ami-3befd93a ami-07a6121a
NetBSD 7.0 ami-569ed93c ami-fa0e679a ami-9f8090fe ami-a460c5d7 ami-4af33229 ami-f98bd29a ami-c5f8daab ami-2bd15447
Posted at midnight, March 13th, 2011

Your first steps within the Amazon Cloud

Quick overview

Before you can start playing with Amazon EC2, you have to create an account on Amazon Web Services, of which EC2, the Elastic Compute Cloud, is part. This is fairly straightforward, and done in two steps:

  1. you "sign-up" directly on Amazon Web Services home-page. This is where you enter your credentials, and confirm your AWS account registration.
  2. you sign-up to EC2 through EC2 AWS home-page. You will be asked some more information, like a credit card (for billing), and a phone-number, for account validation.

What do you need to know?

EC2 uses different types of credentials. In addition to your login and password, you need an access key, a X.509 certificate (with its private key), and a pair of RSA keys, for remote SSH access.

These can be created through the Security Credentials page (also accessible from the Account page):

  1. create the access key. Keep a secured copy of the ID and its associated secret value. These will be used by various scripts later on to perform certain EC2 actions.
  2. note down your account number (different from your access key ID!). This identifier can usually be obtained in the right top part of the page; it is a serie of numbers, separated with dashes: XXXX-XXXX-XXXX.
  3. create, or upload, a X.509 certificate, in PEM format. Keep the private key in a safe place.
  4. lastly, generate Amazon EC2 key pairs that will be used for SSH access. This step will be performed through the Amazon Management Console. Note down the SSH Key Pair Name you chose.

Keep your credentials!

The different credentials created above will be used in various places of EC2, and by a myriad of commands. You are advised to keep them easily accessible, while still reasonably secure regarding their access. Most EC2 tools expect them to be find through a set of environment variables.

For convenience, you could store them under a .ec2 directory inside your $HOME:

$ ls .ec2/                                                                
cert-SOMERANDOMKEY.pem # the X.509 certificate
id_rsa.ec2             # private RSA SSH key
id_rsa.ec2.pub         # public RSA SSH key
pk-SOMERANDOMKEY.pem   # the private key associated to the certificate

then set the environment accordingly:

export EC2_PRIVATE_KEY=$HOME/.ec2/pk-SOMERANDOMKEY.pem
export EC2_CERT=$HOME/.ec2/cert-SOMERANDOMKEY.pem
export EC2_SSH_KEY=$HOME/.ec2/id_rsa.ec2
export EC2_SSH_KEYNAME=<your_ssh_key_pair_name>
export EC2_ACCOUNT_NUM=XXXX-XXXX-XXXX
export EC2_ACCESS_KEY=MYACCESSKEYID
export EC2_SECRET_KEY=MYSECRETACCESSKEY

Please note that the rest of the tutorial will assume that these variables are set.

Installing EC2 API tools

NetBSD provides EC2 API tools, to ease EC2 account management a little bit. The package is found inside pkgsrc, under misc/ec2-api-tools.

cd /usr/pkgsrc/misc/ec2-api-tools
make ACCEPTABLE_LICENSES+=amazon-software-license install

Package depends on Java, so build will take some time to finish. While it builds, just continue reading.

EC2 vocabulary -- last notes

Before starting to play with EC2, you need to be familiar with the EC2 vocabulary used throughout this tutorial.

Briefly said, EC2 uses Xen as virtualization solution. So all operating systems that support Xen para-virtualization can theoretically run inside EC2 as a domU, and NetBSD is one of them.

All operating systems are run as instances, which are, as their name implies, the instantiation of a specific AMI, or Amazon Machine Image. An AMI is an image built from specific snapshots of volumes. The volumes are part of Elastic Block Storage (or EBS for short), which is another service offered by AWS, distinct from EC2.

These instances are tied to a region (a geographical location; typically US East, US West, Europe West, etc.). Each region has availability zones, which can be compared to a sub-region, each one being physically distinct from another. Regions are identified by a name, like us-east-1, eu-west-1. Same goes for availability zones, usually with the region's name as prefix: us-east-1a, us-east-1b, and so forth. Note that resources are not shared between zones, so if you transfer data from one zone to another, you will be charged for it.

AKI, or Amazon Kernel Image, are a specific type of image. It represents the Xen guest para-virtualized kernel, as used by an AMI. Certain AKIs are allowed to boot customized operating systems, e.g. those that are still not officially supported by Amazon. Thanks to PyGrub, it can boot a kernel that resides inside an AMI's snapshot.

Posted in the wee hours of Saturday night, March 13th, 2011

Launching a NetBSD instance in 5 minutes

The easiest and quickest way to start a NetBSD instance under EC2 is via the Amazon Management Console. The only required tool is a web browser and a valid Amazon Web Service account.

Once you are connected to the Amazon Management Console, select the region you are interested in, then click on the instance menu (left part of the panel).

Look for the Launch Instance button. Click on it, choose the Classic Wizard, then select Community AMIs. Enter NetBSD in the search box, wait a few seconds, and a list of possible AMIs will appear. Select the one you want, then continue to the next step. You can also obtain the IDs directly through NetBSD's AMI page.

You will eventually be asked to enter, or create, an SSH key pair. This element is essential, as it is the only way you have to login to your NetBSD instance remotely once it is started. Choose the method you prefer. You can provide your own key pair, provided you have created one earlier, or let Amazon generate one for you, and download the resulting PEM file.

Finish by validating the instance creation.

While the machine starts up, be sure to adjust the firewall rules under "Security Groups" to allow incoming traffic to SSH (port 22/tcp) from anywhere (0.0.0.0/0). If you offer other services, remember to enable them as well.

The virtual machine will then appear in the list of running instances. Select the associated line, and look for its public DNS name, in the details section at the bottom of the page.

Once you have it, you will be able to login to your NetBSD virtual machine, thanks to your private key. For this, use the root account:

ssh -i /path/to/your/private/key.pem root@address-of-the-NetBSD-instance
Posted Saturday afternoon, March 19th, 2011
Posted early Monday morning, March 28th, 2011

How to install NetBSD/emips-current to Microsoft Giano

See: http://www.netbsd.org/ports/emips/NetBsd_excerpt.htm

Japanese version

Requirements

  • Microsoft Windows XP SP3 Home (32 bit) (for example)
  • some hard drive space

How to get softwares

Microsoft Giano

At 2011-02-04, Microsoft Giano Version 3.1 is latest. Download giano.msi file from http://research.microsoft.com/en-us/downloads/02e2edbf-c76c-47d5-b9c0-2c9915c63e98/default.aspx or http://research.microsoft.com/en-us/downloads.

How to get iso image file

Download emipscd.iso from http://nyftp.netbsd.org/pub/NetBSD-daily/HEAD/ or http://ftp.jaist.ac.jp/pub/NetBSD-daily/HEAD/

ftp.jaist.ac.jp is suitable for people in Japan

Recently the ISO image is named as NetBSD-7.99.25-emips.iso or so. Be sure to rename it to emipscd.iso.

How to get and select PuTTY

Download putty.exe from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html. Old PuTTY does not support serial connection. Please use latest version.

If you want to use Japanese locale, please use "PuTTY Gottani-ban 0.60", for example. You can download it from http://yebisuya.dip.jp/Software/PuTTY/.

Preparing

Installing Giano

Follow installer's instruction. You can install Giano under C:\Program Files.

Preparing space for emulated machine

Make c:\emul\NetBSD-emips-current directory.

Copying files to c:\emul\NetBSD-emips-current directory

There is following 3 files in c:\Program Files\Microsoft Research\Microsoft Giano\tests\eMIPS directory.

  • boot.emips
  • Ml40x_2ace.plx
  • Ml40x_bram.bin.

Please copy them to c:\emul\NetBSD-emips-current.

And downloaded emipscd.iso file should be copied to c:\emul\NetBSD-emips-current. Latest boot.emips is included in emipscd.iso. If you can, please use it.

Creating target disk image

If you have installed cygwin or UnxUtils. You can simply use dd command.

Alternatively if you have large files (for example emipscd.iso), You can make target disk image from them.

I do not know target image file should be started by boot.emips or not.

Name of the target disk image is emips3.img.

> cd /d c:\emul\NetBSD-emips-current
> copy /bin boot.emips + \somewhere\somethins.img emips3.img

Setting up PuTTY

Select Connection Type as Serial. Input Serial line to \\.\pipe\usart0 Save this setting to "Saved Sessions".

Start emulator machine

Start Giano

> cd /d c:\emul\NetBSD-emips-current
> "c:\Program Files\Microsoft Research\Microsoft Giano\bin\giano.exe" -Platform Ml40x_2ace.plx

If you see "Access to a non-existent memory" dialog box here. You can simply "Ignore" it.

Start PuTTY

Start PuTTY and connect to \\.\pipe\usart0. And click Retry in the dialog box.

Boot from NetBSD/emips iso image

If you see

NetBSD/emips 5.99.45
Default: 0/ace(0,0)/netbsd
boot: 

then input

boot: 0/ace(1,0)/netbsd
      ~~~~~~~~~~~~~~~~~

Please select vt110 as terminal type. And sysinst is started.

Installing NetBSD/emips

Please install NetBSD. See http://www.netbsd.org/docs/guide/en/index.html.

This process consumes your time.

Supplementary

Networking

Network device is identified as enic0

# ifconfig enic0 inet 192.168.0.200 netmask 0xffffff00

single user mode

boot: 0/ace(1,0)/netbsd -s
      ~~~~~~~~~~~~~~~~~~~~

Clock

It seems that RTC_OFFSET in kernel config file is not needed. RTC is not accurate.

homework

  • This document does not contain instruction about acceleration.
  • Fix boot.
Posted at lunch time on Tuesday, March 29th, 2011