<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>Passing Curiosity: Posts tagged openbsd</title>
    <link href="https://passingcuriosity.com/tags/openbsd/openbsd.xml" rel="self" />
    <link href="https://passingcuriosity.com" />
    <id>https://passingcuriosity.com/tags/openbsd/openbsd.xml</id>
    <author>
        <name>Thomas Sutton</name>
        
        <email>me@thomas-sutton.id.au</email>
        
    </author>
    <updated>2023-01-08T00:00:00Z</updated>
    <entry>
    <title>Installing OpenBSD on a Microsoft Surface Go 3</title>
    <link href="https://passingcuriosity.com/2023/openbsd-surface-go-3/" />
    <id>https://passingcuriosity.com/2023/openbsd-surface-go-3/</id>
    <published>2023-01-08T00:00:00Z</published>
    <updated>2023-01-08T00:00:00Z</updated>
    <summary type="html"><![CDATA[<p>I have a new Microsoft Surface Go 3 and installed OpenBSD 7.2 to see how it
does as a machine to carry while travelling. The box contained the Surface Go
itself, a 24 W charger with the silly proprietary connector, and a few bits of
paper. I already had a Type Cover keyboard (from the Go I bought when it came
out) so I was pretty much ready to go.</p>
<h2 id="installing-openbsd">Installing OpenBSD</h2>
<ol start="0" type="1">
<li><p>Boot the Surface and let Microsoft Update install a bunch of stuff. Most of
this isn’t important as I blew away the Windows installation completely, but
I guess the firmware updates will probably be useful (and there’s no chance
of getting them installed except through Windows). This takes absolutely
ages. Something on the order of an hour, much of it with a static
“installing updates” screen.</p></li>
<li><p>Download an OpenBSD installer image and write it to a USB storage device. I
used <code>install72.img</code> and the <code>dd</code> command but it doesn’t matter much. Don’t
forget to validate the signature of the image!</p></li>
<li><p>Boot the Surface into firmware mode (hold volume-up, press the power button,
and wait until it enters the firmware before you release volume-up). Disable
Secure Boot and set the boot order to include USB devices.</p></li>
<li><p>Insert the USB device and reboot. I needed a USB-C to USB-A converted for my
USB storage device.</p></li>
<li><p>Go through the OpenBSD installer process. While OpenBSD includes a driver
for the Intel wireless device, the installer doesn’t include the firmware. I
yanked out the USB storage device and inserted a USB Ethernet adaptor I had
handy at the network configuration point. This allowed me to use an HTTP
mirror as the source for the installation and, importantly, let installer
download the appropriate firmware.</p></li>
</ol>
<p>https://jcs.org/2020/05/15/surface_go2</p>
<h2 id="networking">Networking</h2>
<p>The installer identified the firmware packages needed for built-in Intel
wireless adaptor. But running <code>fw_update</code> is probably a good idea.</p>
<p>Configure the WiFi interface by creating <code>/etc/hostname.iwx0</code> with content like
the following:</p>
<pre><code>join HOME_NETWORK wpakey PASSWORD
join WORK_NETWORK wpakey OTHERPASS
dhcp</code></pre>
<p>There are more parameters that can be added; see <code>hostname.if(5)</code> and
<code>ifconfig(8)</code> for details.</p>
<p>I also have a new Google Pixel 7 Pro phone and want to get USB tethering up and
running. Recent Pixel models have stopped using RNDIS protocol for USB
tethering (though OpenBSD does have a driver for RNDIS). This is a good move by
Google! <em>And</em> they’ve moved to using an actual standard: CDC UNM. Unfortunately
OpenBSD does <em>not</em>, as far as I can tell, have a driver that supports CDC UNM
devices.</p>
<p>If your USB tethering device is supported, you can configure <code>hotplugd</code> to
bring up a network connection when you plug it in.</p>
<p>http://www.omarpolo.com/post/openbsd-tethering.html</p>
<h2 id="x-xenodm-and-a-window-manager">X, XenoDM, and a window manager</h2>
<p><code>xtsscale</code> to calibrate the touch screen but you need to find the right XInput
device. <code>xinput --list</code> will show a number of mouse devices (all alike except
for the device and XInput IDs).</p>
<p>I consulted <code>dmesg</code> for the <code>ims</code> devices:</p>
<pre><code>dmesg | grep -E 'ims[0-9]'</code></pre>
<p>On my machine <code>ims0</code> has “button, tip” while <code>ims1</code> also has “barrel, eraser”
listed: clearly <code>ims0</code> is the touch screen and <code>ims1</code> is the stylus support.
The other matched lines in <code>dmesg</code> should mention the <code>wsmouse</code> the corresponds
to each <code>ims</code> device: my machine had <code>wsmouse0</code> and <code>wsmouse1</code> respectively.
Use <code>xinput --list</code> and find the entry for <code>wsmouse0</code>. Then find the XInput ID
(e.g. <code>id=7</code>) and calibrate it:</p>
<pre><code>xtsscale -d 7</code></pre>
<p>If your fingers are as fat as mine the calibration process might take a few
attempts but eventually it will update the calibration parameters for the
running X server and print those same parameters so you can update your
configuration. The details are in <code>xtsscale(1)</code>.</p>
<p>https://www.birkey.co/2022-01-29-openbsd-7-xfce-desktop.html</p>
<p>https://www.tumfatig.net/2019/customizing-openbsd-xenodm/</p>
<p>https://dataswamp.org/~solene/2021-07-30-openbsd-xidle-xlock.html</p>
<p>https://www.tumfatig.net/2021/calibrate-your-touch-screen-on-openbsd/</p>]]></summary>
</entry>

</feed>
