<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator><link href="https://www.tspi.at/atom.xml" rel="self" type="application/atom+xml" /><link href="https://www.tspi.at/" rel="alternate" type="text/html" /><updated>2026-11-12T06:42:34+01:00</updated><id>https://www.tspi.at/atom.xml</id><title type="html">tspi.at</title><entry><title type="html">OrcaCubic on FreeBSD: Local Printing Without the Vendor Slicer</title><link href="https://www.tspi.at/2026/09/29/orcacubicfreebsd.html" rel="alternate" type="text/html" title="OrcaCubic on FreeBSD: Local Printing Without the Vendor Slicer" /><published>2026-09-29T00:00:00+02:00</published><updated>2026-09-28T23:58:04+02:00</updated><id>https://www.tspi.at/2026/09/29/orcacubicfreebsd</id><content type="html" xml:base="https://www.tspi.at/2026/09/29/orcacubicfreebsd.html"><![CDATA[<p>When I wrote about the <a href="/2026/07/04/kobrax.html">Anycubic Kobra X</a> a few months ago, the conclusion was somewhat mixed. The hardware was very impressive for a low cost printer, assembly was straightforward and the integrated multi-material system opened up quite a few possibilities. Unfortunately, the software surrounding the printer made using that hardware outside the manufacturers intended environment considerably less convenient than it should have been. The problem was not that I wanted to use their cloud service from another operating system but the opposite. The cloud is something I would not have missed at all (though I get some beginners may prefer it). What was missing was a usable, transparent way to communicate with a printer sitting in my own network. <em>LAN mode</em> existed, but its protocol was undocumented and the practical route to using it led through the manufacturers application, a fork of the famous <a href="https://www.orcaslicer.com/">Orca slicer</a></p>

<blockquote class="disclaimer">
  <p>💡 <strong>TL;DR</strong>: The availability of open software and protocol information changes my view about this printer. Now I can only totally recommend it. Solid hardware, open software interface; still good manufacturer supplied software for all users who like it. Solid product. Very good documentation. <a href="https://wiki.anycubic.com/en/home">Amazing Wiki</a>.</p>
</blockquote>

<p>As described in my article about <a href="/2026/08/30/freebsdeverywhere.html">using FreeBSD on all of my machines</a>, FreeBSD remains the most stable and consistent environment from my point of view. Replacing that environment or keeping another operating system around just to send a file to a printer was not a particularly attractive solution. Fortunately, the situation has changed. <a href="https://github.com/ANYCUBIC-3D/AnycubicSlicerNext">Source is now available for Anycubic Slicer Next</a>, the community project <a href="https://github.com/marcodiniz/OrcaCubic/">OrcaCubic</a> brings Kobra X integration into an OrcaSlicer based workflow, and I have put together a native FreeBSD port. Along the way, an unnecessarily troublesome <a href="https://opencv.org/">OpenCV</a> dependency was removed as well. The complete port and patches are available on <a href="https://github.com/tspspi/OrcaCubicFreeBSD">GitHub (OrcaCubicFreeBSD)</a>.</p>

<ul>
  <li><a href="#the-missing-part-was-not-the-slicer">The Missing Part Was Not the Slicer</a></li>
  <li><a href="#from-anycubic-slicer-next-back-to-orca">From Anycubic Slicer Next Back to Orca</a></li>
  <li><a href="#porting-the-application-instead-of-replacing-the-operating-system">Porting the Application Instead of Replacing the Operating System</a></li>
  <li><a href="#why-opencv-had-to-go">Why OpenCV Had to Go</a>
    <ul>
      <li><a href="#a-short-rant-about-dependency-contracts">A Short Rant About Dependency Contracts</a></li>
    </ul>
  </li>
  <li><a href="#packaging-it-as-a-normal-freebsd-port">Packaging It as a Normal FreeBSD Port</a></li>
  <li><a href="#installing-and-running-orcacubic">Installing and Running OrcaCubic</a>
    <ul>
      <li><a href="#connecting-to-the-kobra-x">Connecting to the Kobra X</a></li>
    </ul>
  </li>
  <li><a href="#current-status-and-limitations">Current Status and Limitations</a></li>
  <li><a href="#conclusion">Conclusion</a></li>
  <li><a href="#references">References</a></li>
</ul>

<p><img src="/assets/images/png/orcacubic01.png" alt="" /></p>

<h2 id="the-missing-part-was-not-the-slicer">The Missing Part Was Not the Slicer</h2>

<p>The original problem was easy to underestimate because a printer profile and a working slicing engine can make the machine appear supported even when its integration is incomplete. The profile describes how a model should be translated into instructions suitable for the printer; sending those instructions requires another layer for device discovery, connection information, authentication, job upload and commands. Status reporting and material selection also have to be integrated. In the <a href="https://www.tspi.at/2026/07/04/kobrax.html">first article</a>, I inspected network traffic and instrumented the manufacturers application, which revealed MQTT and HTTP communication.</p>

<p>This is why an undocumented LAN mode is only part of a solution. The connection may remain local, but the user is still dependent on a particular application to make use of it. I do not think a manufacturer needs to provide a polished application for every operating system in existence. What I do expect is that the interfaces required to operate purchased hardware are available. A convenient vendor application can then be offered on top of those interfaces, rather than becoming a prerequisite for using the device. Such software should never be mandatory.</p>

<h2 id="from-anycubic-slicer-next-back-to-orca">From Anycubic Slicer Next Back to Orca</h2>

<p>The relevant source repository is <a href="https://github.com/ANYCUBIC-3D/AnycubicSlicerNext">AnycubicSlicerNext</a>. Anycubic Slicer Next is based on OrcaSlicer, and its most interesting additions for this purpose are the printer-specific profiles and integration: multicast discovery, token generation and MQTT communication. These are the pieces which had made local operation unnecessarily opaque before. With the source available, the implementation can be inspected and adapted instead of reconstructing its behavior from outside the application. This concerns the slicer and printer integration. The cloud is uninteresting.</p>

<p><a href="https://github.com/marcodiniz/OrcaCubic">OrcaCubic, maintained by marcodiniz</a>, takes the useful route of adding Kobra X integration to an OrcaSlicer fork. It also credits the LAN protocol work from KX-Bridge. This is not the same thing as having the changes merged into stock OrcaSlicer, but it provides a community-maintained application rather than requiring Anycubics vendor-specific fork. For my setup, retaining a general-purpose slicer matters. There is no good reason why adding one manufacturer’s printer should require abandoning support for machines from other manufacturers. OrcaCubic adds local job upload and print control, material-to-slot matching, filament synchronization, and a local device dashboard. The application is therefore addressing the integration layer, not supplying another collection of slicing presets. Its Anycubic cloud connection is not currently implemented; the workflow discussed here is local. That is exactly the direction I wanted to go.</p>

<h2 id="porting-the-application-instead-of-replacing-the-operating-system">Porting the Application Instead of Replacing the Operating System</h2>

<p>With the relevant code available, the next step was to make it build on <a href="https://www.freebsd.org">FreeBSD</a>. As usual, much of this work consisted of cleaning up platform assumptions and conditional compilation. Code which is already close to portable can still be made unnecessarily platform-specific by the way its <code class="language-plaintext highlighter-rouge">#ifdef</code> branches are built. There is an important distinction between code which requires a Linux-specific interface and code which happens to have been written and tested on Linux. The latter should not automatically be hidden behind a Linux-only platform check. Conversely, an <code class="language-plaintext highlighter-rouge">#else</code> branch should not silently assume that every system which is not Windows must behave exactly like Linux. The aim is not simply to add <code class="language-plaintext highlighter-rouge">__FreeBSD__</code> to every condition until the compiler stops complaining. Each condition needs to describe the actual requirement. Shared code should remain shared, and genuinely operating-system-specific behavior should be isolated where it is needed.</p>

<p>This is the sort of portability work I would much rather do than maintain a separate operating system just for one desktop application. It fixes the application at the boundary where the assumption was made, instead of restructuring the rest of the workstation around it. The resulting changes are carried as patches in the port’s <code class="language-plaintext highlighter-rouge">files/</code> directory. There is no need to copy a separately modified OrcaCubic source tree around together with the build instructions.</p>

<h2 id="why-opencv-had-to-go">Why OpenCV Had to Go</h2>

<p>The more annoying obstacle was the dependency tree. OpenCV has repeatedly been a source of dependency trouble in my setups (dont get me wrong, it is an amazing library), and in this case satisfying the requested combination of versions would have required removing a large part of my existing application set. That was not an acceptable trade-off just to install the slicer, so I looked at what OpenCV was actually doing before trying to reconcile the entire dependency graph. For the paths relevant to this port, it was mainly loading images and processing their colors to map them onto available filament colors. Those are useful features, but they do not automatically justify pulling in a large computer-vision framework.</p>

<p>There is a considerable difference between an application built around a broad collection of computer-vision algorithms and an application which needs to decode an image and perform a bounded amount of color processing. A dependency which is reasonable for the former may be a poor fit for the latter. The solution was therefore to remove OpenCV from the patched build rather than trying to make the rest of the workstation accommodate it. The replacement uses <code class="language-plaintext highlighter-rouge">libpng</code> and <code class="language-plaintext highlighter-rouge">libjpeg</code> for PNG/JPEG textures and <code class="language-plaintext highlighter-rouge">wxWidget</code>s existing image handlers for other supported formats. OpenCV is no longer built or directly required. OpenCascade still pulls in FreeImage indirectly on FreeBSD, so this does not remove every imaging library from the dependency tree - I may tackle this later. These details are documented in the <a href="https://github.com/tspspi/OrcaCubicFreeBSD#readme">port README</a>.</p>

<p>The point is not to eliminate every library or pretend that a modern slicer is a tiny application. It is to make the dependencies proportionate to the functionality being used. Image decoding is still delegated to established libraries; an unnecessary additional framework does not have to sit between those libraries and the application.</p>

<h3 id="a-short-rant-about-dependency-contracts">A Short Rant About Dependency Contracts</h3>

<p>In my opinion, this is something application and library developers should take much more seriously. Applications should specify the minimum dependency versions which provide the interfaces they actually require. Libraries should maintain stable API and ABI contracts within their promised compatibility range. A particular developers build environment should not become the only environment in which an application is allowed to exist. Of course, changing an exact-version requirement into <code class="language-plaintext highlighter-rouge">&gt;=</code> does not magically make incompatible releases compatible. That is why interface stability and sensible dependency declarations belong together. Arbitrary pinning should not be used as a substitute for maintaining a usable interface contract. A dependency is not free merely because adding its name to a build file is easy. Every dependency also becomes somebody elses installation problem, update problem, and potential conflict with software which is already installed. In this case, reducing the dependency was more useful than adding another workaround around it.</p>

<h2 id="packaging-it-as-a-normal-freebsd-port">Packaging It as a Normal FreeBSD Port</h2>

<p>The result is a FreeBSD Ports-compatible directory rather than a collection of commands which only work inside my development checkout. Its layout contains the usual <code class="language-plaintext highlighter-rouge">Makefile</code>, <code class="language-plaintext highlighter-rouge">distinfo</code>, <code class="language-plaintext highlighter-rouge">pkg-descr</code>, and <code class="language-plaintext highlighter-rouge">files/</code> directory. The port fetches the selected upstream source, applies the local patches, and builds the application. At the time of writing, the <a href="https://github.com/tspspi/OrcaCubicFreeBSD/blob/master/Makefile">Makefile</a> selects OrcaCubic commit:</p>

<div class="language-text highlighter-rouge"><div class="highlight"><pre class="highlight"><code>822ae314016642d0ed2a362d38ebf15f03852300
</code></pre></div></div>

<p>Pinning the application source is intentional. The patch set needs a defined input; it should not silently be applied to whatever happens to be at the tip of an upstream branch tomorrow. That is a different issue from unnecessarily demanding one exact version of every external library. The port also gives OrcaCubic its own installation location and launcher, rather than replacing an existing OrcaSlicer installation.</p>

<h2 id="installing-and-running-orcacubic">Installing and Running OrcaCubic</h2>

<p>An existing FreeBSD Ports tree is assumed. With Git installed, the repository can be placed directly into the local <code class="language-plaintext highlighter-rouge">print</code> category. As root, and provided the destination does not already contain another checkout:</p>

<div class="language-sh highlighter-rouge"><div class="highlight"><pre class="highlight"><code>git clone https://github.com/tspspi/OrcaCubicFreeBSD.git <span class="se">\</span>
    /usr/ports/print/orcacubic

<span class="nb">cd</span> /usr/ports/print/orcacubic
make <span class="nb">install</span>
</code></pre></div></div>

<p>Alternatively, copy the complete repository directory to <code class="language-plaintext highlighter-rouge">/usr/ports/print/orcacubic</code> and run the same <code class="language-plaintext highlighter-rouge">make install</code> command. The normal <a href="https://docs.freebsd.org/en/books/handbook/ports/">Ports framework</a> handles the build and missing dependencies. This is still a substantial application even without OpenCV. If necessary, build parallelism can be limited:</p>

<div class="language-sh highlighter-rouge"><div class="highlight"><pre class="highlight"><code>make <span class="nv">MAKE_JOBS_NUMBER</span><span class="o">=</span>4 <span class="nb">install</span>
</code></pre></div></div>

<p>After installation, the application should be launched as the normal desktop user. I recommend giving it a separate configuration directory from the beginning:</p>

<div class="language-sh highlighter-rouge"><div class="highlight"><pre class="highlight"><code>orcacubic <span class="nt">--datadir</span> <span class="s2">"</span><span class="nv">$HOME</span><span class="s2">/.OrcaCubic"</span>
</code></pre></div></div>

<p>The installed command is <code class="language-plaintext highlighter-rouge">orcacubic</code>, not a replacement for <code class="language-plaintext highlighter-rouge">orca-slicer</code>. With the default installation prefix, the application and resources reside below <code class="language-plaintext highlighter-rouge">/usr/local/libexec/OrcaCubic</code>. There is also a deliberate safeguard in the <a href="https://github.com/tspspi/OrcaCubicFreeBSD/blob/master/files/orcacubic.in">launcher</a>: without an explicit <code class="language-plaintext highlighter-rouge">--datadir</code>, it uses <code class="language-plaintext highlighter-rouge">~/.OrcaSlicer</code>, but refuses to start when that directory already contains <code class="language-plaintext highlighter-rouge">OrcaSlicer.conf</code>. This prevents silently opening an existing OrcaSlicer configuration with the fork. Supplying a dedicated directory makes the separation explicit.</p>

<h3 id="connecting-to-the-kobra-x">Connecting to the Kobra X</h3>

<p>Enable the printers LAN mode and make it reachable from the workstation on the local network. In OrcaCubic, select the <strong>Anycubic Kobra X</strong> profile, then open <strong>Printer settings → Physical printer</strong>. Select <strong>Anycubic</strong> as the host type, enter the printer’s local IP address, and use <strong>Test</strong> to check the connection. After slicing, select <strong>Print</strong> and review the material-to-slot assignments before starting the job. The <a href="https://github.com/marcodiniz/OrcaCubic#setup">upstream setup instructions</a> describe this workflow. The aim remains communication between the workstation and the printer without requiring a vendor cloud service in the middle.</p>

<h2 id="current-status-and-limitations">Current Status and Limitations</h2>

<p>The snapshot has been built and run on FreeBSD 13.5/amd64, with package creation checked. Model import has been exercised and LAN upload and print start were tested with pre-engage disabled. The Kobra X camera stream is currently not working. This remains an unofficial local port, not an accepted FreeBSD Ports entry. A successful build is of course not a completed validation and features available in an upstream application are not automatically verified on every platform. Initial printer tests should therefore be supervised.</p>

<h2 id="conclusion">Conclusion</h2>

<p>The most useful change since the first Kobra X article is that the integration can now be studied and adapted from source. Anycubic has published slicer source, OrcaCubic provides a community implementation of the local integration and the FreeBSD-specific work can be distributed as a normal port. The OpenCV removal also shows why access to source matters beyond the ability to inspect a protocol: a dependency that fits poorly on another workstation can actually be replaced.</p>

<p>This is how I would like hardware support to work. A manufacturer can provide a convenient default application while allowing other people to support additional operating systems, integrate the device into different workflows and fix problems which the manufacturer may never encounter in its own test environment. There is still work to do here, particularly validating the complete printing workflow and adding camera support, but that work can now happen in the environment where the printer is actually supposed to be used. The printer should fit into the workstations workflow, the workstation should not have to be rebuilt around the printer.</p>

<h2 id="references">References</h2>

<ul>
  <li>The <a href="https://amzn.to/4eo6tkN">Anycubic Kobra X</a></li>
  <li><a href="/2026/07/04/kobrax.html">Anycubic Kobra X - First Impressions</a></li>
  <li><a href="/2026/08/30/freebsdeverywhere.html">Why I Prefer FreeBSD on All of My Machines</a></li>
  <li><a href="https://github.com/ANYCUBIC-3D/AnycubicSlicerNext">Anycubic Slicer Next</a> on GitHub</li>
  <li><a href="https://github.com/marcodiniz/OrcaCubic">OrcaCubic</a></li>
  <li><a href="https://github.com/tspspi/OrcaCubicFreeBSD">OrcaCubicFreeBSD - port and patches</a></li>
  <li><a href="https://docs.freebsd.org/en/books/handbook/ports/">FreeBSD Handbook - Packages and Ports</a></li>
</ul>]]></content><author><name>tsp</name></author><category term="FreeBSD" /><category term="System administration" /><category term="Administration" /><category term="3D printing" /><summary type="html"><![CDATA[The Anycubic Kobra X has interesting hardware, but its undocumented LAN integration made it difficult to use from my FreeBSD workstation without the manufacturers application. This article follows the publication of Anycubic Slicer Next source and the community OrcaCubic fork. It describes a native FreeBSD port, the step to reduce heavy unnecessary dependencies, the local printing workflow and the limits of the tests completed so far.]]></summary></entry><entry><title type="html">From Specialists to a Generalist: Consolidating Knowledge in Neural Networks</title><link href="https://www.tspi.at/2026/09/25/distill.html" rel="alternate" type="text/html" title="From Specialists to a Generalist: Consolidating Knowledge in Neural Networks" /><published>2026-09-25T00:00:00+02:00</published><updated>2026-09-25T01:36:14+02:00</updated><id>https://www.tspi.at/2026/09/25/distill</id><content type="html" xml:base="https://www.tspi.at/2026/09/25/distill.html"><![CDATA[<p>When working with neural networks, it is tempting to start with the largest possible model. A sufficiently large network is created, all available data is thrown at it, and the expectation is that it will eventually learn every task that is required.</p>

<p>There is, however, another way of approaching the problem.</p>

<p>Instead of teaching one large network everything at once, many small networks may first be trained for individual situations, potentially even in parallel. One network becomes very good at task A, another one learns task B, and yet another network handles some particularly unpleasant corner case that occurs only occasionally.</p>

<p>At some point one asks obviously:</p>

<blockquote>
  <p>How do I transfer all of this independently acquired knowledge later into one larger network?</p>
</blockquote>

<p>And this leads to a surprisingly interesting way of thinking about how complex neural systems may be built.</p>

<ul>
  <li><a href="#starting-with-specialists">Starting With Specialists</a></li>
  <li><a href="#learning-from-networks-instead-of-data">Learning From Networks Instead of Data</a></li>
  <li><a href="#why-not-simply-average-the-networks">Why Not Simply Average the Networks?</a></li>
  <li><a href="#the-generalist-needs-context">The Generalist Needs Context</a></li>
  <li><a href="#a-shared-representation">A Shared Representation</a></li>
  <li><a href="#specialists-can-teach-more-than-their-original-labels">Specialists Can Teach More Than Their Original Labels</a></li>
  <li><a href="#filling-the-gaps">Filling the Gaps</a></li>
  <li><a href="#progressive-consolidation">Progressive Consolidation</a></li>
  <li><a href="#catastrophic-forgetting">Catastrophic Forgetting</a></li>
  <li><a href="#keeping-the-experts-around">Keeping the Experts Around</a></li>
  <li><a href="#mixture-of-experts-instead-of-complete-consolidation">Mixture of Experts Instead of Complete Consolidation</a></li>
  <li><a href="#from-task-to-goals">From Tasks to Goals</a></li>
  <li><a href="#the-missing-ingredient-time">The Missing Ingredient: Time</a></li>
  <li><a href="#from-a-bag-of-tricks-to-a-world-model">From a Bag of Tricks to a World Model</a></li>
  <li><a href="#most-likely-the-giant-network-should-come-lkast">Most Likely the Giant Network Should Come Last</a></li>
  <li><a href="#references">References</a></li>
</ul>

<p><img src="/assets/images/png/distill009.png" alt="" /></p>

<h2 id="starting-with-specialists">Starting With Specialists</h2>

<p>Assume a number of independently trained models</p>

[
f_1(x), f_2(x), \ldots, f_N(x)
]

<p>have been created. Each of them solves a <em>different</em> problem or covers a different region of the input space. For example $f_1(x)$ might recognize or correct one particular situation, while $f_2(x)$ is responsible for another one.</p>

<p>The straightforward interpretation would be that these networks have to remain separate forever. An external controller could simply select the appropriate network:</p>

[
y = f_k(x)
]

<p>where some external logic decides which $k$ is currently required. <em>This works and is often a very useful architecture.</em> But it is not the only option.</p>

<p>A larger network may instead be trained to reproduce the behaviour of <em>all</em> the smaller ones. The specialists then stop being merely the final solution. They become <strong>teachers</strong>.</p>

<h2 id="learning-from-networks-instead-of-data">Learning From Networks Instead of Data</h2>

<p>Usually a neural network is imagined as being trained from examples</p>

[
(x_i,y_i)
]

<p>An input $x_i$ is presented and the desired output $y_i$ is known. But once a competent network already exists, it can <em>generate</em> these desired outputs itself. For a specialist network $f_k$, arbitrary suitable inputs may be evaluated:</p>

[
y_i = f_k(x_i)
]

<p>This immediately produces a new training dataset</p>

[
D_k = \left\{ (x_i,f_k(x_i)) \right\}
]

<p>If many specialists exist, their datasets may be combined:</p>

[
D = \bigcup_{k=1}^{N}D_k
]

<p>A larger network $F$ can then be trained on this combined knowledge. One possible formulation is</p>

[
F(x,k) \approx f_k(x)
]

<p>where $k$ identifies the task. Training can then be expressed for example with the mean squared error (MSE) as</p>

[
\mathcal L = \sum_{k,i} \left\| F(x_i,k)-f_k(x_i) \right\|^2
]

<p>Of course the MSE is only an example - for classifiers one often performs distillation on the probabilities, very common with the <a href="https://en.wikipedia.org/wiki/Kullback%E2%80%93Leibler_divergence">Kullback–Leibler divergence</a>.</p>

<p>This is one form of <strong>knowledge distillation</strong>.</p>

<p>The new network does not need to know <em>how</em> the original specialist learned its task, it only requires its behaviour. The knowledge is transferred in function space.</p>

<h2 id="why-not-simply-average-the-networks">Why Not Simply Average the Networks?</h2>

<p>At first sight another idea seems even simpler (and it actually works when models originate from the same initialization or remain in compatible regions of parameter space). If all networks use the same architecture, perhaps their weights could simply be averaged:</p>

[
\theta =
\frac{1}{N}
\sum_k\theta_k
]

<p>Unfortunately this is usually not equivalent to averaging their knowledge. Neural networks contain a large number of internal symmetries. Consider two consecutive layers</p>

[
W_2W_1
]

<p>If the hidden neurons are permuted using a permutation matrix $P$, the same function may be written as</p>

[
(W_2P^{-1})(PW_1)
]

<p>The numerical representation has changed substantially while the represented function has not changed at all. Two independently trained networks may therefore implement very similar behaviour using completely different internal arrangements of neurons. Averaging corresponding weights can consequently combine things that have no semantic relationship whatsoever.</p>

<h2 id="the-generalist-needs-context">The Generalist Needs Context</h2>

<p>There is an important difficulty. Assume one expert has learned</p>

[
f_A(x)=+0.2
]

<p>while another one has learned</p>

[
f_B(x)=-0.2
]

<p>If the general network only receives $x$, both outputs appear to be correct answers for the same input. A sufficiently confused network may learn</p>

[
F(x)\approx0
]

<p>This is not a <em>compromise</em>. It is simply wrong for both tasks.</p>

<p>The larger model therefore needs enough information to distinguish the situations. One possibility is explicit task conditioning:</p>

[
F(x,c)
]

<p>where $c$ describes the task or operating mode. The <em>context</em> may contain a categorical task identifier, but it does not have to. It may also describe the surrounding system state:</p>

[
c = (c_1,c_2,\ldots,c_m)
]

<p>This is important because what appears to be the same sensory situation may require entirely different actions depending on the current operating regime. A generalist network can only become general if it is actually given the information required to distinguish those regimes.</p>

<h2 id="a-shared-representation">A Shared Representation</h2>

<p>Once several related tasks are learned by the same network, something more interesting becomes possible. Instead of maintaining a completely separate representation for every problem, a common encoder may be learned:</p>

[
z = E(x)
]

<p>The latent vector $z$ represents relevant information about the current state. Different task-specific heads can then operate on this shared representation:</p>

[
y_k = H_k(z)
]

<p>The architecture becomes conceptually</p>

<p><img src="/assets/images/png/distill001.drawio.png" alt="An input vector passes an encoder and depending on the encoder specific task networks are executed" /></p>

<p>This is already significantly different from a collection of independent specialist networks. The individual tasks now share a common internal description of the world and can produce useful interactions between them.</p>

<p>Features learned for task $A$ may unexpectedly help task $B$. A property that was originally relevant only to task $C$ may turn out to be useful for task $D$ as well.</p>

<blockquote>
  <p><strong>The network is no simply storing several independent mappings, it learns structure shared by the tasks.</strong></p>
</blockquote>

<h2 id="specialists-can-teach-more-than-their-original-labels">Specialists Can Teach More Than Their Original Labels</h2>

<p>There is another subtle advantage. Suppose a specialist was trained using noisy measurements:</p>

[
y = f^*(x)+\epsilon
]

<p>where $\epsilon$ represents measurement noise. After training, the network may approximate something closer to</p>

[
f(x)\approx E\lbrack y|x \rbrack
]

<p>The trained model has therefore already performed a kind of smoothing. If another network is later trained from the specialist’s output</p>

[
(x,f(x))
]

<p>it may receive a <em>cleaner</em> (filtered) target than the original raw measurements provided.</p>

<p>This sounds slightly paradoxical. A network is being trained from another network rather than from the supposedly more fundamental experimental data. But the teacher may already contain a useful estimate of the underlying relationship.</p>

<p><strong>Distillation</strong> can therefore act not only as <em>compression</em>, but also as a form of <em>knowledge cleanup</em>. Note that this of course only applies to random measurement noise, not to systematic errors.</p>

<h2 id="filling-the-gaps">Filling the Gaps</h2>

<p>Specialists introduce another problem. Each expert usually knows only a limited part of the state space. Assume one model was trained for</p>

[
x\in\lbrack 0,1 \rbrack
]

<p>and another one for</p>

[
x\in \lbrack 3,4 \rbrack
]

<p>Neither model says much about</p>

[
x=2
]

<p>A generalist trained blindly from both experts may produce almost arbitrary behaviour in the gap. This problem becomes especially important in control systems. Interpolation between two valid control regimes is not automatically a valid control regime.</p>

<p>A powerful approach is therefore to deliberately generate states between the known regions. <strong>If a simulator exists</strong>, this becomes particularly attractive. The training process may explore</p>

[
x\sim p_{\mathrm{exploration}}(x)
]

<p>rather than using only the originally observed states.</p>

<p>The specialists can provide supervision where they are competent, while simulated trajectories, measured data or additional optimization can populate the remaining regions. The resulting system may eventually cover a state space <em>much</em> larger than any individual expert encountered.</p>

<h2 id="progressive-consolidation">Progressive Consolidation</h2>

<p>There is no requirement that all specialists have to exist before consolidation begins. <strong>Knowledge may instead be accumulated progressively.</strong></p>

<p>First</p>

<p><img src="/assets/images/png/distill002.drawio.png" alt="" /></p>

<p>Later</p>

<p><img src="/assets/images/png/distill003.drawio.png" alt="" /></p>

<p>and later still</p>

<p><img src="/assets/images/png/distill004.drawio.png" alt="" /></p>

<p>The previous generalist itself becomes another teacher. This is a form of <strong>continual knowledge consolidation</strong>.</p>

<p>The attractive property is that new skills may be added without rebuilding the entire system conceptually from zero. Though there is, besides recursive teacher error accumulation, a serious danger.</p>

<h2 id="catastrophic-forgetting">Catastrophic Forgetting</h2>

<p>If a network is trained only on a new task, parameters useful for older tasks may be overwritten. The model becomes better at the new problem while silently becoming worse at everything it previously knew. This is usually called <strong>catastrophic forgetting</strong>.</p>

<p>A simple mitigation is replay. Representative states from previously learned tasks are retained in a replay dataset $D_{\mathrm{replay}}$. Training then uses both $D_{\mathrm{new}}$ and $D_{\mathrm{replay}}$.</p>

<p>One possible loss is</p>

[
\mathcal L = \lambda_{\mathrm{new}}\mathcal L_{\mathrm{new}} +
\lambda_{\mathrm{old}}\mathcal L_{\mathrm{distill}}
]

<p>The first term teaches the new behaviour, the second one penalizes changes to behaviour that should remain intact. One can think of this as periodically reminding the network to learn the new thing but retain it’s old capabilities. That is surprisingly close to the problem encountered in many continually learning systems.</p>

<h2 id="keeping-the-experts-around">Keeping the Experts Around</h2>

<p>After consolidation, the specialist networks do not necessarily have to be deleted. Keeping them can be extremely useful. <strong>They can act as regression references.</strong></p>

<p>For a set of validation states $x_i$, the consolidated model may periodically be compared against the old expert:</p>

[
\Delta_i = \left\| F(x_i,k)-f_k(x_i) \right\|
]

<p>If $\Delta_i &gt; \epsilon$ something has changed significantly. This gives the system a permanent collection of known-good behaviours against which future versions can be tested.</p>

<h2 id="mixture-of-experts-instead-of-complete-consolidation">Mixture of Experts Instead of Complete Consolidation</h2>

<p>There is also no requirement that everything has to be compressed into one homogeneous network. Another possibility is a <em>learned router</em>.</p>

<p>The system becomes</p>

<p><img src="/assets/images/png/distill005.drawio.png" alt="An input vector gets passed into a learned router layer and depending on the routers decision routed into one of the expert branches" /></p>

<p>The router learns which expert or combination of experts should process a given situation. This is broadly the idea behind a <strong>Mixture of Experts</strong> system.</p>

<p>It offers an interesting compromise. Shared components can learn common representations while specialist components retain their individual competence. Instead of asking whether the final system should consist of specialists <em>or</em> a generalist, both can coexist.</p>

<p>This may actually be the better architecture for sufficiently complicated physical systems.</p>

<h2 id="from-tasks-to-goals">From Tasks to Goals</h2>

<p>The most fascinating transition occurs when the network is no longer explicitly told which task to execute. Initially the system may be formulated as</p>

[
F(x,\text{task})\rightarrow y
]

<p>But <em>tasks</em> are only <strong>human descriptions of desired transformations</strong>. A more general formulation is</p>

[
F(x,g)\rightarrow y
]

<p>where $g$ describes a goal. Instead of saying <em>“execute procedure C”</em> one could eventually specify <em>“move the system toward a state with these properties”</em>.</p>

<p>A global objective may, for example, be written as</p>

[
J(x) = \alpha J_1(x) +\beta J_2(x) -\gamma J_3(x)
]

<p>The specialists then become demonstrations of trajectories that improve different components of $J$. At this point the architecture starts looking substantially less like a collection of classifiers and substantially more like a controller.</p>

<h2 id="the-missing-ingredient-time">The Missing Ingredient: Time</h2>

<p>For many physical systems, the present observation does not fully describe the system. The same measured state can behave differently depending on how it was reached. <em>Hysteresis exists</em>, components settle over time, temperatures drift, mechanical systems exhibit backlash, charges accumulate, there are delays, etc.</p>

<p>Consequently $a_t = \pi(x_t)$ may fundamentally be insufficient. The appropriate action can <strong>depend on history</strong>:</p>

[
a_t = \pi(x_t,x_{t-1},\ldots,a_{t-1},a_{t-2},\ldots)
]

<p>This history can be compressed into an internal state</p>

[
h_t = F(h_{t-1},x_t,a_{t-1})
]

<p>and the controller becomes</p>

[
a_t = \pi(h_t,g)
]

<p>The internal state $h_t$ can be interpreted as the networks current <em>belief</em> about the physical system. At this point something rather interesting has happened. The network is no longer learning individual tasks, it is beginning to construct a model of the system it controls.</p>

<h2 id="from-a-bag-of-tricks-to-a-world-model">From a Bag of Tricks to a World Model</h2>

<p>This suggests a useful progression.</p>

<p>A project may begin with many small networks (<code class="language-plaintext highlighter-rouge">specialist</code>). These networks solve narrow problems very well. Their behaviour is then consolidated:</p>

<p><img src="/assets/images/png/distill006.drawio.png" alt="" /></p>

<p>Additional specialists are added over time:</p>

<p><img src="/assets/images/png/distill007.drawio.png" alt="" /></p>

<p>Eventually temporal state and goals may be included:</p>

<p><img src="/assets/images/png/distill008.drawio.png" alt="" /></p>

<p>And somewhere along this path the nature of the system changes. What originally consisted of many independent tricks starts acquiring a common representation of the environment.</p>

<p>The specialists knew <em>how to react</em>, the consolidated system may eventually begin learning <em>what kind of situation it is in</em>. That is a considerably more powerful abstraction.</p>

<h2 id="most-likely-the-giant-network-should-come-last">Most Likely the Giant Network Should Come Last</h2>

<p>There is a funny reversal in all of this. Modern machine learning often encourages starting with the giant model.</p>

<ul>
  <li>Collect everything</li>
  <li>Train everything jointly</li>
  <li>Scale until the problem disappears</li>
</ul>

<p>But for engineering systems it may sometimes be much more practical to do almost the opposite.</p>

<ul>
  <li>First solve narrow problems</li>
  <li>Make the individual pieces work</li>
  <li>Understand the strange corner cases</li>
  <li>Train small experts until each one is reliable</li>
  <li>Only then ask how their knowledge can be combined</li>
</ul>

<p>The giant network is not the starting point, it is the <strong>consequence of accumulated working solutions</strong>. Instead of hoping that one enormous network somehow discovers every useful behaviour at once, the knowledge can grow piece by piece:</p>

[
\text{experience}
\rightarrow
\text{specialization}
\rightarrow
\text{distillation}
\rightarrow
\text{shared representation}
\rightarrow
\text{generalization}.
]

<p>The small networks are therefore not disposable prototypes on the way toward the real model, they can be exactly how the real model learns what it should become.</p>

<h2 id="references">References</h2>

<ul>
  <li>Goodfellow, Bengio, Courville, <a href="https://amzn.to/4rsvHTY">Deep Learning (Adaptive Computation and Machine Learning series)</a></li>
  <li>Sutton, Barto, <a href="https://amzn.to/4xOnqvh">Reinforcement Learning, second edition: An Introduction (Adaptive Computation and Machine Learning series)</a></li>
  <li>Huyen, <a href="https://amzn.to/4dXHHHs">Designing Machine Learning Systems: An Iterative Process for Production-Ready Applications</a></li>
</ul>]]></content><author><name>tsp</name></author><category term="Artificial Intelligence" /><category term="Tutorial" /><category term="How stuff works" /><category term="Large Language Models" /><category term="Machine learning" /><category term="Computational linear algebra" /><category term="LLM" /><category term="Optimization" /><summary type="html"><![CDATA[Neural network systems are often imagined as being trained from the beginning as one large model that has to learn everything at once. There is another possibility: narrow specialist networks can first be trained for individual situations, and their behaviour can later be distilled into a larger system. This raises interesting questions about conflicting tasks, shared representations, gaps in the state space and catastrophic forgetting. This article follows that idea from a collection of independent experts toward progressively consolidated and goal-conditioned systems. Distillation, replay, shared encoders, learned routing and temporal state are explored along the journey - leading to the perhaps counterintuitive conclusion that for some engineering problems the giant network may make more sense as the consequence of accumulated working solutions than as the starting point.]]></summary></entry><entry><title type="html">When the University Enables PMF: Teaching FreeBSD’s iwm Driver a New Trick</title><link href="https://www.tspi.at/2026/09/15/wifipmf.html" rel="alternate" type="text/html" title="When the University Enables PMF: Teaching FreeBSD’s iwm Driver a New Trick" /><published>2026-09-15T00:00:00+02:00</published><updated>2026-09-28T03:01:20+02:00</updated><id>https://www.tspi.at/2026/09/15/wifipmf</id><content type="html" xml:base="https://www.tspi.at/2026/09/15/wifipmf.html"><![CDATA[<blockquote class="disclaimer">
  <p><strong>The rant</strong>: This is one of the problems where IT departments show that they are no help at all (searching excuses like <em>“oh thats not supported”</em> after doing a breaking change because someone in some hidden away team just flipped a switch) and where people always surface the unhelpful question <em>“Have you asked IT department about this?”</em> (and by the way an IT department is not an helpdesk nor a spreadsheet filling account managing secretariat, they should keep the stuff up and running). Well and as usual: When there is a problem one just has to solve it by oneself. There is never anyone else to do this. So let’s go and solve that problem. And since it’s a technical problem there is always a solution that is not <em>“not supported”</em> or <em>“buy new hardware”</em>.</p>
</blockquote>

<p>My university enabled mandatory <a href="https://www.wi-fi.org/beacon/philipp-ebbecke/protected-management-frames-enhance-wi-fi-network-security">Protected Management Frames</a>, and my beloved notebook stopped connecting. The authentication configuration had worked before; the operating system and wireless card had not suddenly become useless overnight. Nevertheless, a network-side change had turned a routine part of my day into another software project. As I explained in <a href="/2026/08/30/freebsdeverywhere.html">Why I Prefer FreeBSD on All of My Machines</a>, I use <a href="http://www.freebsd.org/">FreeBSD</a> wherever I can, and usually also where somebody suggests that I cannot. I hate unnecessary change, have worked with FreeBSD for decades, and have absolutely no intention of going back to the hell of Windows or switching to chaotic Linux because a wireless feature is missing. Repairing the feature seemed the more reasonable response.</p>

<p>The temporary workaround was mobile-phone tethering followed by a VPN tunnel back into the university network. That was annoying, and it became costly when larger data transfers were involved. It is also worth explaining why the (private) notebook was there in the first place: in our academic setting, employees using their own equipment is perfectly normal. Scientific work brings particular software requirements and direct control of laboratory hardware. A centrally administered device on which every compiler, dependency or driver change becomes an IT request would prevent progress before the experiment had even started. We are not insane about this: laboratory networks are usually closed down and separated according to their purpose. The point is to retain control of the tools needed to do the work.</p>

<p>The result was a working experimental PMF implementation using the existing <a href="https://www.intel.de/content/www/de/de/products/sku/86068/intel-dual-band-wirelessac-8260/downloads.html">Intel Wireless-AC 8260</a> and FreeBSDs <a href="https://man.freebsd.org/cgi/man.cgi?iwm"><code class="language-plaintext highlighter-rouge">iwm</code></a> driver. According to my timing, <a href="https://chatgpt.com/codex/">Codex</a> helped to get to a working driver milestone in about <strong>6 hours and 15 minutes</strong>, and it took that long largely because I was slow at reading suggestions and approving the next steps as well as reviewing code. That is the elapsed development story, not a claim that a complete wireless security qualification can be compressed into an afternoon. The distinction matters throughout this article: authentication and ordinary operation worked on the real notebook, while several security and lifecycle checks remain unfinished.</p>

<blockquote class="disclaimer">
  <p>Source Code is available on <a href="https://github.com/tspspi/iwm_pmf_hack">GitHub</a></p>
</blockquote>

<ul>
  <li><a href="#what-a-protected-wireless-connection-was-still-missing">What a Protected Wireless Connection was Still Missing</a></li>
  <li><a href="#two-different-cryptographic-paths">Two different cryptographic paths</a></li>
  <li><a href="#why-iwm-was-a-useful-place-to-work">Why iwm was a Useful Place to Work</a>
    <ul>
      <li><a href="#why-not-simply-use-the-iwlwifi-driver">Why not Simply Use the <code class="language-plaintext highlighter-rouge">iwlwifi</code> driver?</a></li>
    </ul>
  </li>
  <li><a href="#what-changed-in-the-kernel-and-supplicant">What changed in the Kernel and Supplicant</a></li>
  <li><a href="#replacing-a-driver-without-rebuilding-the-kernel">Replacing a Driver without Rebuilding the Kernel</a></li>
  <li><a href="#what-the-actual-tests-establish">What the Actual Tests establish</a></li>
  <li><a href="#the-same-problem-a-different-ax200-network-card">The same problem, a different AX200 network card</a></li>
  <li><a href="#conclusion-keeping-the-system-i-actually-want-to-use">Conclusion: Keeping the System I Actually Want to Use</a></li>
  <li><a href="#references">References</a></li>
</ul>

<!--
<video autoplay loop muted playsinline poster="/assets/images/png/pmf001.png" width="878" style="display: block; max-width: 90%; height: auto; margin: 0 auto;">
    <source src="/assets/videos/mp4/pmf001.mp4" type="video/mp4">
    <img src="/assets/images/png/pmf001.png" alt="">
</video>
-->

<p><img src="/assets/images/png/pmf001.png" alt="" /></p>

<h2 id="what-a-protected-wireless-connection-was-still-missing">What a Protected Wireless Connection was Still Missing</h2>

<blockquote class="factbox">
<p><strong>PMF and this implementation at a glance</strong></p>
<table border="0">
<tr><th>Property</th><th>Meaning</th></tr>
<tr><td>Original specification</td><td>IEEE 802.11w-2009, later incorporated into IEEE 802.11</td></tr>
<tr><td>Protected traffic</td><td>Selected robust management frames, subject to association/key state</td></tr>
<tr><td>Unicast protection here</td><td>CCMP-128 with the pairwise key</td></tr>
<tr><td>Group protection here</td><td>BIP-CMAC-128 with IGTK and MMIE</td></tr>
<tr><td>Development system</td><td>FreeBSD 14.3-RELEASE-p14 GENERIC, amd64</td></tr>
<tr><td>Wireless adapter</td><td>Intel Wireless-AC 8260, iwm driver</td></tr>
<tr><td>Firmware</td><td>Unmodified stock 22.361476.0 firmware</td></tr>
<tr><td>Userspace</td><td>Modified BSD backend and completion hooks for wpa_supplicant 2.11</td></tr>
<tr><td>Delivery</td><td>Replacement <code>if_iwm.ko</code> plus matching supplicant; private ABI 3</td></tr>
<tr><td>Status</td><td>Working experimental client; complete security qualification remains open</td></tr>
</table>
</blockquote>

<p>A wireless network exchanges several kinds of frames. Data frames carry the traffic we normally think about: an SSH connection, a web request or a measurement file copied from a laboratory computer. Management frames establish and maintain the relationship between a station and an access point. Historically, protecting the data did not automatically protect all of that management conversation. A message claiming that the association had ended could therefore affect a connection even though the application traffic itself was encrypted. PMF addresses selected management frames, including deauthentication, disassociation and robust Action frames, by adding cryptographic protection and replay checks once the necessary keys exist. Its original specification was <a href="https://standards.ieee.org/ieee/802.11w/3736/">IEEE 802.11w-2009</a>, the amendment was subsequently incorporated into the consolidated <a href="https://www.ieee802.org/11/overview.html">IEEE 802.11 standard</a>.</p>

<p>This makes requiring PMF a defensible network-security decision. My objection was to losing a working connection, not to authenticating messages that can tear that connection down. PMF makes certain forged management messages ineffective against a correctly implemented protected association. It does not make a radio channel immune to interference, authenticate every frame sent before a connection exists, or replace the certificate validation used by enterprise authentication. An access point still needs its normal authentication policy, a client still needs to validate the server correctly, and applications still need their own appropriate transport security. Treating PMF as an additional, specific protection is more useful than describing it as a general switch that makes WiFi secure.</p>

<h2 id="two-different-cryptographic-paths">Two different cryptographic paths</h2>

<p>The initial cipher target was <code class="language-plaintext highlighter-rouge">CCMP-128</code> for individually addressed traffic and <code class="language-plaintext highlighter-rouge">BIP-CMAC-128</code> for group management traffic. Those are distinct operations. A unicast robust management frame uses the pairwise key with <code class="language-plaintext highlighter-rouge">CCMPs</code> management-frame-specific nonce and authenticated-data handling. Group-addressed management traffic carries an integrity element with a management key identifier, packet number and authentication code. The body remains readable, but a receiver checks its integrity and rejects an old packet number. Consequently, testing only the Protected bit in the frame header cannot select every PMF verification path. Group management needs its own parsing, key selection and replay state, and it must not accidentally fall through to ordinary data-key handling. The <a href="https://www.cisco.com/c/en/us/td/docs/wireless/controller/ewc/17-10/config-guide/ewc_cg_17_10/802_11w.html">controller documentation for 802.11w</a> also describes the separate management protection and SA Query procedures.</p>

<p>SA Query handles another part of the problem: a station sometimes needs to establish whether its existing security association is still valid instead of immediately accepting an apparent disconnect. Implementing that behavior involves requests, responses, transaction identifiers, retry intervals and a bounded timeout. Association-comeback handling adds another timing boundary between the kernel’s association state and the supplicant’s expectations. These details explain why the project could not be reduced to advertising a capability bit or enlarging a key array. A client needs to negotiate, install the right keys, process the relevant frames and preserve the association state across all those operations.</p>

<h2 id="why-iwm-was-a-useful-place-to-work">Why iwm was a Useful Place to Work</h2>

<p>The most useful property of this particular driver was how much of its cryptographic work already happened <em>in software</em>. Its transmit path calls into <code class="language-plaintext highlighter-rouge">net80211</code> software encryption, and we did not need to introduce hardware management-key offload before implementing PMF. Receive frames were available to software with the information needed for the management protection path. That made it practical to add a private extension around the existing driver and stack interfaces while leaving the firmware itself alone. It was still necessary to verify the behavior on the card; readable source code cannot prove that a particular firmware will deliver every relevant frame in the expected form.</p>

<p>The firmware check was deliberately mundane. The firmware-transfer source file matched the local stock driver and the driver continued requesting firmware through FreeBSDs normal firmware subsystem. The tested card loaded the same <code class="language-plaintext highlighter-rouge">22.361476.0</code> firmware supplied by the stock firmware module. We did not flash the adapter, modify a firmware image or claim that a firmware flag alone would enable the missing feature. Preserving that part of the system reduced the number of moving pieces and made a rollback much easier to reason about.</p>

<h3 id="why-not-simply-use-the-iwlwifi-driver">Why not Simply Use the <code class="language-plaintext highlighter-rouge">iwlwifi</code> driver?</h3>

<p>The Intel 8260 can also be driven by FreeBSDs newer <a href="https://wiki.freebsd.org/WiFi/Iwlwifi">iwlwifi</a> driver in theory, so switching drivers was an obvious alternative to investigate. First switching drivers immediately lead to crashes that where only resolvable by PTX prompt work to get into the system again (what a surprise - the next component that spilled over from Linux that makes stability problems).</p>

<p>Second, it does not remove the underlying PMF problem: FreeBSDs management-frame protection support was still incomplete in the common wireless stack, including <code class="language-plaintext highlighter-rouge">IGTK</code> handling. I therefore stayed with <code class="language-plaintext highlighter-rouge">iwm</code>, whose software-crypto path also made it a particularly convenient place for this experiment.</p>

<h2 id="what-changed-in-the-kernel-and-supplicant">What changed in the Kernel and Supplicant</h2>

<p>The installed <code class="language-plaintext highlighter-rouge">GENERIC</code> kernel already contained important parts of <code class="language-plaintext highlighter-rouge">net80211</code>, so replacing those pieces wholesale would have complicated the goal of delivering a loadable module. Instead, the replacement <code class="language-plaintext highlighter-rouge">if_iwm.ko</code> contains a private PMF implementation and hooks at the necessary driver boundaries. The core handles management <code class="language-plaintext highlighter-rouge">CCMP</code>, <code class="language-plaintext highlighter-rouge">BIP-CMAC</code>, frame classification, replay state, fragmentation, SA Query and association timing. Private session state binds operations to a peer and an association generation. <code class="language-plaintext highlighter-rouge">IGTK</code> slots 4 and 5 remain distinct from data-key slots, while a private pairwise-key copy supports protected management traffic. The design preserves the public net80211 structure layouts and leaves ordinary data processing in the existing stack.</p>

<p>The matching supplicant is equally important. Its BSD backend communicates PMF policy, selected RSN parameters and management keys through a private control ABI. Completion hooks check that the kernel has the required PMF keys and can authorize the matching session before the supplicant reports success. A connection with incomplete management protection must not become an ordinary authorized data connection merely because EAP authentication succeeded. One concrete audit finding concerned a failed key callback: <code class="language-plaintext highlighter-rouge">net80211</code> had already changed its software key before the private management-key installation could fail. The corrected callback therefore revokes private data authorization on failure instead of retaining authorization from the old session. That failure case was exercised offline, not deliberately induced on the campus network to prevent hearth attacks in the IT departement.</p>

<p>Departure ordering also needed care. A disconnect is itself management traffic, and it must be protected while the required key and firmware association still exist. Erasing the key first and trying to construct a departure frame afterward would defeat the purpose. The implementation retains the management context through departure submission and completion, then drains outstanding receive and transmit work before releasing the private state. Generation checks help reject work that belongs to a previous association, including frames that were delayed by reordering or reassembly.</p>

<h2 id="replacing-a-driver-without-rebuilding-the-kernel">Replacing a Driver without Rebuilding the Kernel</h2>

<p>On the tested system we could stop WiFi, destroy its virtual interface normally, unload the current iwm module, load the replacement and recreate the interface without rebooting. Before doing that, we established wired access and temporarily suppressed only the relevant WiFi automation in <code class="language-plaintext highlighter-rouge">devd</code>. Otherwise, automatic interface scripts or module discovery could interfere with the controlled replacement. Every shell command was recorded in a write-ahead journal before execution, so a crash would leave evidence of the last intended operation. The feared interface-destruction hang did not occur during these tests, but successful teardown on one machine is not a universal guarantee.</p>

<p>For ordinary use the replacement module must run with its matching supplicant and the existing trusted network configuration. The intended persistent setup retains the original failover aggregation of wired and wireless interfaces; it does not require abandoning that network design. The deployment approach saves the installed module, places the matching userspace programs in a dedicated directory and selects the new supplicant through a service-specific configuration setting. The authentication configuration stays unchanged. A standalone shell rollback script restores the original driver and service configuration without requiring Python or networking. Persistent boot recovery also needs loader instructions: if a module panics before single-user mode, one must first boot without preloading that module. That recovery path is part of deployment engineering, not evidence that a reboot has already been tested.</p>

<h2 id="what-the-actual-tests-establish">What the Actual Tests establish</h2>

<p>The corrected candidate authenticated to the enterprise network using the unchanged configuration, installed a pairwise key and an <code class="language-plaintext highlighter-rouge">IGTK</code>, and reached the private secured state. An ordinary <code class="language-plaintext highlighter-rouge">DHCP</code> exchange demonstrated data traffic beyond <code class="language-plaintext highlighter-rouge">EAPOL</code>, while a no-op DHCP configuration script preserved the wired address and route setup. A client-requested reauthentication completed another EAP and key exchange without a disconnect. A subsequent deliberate client disconnect and reconnect succeeded with a new session generation. Two protected departures were submitted and completed according to driver/firmware counters, and the stock driver was restored without a crash, hang or reboot. No malformed-frame, replay or disruptive network tests were performed against the live infrastructure.</p>

<p>Those observations have practical value, but they also have limits. We did not observe protected management reception during that session, so BIP receive and SA Query interoperability are not established by the connection result. Departure completion counters are not an independent over-air capture proving what the access point accepted. Offline tests use independently generated cryptographic reference frames and sanitizer-backed harnesses, including key rotation, replay boundaries and teardown ownership, but they cannot certify firmware behavior. Broader lifecycle tests, independent captures and an isolated environment for negative security tests remain necessary. Likewise, receiving a DHCP acknowledgment while deliberately preserving routes is not the same as validating ordinary routed application traffic through the new interface.</p>

<h2 id="the-same-problem-a-different-ax200-network-card">The same problem, a different AX200 network card</h2>

<p>The notebook was not my only machine affected by the change. A Ryzen desktop with an <a href="https://www.intel.com/content/www/us/en/products/sku/189347/intel-wifi-6-ax200-gig/specifications.html">Intel Wi-Fi 6 AX200</a> faced the same mandatory-PMF network, but its FreeBSD 15.1 installation used the newer <a href="https://man.freebsd.org/cgi/man.cgi?query=iwx&amp;sektion=4&amp;manpath=FreeBSD+15.0-RELEASE"><code class="language-plaintext highlighter-rouge">iwx</code></a> driver. It would have been tempting to call that a straightforward port of the notebook work. In practice, it was a different driver with a different division of labour between the operating system and the cards firmware. I kept its source in a separate project tree, built a replacement <code class="language-plaintext highlighter-rouge">if_iwx.ko</code> against that machine’s installed kernel sources, and built a matching supplicant. The existing enterprise authentication configuration remained where it was; the work concerned the missing management-frame protection, not the credentials.</p>

<p>The difference from <code class="language-plaintext highlighter-rouge">iwm</code> made a huge difference.  On the notebook I could do much of the cryptographic work in software and inspect the resulting frames at the driver boundary. The <code class="language-plaintext highlighter-rouge">AX200</code> firmware offloads the receive-side <code class="language-plaintext highlighter-rouge">CCMP</code> and <code class="language-plaintext highlighter-rouge">MIC</code> checks for individually addressed protected management frames and the driver has to interpret that result before software checks the management packet number for replay. Robust management transmit uses software <code class="language-plaintext highlighter-rouge">CCMP</code>, while group-addressed robust management uses the separate <code class="language-plaintext highlighter-rouge">BIP-CMAC</code> and <code class="language-plaintext highlighter-rouge">IGTK</code> path. I connected those paths to a private per-association <code class="language-plaintext highlighter-rouge">PMF</code> state machine, the supplicants required-PMF policy, key installation and deletion, <code class="language-plaintext highlighter-rouge">SA</code> Query and protected departure. The private interface refuses to describe the connection as secured until the pairwise key and an <code class="language-plaintext highlighter-rouge">IGTK</code> are present. That is useful evidence about the implementation state, although it is no substitute for watching every kind of protected management frame on the air.</p>

<p>The first successful association was only the beginning of the second problem. Authentication and DHCP could succeed while ordinary traffic still disappeared and later the firmware reported a fatal error after the station had been running for minutes (a well known effect with the <code class="language-plaintext highlighter-rouge">AX200</code> as google suggested after some search). A connection indicator in the supplicant plainly did not tell the whole story. I found and corrected a duplicate missed-beacon dispatch in the driver, then added a recovery path that takes the station out of its secured RUN state when the firmware dies, resets the device and lets the supplicant authenticate and install fresh keys again. I also retired a transmit watchdog during reset so that an old timer could not continue to act on the new firmware instance. These were driver changes around an <em>unmodified</em> black-box firmware image (such transparent binaries are just a curse). Getting through the firmware interaction and its recovery took roughly <strong>two days</strong>, rather than the notebooks six-hour-and-fifteen-minute first milestone.</p>

<p>The resulting experimental connection did work on the actual network. During the first multi-hour trial, firmware failures caused the station to leave <code class="language-plaintext highlighter-rouge">RUN</code> and reinitialize. Each time it returned to required <code class="language-plaintext highlighter-rouge">PMF</code>, received an address again and completed ordinary WiFi-sourced HTTPS traffic. A guarded reboot then loaded the patched module and matching supplicant automatically. The firmware failed again shortly after startup, but the driver reset it, the supplicant authenticated again and the supervisor restored the WiFi connection. This is now a usable experimental connection, although the cause of the firmware assertion still need work - most likely this was caused by a <em>firmware bug</em> which unfortunately requires a load of reverse engineering since those components are not open source - still not unfixable but requires massively more effort to reconstruct what the firmware blob does, which registers it accesses and in the end - getting rid of the proprietary firmware (such stuff should be open from the start anyways, and this article demonstrates in a nice way why this should be the case).</p>

<p>And all of that because of mandatory PMF, which does not make too much sense on the network this is all about.</p>

<h2 id="conclusion-keeping-the-system-i-actually-want-to-use">Conclusion: Keeping the System I Actually Want to Use</h2>

<p>This project was possible within a day because of the magnificent and fascinating capabilities of OpenAI’s <a href="https://openai.com/de-DE/index/gpt-6-astra/">GPT-6-Astra</a> running in <a href="https://chatgpt.com/codex/">Codex</a>, combined with manual verification and real hardware checks. In my run, the working driver milestone took six hours and fifteen minutes, with a substantial part of that elapsed time attributable to me reading the suggestions and approving the next steps. Codex could inspect the kernel and supplicant together, implement changes, build them, exercise offline harnesses and follow the evidence from the notebook. That is a substantial improvement over treating every missing driver feature as a reason to replace an otherwise useful operating system.</p>

<p>It does of course not eliminate engineering responsibility. A model’s confidence is not a packet capture, an assertion is not an interoperability test and a successful connection is not a security certification. What we achieved was a working <em>experimental</em> path on the hardware I already owned, with the original authentication settings and an approach that can be packaged as a kernel module and matching userspace tools. For me, that is a much better outcome than accepting permanent tethering or changing the operating system. I get to keep using FreeBSD, and the missing capability becomes an implementation problem we can inspect and improve.</p>

<h2 id="references">References</h2>

<ul>
  <li><a href="https://github.com/tspspi/iwm_pmf_hack">GitHub repository containing the patched driver and supplicant</a></li>
  <li><a href="http://www.freebsd.org/">FreeBSD</a>
    <ul>
      <li>FreeBSDs <a href="https://man.freebsd.org/cgi/man.cgi?iwm"><code class="language-plaintext highlighter-rouge">iwm</code></a> driver</li>
      <li>FreeBSDs <a href="https://man.freebsd.org/cgi/man.cgi?query=iwx&amp;sektion=4&amp;manpath=FreeBSD+15.0-RELEASE"><code class="language-plaintext highlighter-rouge">iwx</code></a> driver</li>
    </ul>
  </li>
  <li><a href="https://www.ieee802.org/11/overview.html">IEEE 802.11 standard</a></li>
  <li><a href="https://www.wi-fi.org/beacon/philipp-ebbecke/protected-management-frames-enhance-wi-fi-network-security">Protected Management Frames</a></li>
  <li><a href="https://www.intel.de/content/www/de/de/products/sku/86068/intel-dual-band-wirelessac-8260/downloads.html">Intel Wireless-AC 8260</a></li>
  <li><a href="https://www.intel.com/content/www/us/en/products/sku/189347/intel-wifi-6-ax200-gig/specifications.html">Intel Wi-Fi 6 AX200</a></li>
  <li>OpenAIs <a href="https://chatgpt.com/codex/">codex</a>
    <ul>
      <li><a href="https://openai.com/de-DE/index/gpt-6-astra/">GPT-6-Astra</a></li>
    </ul>
  </li>
</ul>]]></content><author><name>tsp</name></author><category term="FreeBSD" /><category term="Network" /><category term="Security" /><category term="Programming" /><category term="Artificial Intelligence" /><category term="Vibe coding" /><summary type="html"><![CDATA[When my university suddenly required Protected Management Frames (PMF), my FreeBSD notebook with its Intel Wireless-AC 8260 simply stopped connecting from one day to the oher. Replacing the operating system or buying different hardware was not particularly appealing or justified, so the missing functionality became an implementation problem instead. What initially looked like a small Wi-Fi compatibility issue quickly led into the details of 802.11 management-frame protection, CCMP, BIP-CMAC, IGTKs, SA Query and the boundary between FreeBSDs net80211, the iwm driver and wpa_supplicant. Luckily an area that I know pretty well. With the help of Codex, a private PMF implementation for iwm and a matching supplicant backend reached a working hardware milestone within a few hours: enterprise authentication, key installation, DHCP traffic, reauthentication and reconnects all worked on the actual notebook without modifying its firmware. But a successful connection is not the same thing as complete security validation. This article therefore looks not only at how the implementation works, but also at what the tests actually prove, what they do not prove yet, and why packet captures, negative tests and interoperability checks still matter after the WiFi seems to be finally connected.]]></summary></entry><entry><title type="html">Artificial Intelligence doing Vector Graphics: LLM agents and Inkscape</title><link href="https://www.tspi.at/2026/09/13/llminkscape.html" rel="alternate" type="text/html" title="Artificial Intelligence doing Vector Graphics: LLM agents and Inkscape" /><published>2026-09-13T00:00:00+02:00</published><updated>2026-09-14T20:20:51+02:00</updated><id>https://www.tspi.at/2026/09/13/llminkscape</id><content type="html" xml:base="https://www.tspi.at/2026/09/13/llminkscape.html"><![CDATA[<blockquote class="disclaimer">
  <p><strong>TL;DR</strong>: The project is hosted on <a href="https://github.com/tspspi/mcpinkscape">GitHub</a> and <a href="https://pypi.org/project/mcpinkscape/">PyPi</a>. The results of a first test session are two posters, a simple <a href="/assets/pdf/mcpinkscape-A0.pdf">A0 poster about the MCP itself</a> as well as an <a href="/assets/pdf/mcpinkscape-pastel-A0.pdf">alternative pastel version</a></p>
</blockquote>

<p>A colleague told me he was not in the mood to spend one or two hours designing a poster. Naturally, I took that as a reason to spend a few hours developing and testing software to automate the process. The time savings on that first poster might be debatable, but at least there would be something reusable for the next one.</p>

<p>In my previous article about <a href="/2026/08/06/llmfreecad.html">LLMs working with FreeCAD</a>, I described an approach that I find particularly interesting: give a model access to a real application, let it inspect what it has produced, and allow it to keep correcting the result. The editable model and the visual feedback were central to making that work. That same idea has a very natural application in another part of the scientific and engineering workflow: creating figures, diagrams, and posters.</p>

<p>These are documents in which details and especially editability matter. And when a collaborator asks for a correction, it should be possible to change that particular element without rebuilding the entire document.</p>

<p>For this I built <code class="language-plaintext highlighter-rouge">mcpInkscape</code>, an MCP server that gives an agent access to typed vector drawing operations, document inspection, rendering, and export. It can work with SVG documents without an open window, or connect to a running Inkscape session through an optional native bridge. The latter makes something especially interesting possible: a person and an agent can work on the same visible, editable document - in a collaborative fashion.</p>

<p>What appeals to me here is the continuity with the CAD work. The agent has a structured representation it can change and a rendered representation it can inspect. The final deliverable is an ordinary document that I can continue editing myself. The two A0 science posters shown below provide concrete examples of the process, using the project itself as their subject.</p>

<ul>
  <li><a href="#the-idea">The Idea</a></li>
  <li><a href="#the-inkscape-mcp-approach">The Inkscape MCP Approach</a></li>
  <li><a href="#working-together-in-a-live-document">Working Together in a Live Document</a></li>
  <li><a href="#why-visual-inspection-matters-again">Why Visual Inspection Matters Again</a></li>
  <li><a href="#design-requires-a-workflow">Design Requires a Workflow</a></li>
  <li><a href="#review-records-and-validation">Review Records and Validation</a></li>
  <li><a href="#results-a0-science-posters">Results: A0 Science Posters</a></li>
  <li><a href="#current-limitations">Current Limitations</a></li>
  <li><a href="#what-comes-next">What comes next</a></li>
  <li><a href="#references">References</a></li>
</ul>

<video autoplay="" loop="" muted="" playsinline="" poster="/assets/images/png/llminkscape002.png" width="878" style="display:block; max-width:90%; height:auto; margin:0 auto;">
    <source src="/assets/videos/mp4/llminkscape002.mp4" type="video/mp4" />
    <img src="/assets/images/png/llminkscape002.png" alt="" />
</video>

<h2 id="the-idea">The Idea</h2>

<p>The starting point is quite simple: let an agent build graphics out of the same kinds of objects that one would manipulate manually in Inkscape. Rectangles, paths, text, groups, layers, fills, strokes and transformations become operations it can request and inspect.</p>

<p>This is useful because an SVG contains more than its final appearance. A caption can remain a text object. A schematic can consist of named groups. The background, figures, annotations, and main text can occupy separate layers. That structure makes later corrections much easier, both for the agent and for a human editor. For example, a request such as <em>“move the explanation below the diagram and make the figure labels larger”</em> can become a sequence of changes to existing objects. Their contents and relationships can be inspected before and after the edit. Once the result has been rendered, the agent can check whether the larger labels actually fit and whether the revised reading order makes sense.</p>

<p>One can of course generate SVG directly as text. For a small drawing that is often entirely sufficient. A persistent document interface becomes useful <em>as the work grows</em>: the agent can retain object identities, make focused changes, inspect the current state, and obtain visual feedback throughout the process. This also creates a practical meeting point between automated work and manual editing.</p>

<p>The additional gain is the deliberately constrained set of actions. Direct textual editing lets the agent rewrite arbitrary parts of the SVG; the MCP interface instead limits it to defined operations on drawing objects, with typed parameters and validation. In the native live workflow, these operations also pass through Inkscape’s application logic and document model. Together, those constraints narrow the agent’s action space: it chooses an operation such as moving an object or changing a fill, while the application handles the corresponding document changes. This reduces the degrees of freedom the agent has to manage, although it still has to judge whether the resulting design is correct. The offline backend applies the MCP interface’s own constraints without executing edits inside the running Inkscape application.</p>

<p>Scientific communication is a particularly appealing use case. A plot might originate in an analysis program, a schematic might be assembled from vector objects, and the surrounding explanation might need several rounds of revision. Inkscape can be the place where these elements become one coherent figure or poster, while the underlying analysis remains in the tools that produced it.</p>

<h2 id="the-inkscape-mcp-approach">The Inkscape MCP Approach</h2>

<p>The project exposes drawing operations through the <a href="https://modelcontextprotocol.io/">Model Context Protocol</a>, allowing an MCP-capable agent to discover and call them. The server provides both local <code class="language-plaintext highlighter-rouge">stdio</code> and authenticated Streamable HTTP transport. The choice of transport is separate from the choice of document backend: HTTP does not itself imply live GUI editing and a local agent can also work through the native bridge.</p>

<p>The HTTP endpoint is <strong>not designed to be exposed directly to the public internet</strong>. It is intended to run behind a reverse proxy that provides TLS and appropriate access controls, or to be reachable only on a protected subnet. API-key authentication does not replace that deployment boundary.</p>

<p>There are three backend paths, with deliberately different capabilities.</p>

<ul>
  <li>The <strong>offline SVG backend</strong> creates and edits documents under a configured document root. It supports document lifecycle operations, layers, stable object IDs, geometry, text, appearance, and composition. Inkscape’s command-line renderer supplies PNG snapshots and the export path. No running GUI or native extension is needed for this workflow, although rendering and export still depend on the Inkscape executable.</li>
  <li>The <strong>active-window CLI backend</strong> provides a more limited compatibility path to a running Inkscape window. It probes the actions advertised by the installed executable and exposes supported selection, style, transformation, and rendering operations. This is useful, but it does not provide the full collaborative drawing surface or revision protection of the native extension.</li>
  <li>The <strong>native C++ bridge</strong> operates inside Inkscape and executes supported edits on the GUI thread. It supplies live drawing, inspection, styling, transformations, structure changes, named undo transactions, snapshots, and change polling. Because it is an optional component, the server advertises its tools according to the methods the connected bridge actually supports.</li>
</ul>

<p>The drawing surface includes:</p>

<ul>
  <li>Rectangles, circles, ellipses, lines, polylines, polygons, paths, and text</li>
  <li>Fill and stroke styling, opacity, gradients, and page background</li>
  <li>Movement, rotation, scaling, grouping, duplication, and stacking order</li>
  <li>Embedded PNG and JPEG assets from the configured document area</li>
  <li>Document and object inspection, bounds queries, and rendered snapshots</li>
  <li>Editable SVG, plain SVG, PNG, and PDF output</li>
</ul>

<p>Absolute SVG units such as millimetres and points are supported, which is convenient when the requested result has a physical size. An A0 poster can start with its actual page dimensions instead of an arbitrary pixel canvas that must be interpreted later.</p>

<p>There is an important architectural difference from the FreeCAD bridge described in the earlier article. This server exposes a bounded set of typed operations. It does not accept arbitrary Python, shell commands, raw SVG replacement, or arbitrary Inkscape action strings from the agent. The interface describes changes to a drawing, and the implementation decides how to carry them out.</p>

<p>That also helps keep the workflow understandable. An operation that moves a known text object or changes its stroke has a much more specific meaning than a general script. Object identities and revisions provide something concrete to inspect when a change needs to be understood or corrected.</p>

<h2 id="working-together-in-a-live-document">Working Together in a Live Document</h2>

<p>The live bridge lets the agent participate in an ordinary editing session. Its changes appear in Inkscape, and the user can continue manipulating the document with the familiar interface. This immediately introduces a problem: the state the agent last inspected may no longer be current. Suppose it plans a change to a caption, but I move that caption and alter the surrounding layout before the edit arrives. Applying the original plan without checking could damage the new arrangement.</p>

<p>The native bridge therefore supports document revisions and expected-revision checks. An edit based on an outdated revision can be rejected, allowing the agent to inspect the updated document before deciding what to do next. Polling also exposes document and selection changes, including changes made directly by a person in Inkscape. Selection state is tracked separately because selecting an object is different from modifying the drawing.</p>

<p>This does not automatically resolve a disagreement about design. It gives the agent a way to notice that its assumptions need updating. That is a useful foundation for collaboration: inspect the current state, apply a bounded change, and inspect again.</p>

<p>Named undo transactions make the changes easier to navigate from the application side. The native bridge connection stays local to Inkscape; on FreeBSD and Linux it uses a private Unix-domain socket in the users <code class="language-plaintext highlighter-rouge">~/.local</code> directory. The optional remote MCP transport sits outside that local connection and applies its own API-key and document-access policies.</p>

<p>This supports a shared editing process. The user can adjust the overall direction, reposition a region, or select something that needs attention. The agent can handle repetitive changes, assemble a first composition, or work through a series of corrections while keeping the document editable throughout.</p>

<h2 id="why-visual-inspection-matters-again">Why Visual Inspection Matters Again</h2>

<p><a href="/2026/08/06/llmfreecad.html">The same lesson from FreeCAD</a> appears here almost immediately: <strong>a successful tool call does not establish that the result is right</strong>.</p>

<p>A text object may contain the requested words and occupy the intended coordinates, yet be difficult to read. Two objects may remain inside the page while overlapping each other. Every section may be present, but the page can still give the reader no clear indication of where to start.</p>

<p>Object inspection and bounds checks answer useful structural questions. Rendered feedback answers a different set of questions: what does the page actually communicate, which elements compete for attention, and which details disappear at the intended reading scale? The distinction is especially clear with posters. A full-page overview helps judge the overall hierarchy and balance. A detail view helps inspect captions, labels, symbols, and line breaks. Both are needed. A composition that looks convincing as a thumbnail may contain text that is much too small, while individually tidy panels can add up to an overcrowded page.</p>

<p>The intended <em>loop</em> is therefore straightforward: build a composition, render it, diagnose a specific problem, make a targeted correction and render again. The diagnosis matters. <em>“The caption is too close to the arrow”</em> suggests an actionable change. <em>“Make it more professional”</em> leaves a great deal unresolved.</p>

<p>Export adds another boundary. Inspecting the live canvas does not establish that the delivered PDF has the intended page dimensions, fonts, and appearance. The exported result needs its own review. Rendering the PDF separately checks the export through another path, although it still does not replace a physical print proof.</p>

<p>This is closely related to the independent representations discussed in the <a href="/2026/08/06/llmfreecad.html">CAD article</a>. Here they are the object structure, numerical bounds, rendered document, extracted text, and exported page. Each can reveal errors that are easy to miss in the others. Agreement between them is useful evidence, even though the communication itself still needs human judgment.</p>

<h2 id="design-requires-a-workflow">Design Requires a Workflow</h2>

<p>The repository includes a coding-agent skill, a tool catalog and separate design and delivery-review guides. These describe how to approach the task as a piece of communication, beyond the mechanics of calling drawing tools.</p>

<p>The starting point is the brief: who will read this, what should they understand, what format will they encounter, and which content must be preserved? An attended scientific poster can support a conversation with its author. A standalone explanatory poster has to supply more of that context itself. A folded leaflet introduces a physical reading sequence that cannot be inferred from its flat layout alone.</p>

<p>Typography, colour, and composition follow from those requirements. The guidance encourages deliberate text roles, a visible reading route, and meaningful use of colour. It also makes an important point about crowded pages: shrinking every label is not a satisfactory default response to running out of room. The structure or amount of content may need reconsideration.</p>

<p>For scientific work, the relationship between claims and evidence is part of the design problem. Units, legends, uncertainty, and source information have to survive the layout process when they are needed to interpret a figure. A conceptual illustration must remain distinguishable from a measurement. Attractive composition cannot compensate for a misleading scientific statement.</p>

<p>The editable document supports this discipline. Named layers and stable object IDs let the agent return to the exact caption, figure, or annotation that requires correction. Rendering then checks whether the change achieved its intended effect.</p>

<p>The review guidance also distinguishes a concept, a reviewable document, a production candidate, and an externally approved result. These are useful descriptions of what has actually been checked. A PDF export can be reviewed on screen while printer-specific requirements and a physical proof remain open.</p>

<h2 id="review-records-and-validation">Review Records and Validation</h2>

<p>A useful part of the Codex workflow is making the review explicit and keeping its results alongside the drawing. The source SVG and exported files are accompanied by a record of the requirements, checks, observations, and remaining work. This is a workflow guided by the project’s skill and review instructions; the MCP server supplies drawing and inspection tools, while the agent assembles and interprets the evidence. There is no single tool call that certifies a design as correct.</p>

<p>The process starts by separating confirmed constraints from assumptions. Page dimensions, required wording, supplied figures, and requested output formats can become concrete checks. Missing information, such as a printer’s colour profile or a fold specification, remains an explicit assumption or open requirement. That distinction prevents the agent from quietly treating an unspecified production detail as something it has already satisfied.</p>

<p>The review then examines several different aspects of the document:</p>

<ul>
  <li><strong>Content and structure:</strong> Are the required text and figures present? Do labels retain the correct units and symbols? Are important elements still editable, and have temporary construction objects been removed?</li>
  <li><strong>Geometry and layout:</strong> Are the page dimensions correct? Do object bounds reveal content crossing a page or column boundary? Are alignment, spacing, and grouping consistent with the intended composition?</li>
  <li><strong>Rendered appearance:</strong> Is the main message apparent in an overview? Are captions and figure labels readable in detail? Are there collisions, clipping, awkward line breaks, or competing visual elements that the structural checks missed?</li>
  <li><strong>Export integrity:</strong> Does the delivered file have the expected page count and dimensions? Where relevant tools are available, are PDF fonts embedded and required text retained? Does a separate render of the export agree with the intended composition?</li>
  <li><strong>External requirements:</strong> Which checks still need a domain reviewer, a printer specification, an accessibility assessment, or a physical proof?</li>
</ul>

<p>These checks use different kinds of evidence. Object queries and saved bounds tables support geometric inspection. Extracted text helps identify missing content or unexpected substitutions, but cannot establish that the text is legible on the page. A rendered overview supports a judgment about hierarchy, while a detail render supports a judgment about a particular label. PDF metadata and font reports address properties of the exported file. Some of these checks require separate analysis utilities available to Codex in addition to the MCP tools.</p>

<p>The record gives each check a status such as <code class="language-plaintext highlighter-rouge">pass</code>, <code class="language-plaintext highlighter-rouge">fail</code>, <code class="language-plaintext highlighter-rouge">not_run</code>, or <code class="language-plaintext highlighter-rouge">not_applicable</code>, together with a reason or reference to the evidence. A compact JSON file or a short Markdown record is sufficient; the exact filename is less important than preserving what was checked and against which artifact. Retaining the document revision also helps relate a review to the state it actually describes. Tool receipts can record which operations were accepted, but an accepted operation alone says nothing about whether the resulting layout communicates well.</p>

<p>For example, a general review might record that the required content is present and the page dimensions are correct, but that a figure’s labels are unreadable in the detail render. The next action is then specific: enlarge or rearrange those labels, render again, and inspect the affected figure and surrounding layout. If the change affects the exported result, the export and its checks need updating as well. A favorable review of an earlier revision cannot simply be carried forward after a consequential edit.</p>

<p>This makes the record useful during the work, rather than only as documentation at the end. It gives Codex a concrete set of unresolved issues to return to and helps a human reviewer understand why another correction was made. A failed check stays visible until the problem is corrected and checked again. An unperformed check remains <code class="language-plaintext highlighter-rouge">not_run</code>; it does not become a pass because the rest of the page looks convincing.</p>

<p>The resulting delivery stage follows from that evidence. A <strong>concept</strong> explores direction and placement. A <strong>reviewable</strong> document has been rendered and checked against the known content and format constraints. A <strong>production candidate</strong> also incorporates the supplied production requirements and has had its requested export inspected. <strong>Approved</strong> is reserved for the required external approval or physical proof actually being recorded.</p>

<p>The record ties each assessment to observations. Numerical validation can establish a page size precisely. Visual review can identify a crowded diagram, but remains a judgment by the reviewing model or person. Neither proves that a scientific conclusion is sound or that a physical print will reproduce as intended. Keeping the individual findings and their limits visible makes it much easier to decide what is ready to use and what still needs attention.</p>

<h2 id="results-a0-science-posters">Results: A0 Science Posters</h2>

<p>The two posters shown below make the workflow concrete. They describe <code class="language-plaintext highlighter-rouge">mcpInkscape</code> itself, so they also demonstrate the kind of technical communication the project is intended to support. The recorded run below shows the creation of the first displayed poster; the second explores an alternative design.</p>

<p>The first displayed poster is portrait A0, 841 by 1189 millimetres. Its saved SVG contains 196 drawable elements: 126 editable text objects and 70 vector shapes, excluding the three layer groups and document metadata. There are no raster images embedded in the document.</p>

<p>That distinction matters for future revision. The poster’s labels and explanations remain text, and its diagrams remain objects that can be selected and changed. The delivery record also includes checks of the A0 PDF page size, embedded font subsets, object bounds, extracted text, and separate live and PDF renders.</p>

<p>The example shown in the video uses named Structure, Figures, and Text layers. Its validation record lists 126 text objects, no embedded raster images, and a one-page A0 PDF with all five font subsets embedded. It records review of the live overview, a feedback detail, and a separately rasterized PDF. Its recorded delivery stage is <em>reviewable</em>; physical print proof and printer-specific preflight were not performed.</p>

<p>One small artifact from that recorded example is particularly illustrative: a feedback correction selects a specific text object, moves it, and requests another page render. That is exactly the kind of focused iteration this interface is meant to support. A finished-looking page can still be adjusted at the level of an individual object, followed by another visual check.</p>

<p>There is also a practical boundary worth preserving in the description of these runs. The native tool surface used for the posters did not expose document opening and saving. GUI actions handled those steps; typed native MCP operations created the artwork and text, and MCP handled the subsequent exports. The examples demonstrate a working composition and review process with that division of responsibilities.</p>

<p>A complete poster exercises exact wording, typography, diagrams, physical page dimensions, visual hierarchy, document organization, and export together. The saved artifacts and review records show how those concerns can be handled within one iterative workflow.</p>

<p>The following video shows the full process of producing the first poster shown below in Inkscape. It gives a more direct impression of the agent working on the document than the finished poster alone can convey.</p>

<iframe width="560" height="315" src="https://www.youtube.com/embed/i3NMtjDiHq0?si=rP4YjqeB_8eOnsEb" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen=""></iframe>

<p><a href="/assets/pdf/mcpinkscape-A0.pdf"><img src="/assets/images/jpg/mcpinkscape-A0-preview.jpg" alt="A0 science poster about mcpInkscape, created through the native live bridge with editable text and vector diagrams" /></a></p>

<p>The A0 poster created in the recorded live MCP session. The original SVG retains editable text and named layers.</p>

<p>The second example is exploring a pastel palette and a different typographic treatment of the same subject. This is another useful direction for the workflow: keeping the technical message while revisiting how the page introduces and organizes it. The design uses the headline <em>“Ideas become editable”.</em>, with vector artwork illustrating an editable curve.</p>

<p>Its saved SVG contains 262 drawable elements: 126 editable text objects and 136 vector shapes, again excluding the three layer groups and document metadata. It also contains no embedded raster images.</p>

<p><a href="/assets/pdf/mcpinkscape-pastel-A0.pdf"><img src="/assets/images/jpg/mcpinkscape-pastel-A0-preview.jpg" alt="Pastel A0 poster about mcpInkscape, headed Ideas become editable" /></a></p>

<h2 id="current-limitations">Current Limitations</h2>

<p>The project ist still work in progress (at the time of writing at an RC1 implementation). The offline and CLI compatibility testing has happened on FreeBSD with Inkscape 1.4.3, and native live testing was performed against a matching Inkscape 1.4.4 fixture.</p>

<p>The native bridge is a separately built C++ component that <em>must match the Inkscape build and its ABI</em>. Installing the Python package alone does <strong>not install that extension</strong>. Offline operation remains available without it, and capability discovery tells the agent which live operations are actually supported.</p>

<p>The active-window fallback also has narrower guarantees. It targets the focused window, depends on the installed action set, and cannot provide the native bridges revision-conflict protection. Those differences need to remain visible to the agent using the tools.</p>

<p>Finally, review has limits. The poster records provide evidence about editable structure, dimensions, fonts, bounds, and rendered output. They do not establish reader comprehension or physical print quality. A scientific figure still needs its scientific content checked, and a production job still needs the requirements of its actual destination applied.</p>

<h2 id="what-comes-next">What comes next</h2>

<p>The direction I find most interesting is connecting this drawing workflow to the rest of a research or engineering task. An agent could gather information from laboratory books and publications, prepare a plot using an analysis tool, assemble it with a schematic and explanatory text in Inkscape, review the combined figure, and then revise the composition when the data or explanation changes.</p>

<p>The boundaries between these steps can remain clear. The analysis program produces the scientific result. Inkscape supplies the editable composition. The agent coordinates the work and checks the representations available to it. That makes it easier to preserve the origin of a figure while still automating much of the repetitive layout work around it.</p>

<p>There is also room to improve the shared editing experience: noticing human changes promptly, preserving deliberate manual adjustments, and making long sequences of agent edits easy to inspect and undo. Revision checks and polling provide the beginnings of that interaction, but good collaboration also depends on how the agent uses them.</p>

<p>What I like about this approach is that it leaves behind something useful beyond the immediate session. The SVG remains an editable document. The labels can be corrected, the layout can be reused, and the figures can be adapted for another purpose. Human and automated work can continue from the same artifact.</p>

<p>The <a href="/2026/08/06/llmfreecad.html">FreeCAD project</a> explored that idea for mechanical objects. <code class="language-plaintext highlighter-rouge">mcpInkscape</code> brings it into visual communication. In both cases, the interesting capability comes from combining a structured application with a model that can inspect, act, review, and revise. I think there is a great deal more to explore there.</p>

<h2 id="references">References</h2>

<ul>
  <li>The <a href="https://github.com/tspspi/mcpinkscape">mcpInkscape project on GitHub</a>, including its README, user manual, and native bridge
    <ul>
      <li>Project workflow documentation: <code class="language-plaintext highlighter-rouge">skill/mcpinkscape/SKILL.md</code>, <code class="language-plaintext highlighter-rouge">design-for-inkscape.md</code>, and <code class="language-plaintext highlighter-rouge">design-review.md</code> <a href="https://github.com/tspspi/mcpinkscape">in the repository</a></li>
    </ul>
  </li>
  <li>Example posters:
    <ul>
      <li><a href="/assets/pdf/mcpinkscape-A0.pdf">A0 poster from the recorded session</a></li>
      <li><a href="/assets/pdf/mcpinkscape-pastel-A0.pdf">Alternative pastel A0 poster</a></li>
    </ul>
  </li>
  <li>Previous blog articles:
    <ul>
      <li><a href="/2026/08/06/llmfreecad.html">Artificial Intelligence doing CAD: ChatGPT, Codex and FreeCAD</a></li>
      <li><a href="/2026/07/03/autonomousmachines.html">The Hum That Never Sleeps</a></li>
    </ul>
  </li>
  <li>Commercial Agent Orchestrators
    <ul>
      <li><a href="https://openai.com/de-DE/codex/">OpenAIs codex</a></li>
      <li><a href="https://claude.com/de/product/claude-code">Claude Code</a></li>
    </ul>
  </li>
</ul>]]></content><author><name>tsp</name></author><category term="Artificial Intelligence" /><category term="Large Language Models" /><category term="LLM" /><category term="Automation" /><category term="Programming" /><category term="Projects" /><category term="Science" /><summary type="html"><![CDATA[Generating an SVG with an LLM is easy. Giving an agent access to a real vector graphics application, letting it work with editable objects, inspect the result visually, react to human changes, and iteratively correct the document is considerably more interesting. mcpInkscape provides such an interface for Inkscape, ranging from offline SVG editing to a native live bridge where a person and an agent can work on the same visible document. This article looks at the architecture behind that approach, why structured objects and rendered feedback complement each other, and how revision checks and explicit review records can make the workflow more reliable. Two A0 scientific posters serve as practical examples, showing how an agent can assemble, inspect, revise, validate, and export a complex document while leaving behind an ordinary editable SVG that can still be changed by a human afterwards.]]></summary></entry><entry><title type="html">Apache kicking proxy connection every 1000 seconds?</title><link href="https://www.tspi.at/2026/09/08/apache1000.html" rel="alternate" type="text/html" title="Apache kicking proxy connection every 1000 seconds?" /><published>2026-09-08T00:00:00+02:00</published><updated>2026-09-08T21:19:44+02:00</updated><id>https://www.tspi.at/2026/09/08/apache1000</id><content type="html" xml:base="https://www.tspi.at/2026/09/08/apache1000.html"><![CDATA[<blockquote class="disclaimer">
  <p><strong>TL;DR</strong>: This is a story about a (nearly fully automated via codex; I did an initial bug description as well as some steering which tools to use and how to perform runtime testing, the remaining story unfolded autonomously) mini bug search for a timeout for slow backends behind an Apache <code class="language-plaintext highlighter-rouge">mod_proxy</code> reverse proxy. It describes a pretty simple datatype conversion error due to truncation from 64 to 32 bit integers and is a mini example that one can fully automate debugging on the live systems as well as by inspecting binaries or source code using large language models.</p>
</blockquote>

<p>Some infrastructure failures look like an intentional timeout although there is no corresponding configuration. A request runs for a while and Apache then returns a <code class="language-plaintext highlighter-rouge">502 Proxy Error</code> with <code class="language-plaintext highlighter-rouge">Error reading from remote server</code>. The timeout is neither the default value nor the configured proxy timeout. It is close to one thousand seconds.</p>

<p>Most ordinary HTTP requests do not reach this limit. It becomes visible with workloads that take a <em>long time</em> before producing their first byte of output. Non-streaming LLM requests are one example. Depending on model, context size and hardware, a long prefill can take twenty or thirty minutes; with some large models and inference configurations it can take considerably longer. A reverse proxy intended for such workloads should not terminate the backend connection after roughly sixteen minutes.</p>

<p>This article documents how I tracked down such a timeout on <a href="http://freebsd.org/">FreeBSD</a> and why the eventual answer was neither the firewall nor Apaches proxy module configuration - or any direct source mistake in Apaches httpd or the <code class="language-plaintext highlighter-rouge">mod_proxy</code> itself. It was a very small integer conversion in APR.</p>

<blockquote class="disclaimer">
  <p><strong>Versions:</strong> The problem and solution described here was observed on FreeBSD 13.3 running Apache httpd 2.4.66 with APR 1.7.6.</p>
</blockquote>

<ul>
  <li><a href="#the-configuration-looked-correct">The configuration looked correct</a></li>
  <li><a href="#a-timeout-test-server">A timeout test server</a></li>
  <li><a href="#what-apache-is-actually-timing-out">What Apache is actually timing out</a></li>
  <li><a href="#the-integer-conversion-in-apr">The integer conversion in APR</a></li>
  <li><a href="#use-of-llms-for-debugging">Use of LLMs for debugging</a></li>
  <li><a href="#the-fix">The fix</a></li>
  <li><a href="#conclusion">Conclusion</a></li>
  <li><a href="#references">References</a></li>
</ul>

<p><img src="/assets/images/png/apachedebug01.png" alt="" /></p>

<h2 id="the-configuration-looked-correct">The configuration looked correct</h2>

<p>The proxy had deliberately generous limits. A simplified version looked like this:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Timeout 172800
ProxyTimeout 172800

&lt;Proxy "unix:/path/to/backend.sock|http://backend/"&gt;
    ProxySet connectiontimeout=10 timeout=172800 disablereuse=On
&lt;/Proxy&gt;

ProxyPass "/service/" "unix:/path/to/backend.sock|http://backend/" \
    connectiontimeout=10 timeout=172800 disablereuse=On
</code></pre></div></div>

<p>The intention is straightforward: a backend response may take up to two days (this was intended to also accomodate the prefill of <a href="/2026/07/18/glm52colibrifreebsd.html">colibri running GLM</a>) before Apache gives up. The same result appeared with a normal TCP backend instead of a Unix domain socket. Reloading Apache and doing full restarts changed nothing. The error log showed the usual proxy-side result:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>AH01102: error reading status line from remote server
AH00898: Error reading from remote server
</code></pre></div></div>

<p>At this stage it is tempting to suspect that one of the directives was ignored, that a reused worker retained an older configuration, or that a firewall state expired. All of these are plausible in other situations and have obviously been the first points to investigate. They were not the explanation here.</p>

<h2 id="a-timeout-test-server">A timeout test server</h2>

<p>The next step was to temporarily replace the real application with a small HTTP service that has a single endpoint like</p>

<div class="language-text highlighter-rouge"><div class="highlight"><pre class="highlight"><code>/timeouttest?duration=1200
</code></pre></div></div>

<p>The service records the start time, waits for the requested duration without writing a response, then returns a small JSON document. The same process listened both on a Unix domain socket and on a local TCP listener. Apache exposed one route through the Unix socket and a second route through TCP.</p>

<p>That gives three useful comparisons:</p>

<table>
  <thead>
    <tr>
      <th>Path</th>
      <th>What it tests</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Direct TCP to the local listener</td>
      <td>The test application and its TCP listener</td>
    </tr>
    <tr>
      <td>Apache to TCP</td>
      <td>Apache proxying without Unix sockets</td>
    </tr>
    <tr>
      <td>Apache to UDS</td>
      <td>Apache proxying over a Unix domain socket</td>
    </tr>
  </tbody>
</table>

<p>A thirty-second wait completed successfully through all three paths. A 1200-second wait completed successfully when accessed directly. Both proxied variants failed at almost the same point: about 1000 seconds after the request started. This now narrowed down the error to happen inside Apache.</p>

<p>A Unix domain socket does not traverse <code class="language-plaintext highlighter-rouge">ipfw</code> or the TCP stack. The TCP proxy route used a local TCP connection but failed at the same time. Direct TCP succeeded for the full twenty minutes. The application, protocol and firewall were therefore excluded as common causes. The remaining common components were Apache and the <a href="https://apr.apache.org/">library below its socket I/O</a>.</p>

<p>The test server also uncovered a useful detail. It only noticed that Apache had closed the Unix socket when it finally tried to write the delayed response. That is expected: a backend which sends no data has no earlier reason to discover that the peer went away. A later successful application log message is therefore not proof that the original client connection still existed.</p>

<h2 id="what-apache-is-actually-timing-out">What Apache is actually timing out</h2>

<p>Apache was not inventing the <code class="language-plaintext highlighter-rouge">502</code>. The proxy HTTP module reads the backend status line using <code class="language-plaintext highlighter-rouge">ap_proxygetline()</code>. That ultimately reads from the backend connection. If the read returns APR’s timeout status, <code class="language-plaintext highlighter-rouge">APR_TIMEUP</code>, <code class="language-plaintext highlighter-rouge">mod_proxy_http</code> logs <code class="language-plaintext highlighter-rouge">AH01102</code> and translates the failure into the proxy error seen by the client.</p>

<p>The important point is that the configured timeout really was being used by Apache. The <code class="language-plaintext highlighter-rouge">timeout=</code> parameter of a <code class="language-plaintext highlighter-rouge">ProxyPass</code> worker is parsed in seconds and converted using <code class="language-plaintext highlighter-rouge">apr_time_from_sec()</code>. When Apache opens the backend connection it calls <code class="language-plaintext highlighter-rouge">apr_socket_timeout_set()</code> with that value. The socket timeout is stored in microseconds, as APR specifies.</p>

<p>There was no separate hidden <code class="language-plaintext highlighter-rouge">ap_proxygetline</code> timeout of one thousand seconds, and neither <code class="language-plaintext highlighter-rouge">mod_reqtimeout</code> nor an Apache core default was replacing the worker’s value in this backend response path. The next question was therefore: <em>“what does APR do with a socket timeout of 172800 seconds when it is about to wait for data?”</em></p>

<h2 id="the-integer-conversion-in-apr">The integer conversion in APR</h2>

<p>On FreeBSD, APR uses <code class="language-plaintext highlighter-rouge">poll(2)</code> for this particular blocking socket wait. <a href="https://man.freebsd.org/cgi/man.cgi?poll"><code class="language-plaintext highlighter-rouge">poll(2)</code></a> accepts its timeout as a <strong>signed 32-bit integer</strong> in <strong>milliseconds</strong>. APR’s public socket timeout type, however, is a <strong>signed 64-bit integer</strong> in <strong>microseconds</strong>.</p>

<p>The affected APR 1.7.6 source contained the following pattern in <code class="language-plaintext highlighter-rouge">support/unix/waitio.c</code>:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>struct pollfd pfd;
int rc, timeout;

timeout = f ? f-&gt;timeout : s-&gt;timeout;

if (timeout &gt; 0) {
    timeout = (timeout + 999) / 1000;
}
rc = poll(&amp;pfd, 1, timeout);
</code></pre></div></div>

<p>The assignment to <code class="language-plaintext highlighter-rouge">timeout</code> happens before the conversion from microseconds to milliseconds. That is the bug. <code class="language-plaintext highlighter-rouge">f-&gt;timeout</code> and <code class="language-plaintext highlighter-rouge">s-&gt;timeout</code> are 64-bit <code class="language-plaintext highlighter-rouge">apr_interval_time_t</code> values, but the local variable is a 32-bit <code class="language-plaintext highlighter-rouge">int</code>.</p>

<p>The configured two-day timeout is:</p>

[
172800\mathrm{s} * 1000000 \frac{\mathrm{\mu s}}{\mathrm{s}} = 172.800.000.000 \mathrm{\mu s}
]

<p>After narrowing to 32 bits it often wraps modulo 2<sup>32</sup> (though this behaviour is of course <em>implementation defined</em> so one <strong>cannot rely on wrapover in any case</strong>:</p>

[
172800000000 \mathrm{mod} 4294967296 = 1001308160 \mathrm{\mu s}
]

<p>APR then converts that already-wrapped value to milliseconds:</p>

[
1001308160 \mathrm{\mu s} \to 1001309 \mathrm{ms} \to 1001.309 \mathrm{s}
]

<p>This produces the observed 1000 second timeout. It was not a limit configured anywhere; it was the low 32 bits of the intended timeout being treated as the complete timeout.</p>

<p>The installed APR library was checked without tracing running processes: its disassembly showed the 32-bit load of the socket timeout in <code class="language-plaintext highlighter-rouge">apr_wait_for_io_or_timeout()</code>. This is also why the same result occurred for both TCP and Unix domain sockets. Both routes eventually use the same APR wait function.</p>

<h2 id="use-of-llms-for-debugging">Use of LLMs for debugging</h2>

<p><a href="https://chatgpt.com/codex/">Codex</a> was used during this investigation to inspect the Apache and APR source trees, follow the proxy read path, compare the timing with the test service and finally identify the narrowing conversion. It was also used upfront to inspect the server side system - configuration variables, firewall rules, <code class="language-plaintext highlighter-rouge">sysctl</code> values. The decisive part was not guessing from the number 1000, but reducing the failure to a simple reproducible experiment and then checking the exact implementation below Apache. All nearly fully automated with an LLM orchestrator.</p>

<h2 id="the-fix">The fix</h2>

<p>As it turned out APR fixed this upstream as <a href="https://github.com/apache/apr/pull/62">PR 69542 (Bugzilla) / PR 62 (GitHub)</a>, but I patched it locally as an exercise anyways. The corrected code keeps the raw timeout in an <code class="language-plaintext highlighter-rouge">apr_interval_time_t</code>, converts it to milliseconds only after checking its range, and caps values beyond <code class="language-plaintext highlighter-rouge">INT_MAX</code> milliseconds:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>apr_interval_time_t raw_timeout;
int rc, timeout;

raw_timeout = f ? f-&gt;timeout : s-&gt;timeout;
if (raw_timeout &gt; ((apr_interval_time_t)INT_MAX) * 1000) {
    timeout = INT_MAX;
}
else {
    timeout = raw_timeout &gt; 0
        ? (int)((raw_timeout + 999) / 1000)
        : (int)raw_timeout;
}
</code></pre></div></div>

<p>For a two-day timeout this produces 172800000 milliseconds, which is well inside the range accepted by <code class="language-plaintext highlighter-rouge">poll(2)</code>. Values above roughly 25 days are capped to the largest representable <code class="language-plaintext highlighter-rouge">poll(2)</code> interval rather than overflowing.</p>

<p>For FreeBSDs <code class="language-plaintext highlighter-rouge">devel/apr1</code> port, which provided APR 1.7.6 in my case, the appropriate solution is to add this upstream change as a port patch, rebuild and reinstall APR, then restart Apache so that it loads the corrected shared library. The port already carried a small patch in this file for negative timeout handling; the replacement patch should retain that behaviour while adding the overflow fix.</p>

<p>The following patch file was placed in <code class="language-plaintext highlighter-rouge">/usr/ports/devel/apr1/files/patch-apr-1.7.6_support_unix_waitio.c</code>:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>--- apr-1.7.6/support/unix/waitio.c.orig
+++ apr-1.7.6/support/unix/waitio.c
@@ -40,15 +40,24 @@ apr_status_t apr_wait_for_io_or_timeout(
                                         int for_read)
 {
     struct pollfd pfd;
-    int rc, timeout;
+    apr_interval_time_t raw_timeout;
+    int rc, timeout;
 
-    timeout    = f        ? f-&gt;timeout        : s-&gt;timeout;
+    raw_timeout = f ? f-&gt;timeout : s-&gt;timeout;
+    if (raw_timeout &gt; ((apr_interval_time_t)INT_MAX) * 1000) {
+        /* poll(2) takes an int timeout in milliseconds (~25 days max). */
+        timeout = INT_MAX;
+    }
+    else {
+        /* Convert microseconds to milliseconds, rounding up. */
+        timeout = raw_timeout &gt; 0
+            ? (int)((raw_timeout + 999) / 1000)
+            : (int)raw_timeout;
+    }
+
     pfd.fd     = f        ? f-&gt;filedes        : s-&gt;socketdes;
     pfd.events = for_read ? POLLIN            : POLLOUT;
 
-    if (timeout &gt; 0) {
-        timeout = (timeout + 999) / 1000;
-    }
     do {
         rc = poll(&amp;pfd, 1, timeout);
     } while (rc == -1 &amp;&amp; errno == EINTR);
</code></pre></div></div>

<p>After rebuilding and reinstalling APR via</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>cd /usr/ports/devel/apr
make clean
make
make deinstall
make reinstall
</code></pre></div></div>

<p>the bug was gone and the longer timeout was honored as expected.</p>

<h2 id="conclusion">Conclusion</h2>

<p>This bug is a classic that appears all over software engineering - and when quickly skimming code it is easy to pass. Especially when if affects configurations that are not covered by test cases. <a href="https://chatgpt.com/codex/">Codex</a> was extremly helpful in debugging this in an fully automatic fashion after it was instructed to also perform runtime probes.</p>

<p>In addition, this kind of bug shows why formal verification solutions such as <a href="https://frama-c.com/fc-plugins/rte.html">Frama-C’s RTE</a> checks together with <a href="https://www.frama-c.com/fc-plugins/wp.html">WP</a> or <a href="https://frama-c.com/fc-plugins/eva.html">Eva</a>), as well as sufficiently strict compiler warnings, can be so useful. In this particular case, Frama-C RTE can generate range assertions for signed integer downcasts when <code class="language-plaintext highlighter-rouge">-warn-signed-downcast</code> is enabled; proving these assertions would expose that an <code class="language-plaintext highlighter-rouge">apr_interval_time_t</code> cannot in general be represented by the destination <code class="language-plaintext highlighter-rouge">int</code>. Likewise, compilers can diagnose this kind of narrowing conversion when conversion warnings are enabled, for example by building C code with <code class="language-plaintext highlighter-rouge">-Wall -Wextra -Wconversion -Werror</code>.</p>

<p>Other sanitizers remain valuable parts of the same defensive toolbox, although they target different classes of errors: <a href="https://clang.llvm.org/docs/AddressSanitizer.html"><code class="language-plaintext highlighter-rouge">ASan</code></a> detects illegal memory accesses, <a href="https://clang.llvm.org/docs/MemorySanitizer.html"><code class="language-plaintext highlighter-rouge">MSan</code></a> use of uninitialized memory and <a href="https://clang.llvm.org/docs/ThreadSanitizer.html"><code class="language-plaintext highlighter-rouge">TSan</code></a> data races, while <a href="https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html"><code class="language-plaintext highlighter-rouge">UBSan</code></a> detects many forms of undefined behaviour. Clang additionally provides integer-conversion sanitizers such as <code class="language-plaintext highlighter-rouge">-fsanitize=implicit-integer-truncation</code> for lossy implicit conversions. These tools do not all detect this particular APR bug, but together with static analysis, strict compiler diagnostics and formal range checks they eliminate large classes of bugs before they become obscure runtime failures. The upfront cost of properly <a href="https://frama-c.com/html/acsl.html">annotating code</a> and maintaining suitably strict build and verification configurations may be significant, but for long-lived infrastructure software the long-term gain can be substantial. And especially when coding with coding agents those tools are highly valueable in the testing loop.</p>

<h2 id="references">References</h2>

<ul>
  <li>The <a href="https://www.freebsd.org">FreeBSD operating system</a>, which <a href="/2026/08/30/freebsdeverywhere.html">I operate on all of my machines</a></li>
  <li>The <a href="https://httpd.apache.org/">Apache HTTP Server</a>, which is in many cases my preferred webserver besides <a href="https://nginx.org/">nginx</a></li>
  <li>Apache specifics:
    <ul>
      <li><a href="https://httpd.apache.org/docs/2.4/mod/mod_proxy.html">Apache mod_proxy documentation</a> highlighting <code class="language-plaintext highlighter-rouge">ProxyTimeout</code>, <code class="language-plaintext highlighter-rouge">ProxyPass</code> and proxy worker configuration</li>
      <li>The <a href="https://apr.apache.org/">Apache Portable Runtime (APR)</a>, the portability and runtime library used below Apache httpd</li>
      <li><a href="https://github.com/apache/apr/pull/62">APR bug 69542 / GitHub PR #62</a>, an upstream report and fix for the timeout integer overflow in <code class="language-plaintext highlighter-rouge">apr_wait_for_io_or_timeout()</code> that I just discovered after I fixed it by myself. I am in no way associated with that upstream bug report and patch request</li>
      <li><a href="https://bz.apache.org/bugzilla/show_bug.cgi?id=69542">Apache Bugzilla PR 69542</a>, which is the original bug report (I am not in any way associated with that bug report)</li>
      <li><a href="https://github.com/apache/httpd/tree/trunk/modules/proxy">Apache mod_proxy source</a></li>
      <li><a href="https://github.com/apache/apr">APR source repository</a></li>
    </ul>
  </li>
  <li><a href="https://man.freebsd.org/cgi/man.cgi?poll">FreeBSD poll(2) manual page</a> - Documentation of the <code class="language-plaintext highlighter-rouge">poll(2)</code> interface and its millisecond <code class="language-plaintext highlighter-rouge">int</code> timeout argument</li>
  <li>OpenAIs <a href="https://chatgpt.com/codex/">Codex</a>, the coding agent used to assist source inspection, system investigation and runtime probing during debugging</li>
  <li>Frama-C
    <ul>
      <li>The <a href="https://frama-c.com/">Frama-C</a> framework for analysis and verification of C programs</li>
      <li><a href="https://frama-c.com/fc-plugins/rte.html">Frama-C RTE</a>: Runtime-error annotation generation, including integer downcast checks</li>
      <li><a href="https://www.frama-c.com/fc-plugins/wp.html">Frama-C WP</a>: Weakest-precondition based deductive verification</li>
      <li><a href="https://frama-c.com/fc-plugins/eva.html">Frama-C Eva</a>: Abstract-interpretation based value analysis</li>
      <li><a href="https://frama-c.com/html/acsl.html">ACSL</a>, the ANSI/ISO C Specification Language used to state contracts and properties for C programs</li>
    </ul>
  </li>
  <li>Compiler options:
    <ul>
      <li><a href="https://clang.llvm.org/docs/DiagnosticsReference.html">Clang warning options</a> including <code class="language-plaintext highlighter-rouge">-Wconversion</code> and <code class="language-plaintext highlighter-rouge">-Werror</code></li>
      <li><a href="https://clang.llvm.org/docs/AddressSanitizer.html">Clang AddressSanitizer</a></li>
      <li><a href="https://clang.llvm.org/docs/MemorySanitizer.html">Clang MemorySanitizer</a></li>
      <li><a href="https://clang.llvm.org/docs/ThreadSanitizer.html">Clang ThreadSanitizer</a></li>
      <li><a href="https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html">Clang UndefinedBehaviorSanitizer</a> which checks for undefined behaviour and optional checks for suspicious integer conversions</li>
    </ul>
  </li>
  <li>Books for interested readers
    <ul>
      <li>Seacord, R. <a href="https://amzn.to/4xglXxv">Effective C, 2nd Edition: An Introduction to Professional C Programming</a></li>
      <li>Seacord, R. <a href="https://amzn.to/4xeHdnm">Secure Coding in C and C++ (SEI Series in Software Engineering)</a></li>
      <li>Gustedt, J. <a href="https://amzn.to/4qXKKoo">Modern C, Third Edition: Covers the C23 standard</a></li>
    </ul>
  </li>
</ul>]]></content><author><name>tsp</name></author><category term="Programming" /><category term="Frama C" /><category term="FreeBSD" /><category term="Web" /><category term="ANSI C" /><category term="Large Language Models" /><category term="Repair" /><category term="Network" /><summary type="html"><![CDATA[An Apache reverse proxy is configured to wait for two days, yet a slow backend is disconnected after almost exactly 1000 seconds with a 502 Proxy Error. No Apache timeout is configured to that value, direct requests work, and TCP and Unix-domain-socket proxy connections fail at essentially the same time. What looks like a mysterious hidden proxy limit eventually turns out to be a tiny integer conversion bug one layer below Apache, inside APR. By replacing the real backend with a controlled timeout test service, following Apaches backend read path and finally inspecting APR source and binaries, the strange 1000-second value becomes completely explainable: a timeout represented as 64-bit microseconds was narrowed to a 32-bit integer before being converted to milliseconds for poll(2). This article walks through reproducing, locating and patching the problem on FreeBSD and demonstrates how LLM-assisted debugging becomes particularly powerful when source inspection is combined with carefully designed experiments on the running system.]]></summary></entry><entry><title type="html">Ender 3 V3 SE Extruder Not Feeding: Fixing the Freely Spinning Drive Gear</title><link href="https://www.tspi.at/2026/09/04/ender3v3seextruderspinninggearrepair.html" rel="alternate" type="text/html" title="Ender 3 V3 SE Extruder Not Feeding: Fixing the Freely Spinning Drive Gear" /><published>2026-09-04T00:00:00+02:00</published><updated>2026-09-04T10:45:07+02:00</updated><id>https://www.tspi.at/2026/09/04/ender3v3seextruderspinninggearrepair</id><content type="html" xml:base="https://www.tspi.at/2026/09/04/ender3v3seextruderspinninggearrepair.html"><![CDATA[<blockquote>
  <p><em>The black reduction gear turns, the motor appears to work, but no filament is moved: repairing a failed press fit with an M2 grub screw.</em></p>
</blockquote>

<p>The <a href="https://amzn.to/4gBEEqp">Creality Ender-3 V3 SE</a> is a surprisingly pleasant little printer. It is inexpensive, fast enough for most everyday work, and its mechanics are simple enough that most problems can still be understood by looking at the machine rather than by replacing an opaque, sealed module. This makes the following failure particularly confusing at first: the extruder motor turns, the small black motor gear turns, the large black reduction gear turns, but the filament is neither pushed towards the nozzle nor pulled back during retraction.</p>

<p>The usual suspects would be a clogged nozzle, insufficient pressure between the filament gears, a broken cable, a defective stepper driver, or ground-down filament. None of these explanations fits when the extruder has been opened and the actual filament drive wheel can be rotated freely while the large black gear on the same axis is held stationary. Those two parts are supposed to rotate as one unit.</p>

<p>In this case the original press fit between the steel shaft and the hobbed filament drive wheel had failed. The wheel was still captured strongly enough that it could not simply be pulled off the shaft, but it no longer transmitted appreciable torque. A small radial hole, an M2 thread, and a 5 mm long M2 grub screw turned the unreliable friction fit into a positive mechanical connection. The repaired extruder immediately worked normally again.</p>

<blockquote>
  <p><strong>Symptom in one sentence:</strong> If the black extruder gear rotates but no filament moves, and the metal hobbed drive wheel can be turned independently of the large black gear, the press fit between drive wheel and shaft has failed.</p>
</blockquote>

<ul>
  <li><a href="#how-the-ender-3-v3-se-extruder-is-supposed-to-work">How the Ender 3 V3 SE extruder is supposed to work</a></li>
  <li><a href="#confirming-the-failure-before-drilling-anything">Confirming the failure before drilling anything</a></li>
  <li><a href="#tools-and-materials">Tools and materials</a></li>
  <li><a href="#disassembling-the-print-head">Disassembling the print head</a>
    <ul>
      <li><a href="#a-short-note-about-the-glued-connectors">A short note about the glued connectors</a></li>
    </ul>
  </li>
  <li><a href="#drilling-the-hole-for-the-grub-screw">Drilling the hole for the grub screw</a></li>
  <li><a href="#cutting-the-m2-thread">Cutting the M2 thread</a></li>
  <li><a href="#installing-the-m2x5-mm-grub-screw">Installing the M2x5 mm grub screw</a></li>
  <li><a href="#reassembling-the-extruder">Reassembling the extruder</a></li>
  <li><a href="#cleaning-and-lubrication-while-everything-is-open">Cleaning and lubrication while everything is open</a></li>
  <li><a href="#recalibrating-the-nozzle-height">Recalibrating the nozzle height</a></li>
  <li><a href="#conclusion-the-pleasant-side-of-inexpensive-printers">Conclusion: The pleasant side of inexpensive printers</a></li>
</ul>

<p><img src="/assets/images/png/ender3v3se_010.png" alt="" /></p>

<h2 id="how-the-ender-3-v3-se-extruder-is-supposed-to-work">How the Ender 3 V3 SE extruder is supposed to work</h2>

<p>The reduction drive inside the print head is mechanically quite simple:</p>

<p><img src="/assets/images/png/ender3v3se_001.png" alt="stepper motor -&gt; black motor pinion -&gt; black reduction gear -&gt; steel shaft -&gt; hobbed metal filament drive wheel -&gt; filament" /></p>

<p>The large black gear and the hobbed metal wheel sit on the same shaft. There is no hidden grub screw in the original assembly. Instead, the metal wheel is coupled to the shaft by an interference or press fit. Under normal conditions the contact pressure between shaft and wheel creates enough friction to transmit the extrusion torque.</p>

<p>For a cylindrical press fit, the maximum transmissible torque can be estimated as</p>

[
T_{\mathrm{max}} \approx 2\pi \mu p L r^2
]

<p>where $\mu$ is the coefficient of friction, $p$ is the contact pressure, $L$ is the axial length of the fit and $r$ is the shaft radius. Once wear, plastic deformation or insufficient original interference reduces the contact pressure, the transmissible torque falls. Alternatively, a sufficiently large overload can exceed the available friction torque and initiate slip, after which wear may rapidly worsen the fit. The wheel may nevertheless remain difficult or impossible to pull off because axial retention and reliable torque transmission are not quite the same thing.</p>

<p>This produces the failure mode seen here: everything visible from outside appears to rotate correctly, but the last metal wheel in the transmission silently slips on its own shaft.</p>

<h2 id="confirming-the-failure-before-drilling-anything">Confirming the failure before drilling anything</h2>

<p>The printer should first be switched off, unplugged and allowed to cool completely. Dont hurry and burn your fingers. Any remaining filament should be unloaded if this is still possible. After opening the extruder, the large black reduction gear can be held with one hand while the metal hobbed filament wheel on the same shaft is carefully turned with the other.</p>

<p>There must be no relative rotation between these parts. A tiny elastic movement caused by gear play is uninteresting; free rotation of the metal wheel around the shaft is the fault described here.</p>

<p>If the metal wheel remains rigidly connected to the large black gear, this repair is not applicable. In that case the nozzle, heat break, filament tension, idler gear, motor wiring and stepper driver should be examined instead. Drilling a healthy drive assembly would be a fairly funny but useless way of not fixing a clog.</p>

<h2 id="tools-and-materials">Tools and materials</h2>

<p>The following tools were used for the repair:</p>

<ul>
  <li>a <a href="https://amzn.to/4xr1l5T">1.5 mm HSS-Co drill</a> bit,</li>
  <li>an <a href="https://amzn.to/4dhiJ5u">M2 × 0.4 tap</a>,</li>
  <li>one <a href="https://amzn.to/4xHO2ic">M2 × 5 mm grub screw</a>,</li>
  <li>a small <a href="https://amzn.to/4csT4GV">hex key for the grub screw</a>,</li>
  <li><a href="https://amzn.to/4h8viCu">cutting fluid</a> suitable for steel,</li>
  <li>a <a href="https://amzn.to/4ice7kx">drill that can be operated at very low speed</a>,</li>
  <li>a small <a href="https://amzn.to/4gzCyXY">vise</a> or another rigid method of holding the part,</li>
  <li>a <a href="https://amzn.to/3UvHDrO">fine centre punch</a> or another tool for marking the start of the hole,</li>
  <li>medium-strength <a href="https://amzn.to/3UvHPHy">thread-locking compound</a>,</li>
  <li>normal tools for opening the print head and extruder.</li>
</ul>

<p>A 1.5 mm cobalt drill worked for this particular repair. The conventional tapping-drill diameter for an M2 × 0.4 thread is commonly 1.6 mm. Using 1.5 mm produces a somewhat fuller thread, but it also increases the torque on the extremely small tap. Either size may therefore be reasonable depending on the available drill bits, the exact material and how accurately the hole can be produced. With a 1.5 mm hole, patience and <strong>generous chip clearing</strong> are especially important.</p>

<p>An M2 tap is small, brittle and impressively difficult to remove after it has broken inside a steel shaft. This is not the operation during which additional force improves the outcome.</p>

<h2 id="disassembling-the-print-head">Disassembling the print head</h2>

<p>The photographs for this article have been taken during the assembly process, beginning with the repaired gear set and ending with the complete print head. Disassembly is simply the same sequence read backwards.</p>

<p>The exact order is not especially complicated:</p>

<ul>
  <li>The printer is switched off, unplugged, and cooled down.</li>
  <li>The front print-head cover is removed.</li>
  <li>The touch probe on the left side of the print head is removed.</li>
  <li>The extruder and stepper assembly is detached from the print-head base by removing the four mounting screws.</li>
  <li>One tried to disconnect the connectors on the small local print-head PCB. Won’t work.</li>
  <li>The extruder housing is opened. The spring-loaded lever should be held while doing this so that neither the spring nor the idler gear attempts to explore the workshop floor.</li>
  <li>The drive gears and their shafts are removed while their orientation is noted.</li>
</ul>

<p>It is worth photographing every layer before lifting the next component out. There are not many parts, but the orientation of the spring, lever, bearing, and paired filament gears is much easier to preserve with one useful photograph than with ten minutes of later speculation.</p>

<p><img src="/assets/images/jpg/ender3v3se_009.jpg" alt="The culprit" /></p>

<h3 id="a-short-note-about-the-glued-connectors">A short note about the glued connectors</h3>

<p>Several connectors on the local PCB in the print head are secured with hot glue. The probable intention is perfectly reasonable: a printer head accelerates continuously, and an unsecured connector should not gradually shake itself loose. From the perspective of somebody trying to service the machine, however, burying tiny service connectors under glue remains a small act of mechanical hostility.</p>

<p>The glue could be peeled or cut away carefully while holding the connector body. The wires themselves must not be used as handles. A modest amount of swearing is technically appropriate here. The best approach in my personal opinion is: Leave all cables connected and make sure the parts don’t pull on them.</p>

<h2 id="drilling-the-hole-for-the-grub-screw">Drilling the hole for the grub screw</h2>

<p>The purpose of the modification is to add a radial screw through the side of the hobbed drive wheel or its hub so that the screw positively locks the wheel to the steel shaft. The finished grub screw must remain flush with or below the outer surface; otherwise it may rub against the extruder housing or block the gearwheel.</p>

<p>The position of the hole should be selected before drilling. It has to satisfy four conditions:</p>

<ul>
  <li>there must be sufficient metal around the hole for an M2 thread,</li>
  <li>the drill must meet the steel shaft approximately radially,</li>
  <li>the grub screw must not intersect the hobbed filament-contact region,</li>
  <li>and the installed screw must have clearance from the surrounding housing and gears.</li>
</ul>

<p>The part should be removed from the printer before machining. One will never be able to apply the proper force there. The assembly is held rigidly in a vise with soft jaws or protective packing. The plastic gear teeth must not be crushed, and the part should not be clamped by the fine hobbed surface.</p>

<p>A small start mark is made with a centre punch. On a curved metal surface this matters: a 1.5 mm drill will otherwise wander towards whichever location is least convenient.</p>

<p>Cutting fluid is applied both to the drill and to the workpiece. The hole is drilled at very low speed with light, controlled feed. <a href="https://amzn.to/4xr1l5T">HSS-Co</a> is suitable for the steel shaft, but cobalt in the name does not make a tiny drill immune to overheating or side loading. The drill should be advanced only a short distance at a time and then withdrawn to clear the chips. More cutting fluid is added as required (peck-drilling).</p>

<p>The drill is aimed towards the centre line of the shaft. In this repair the hole was drilled from the side of the metal drive gear into the shaft so that the later screw could form a positive connection between both parts. It is not necessary to continue blindly through the opposite side of the shaft as indicated by my photographs. Removing more material than required only weakens a very small component.</p>

<p>The drill should do the cutting. If appreciable bending force is required, the speed, alignment, sharpness, or chip evacuation is wrong.</p>

<p><img src="/assets/images/jpg/ender3v3se_002.jpg" alt="Close-up of the repaired gear set. The drilled radial hole is visible; the installed grub screw itself may be below the surface and therefore difficult to see" /></p>

<h2 id="cutting-the-m2-thread">Cutting the M2 thread</h2>

<p>After drilling, cutting fluid is applied again and the <a href="https://amzn.to/4dhiJ5u">M2 tap</a> is started exactly square to the hole. Initial alignment and especially fixing the gearwheel as well as the shaft is critical because the tap is too small to correct a visibly crooked start later.</p>

<p>The thread is cut using the familiar forward-and-back sequence:</p>

<ul>
  <li>1/2 turn forward</li>
  <li>1/4 turn backward to break the chip</li>
  <li>1/2 turn forward</li>
  <li>1/4 turn backward to break the chip</li>
  <li>repeat</li>
</ul>

<p>The fractions are not sacred, the important point is that the tap is not driven continuously into accumulating chips. When one turns backwards one feels the chips breaking. After several cycles it should be backed out farther, cleaned, lubricated again and restarted carefully in the existing thread. Particularly when a 1.5 mm pilot hole is used, no attempt should be made to force the tap through a sudden increase in resistance. <em>Side loading must be avoided</em>. An M2 tap can tolerate the cutting torque for which it was made, but using it as a lever will leave a solid (if deep enough) but pretty expensive interlock mechanism inside the hole.</p>

<p>Once the required depth has been reached, the tap is removed and all chips are cleaned from the gear, shaft, bearing surfaces, and surrounding work area. The screw should be tested before thread locker is applied. It must enter cleanly, lock the drive wheel to the shaft, and finish flush or slightly recessed.</p>

<h2 id="installing-the-m2x5-mm-grub-screw">Installing the M2x5 mm grub screw</h2>

<p>The <a href="https://amzn.to/4xHO2ic">M2 × 5 mm grub screw</a> is inserted and tightened carefully. Its job is to prevent relative rotation between the hobbed wheel and the shaft. It does not need to be tightened with heroic torque. Stripping the new M2 thread would convert the repair into a slightly more advanced repair.</p>

<p>Before the final installation, the screw and threaded hole are degreased. A small amount of medium-strength thread-locking compound is then applied, and the screw is reinstalled. Excess compound is removed before it can migrate into a bearing, onto a plastic gear, or into the filament path.</p>

<p>The large black gear is then held while an attempt is made to rotate the metal hobbed wheel by hand. There should now be no relative movement. The complete gear assembly should still rotate smoothly without binding, eccentric resistance, or contact between the grub screw and housing.</p>

<p>Adhesives such as <a href="https://amzn.to/4ddDxL9">two-component epoxy</a> or cylindrical retaining compound might also restore the connection, provided that they can enter the damaged fit and bond to clean metal. Spot welding would introduce considerably more heat and distortion risk into a tiny assembly. The grub-screw repair has the pleasant property that torque transmission no longer depends on a microscopic adhesive layer or on the remains of the original interference fit.</p>

<h2 id="reassembling-the-extruder">Reassembling the extruder</h2>

<p>The following image sequence shows the reassembly. It can also be read from bottom to top when disassembling another machine.</p>

<p><img src="/assets/images/jpg/ender3v3se_002.jpg" alt="Close-up of the repaired gear set. The drilled radial hole is visible; the installed grub screw itself may be below the surface and therefore difficult to see" /></p>

<p>Here one sees the repaired drive gear assembly. The radial M2 hole is visible, while the installed grub screw is recessed and may not be visible in the photograph.</p>

<p>The repaired drive gear and the opposing idler gear are returned to their original positions. The spring is then inserted so that it tensions the two gears through the extruder lever. The hobbed regions of both gears have to meet the filament path at the same height.</p>

<p><img src="/assets/images/jpg/ender3v3se_003.jpg" alt="Inserting the gears and the spring loaded lever that presses them together around the filament" /></p>

<p>The motor-side bearing is placed on the stepper motor plane. The shaft must be inserted into this bearing.</p>

<p><img src="/assets/images/jpg/ender3v3se_004.jpg" alt="The bearing on the stepper-motor side into which the drive shaft is inserted during assembly" /></p>

<p>The open extruder is placed on the stepper motor and secured with the two black screws visible outside the housing. Before closing the housing, the lever should move freely and the spring should produce a sensible clamping force between the filament gears. The extruder housing is then closed. The screws should be started by hand and tightened evenly. Small screws in plastic and aluminium do not benefit from maximal wrist torque, and a correctly fitting hex key is much cheaper than grinding access into a cover after destroying a screw head (which has actually happened on this printer).</p>

<p><img src="/assets/images/jpg/ender3v3se_005.jpg" alt="The closed extruder housing after the gear train, lever, spring, and bearing have been checked for free movement" /></p>

<p>The complete assembly is mounted to the print-head base with its four screws. Cables must follow their original routing and must not be trapped between the extruder, motor, and mounting plate. Also make sure the PTFE tube fits into the appropriate place.</p>

<p><img src="/assets/images/jpg/ender3v3se_006.jpg" alt="The PTFE tube reaching into the hotend" /></p>

<p>The touch probe is mounted again on the left side. Depending on terminology and replacement parts this may be referred to as CR Touch. Its bracket must sit flat and its cable must be routed clear of the fan and moving parts.</p>

<p><img src="/assets/images/jpg/ender3v3se_007.jpg" alt="The touch probe reinstalled on the left side of the print head" /></p>

<p>Finally the front housing is mounted again.</p>

<p><img src="/assets/images/jpg/ender3v3se_008.jpg" alt="The completed print head" /></p>

<p>The ground-open section visible on this particular front housing on some of the photographs is of course not original and is unrelated to the grub-screw repair; it resulted from an earlier service operation involving a destroyed screw head.</p>

<h2 id="cleaning-and-lubrication-while-everything-is-open">Cleaning and lubrication while everything is open</h2>

<p>Once the print head has already been dismantled, one should always use the chance to remove all the accumulated filament dust, grease contaminated with particles and fan debris with the same care as the useful components.</p>

<p>The hobbed filament surfaces should be cleaned with a stiff brush or a fine tool, so that compacted filament particles no longer fill the teeth. Metal chips from drilling and tapping must be removed completely. The fans, air passages, and accessible surfaces can also be cleaned before the housing is closed.</p>

<p>A small amount of <a href="https://amzn.to/4zTlJyL">plastic-compatible grease</a> may be applied to the reduction gear teeth, appropriate shaft bearing surfaces and the lever pivot. Grease should be used sparingly. The hobbed filament-contact surfaces, filament path and the nozzle, must remain clean and dry, you do <em>not</em> want to contaminate them!</p>

<p>The gear train should be turned by hand after lubrication. It must move smoothly, and the spring-loaded lever must return reliably.</p>

<h2 id="recalibrating-the-nozzle-height">Recalibrating the nozzle height</h2>

<p>Removing and reinstalling the extruder and the touch probe can change the mechanical relationship between probe, nozzle, and print bed by a small amount. A small amount is entirely sufficient to ruin the first layer. The nozzle should therefore be cleaned, the build plate should be clean, and the printer’s automatic nozzle-height or Z-offset calibration (which is surprisingly easy thanks to the strain gauge below the bed) should be run again. The bed mesh or automatic bed-level procedure should also be repeated. A first-layer test should be observed closely before a larger print is started.</p>

<p>The grub-screw modification does not alter the reduction ratio or the effective diameter of the filament drive wheel. The extruder steps-per-millimetre should therefore normally remain unchanged. Nozzle height is the calibration that must not simply be trusted after the probe and complete extruder assembly have been removed.</p>

<h2 id="conclusion-the-pleasant-side-of-inexpensive-printers">Conclusion: The pleasant side of inexpensive printers</h2>

<p>The failed press fit is not an especially glorious design detail. A factory-installed grub screw, a keyed shaft, or a better controlled interference fit would have prevented the problem. Nevertheless, this repair also demonstrates one of the genuinely pleasant properties of many inexpensive Chinese 3D printers: the machine is not a sealed appliance that has to be discarded because one small mechanical interface has failed.</p>

<p>The extruder can be opened with ordinary tools. The gears can be inspected directly. Standard drills, taps, screws and thread-locking compound can be used to create a stronger connection than the original one. Even the mildly infuriating hot-glued connectors are understandable once vibration is considered, and they can still be serviced without vendor-only equipment.</p>

<p><em>Cheap</em> does not necessarily mean disposable. Often the contrary. And it also does not have to mean low quality - even the electrical connections are crimped properly in those devices. In this case a 1.5 mm hole and an M2 grub screw were enough to turn a printer that moved every extruder component except the one touching the filament back into a fully working machine.</p>]]></content><author><name>tsp</name></author><category term="Tutorial" /><category term="Hardware" /><category term="Mechanics" /><category term="Machining" /><category term="3D printing" /><category term="Repair" /><summary type="html"><![CDATA[An Ender-3 V3 SE can suffer from a specific extruder failure: the motor turns, both visible black gears rotate normally, and yet the filament refuses to move. The problem may be neither a clogged nozzle nor a weak stepper motor. If the metal hobbed drive wheel can be turned independently of the large reduction gear, the press fit connecting it to its shaft has failed and the last stage of the transmission is simply slipping. Fortunately, the failed connection does not necessarily require replacing the complete extruder. This article traces the failure through the Sprite extruder, shows how to confirm it before modifying anything, and documents a repair using a 1.5 mm hole, an M2 thread and a 5 mm grub screw. Along the way it covers disassembly, careful drilling and tapping, reassembly, lubrication and the calibration steps required before sending the repaired printer back to work.]]></summary></entry><entry><title type="html">Why is my flat heating up even after sunset?</title><link href="https://www.tspi.at/2026/09/02/thermalroom.html" rel="alternate" type="text/html" title="Why is my flat heating up even after sunset?" /><published>2026-09-02T00:00:00+02:00</published><updated>2026-09-18T11:05:45+02:00</updated><id>https://www.tspi.at/2026/09/02/thermalroom</id><content type="html" xml:base="https://www.tspi.at/2026/09/02/thermalroom.html"><![CDATA[<blockquote>
  <p>Why is my flat heating up even after the sun set?</p>
</blockquote>

<p>I just got asked this question so I thought it would be a nice idea to write it up.</p>

<p>At first the effect might look strange: The strongest solar illumination may occur at around 16:00, the sun may disappear below the horizon at around 20:00, and yet the temperature inside the flat continues to increase until 03:00 or 04:00 in the morning. At first glance this appears rather strange (if you are not a physicist or engineer). Once the external heat source has disappeared, should the building not immediately begin to cool?</p>

<p>The answer is that sunset only removes one of the <em>heat inputs</em> at the outside of the building. It does not remove the <em>energy</em> that has already been absorbed by the walls, roof, floors, furniture and other parts of the building. In a building made from let’s say two layers of brick, a considerable amount of energy can be stored in the masonry. This energy does not immediately appear at the inner wall surface. Instead, it slowly <em>diffuses</em> through the material and may reach the interior many hours after the outside of the wall was heated.</p>

<p>This behaviour is usually described as <strong>thermal diffusion</strong>, <strong>thermal phase lag</strong> or in building physics as the <strong>time shift of a periodic temperature wave</strong>. <em>“Heat creep”</em> gives a reasonable intuitive picture, but it is not the usual physical term.</p>

<ul>
  <li><a href="#the-temperature-maximum-is-not-the-heat-input-maximum">The temperature maximum is not the heat-input maximum</a></li>
  <li><a href="#heat-does-not-pass-through-the-wall-instantaneously-...">Heat does not pass through the wall instantaneously …</a></li>
  <li><a href="#the-daily-temperature-cycle-behaves-like-a-damped-wave">The daily temperature cycle behaves like a damped wave</a></li>
  <li><a href="#an-example-for-a-massive-brick-wall">An example for a massive brick wall</a></li>
  <li><a href="#the-outside-wall-may-become-much-hotter-than-the-outside-air">The outside wall may become much hotter than the outside air</a></li>
  <li><a href="#why-the-room-can-still-heat-up-at-0400">Why the room can still heat up at 04:00</a></li>
  <li><a href="#is-the-heat-flow-isotropic">Is the heat flow isotropic?</a></li>
  <li><a href="#a-thermal-rc-model-of-the-building">A thermal RC model of the building</a></li>
  <li><a href="#why-one-hot-day-and-one-hot-week-behave-differently">Why one hot day and one hot week behave differently</a></li>
  <li><a href="#the-wall-may-not-be-the-only-source">The wall may not be the only source</a></li>
  <li><a href="#a-simple-experiment">A simple experiment</a></li>
  <li><a href="#cooling-the-room-requires-cooling-the-thermal-mass">Cooling the room requires cooling the thermal mass</a></li>
  <li><a href="#conclusion">Conclusion</a></li>
  <li><a href="#references">References</a></li>
</ul>

<video autoplay="" loop="" muted="" playsinline="" poster="/assets/images/png/thermalroom02.png" width="878" style="display:block; max-width:90%; height:auto; margin:0 auto;">
    <source src="/assets/videos/mp4/physicus_wand.mp4" type="video/mp4" />
    <img src="/assets/images/png/thermalroom02.png" alt="" />
</video>

<h2 id="the-temperature-maximum-is-not-the-heat-input-maximum">The temperature maximum is not the heat-input maximum</h2>

<p>The first important point is that the indoor temperature does not reach its maximum when the external heating power reaches its maximum. The temperature continues to rise for as long as more heat enters the room than leaves it.</p>

<p>A simplified energy balance for the room can be written as</p>

[
C_{\mathrm{room}}\frac{\mathrm dT_{\mathrm{room}}}{\mathrm dt} = \partial_t Q_{\mathrm{walls}} + \partial_t Q_{\mathrm{windows}} + \partial_t Q_{\mathrm{roof}} + \partial_t Q_{\mathrm{internal}} - \partial_t Q_{\mathrm{loss}}
]

<p>Here, $C_{\mathrm{room}}$ is the effective heat capacity of the room, including not only the air but also the floor, ceiling, internal walls, furniture and other objects that exchange heat with the air. The individual $\partial_t Q$ terms describe the different heat flows.</p>

<p>The temperature rises whenever</p>

[
\partial_t Q_{\mathrm{walls}} + \partial_t Q_{\mathrm{windows}} + \partial_t Q_{\mathrm{roof}} + \partial_t Q_{\mathrm{internal}} > \partial_t Q_{\mathrm{loss}}.
]

<p>The temperature maximum is reached only when both sides become equal:</p>

[
\partial_t Q_{\mathrm{in}}=\partial_t Q_{\mathrm{out}}.
]

<p>There is therefore no reason for the indoor maximum to coincide with sunset. The sun may already have disappeared while the walls are still releasing the energy that was absorbed during the afternoon.</p>

<p>The same effect can be seen in many simpler systems:</p>

<ul>
  <li>An electric oven does not immediately become cold when the heating element is switched off.</li>
  <li>A large stone exposed to sunlight remains warm after sunset.</li>
  <li>A saucepan continues heating its contents for a while after it has been removed from a hot plate.</li>
</ul>

<p>In each case, energy has first been stored in a massive object and is subsequently redistributed. A house is simply a more complicated version of the same system.</p>

<h2 id="heat-does-not-pass-through-the-wall-instantaneously-">Heat does not pass through the wall instantaneously …</h2>

<p>… and it enters and leaves at different surfaces when passing through walls. Heat conduction in a homogeneous material is described by the heat equation</p>

[
\frac{\partial T}{\partial t} = \alpha\nabla^2 T
]

<p>where</p>

[
\alpha=\frac{\lambda}{\rho c_p}
]

<p>is the thermal diffusivity of the material. In this expression</p>

<ul>
  <li>$\lambda$ is the thermal conductivity,</li>
  <li>$\rho$ is the density,</li>
  <li>$c_p$ is the specific heat capacity.</li>
</ul>

<p>Thermal conductivity describes how readily heat flows through the material. Heat capacity describes how much energy has to be supplied to change its temperature. Thermal diffusivity combines both effects and describes how quickly a temperature disturbance propagates through the material.</p>

<p>A material can therefore conduct heat reasonably well while still responding slowly if its volumetric heat capacity $\rho c_p$ is large. Brick and concrete are important examples. They are not particularly good thermal insulators when compared with dedicated insulation materials, but they can store a <em>substantial</em> amount of energy.</p>

<p>This distinction between <em>thermal resistance</em> and <em>thermal mass</em> is important. Thermal insulation limits the amount of heat passing through a wall. Thermal mass delays and smooths temperature changes. A wall can have a large thermal mass without having an especially good insulation value.</p>

<h2 id="the-daily-temperature-cycle-behaves-like-a-damped-wave">The daily temperature cycle behaves like a damped wave</h2>

<!--
The folks who know physis see it coming - the harmonic oscillator.
-->

<p>The outside temperature and solar heating approximately repeat with a period of one day. They can therefore be approximated by a periodic boundary condition. Suppose the outside surface temperature of a wall varies as</p>

[
T(0,t) = T_0+A_0\cos(\omega t)
]

<p>where $T_0$ is the average temperature, $A_0$ is the amplitude of the daily variation and</p>

[
\omega=\frac{2\pi}{P}
]

<p>is the angular frequency. For the daily cycle,</p>

[
P=24\ \mathrm{h}=86400\ \mathrm{s}.
]

<p>For a sufficiently thick homogeneous wall, the corresponding solution of the one-dimensional heat equation has the approximate form</p>

[
T(x,t) = T_0+A_0 \exp\left(-\frac{x}{\delta}\right) \cos\left(\omega t-\frac{x}{\delta}\right)
]

<p>The quantity</p>

[
\begin{aligned}
\delta &= \sqrt{\frac{2\alpha}{\omega}} \\
&= \sqrt{\frac{\alpha P}{\pi}}
\end{aligned}
]

<p>is the <em>thermal penetration depth</em>.</p>

<p>This equation shows two effects. First, the amplitude decreases exponentially with depth:</p>

[
A(x)=A_0\exp\left(-\frac{x}{\delta}\right)
]

<p>Second, the oscillation is delayed by the <em>phase</em></p>

[
\varphi(x)=\frac{x}{\delta}
]

<p>The corresponding time delay is</p>

[
\begin{aligned}
\Delta t &= \frac{\varphi}{\omega} \\
&= \frac{x}{\delta\omega}
\end{aligned}
]

<p>Thus, the deeper the heat wave travels into the wall, the weaker and more delayed it becomes.</p>

<p>Strictly speaking, heat is not transported as a wave in the same way as sound or light. There is no defined thermal pulse travelling through the wall at a fixed velocity. The process remains diffusive. Nevertheless, for periodically varying temperatures, the mathematical solution looks like a strongly damped and phase-shifted wave.</p>

<h2 id="an-example-for-a-massive-brick-wall">An example for a massive brick wall</h2>

<p>As an illustrative value, a thermal diffusivity of</p>

[
\alpha=4\times10^{-7}\ \mathrm{m^2\,s^{-1}}
]

<p>may be assumed for the masonry (this has been taken our of my personal experience). The exact value depends considerably on the type of brick, its porosity, moisture content, mortar joints and the complete wall construction.</p>

<p>For a 24-hour cycle, the thermal penetration depth then becomes</p>

[
\delta = \sqrt{\frac{\left(4\times10^{-7}\ \mathrm{m^2\,s^{-1}}\right)\left(86400\ \mathrm{s}\right)}{\pi}} \approx 0.105\ \mathrm{m}
]

<p>The penetration depth is therefore about $10.5\ \mathrm{cm}$</p>

<p>The associated phase delay can now be estimated for different wall depths:</p>

[
\Delta t = \frac{x}{\delta\omega}
]

<p>Since</p>

[
\frac{1}{\omega} = \frac{P}{2\pi} \approx 3.82\ \mathrm{h}
]

<p>each thermal penetration depth corresponds to a delay of approximately $3.82$ hours.</p>

<p>For a depth of $20\ \mathrm{cm}$</p>

[
\frac{x}{\delta} \approx \frac{0.20}{0.105} \approx 1.90
]

<p>and therefore</p>

[
\Delta t \approx 1.90\cdot3.82\ \mathrm{h} \approx 7.3\ \mathrm{h}
]

<p>For $30\ \mathrm{cm}$</p>

[
\Delta t\approx10.9\ \mathrm{h}
]

<p>and for $35\ \mathrm{cm}$,</p>

[
\Delta t\approx12.7\ \mathrm{h}
]

<p>A thermal excitation occurring at the outside of the wall at around 15:00 or 16:00 can therefore influence the inside surface most strongly sometime during the night. A delay into the range between approximately 02:00 and 05:00 is quite plausible for a massive wall system.</p>

<p>These numbers should not be interpreted as an exact prediction for a particular house. A real wall is not a homogeneous semi-infinite slab. It may contain different types of brick, mortar, plaster, air cavities, insulation, anchors and various thermal bridges. Convective heat transfer occurs at both surfaces, and the indoor temperature itself changes during the process.</p>

<p>Nevertheless, the calculation demonstrates that a delay of many hours is not unusual. It follows naturally from the heat equation.</p>

<h2 id="the-outside-wall-may-become-much-hotter-than-the-outside-air">The outside wall may become much hotter than the outside air</h2>

<p>The external air temperature is only one of the boundary conditions. A sunlit wall can become substantially warmer than the surrounding air because it directly absorbs solar radiation. A simplified energy balance at the outer surface can be written as</p>

[
q_{\mathrm{solar}} + q_{\mathrm{conv,out}} + q_{\mathrm{rad,out}} = q_{\mathrm{conducted\ into\ wall}}.
]

<p>The absorbed solar heat flux is approximately</p>

[
q_{\mathrm{solar}} = a_{\mathrm{s}}G
]

<p>where $G$ is the incident solar irradiance and $a_{\mathrm{s}}$ is the solar absorptivity of the surface.</p>

<p>A dark façade absorbs a larger fraction of the incoming radiation than a light façade. Wind cools the surface by convection. Long-wave radiation is exchanged with the sky and the surroundings. The wall surface temperature consequently results from several competing effects.</p>

<p>The time of maximum solar irradiation does not necessarily coincide with the maximum outside surface temperature. The outermost layers of the wall have their own heat capacity, so their temperature can continue to increase for a while after the irradiation begins to decrease. The complete delay between maximum sunlight and maximum indoor temperature is therefore composed of several stages:</p>

[
\text{solar irradiation} \rightarrow \text{outside surface temperature} \rightarrow \text{temperature inside the wall} \rightarrow \text{inside surface temperature} \rightarrow \text{room temperature}
]

<p>Each stage adds some amount of delay and attenuation.</p>

<h2 id="why-the-room-can-still-heat-up-at-0400">Why the room can still heat up at 04:00</h2>

<p>Assume that the strongest solar input occurs at around 16:00 and that the sun sets at around 20:00. During the afternoon, the external layers of the masonry are heated. Some energy is immediately transferred back to the outside air, some is radiated away, and some diffuses deeper into the wall.</p>

<p>At sunset, the outer surface begins to cool. However, the temperature <em>inside</em> the wall is not uniform. A temperature gradient remains:</p>

[
\nabla T\ne0
]

<p>The intermediate layers can still be <em>warmer</em> than the inner layers, so heat continues flowing towards the interior according to Fouriers law</p>

[
\vec q=-\lambda\nabla T
]

<p>At the same time, floors, ceilings, internal walls and furniture may also have been heated during the day. They continue exchanging energy with the room air. Warm air may also be entering from other parts of the building, particularly from an attic, stairwell or neighbouring flat.</p>

<p>The indoor temperature continues to rise as long as the combined delayed heat release exceeds the heat lost through ventilation, conduction and radiation.</p>

<p>In my personal measured case at approximately 04:00, several things may finally have changed sufficiently:</p>

<ul>
  <li>the inward heat flux through the walls has decreased</li>
  <li>the external air has become cooler</li>
  <li>heat loss through windows and other surfaces has increased</li>
  <li>ventilation or leakage removes more energy than the building fabric supplies</li>
</ul>

<p>At that moment</p>

[
\partial_t T_\mathrm{room} = 0
]

<p>and the indoor temperature reaches its maximum. It then begins to decrease.</p>

<p>The maximum temperature therefore marks the point at which the net heat flow changes sign.</p>

<h2 id="is-the-heat-flow-isotropic">Is the heat flow isotropic?</h2>

<p>In an approximately homogeneous brick, heat conduction may be treated as locally isotropic. Fouriers law then uses a scalar thermal conductivity:</p>

[
\vec q=-\lambda\nabla T
]

<p>This means that there is no intrinsic preferred direction in the material. Heat flows in whichever direction the temperature decreases most rapidly.</p>

<p>The geometry of a wall, however, strongly restricts the macroscopic problem. A wall may be several metres high and wide but only a few tens of centimetres thick. Far away from corners, windows and other discontinuities, the dominant temperature gradient is perpendicular to the wall.</p>

<p>The system can therefore often be approximated as one-dimensional:</p>

[
\partial_t T = \alpha\frac{\partial^2T}{\partial x^2}.
]

<p>Heat does spread sideways as well, especially around windows, balconies, corners, beams and wall connections. For a sufficiently large uninterrupted section of wall, however, the through-thickness component dominates.</p>

<p>Thus, the effect is caused by diffusive heat spreading in the masonry, but describing the complete wall as an isotropically expanding heat cloud would be misleading. The relevant macroscopic behaviour is mostly one-dimensional heat conduction with a large phase delay.</p>

<h2 id="a-thermal-rc-model-of-the-building">A thermal RC model of the building</h2>

<p>The heat equation provides the detailed distributed description. For analysing an entire house, it is often useful to replace the structure by a network of thermal resistances and heat capacities (in analogy to electrodynamics).</p>

<p>A simple wall model might contain an outside surface node, an outer masonry node, an inner masonry node and an inside surface node:</p>

[
T_{\mathrm{out}} \longleftrightarrow T_{\mathrm{wall,out}} \longleftrightarrow T_{\mathrm{wall,in}} \longleftrightarrow T_{\mathrm{room}}.
]

<p>Each connection is represented by a thermal resistance $R$, while each massive region is represented by a thermal capacity $C$. For one node</p>

[
C_i \partial_t \mathrm T_i = \sum_j\frac{T_j-T_i}{R_{ij}} + P_i(t)
]

<p>This is mathematically similar to an electrical RC network. Temperature corresponds to voltage, heat flow corresponds to electric current, thermal resistance corresponds to electrical resistance and heat capacity corresponds to electrical capacitance.</p>

<p>A massive building is therefore a large, distributed <em>thermal low-pass filter</em>. Rapid external temperature changes are strongly suppressed. Slow changes pass through more readily. The daily cycle is delayed and attenuated, while seasonal changes penetrate much farther into the building.</p>

<p>This filtering behaviour explains why massive buildings often remain pleasantly cool during the first hot day. The heat has not yet penetrated deeply into the structure. After several consecutive hot days, however, the entire thermal mass gradually becomes warmer. Once this happens, the same mass that previously kept the interior cool can keep releasing heat during the night.</p>

<p>Thermal mass is therefore not a heat sink of unlimited capacity. It is temporary energy storage.</p>

<h2 id="why-one-hot-day-and-one-hot-week-behave-differently">Why one hot day and one hot week behave differently</h2>

<p>The thermal penetration depth depends on the period of the excitation:</p>

[
\delta=\sqrt{\frac{\alpha P}{\pi}}
]

<p>Longer period variations penetrate more deeply. For a one-day cycle, only the outer portion of a thick wall participates strongly in the oscillation. For a weather pattern lasting several days, the penetration depth is larger. For the seasonal cycle, it becomes much larger still.</p>

<p>If the period increases from one day to seven days, the penetration depth increases by</p>

[
\sqrt{7}\approx2.65
]

<p>The corresponding thermal disturbance can therefore reach much deeper into the building fabric. During a prolonged heat wave, the average temperature of the whole wall gradually increases. The night may no longer be sufficiently cool or sufficiently long to remove the stored energy.</p>

<p>This is why a massive brick building can behave extremely well during short temperature peaks and considerably less well after a week of hot weather. During the first days, the masonry absorbs heat while its interior remains relatively cool. Later, the available thermal storage has already been charged.</p>

<blockquote>
  <p>At that point, opening the windows during the day may make the situation worse, but <strong>Even a short period of ventilation during the night may only primarily cool the room air and immediate surfaces, while considerably more energy remains stored deeper in the structure. Sustained night ventilation can gradually remove this energy as it diffuses back towards the surfaces.</strong>.</p>
</blockquote>

<h2 id="the-wall-may-not-be-the-only-source">The wall may not be the only source</h2>

<p>A delayed heat flux through massive exterior walls is a plausible explanation for a temperature maximum around 04:00, but it should not automatically be assumed to be the only explanation. Several other parts of the building can produce similar or even larger effects.</p>

<p>A roof or attic can reach high temperatures during the day and release heat downwards for many hours. Reinforced-concrete floors and ceilings can store more energy than the room air by several orders of magnitude. Direct sunlight entering through a window can heat the floor and furniture. Appliances, computers, refrigerators and people continuously add internal heat. Warm air can enter from stairwells or neighbouring rooms. Ventilation may also become ineffective when the outside air remains warm during the evening.</p>

<p>For a room with large sunlit windows, direct solar transmission through the glazing is often more important than heat conducted through an opaque wall. The sunlight passes through the glass and is absorbed by internal surfaces. The energy is therefore deposited directly inside the thermal envelope instead of first having to diffuse through the wall.</p>

<p>The same thermal-mass argument still applies, but the relevant storage object may then be the floor, the interior wall or the furniture rather than the external brick wall.</p>

<h2 id="a-simple-experiment">A simple experiment</h2>

<p>The mechanism can be investigated with a few temperature sensors. Ideally, the following quantities would be recorded every five or ten minutes:</p>

[
\begin{aligned}
T_{\mathrm{air,out}}(t) \\
T_{\mathrm{surface,out}}(t) \\
T_{\mathrm{surface,in}}(t) \\
T_{\mathrm{air,in}}(t)
\end{aligned}
]

<p>Solar irradiance or at least a binary indication of direct sunlight would also be useful. Wind, open windows and active ventilation should be noted because they can substantially change the surface heat transfer.</p>

<p>The four temperature curves should not peak simultaneously. A likely sequence would be</p>

[
t_{\mathrm{sun}} < t_{\mathrm{surface,out}} < t_{\mathrm{surface,in}} < t_{\mathrm{air,in}}
]

<p>The exact order of the last two may vary because the indoor air is influenced by multiple surfaces and internal heat sources. For an approximately sinusoidal signal, the time shift can be determined from the phase difference. If the outside and inside surface temperatures are fitted</p>

[
T_{\mathrm{out}}(t) = \bar T_{\mathrm{out}} + A_{\mathrm{out}}\cos(\omega t-\varphi_{\mathrm{out}})
]

<p>and</p>

[
T_{\mathrm{in}}(t) = \bar T_{\mathrm{in}} + A_{\mathrm{in}}\cos(\omega t-\varphi_{\mathrm{in}})
]

<p>the measured delay is</p>

[
\Delta t  = \frac{ \varphi_{\mathrm{in}}-\varphi_{\mathrm{out}}}{\omega}
]

<p>The attenuation of the daily oscillation is</p>

[
f=\frac{A_{\mathrm{in}}}{A_{\mathrm{out}}}
]

<p>For the ideal homogeneous model</p>

[
f=\exp\left(-\frac{x}{\delta}\right).
]

<p>The measured delay and attenuation could therefore be used to <em>estimate an effective thermal diffusivity</em>. From the delay,</p>

[
\alpha \approx \frac{x^2P}{4\pi(\Delta t)^2}.
]

<p>This result would represent the complete effective wall construction rather than a pure material property of one brick. Plaster, mortar, cavities, insulation and surface heat transfer would all influence the measurement. Even so, it would provide a useful experimental description of the walls dynamic behaviour.</p>

<p>The followin graph shows a few measurement points inside a facility - showing clear peaking of the temperature at around 01:30 at night. It also shows how the peak shifts with respect to different locations inside the facility.</p>

<p><img src="/assets/images/png/thermalroom01.png" alt="" /></p>

<h2 id="cooling-the-room-requires-cooling-the-thermal-mass">Cooling the room requires cooling the thermal mass</h2>

<p>This analysis also explains why briefly opening a window may produce only temporary relief. The heat capacity of the room air is surprisingly small. For a room volume $V$, the heat capacity of the air is approximately</p>

[
C_{\mathrm{air}} = \rho_{\mathrm{air}}c_{p,\mathrm{air}}V
]

<p>For a $50\ \mathrm{m^3}$ room, using</p>

[
\rho_{\mathrm{air}}\approx1.2\ \mathrm{kg\,m^{-3}}
]

<p>and</p>

[
c_{p,\mathrm{air}}\approx1000\ \mathrm{J\,kg^{-1}K^{-1}},
]

<p>one obtains</p>

[
C_{\mathrm{air}} \approx 60\,000\ \mathrm{J\,K^{-1}}.
]

<p>Only about $60\ \mathrm{kJ}$ is therefore required to change the air temperature by one kelvin.</p>

<p>A few tonnes of brick, concrete, plaster and furniture have an enormously larger effective heat capacity. After cool outside air has replaced the warm room air, the warmer surfaces can therefore heat the new air again within a relatively short time.</p>

<p><strong>Effective night cooling has to remove energy from the building fabric, not merely exchange the air once</strong>. This generally requires sustained ventilation or for longer heatwaves air conditioning. Airflow should pass across the warm surfaces, and cross-ventilation is much more effective than a single slightly opened window.</p>

<p>External shading is even better because it prevents solar energy from <em>entering</em> the system in the first place. Once energy has been absorbed by the building, it has to leave again through ventilation, radiation or conduction.</p>

<h2 id="conclusion">Conclusion</h2>

<p>Solar radiation heats the external surfaces during the daytime. Heat then diffuses through the masonry and is stored in the wall. The daily temperature variation is attenuated and phase-shifted as it travels through the material. For several tens of centimetres of massive masonry, delays on the order of eight to fourteen hours are physically plausible.</p>

<p>The room temperature continues to rise until the delayed heat released by walls, ceilings, floors and furniture becomes smaller than the heat leaving the room. Sunset removes the original external source, but the building continues processing the energy that it received earlier.</p>

<p>Thus, the effect may be described intuitively as heat slowly creeping through the structure. Physically, however, it is a combination of thermal diffusion, heat storage and the phase lag of a massive building acting as a distributed thermal low-pass filter.</p>

<h2 id="references">References</h2>

<ul>
  <li>Wolfgang Demtröder, <a href="https://amzn.to/4x1Lbj0">Experimentalphysik 1: Mechanik und Wärme</a> - an often used first semester physics book that covers thermodynamics</li>
</ul>]]></content><author><name>tsp</name></author><category term="Basics" /><category term="Tutorial" /><category term="Physics" /><category term="School math" /><category term="How stuff works" /><summary type="html"><![CDATA[Why does a flat sometimes continue heating up long after the sun has disappeared? The answer is not simply that the walls are still warm. Massive buildings store energy and temperature changes diffuse through brick, concrete, floors and ceilings only slowly. The daily heating cycle is therefore attenuated and phase shifted as it propagates through the structure. This article takes a short look at that delayed thermal response using the heat equation, a simple thermal RC model and actual temperature measurements. It shows why the indoor maximum can occur many hours after the strongest solar input, why one hot day behaves differently from an entire hot week and why effective night cooling has to cool the building itself rather than merely replacing the warm air inside.]]></summary></entry><entry><title type="html">Why I Prefer FreeBSD on All of My Machines</title><link href="https://www.tspi.at/2026/08/30/freebsdeverywhere.html" rel="alternate" type="text/html" title="Why I Prefer FreeBSD on All of My Machines" /><published>2026-08-30T00:00:00+02:00</published><updated>2026-08-30T13:07:04+02:00</updated><id>https://www.tspi.at/2026/08/30/freebsdeverywhere</id><content type="html" xml:base="https://www.tspi.at/2026/08/30/freebsdeverywhere.html"><![CDATA[<blockquote class="disclaimer">
  <p>⚠️ <strong>Authors note</strong>:
This is an opinion article. It describes my personal experience and preference. Anyone can use which ever operating system they like and think of fitting them best (though I strongly oppose that any system should be <em>required</em> or called a <em>de-facto standard</em>, I hope we have left those times behind and have learned something from it). Whenever I am free to choose, I will almost always choose FreeBSD. And when I am not free to choose I will use it anyway.</p>
</blockquote>

<p>Whenever I mention that I use <a href="http://www.freebsd.org/">FreeBSD</a>, people usually assume that I am talking about a server, a storage appliance, a router or perhaps some other infrastructure system hidden in a rack. Using FreeBSD on a workstation with a graphical user interface already appears unusual to many people, and using it on an embedded system such as a Raspberry Pi somehow seems almost incomprehensible. I have never really understood this categorization. A workstation, a server and a Raspberry Pi are all computers. They differ in their available resources, peripherals and workloads, but there is no reason why this should automatically require three completely different administrative environments.</p>

<p>In fact, one of the greatest advantages of using FreeBSD is precisely that the same operating system can be used on all of them. The configuration files are in the same locations, services are managed in the same way, network interfaces are configured using the same tools, system parameters are adjusted using the same mechanisms, and the same package-management and build infrastructure is available. When I move from my workstation to a server through SSH, or from a server to an embedded controller through a serial console, I do not have to switch mental models. I do not have to remember which generation of network-management framework happens to be used on this machine, where this distribution stores its service configuration, which package manager is responsible for a particular file or whether a certain command happens to be the GNU, BusyBox or some distribution-specific implementation.</p>

<p>This uniformity is extremely convenient and, in my opinion, often underestimated. Knowledge gained while debugging a workstation is directly useful when repairing a server. A script written to configure an <code class="language-plaintext highlighter-rouge">amd64</code> machine can often be used almost unchanged on an <code class="language-plaintext highlighter-rouge">AArch64</code> board. The same commands, directory structures and conventions occur everywhere. Instead of learning separate operating systems for desktop computers, servers and embedded devices, I can concentrate on the differences which actually matter: the hardware and the application.</p>

<p>There are naturally exceptions. Sometimes a device is not supported well enough, a proprietary application requires another operating system or a vendor supplies an essential driver only for Linux or Windows (though reverse engineering capabilities of modern LLMs even solve this pretty well). Some Raspberry Pi systems currently run Raspberry Pi OS because I need uniform hardware support across several Pi generations. This is a pragmatic decision, not an ideological preference. Where the required hardware works, I would much rather use FreeBSD.</p>

<ul>
  <li><a href="#a-quiet-system-by-default">A quiet system by default</a></li>
  <li><a href="#consistency-without-freezing-the-system-in-time">Consistency without freezing the system in time</a></li>
  <li><a href="#an-integrated-operating-system">An integrated operating system</a></li>
  <li><a href="#standards-and-predictable-command-line-tools">Standards and predictable command-line tools</a></li>
  <li><a href="#documentation-and-source-code-quality">Documentation and source-code quality</a></li>
  <li><a href="#binary-and-source-compatibility">Binary and source compatibility</a></li>
  <li><a href="#foreign-binaries-and-compatibility-layers">Foreign binaries and compatibility layers</a></li>
  <li><a href="#jails-and-virtualization">Jails and virtualization</a></li>
  <li><a href="#zfs">ZFS</a></li>
  <li><a href="#networking">Networking</a></li>
  <li><a href="#a-graphical-workstation-is-still-a-unix-machine">A graphical workstation is still a Unix machine</a></li>
  <li><a href="#embedded-systems-are-computers-too">Embedded systems are computers too</a></li>
  <li><a href="#hardware-and-gpu-support">Hardware and GPU support</a></li>
  <li><a href="#the-license">The license</a></li>
  <li><a href="#no-systemd">No systemd</a></li>
  <li><a href="#why-i-do-not-want-windows">Why I do not want Windows</a></li>
  <li><a href="#mandatory-access-control-and-the-optional-superuser">Mandatory access control and the optional superuser</a>
    <ul>
      <li><a href="#the-optional-superuser">The optional superuser</a></li>
    </ul>
  </li>
  <li><a href="#the-alleged-software-problem">The alleged software problem</a></li>
  <li><a href="#the-operating-system-underneath-the-work">The operating system underneath the work</a></li>
  <li><a href="#references">References</a></li>
</ul>

<p><img src="/assets/images/png/freebsdeverywhere01.png" alt="" /></p>

<h2 id="a-quiet-system-by-default">A quiet system by default</h2>

<p>One of the first characteristics I appreciate about FreeBSD becomes visible immediately after installation: it does not enable a large collection of remotely accessible or application-level services merely because somebody thought they might possibly be useful.</p>

<p>A newly installed FreeBSD system naturally runs the basic facilities required by an operating system. Device management, system logging, process scheduling and periodic maintenance do not disappear. The important point is that additional services generally remain disabled until the administrator explicitly enables them. SSH, NFS, RPC services, routing daemons and third-party applications do not spontaneously become active simply because their packages happen to be installed.</p>

<p>When I want an SSH server, I enable it:</p>

<div class="language-text highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sysrc sshd_enable="YES"
/etc/rc.d/sshd start
</code></pre></div></div>

<p>The decision is then visible in <code class="language-plaintext highlighter-rouge">/etc/rc.conf</code>. A third-party service installed through the package system usually provides an <code class="language-plaintext highlighter-rouge">rc.d</code> script below <code class="language-plaintext highlighter-rouge">/usr/local/etc/rc.d</code>, but it will still not be started until I enable it. The base system and additional software follow the same general administrative model.</p>

<p>This has consequences beyond saving a few megabytes of memory. When examining a machine, I can normally determine why every significant service is running. There should not be an indexing daemon, discovery service, synchronization client, telemetry component, cloud integration layer or update orchestrator which appeared because of a default selected by somebody else. A running process usually corresponds to an explicit administrative decision.</p>

<p>A quiet default installation also keeps the number of failure modes and the exposed attack surface small. A service which is not running cannot listen on a network socket, consume memory, write logs, wake up the processor or alter system state. This is especially valuable on embedded platforms and older computers, where resources should be spent on the actual purpose of the machine rather than on a growing collection of background components.</p>

<p>FreeBSD starts as a comparatively small and understandable system. Capabilities are added when they become necessary. This is a remarkably simple principle, but it is one which many modern operating systems appear to have abandoned.</p>

<h2 id="consistency-without-freezing-the-system-in-time">Consistency without freezing the system in time</h2>

<p>FreeBSD has existed since the early 1990s, and a current installation is obviously very different from one from that era. Hardware architectures have appeared and disappeared, storage systems have changed, new security mechanisms have been introduced, and entire classes of network and peripheral devices did not exist when the project began. Nevertheless, the basic administrative structure of the system remains recognizable.</p>

<p>Central system configuration is found below <code class="language-plaintext highlighter-rouge">/etc</code>. Local settings normally belong in <code class="language-plaintext highlighter-rouge">/etc/rc.conf</code>, while the supplied defaults remain separately in <code class="language-plaintext highlighter-rouge">/etc/defaults/rc.conf</code>. Boot-loader configuration belongs in <code class="language-plaintext highlighter-rouge">/boot/loader.conf</code>, runtime kernel parameters in <code class="language-plaintext highlighter-rouge">/etc/sysctl.conf</code>, and third-party application configuration normally in <code class="language-plaintext highlighter-rouge">/usr/local/etc</code>. Base-system startup scripts live below <code class="language-plaintext highlighter-rouge">/etc/rc.d</code>, while scripts installed by packages are placed below <code class="language-plaintext highlighter-rouge">/usr/local/etc/rc.d</code>.</p>

<p>This layout has survived for decades because it works. It is not necessary to replace it merely to make a new release appear modern. Improvements are introduced within the existing administrative model instead of invalidating it. The <code class="language-plaintext highlighter-rouge">sysrc</code> utility, for example, provides a convenient and safe interface for changing <code class="language-plaintext highlighter-rouge">rc.conf</code>, but it does not hide the resulting configuration inside an opaque database. The file can still be read and edited using an ordinary text editor.</p>

<p>As a result, old knowledge retains value. A FreeBSD administrator returning after many years will encounter a few new commands, new filesystems, new security facilities and new hardware, but the system will still be structurally familiar. Old documentation may contain obsolete details, but its description of the overall operating model often remains useful. Configuration experience accumulates instead of being discarded every time a new framework becomes fashionable.</p>

<p>This consistency becomes even more valuable when several classes of machines are involved. My workstation, servers, virtualization hosts and embedded systems do not need entirely different configuration-management approaches. The shell history and manual pages on one machine remain relevant on another. When I have understood how a particular subsystem behaves on my workstation, I can apply the same understanding to a remote server or a small ARM board.</p>

<p>Consistency is therefore not merely a pleasant property of an individual installation. It reduces the total cognitive complexity of an entire environment.</p>

<h2 id="an-integrated-operating-system">An integrated operating system</h2>

<p>Another important distinction is that FreeBSD is developed as an integrated operating system. Its kernel, base userland, system libraries, boot loader, shell, fundamental utilities, service-management framework and documentation belong to the same project and are maintained in a common source tree.</p>

<p>Linux itself is a kernel. A usable Linux system combines that kernel with a C library, a userland, compiler tools, a startup system, package-management infrastructure and many other independently developed components. Linux distributions perform the considerable work of selecting and integrating those pieces, but they make different decisions. Even distributions which initially appear similar may use different network-management systems, firewall frameworks, package layouts, boot mechanisms and upgrade procedures.</p>

<p>FreeBSD’s integrated development model produces a more clearly defined base system. Third-party applications are deliberately kept separate through binary packages and the Ports Collection. Files below <code class="language-plaintext highlighter-rouge">/usr/bin</code> and <code class="language-plaintext highlighter-rouge">/usr/sbin</code> belong to the operating system, while additional programs are normally installed below <code class="language-plaintext highlighter-rouge">/usr/local/bin</code> and <code class="language-plaintext highlighter-rouge">/usr/local/sbin</code>. The same distinction exists between <code class="language-plaintext highlighter-rouge">/etc</code> and <code class="language-plaintext highlighter-rouge">/usr/local/etc</code>.</p>

<p>This separation makes upgrades, repairs and audits much easier. It is usually clear whether a file belongs to FreeBSD itself or to an installed application. The base system is not simply another collection of packages mixed together with browsers, databases and desktop programs. It can be rebuilt from <code class="language-plaintext highlighter-rouge">/usr/src</code>, upgraded as a coherent unit and compared against a known system distribution.</p>

<p>The integrated model does not eliminate bugs, nor does it mean that every component always evolves at exactly the same rate. It does, however, greatly reduce the number of accidental boundaries between independently assembled components. The kernel and userland are designed with one another in mind, and the documentation describes that particular combination rather than an abstract mixture which may behave differently on each distribution.</p>

<h2 id="standards-and-predictable-command-line-tools">Standards and predictable command-line tools</h2>

<p>I also appreciate the way FreeBSD approaches standards. This point requires some qualification because FreeBSD utilities are not identical to GNU utilities, and not every traditional Unix command has a completely standardized interface. Where no applicable specification exists, implementations naturally differ. A script which relies on a GNU-specific extension is not portable merely because several Linux distributions happen to ship the same GNU implementation.</p>

<p>Where standards do exist, however, FreeBSD generally treats them as contracts. POSIX-defined behaviour is taken seriously, and extensions tend to be identified as such. Manual pages frequently contain explicit <code class="language-plaintext highlighter-rouge">STANDARDS</code>, <code class="language-plaintext highlighter-rouge">COMPATIBILITY</code> and <code class="language-plaintext highlighter-rouge">HISTORY</code> sections. They explain whether a command follows POSIX, implements historical BSD behaviour or provides an additional FreeBSD-specific option.</p>

<p>This makes command-line tools far less surprising. When behaviour differs from another Unix implementation, it is usually possible to determine whether the difference results from a standard, a documented extension or historical compatibility. The system does not silently assume that whichever behaviour was implemented first has become a universal specification.</p>

<p>For software development, this distinction is valuable. I want to know whether a shell script uses a portable interface or depends on an implementation detail. I want system calls and utility options to have documented semantics, especially when they are used in automation which may survive for many years. Standards compliance does not guarantee the absence of bugs, but it provides a stable target and a shared vocabulary for discussing them.</p>

<h2 id="documentation-and-source-code-quality">Documentation and source-code quality</h2>

<p>FreeBSD manual pages are part of the system rather than an optional accessory. User commands, system calls, configuration files, device drivers and many kernel interfaces are documented locally. It is entirely normal to use <code class="language-plaintext highlighter-rouge">man 4</code> to understand a device driver or <code class="language-plaintext highlighter-rouge">man 9</code> to inspect an internal kernel API.</p>

<div class="language-text highlighter-rouge"><div class="highlight"><pre class="highlight"><code>man rc.conf
man loader.conf
man sysctl
man ifconfig
man jail
man 9 malloc
</code></pre></div></div>

<p>The locally installed manual pages correspond reasonably closely to the locally installed system. This means that solving a problem does not always begin with searching through forum discussions, videos or configuration examples written for some other release. The answer is often already installed on the machine.</p>

<p>The source tree follows a similarly consistent style. No codebase of this size is uniformly beautiful, and FreeBSD naturally contains old compatibility code and complicated subsystems. Nevertheless, naming, formatting, comments, error handling and subsystem organization usually follow recognizable conventions. Moving from one part of the system to another still feels like reading different parts of the same project.</p>

<p>This matters whenever the system has to be extended or debugged beyond ordinary administration. Device drivers, executable-image handlers, network protocols and kernel modules are not inaccessible vendor internals. They are inspectable parts of a system which is intended to be understood and modified. When something behaves unexpectedly, I can read the startup script, inspect the utility, follow the corresponding library call and, if necessary, examine the kernel implementation.</p>

<p>The interfaces themselves are also commonly designed with future extension in mind. Structure sizes, version fields, reserved members, compatibility handlers and extension pointers are used where appropriate so that new functionality does not automatically require every existing consumer to be broken. This cannot make every internal interface eternally stable, but it demonstrates that compatibility is considered during design rather than being left as an afterthought.</p>

<h2 id="binary-and-source-compatibility">Binary and source compatibility</h2>

<p>FreeBSD takes compatibility between kernel and userland seriously. This is partly a practical requirement of the upgrade process: during an in-place source upgrade, the new kernel initially has to run the old userland before the replacement userland can be installed.</p>

<p>The system therefore contains compatibility support for binaries built against older FreeBSD releases. This is not an unconditional promise that every arbitrary executable from every historical release will run forever. A sufficiently old program may require a library which no longer exists, depend on a removed device or rely on an undocumented interface. Nevertheless, when the necessary libraries are retained, old FreeBSD binaries often remain usable for an astonishingly long time.</p>

<p>Shared libraries are handled with a similar concern for ABI stability. Symbol versioning and compatibility implementations make it possible to improve interfaces without instantly invalidating all existing binaries. Kernel interfaces still evolve, particularly for out-of-tree modules, but those changes are generally documented and treated as changes which have a real cost.</p>

<p>The same attitude applies to source compatibility. An old program may need adaptation when standards, compilers or security requirements change, but the system does not casually rearrange fundamental interfaces merely to create activity. Existing software is regarded as something worth preserving.</p>

<p>This is particularly useful in scientific, industrial and embedded environments. Software may outlive the project which originally created it, and rebuilding it may not be trivial. Source code can be lost, development environments can disappear, or a proprietary vendor may no longer exist. Being able to continue executing an old binary is not nostalgia; it is an operational capability.</p>

<h2 id="foreign-binaries-and-compatibility-layers">Foreign binaries and compatibility layers</h2>

<p>FreeBSD’s compatibility architecture extends beyond old FreeBSD executables. The Linux binary compatibility layer allows many unmodified Linux binaries to run directly on supported FreeBSD systems. The kernel implements the relevant Linux ABI, while a Linux userland below <code class="language-plaintext highlighter-rouge">/compat/linux</code> supplies the expected libraries and filesystem content.</p>

<p>This is not the same as running a complete Linux virtual machine. There is no separate Linux kernel, and not every Linux-specific facility is reproduced. Applications which depend deeply on cgroups, namespaces, stuff like the <code class="language-plaintext highlighter-rouge">/proc</code> filesystem that is usually not existing on FreeBSD or particular kernel internals may not work. For ordinary user-space applications, however, the distinction can become nearly invisible. A Linux binary can be started from the shell like another executable and appears in the ordinary process table - often one just needs to patch a few <code class="language-plaintext highlighter-rouge">/bin/bash</code> lines to map correctly to <code class="language-plaintext highlighter-rouge">/bin/sh</code> or <code class="language-plaintext highlighter-rouge">/usr/local/bin/bash</code> and everything is up and running.</p>

<p>FreeBSD also provides mechanisms for associating foreign executable formats with interpreters. Through <code class="language-plaintext highlighter-rouge">binmiscctl</code>, for example, an executable for another architecture can automatically be passed to a QEMU user-mode emulator - for example allowing one to execute AArch64 binaries on the amd64 machine transparently. Windows executables can similarly be integrated through Wine. Build systems and users do not necessarily have to prepend the emulator command manually each time; the operating system can recognize the executable format and select the configured handler.</p>

<p>I find this approach architecturally elegant because compatibility is attached at the executable boundary. The calling process starts a program, and the system decides how that program has to be activated. Emulation and compatibility do not have to be reimplemented independently by every shell script and application.</p>

<p>This also reinforces the idea of using FreeBSD as the common operating environment. Linux or Windows software can be accommodated where necessary without turning the entire machine into a Linux or Windows installation.</p>

<h2 id="jails-and-virtualization">Jails and virtualization</h2>

<p>FreeBSD jails are another technology which existed before containers became fashionable. They were introduced with FreeBSD 4.0 in 2000, several years before LXC appeared and long before container orchestration became an industry of its own.</p>

<p>A jail extends the traditional <code class="language-plaintext highlighter-rouge">chroot</code> concept by isolating more than the filesystem hierarchy. Processes, users, hostnames, networking and other resources can be separated. Modern VNET jails can receive their own virtualized network stacks, and ZFS datasets can be assigned or delegated to individual jails. Depending on the intended use, a jail can contain a complete FreeBSD userland or share substantial parts of the host filesystem through read-only mounts and snapshots.</p>

<p>Jails are not hardware virtual machines and should not be presented as identical security boundaries. They share the host kernel, which is precisely what makes them lightweight. For services which can use the same FreeBSD kernel, they provide a direct and understandable isolation mechanism. A jail can be described in <code class="language-plaintext highlighter-rouge">/etc/jail.conf</code>, attached to a network interface, assigned resource limits and controlled using the ordinary service infrastructure.</p>

<p>For workloads requiring separate kernels, I normally use <a href="https://xenproject.org/">Xen</a>. FreeBSD can operate as a Xen Dom0, allowing the virtualization host itself to remain a FreeBSD system. ZFS can provide the storage, familiar network interfaces and bridges can connect the guests, and the host is still configured through the same mechanisms used everywhere else.</p>

<p>FreeBSD also includes <a href="https://bhyve.org/">bhyve</a>, which is a perfectly reasonable choice and more tightly integrated into the base system. My preference for Xen is based on my existing infrastructure and experience rather than a claim that no other hypervisor should be used.</p>

<p>Keep in mind that jails and full virtualization serve different purposes. Jails offer low-overhead isolation for FreeBSD services, while Xen guests provide a separate kernel and can run other operating systems - or consist of library operating systems. Both can coexist without requiring the host to adopt an entirely different management model.</p>

<h2 id="zfs">ZFS</h2>

<p>Then there is ZFS, which remains, in my opinion, the best general-purpose storage system available.</p>

<p>Calling ZFS a filesystem is technically correct but incomplete. It combines filesystems, pooled storage, checksumming, redundancy, snapshots, clones, compression, replication, quotas, reservations and volume management into a coherent design. Physical storage devices form pools, and datasets are allocated from those pools without requiring the administrator to divide the available space into a rigid collection of traditional partitions.</p>

<p>Each dataset can have its own compression, quota, reservation, snapshot and delegation policy. Snapshots are cheap administrative objects rather than exceptional emergency operations. Clones can be created from snapshots, datasets can be replicated using send and receive streams, and every block is protected by checksums which allow many forms of silent corruption to be detected.</p>

<p>Boot environments are particularly useful on FreeBSD. Before a significant system upgrade, a new boot environment can be created from a snapshot. If the upgrade fails, the previous environment can be selected again from the boot loader. This is not a substitute for backups, but it converts many potentially unpleasant system-recovery procedures into controlled rollbacks.</p>

<p>Yes, ZFS uses RAM. <em>Much</em> RAM. Very much RAM. Its ARC uses available memory as an adaptive storage cache, which is generally a productive use of memory which would otherwise remain unused. The cache can be constrained on small systems, and there are situations in which UFS is the simpler and more appropriate choice. An embedded device with very little memory does not necessarily require ZFS merely because ZFS exists.</p>

<p>On large storage systems, however, the capabilities of ZFS are difficult to replace. Btrfs has improved significantly and may be entirely appropriate for many Linux installations, but I still consider ZFS to provide a more coherent and mature overall storage-management model, particularly at large scale.</p>

<p>The transition from the original FreeBSD ZFS integration to the shared OpenZFS codebase introduced some additional movement and complexity. A subsystem which had previously felt like a tightly controlled part of one operating system became more visibly dependent on a cross-platform upstream project.</p>

<h2 id="networking">Networking</h2>

<p>FreeBSD’s networking stack and network-management tools are another major reason I use it. The system has a long history as a server, router, firewall and network-appliance platform, and that heritage remains visible.</p>

<p>Tools such as <code class="language-plaintext highlighter-rouge">ifconfig</code>, <code class="language-plaintext highlighter-rouge">route</code>, <code class="language-plaintext highlighter-rouge">netstat</code>, <code class="language-plaintext highlighter-rouge">sockstat</code> and <code class="language-plaintext highlighter-rouge">tcpdump</code> form a coherent set. VLANs, bridges, routing tables, packet filters and virtual interfaces behave in understandable ways. PF and IPFW provide powerful firewalling and traffic-control capabilities without requiring an entirely separate orchestration framework.</p>

<p>The most important property is predictability. A network interface behaves like a network interface, a route behaves like a route, and a bridge behaves like a bridge. There is comparatively little magic between the configuration which was written and the packets which leave the machine.</p>

<p>The same tools can be used on a notebook, a jail host, a router, an embedded controller and a Xen Dom0. The topology may be completely different, but the underlying administrative vocabulary remains the same. Once again, there is no need to abandon one mental model and adopt another merely because the machine has a different physical role.</p>

<p>The performance is also excellent. Exact benchmark results naturally depend on drivers, queue configuration, packet sizes, offloading and the workload being tested, but I have repeatedly found FreeBSD networking to remain fast and stable under real loads without requiring the network stack to be replaced by a fashionable special-purpose subsystem.</p>

<h2 id="a-graphical-workstation-is-still-a-unix-machine">A graphical workstation is still a Unix machine</h2>

<p>People usually understand using FreeBSD on a server. They are often much more surprised when I explain that I also use it on graphical workstations and notebooks. I see no reason why connecting a monitor should require replacing the operating system.</p>

<p>On graphical systems, I normally use <a href="https://www.xfce.org/">Xfce</a> running on <a href="https://www.x.org/">Xorg</a>. It provides an ordinary desktop with panels, windows, menus and file management without attempting to become a second operating system layered on top of the first one. It remains lightweight enough that the desktop environment itself does not consume most of the available memory or processor time.</p>

<p>My main workstation is still based on Westmere-era Xeon processors. It has 196 GB of RAM because it is also used for technical workloads which can make productive use of that memory, but the processors themselves are old. I also use older i5- and Celeron-based notebooks with between 2 GB and 8 GB of RAM.</p>

<p>These machines remain useful. They can run editors, compilers, terminals, plotting software, scientific tools, document-processing systems and web browsers. They can be used to develop software, write articles and prepare scientific publications. Not every task requires a new high-end computer, and there is no sensible reason why displaying windows and editing text should demand the equivalent of what would have been considered a supercomputer not very long ago.</p>

<p>Modern web browsers and individual applications can of course consume absurd amounts of memory, and sufficiently demanding simulations, machine-learning workloads or compilation jobs may justify faster processors and modern GPUs. In those cases, the application requires the hardware. What I reject is having to replace a functional computer because the operating system and desktop environment have become too heavy to perform essentially unchanged tasks.</p>

<p>Lightweight software preserves useful hardware. It reduces power consumption, heat, cost and electronic waste, while allowing older systems to continue doing productive work. FreeBSD with Xfce fits this model very well.</p>

<h2 id="embedded-systems-are-computers-too">Embedded systems are computers too</h2>

<p>The same argument applies to embedded platforms. A Raspberry Pi is not intrinsically a Linux machine. It is an ARM computer with a particular collection of peripherals, firmware and hardware interfaces. The operating system remains a separate choice.</p>

<p>Where the required hardware is supported, FreeBSD is an attractive embedded platform precisely because it remains FreeBSD. Service configuration, network administration, package management, shell tools and system layout work in the same way as they do on a large server or workstation. A small laboratory controller or automation node does not require an entirely new administrative worldview.</p>

<p>This uniformity also simplifies automation. The same configuration-generation logic can be applied to amd64 and AArch64 systems. Scripts do not have to detect which of several unrelated network frameworks is currently active. Monitoring, logging and deployment tools can follow the same conventions.</p>

<p>Small systems benefit particularly strongly from FreeBSD’s quiet defaults. A device with 512 MB or 1 GB of RAM should use that memory for its actual function. It should not spend resources on indexing, desktop integration, telemetry, discovery or cloud synchronization which nobody requested.</p>

<p>Hardware support remains the deciding factor. Some boards and peripherals are supported later than they are under Linux, and vendor-specific interfaces may never receive complete FreeBSD drivers. When a project depends on such hardware, Linux may be the pragmatic answer. This is a limitation of available drivers, not evidence that embedded systems require a fundamentally different kind of operating system.</p>

<h2 id="hardware-and-gpu-support">Hardware and GPU support</h2>

<p>Hardware support is one of FreeBSD’s genuine disadvantages. The newest notebook, Wi-Fi chipset or GPU may not be supported immediately. Linux benefits from a much larger contributor base and considerably more vendor attention, while Windows drivers are commonly supplied directly by hardware manufacturers.</p>

<p>I can generally accept hardware support arriving somewhat later, provided that it is properly integrated and remains stable afterwards. Once a device is supported, my experience has been that it usually continues to work reliably across releases. I prefer this to constantly changing layers of partially integrated vendor software.</p>

<p>Graphics support illustrates both sides of the problem. Intel and AMD DRM drivers are derived from the corresponding Linux drivers through a compatibility infrastructure. This works, but it also imports some of the synchronization and versioning complexity which FreeBSD otherwise avoids. Proprietary NVIDIA drivers are luckily available directly from NVIDIA.</p>

<p>Normal accelerated graphical desktops work well on supported hardware. Vulkan has worked on the Intel NUC systems on which I tested it, and OpenCL has been usable for several workloads. Vendor-specific compute remains less convenient. CUDA support lags substantially behind native Linux, and anyone whose primary workload depends on current CUDA tooling will probably have a much easier time using Linux on that particular machine.</p>

<p>This is a real limitation, but it does not follow that every workstation must therefore run Linux or Windows. Operating-system selection should be driven by an actual requirement. The possibility that a machine might someday need an unsupported GPU stack is not enough reason for me to abandon the environment which works better for everything it currently does.</p>

<h2 id="the-license">The license</h2>

<p>FreeBSD’s permissive licensing also matches my understanding of software freedom more closely than copyleft licensing does.</p>

<p>The GPL has achieved many important things. Copyleft has forced manufacturers to publish modifications which might otherwise have remained private, and it has helped preserve large bodies of software as shared infrastructure. The opening of devices such as the WRT54G family is a well-known example of the positive effect GPL obligations can have. I do not dismiss that contribution.</p>

<p>Nevertheless, my own idealistic definition of freedom is closer to the BSD model. When I release software freely, I generally want the recipient to be able to use it for any purpose: in another open-source project, in a proprietary product, in a laboratory instrument, in an embedded controller or as part of a commercial service. Attribution and preservation of the license notices are reasonable requirements, but I do not normally want to dictate the licensing model of the larger system around my component.</p>

<p>This seems particularly appropriate for an operating system. A permissively licensed system can be incorporated into commercial products, research instruments and appliances without forcing the licensing of every surrounding component into the same model. The source remains available, but the recipient receives broad permission rather than a legal mechanism governing whatever may later be built around it.</p>

<p>There is an obvious cost. A company can modify BSD-licensed software and decline to publish the resulting changes. The community may not receive every useful improvement. That is not an accidental loophole; it is part of the freedom the license intentionally provides. And out of experience especially large corporations tend to still contribute back.</p>

<p>The permissive licensing of the FreeBSD base also allowed components under other compatible licensing models to be integrated without imposing a conflicting copyleft requirement on the entire kernel. The original CDDL-licensed ZFS implementation is an important example. The same integration would have been considerably more difficult in a kernel whose licence was incompatible with the CDDL.</p>

<p>For my own work, the BSD model therefore feels closer to genuinely giving something away. Another person’s proprietary use does not remove the public version I released, and I would naturally prefer useful improvements to be contributed upstream. I simply do not believe every act of sharing must also regulate the licensing of everything built around the shared component.</p>

<p><img src="/assets/images/png/bsdgpl001.png" alt="" /></p>

<h2 id="no-systemd">No systemd</h2>

<p>FreeBSD does not use systemd. It retains the BSD <code class="language-plaintext highlighter-rouge">rc.d</code> system, in which startup scripts declare their dependencies and configuration values are stored in ordinary text files such as <code class="language-plaintext highlighter-rouge">/etc/rc.conf</code>.</p>

<p>Systemd solves real problems, and many administrators prefer it. It provides service supervision, dependency management, activation mechanisms and a large collection of integrated facilities. My objection is not that every part of systemd is technically bad. I simply do not want that style of tightly integrated service-management ecosystem controlling increasing portions of my operating system. I want to know which script starts a service, to be able to open that script in an editor and to invoke it manually when necessary. I want configuration to remain visible in text files, and I do not want basic service diagnosis to depend on a central daemon and its surrounding ecosystem.</p>

<p>FreeBSD’s <code class="language-plaintext highlighter-rouge">rc.d</code> system is less spectacular. It starts services, stops services and orders their dependencies. It has been refined over decades, remains understandable and does its job. The absence of systemd is therefore not the sole reason I use FreeBSD, but it is a visible consequence of the project’s preference for smaller, inspectable and composable mechanisms.</p>

<h2 id="why-i-do-not-want-windows">Why I do not want Windows</h2>

<p>I will not pretend to be neutral about Windows. I hate using modern Windows, not because it lacks technically impressive components or useful applications, but because the relationship between the administrator, the machine and the operating system feels fundamentally wrong.</p>

<p>With FreeBSD, I regard the operating system as software installed on my computer. I decide which services run, when the machine is upgraded, which kernel is booted, how storage is organized and how the machine participates in a network. Windows increasingly feels like a service delivered through hardware which I happen to own.</p>

<p>Updates are the most visible part of this difference. Security updates are necessary, and my FreeBSD systems are regularly updated. The problem is not that an operating system receives patches. The problem is losing control over when and how maintenance occurs. A workstation, laboratory controller or long-running service should not reboot because the operating system decided that its own update schedule is more important than the work being performed.</p>

<p>My FreeBSD machines routinely run for weeks or months between planned reboots, and systems in suitable roles can remain operational for much longer. Kernel security updates eventually require restarts, and preserving a large uptime counter is never more important than applying necessary fixes. The important distinction is that the reboot remains an administrative decision.</p>

<p>I have also never personally experienced a FreeBSD kernel crash on one of my deployed systems. This is not proof that FreeBSD cannot crash; naturally it can. It is a description of my experience across many systems and many years. My experience with Windows has been considerably worse, particularly when updates, drivers and recovery mechanisms interact.</p>

<p>When Windows fails during boot, manual recovery mechanisms technically exist, but the primary experience is often an opaque graphical screen announcing that the system is diagnosing or repairing itself. Very little information is initially provided about what failed, what is being changed or how the administrator can intervene. One is left staring at a blank window or an indefinite progress message while the operating system negotiates with itself.</p>

<p>FreeBSD exposes the machine more directly. I can enter the boot loader, select another kernel, boot into single-user mode, mount filesystems manually, inspect logs, edit configuration files or return to an earlier ZFS boot environment. The repair environment is not a separate simplified product layered over the real system. It is the system.</p>

<p>The hardware requirements of modern Windows releases are another problem. Functional computers are excluded from supported upgrades because of CPU-generation lists, TPM requirements and other platform policies even when their actual performance remains entirely sufficient for the intended workload. I reject the idea that replacing an operating system should automatically require replacing working hardware.</p>

<p>The increasing cloud integration is perhaps even more objectionable. Online accounts, synchronization services, subscription suggestions and vendor integrations are pushed into the default installation and setup process. Individual components can often be disabled, removed or worked around, but doing so requires actively resisting the direction of the product. I do not want my operating system to repeatedly suggest uploading my files to somebody else’s computers. I do not want a cloud account to become the expected form of local identity. I do not want additional services to appear because an update decided that they would improve engagement. A local machine should remain a local machine unless I explicitly configure it otherwise.</p>

<p>Windows may be unavoidable for particular proprietary applications, hardware tools or testing requirements. In those cases I will use it, preferably in an isolated and controlled environment. It is not a system on which I want to build infrastructure or depend for long-running work.</p>

<h2 id="mandatory-access-control-and-the-optional-superuser">Mandatory access control and the optional superuser</h2>

<p>Another aspect of FreeBSD which is surprisingly easy to overlook is that its security model does not end with traditional Unix ownership, groups, mode bits and one universally privileged account. The Mandatory Access Control framework provides an in-kernel architecture through which additional security policies can participate in access-control decisions involving filesystems, processes, sockets, network interfaces, executable activation and other system objects. These policies can be loaded as kernel modules or compiled into the kernel, and several policies can be active at the same time. They do not replace the ordinary Unix permissions but add further restrictions on top of them; a MAC policy can deny something which the normal discretionary permissions would permit, but it cannot simply override a denial made by the base system. This makes the framework composable rather than turning it into a second, unrelated permission system.</p>

<p>One of my favourite examples is <code class="language-plaintext highlighter-rouge">mac_portacl</code>. Traditionally, a network daemon which wants to listen on a port below 1024 has to begin its life as <code class="language-plaintext highlighter-rouge">root</code>, bind the socket and then attempt to discard its privileges correctly. This is a rather unfortunate design inherited from a time when the distinction between <em>“ordinary user”</em> and <em>“all-powerful system administrator”</em> was considered sufficiently fine-grained. A web server does not need permission to mount filesystems, load kernel modules, alter routing tables or read every file on the machine merely because it wants to listen on TCP port 80.</p>

<p><code class="language-plaintext highlighter-rouge">mac_portacl</code> allows binding individual TCP or UDP ports to be authorized for specific numerical user or group IDs. The daemon can therefore be started under its dedicated unprivileged account from its first instruction and still be permitted to bind exactly the ports it requires. It does not first have to receive every privilege available to <code class="language-plaintext highlighter-rouge">root</code> and then rely on its own code to discard those privileges without mistakes. The policy can also be configured so that even <code class="language-plaintext highlighter-rouge">root</code> is not automatically exempt from its rules, meaning that a particular port can genuinely be reserved for a particular service identity rather than merely being protected from ordinary users. The only drawback is the length limit of the ruleset encoded in a <code class="language-plaintext highlighter-rouge">sysctl</code> variable.</p>

<p>There is a small but important technical detail here. Since MAC policies may restrict existing permissions but cannot grant access which the traditional privilege checks already deny, the ports controlled by <code class="language-plaintext highlighter-rouge">mac_portacl</code> must first be removed from the ordinary <code class="language-plaintext highlighter-rouge">net.inet.ip.portrange.reservedlow</code> to <code class="language-plaintext highlighter-rouge">net.inet.ip.portrange.reservedhigh</code> range. After that, the MAC policy becomes the authority deciding which UID or GID may bind the port. This is a good example of the framework’s design: the traditional policy is not silently bypassed, but the administrator can deliberately move responsibility for a particular decision into a more precise policy.</p>

<p>The same idea appears in <code class="language-plaintext highlighter-rouge">mac_bsdextended</code>, which is sometimes described as a <em>filesystem firewall</em>. Its rules are normally managed using <code class="language-plaintext highlighter-rouge">ugidfw</code> and can impose additional restrictions based on the credentials of the accessing process, properties of the target filesystem object and the requested access mode. Unlike the labeling policies, <code class="language-plaintext highlighter-rouge">mac_bsdextended</code> does not attach persistent security labels to every file. It maintains an ordered in-kernel rule set and applies it in a manner deliberately reminiscent of a packet firewall. This makes it possible to express restrictions which do not fit neatly into owner, group and mode bits without changing the basic permissions of every affected file.</p>

<p>Traditional Unix permissions describe what an object’s owner and group normally permit, whereas <code class="language-plaintext highlighter-rouge">mac_bsdextended</code> can describe system-wide rules about which combinations of subjects, objects and operations must never be allowed. The distinction resembles the difference between configuring a listening service and placing a packet filter around it. The application’s normal permission model remains present, but an independently administered security boundary can reject accesses before they reach it. This is useful on multi-user systems, service hosts and appliances where the intended separation does not correspond exactly to the ownership hierarchy of the filesystem.</p>

<p>FreeBSD also includes proper label-based <em>information-flow policies</em>. <code class="language-plaintext highlighter-rouge">mac_biba</code> implements the Biba integrity model, in which subjects and objects receive integrity levels and optional compartments. The purpose is to prevent lower-integrity information or processes from modifying higher-integrity objects. A process at a low integrity level may be able to read a high-integrity object, but it cannot write to it; conversely, a high-integrity process is prevented from reading lower-integrity data which could contaminate its decisions. This allows the integrity of system components, configurations or valuable data to be represented independently of which numerical user happens to own them.</p>

<p><code class="language-plaintext highlighter-rouge">mac_lomac</code> follows a related but more dynamic model. Instead of simply denying every read from an object at a lower integrity level, it can permit the read and then lower the integrity label of the reading process. Once the process has consumed less trustworthy information, it is no longer allowed to modify objects which require a higher integrity level. This floating-label behaviour is particularly interesting because it models the history of information flow rather than only the identity under which a process was started. A process which was previously trusted does not remain trusted merely because its UID has not changed after it has processed untrusted input.</p>

<p><code class="language-plaintext highlighter-rouge">mac_mls</code>, in turn, applies labels to confidentiality rather than integrity. Subjects receive clearance levels and compartments, while objects receive classifications. The policy can prevent a process from reading information above its clearance and from writing sensitive information into a lower classification where it could become visible to less privileged subjects. Biba and MLS therefore address nearly opposite directions of undesirable information flow: Biba protects high-integrity objects from low-integrity influence, while MLS protects confidential information from flowing towards lower confidentiality levels.</p>

<p>These systems are more elaborate than ordinary access-control lists, but they are not merely theoretical models mentioned in an academic security book. They are implemented policies which can label processes, files, sockets and network interfaces, and labels can be assigned through tools such as <code class="language-plaintext highlighter-rouge">setfmac</code>, <code class="language-plaintext highlighter-rouge">setfsmac</code> and <code class="language-plaintext highlighter-rouge">setpmac</code> or inherited through login classes and executable labels. A service can consequently be constrained not only by the account under which it runs but also by the integrity or confidentiality domain in which it operates. The FreeBSD Handbook even demonstrates configurations in which a correctly constrained <code class="language-plaintext highlighter-rouge">root</code> process cannot access files belonging to a differently labeled service domain.</p>

<p>There are naturally practical limitations. Label-based policies require careful planning, filesystems have to support the required labels, boot and login environments must receive suitable initial labels, and an incorrect configuration can make a machine rather comprehensively inaccessible. The MAC framework documentation also explicitly warns that not every possible attack path from an already malicious privileged process is covered, so these policies should not be treated as a magical proof that a compromised traditional superuser can never escape every restriction. They are additional kernel-enforced security mechanisms, not substitutes for careful service design, jails, secure levels, Capsicum or physical control of the machine.</p>

<p>There are also useful network-oriented policies beyond <code class="language-plaintext highlighter-rouge">mac_portacl</code>. <code class="language-plaintext highlighter-rouge">mac_ifoff</code> provides a deliberately blunt interface-silencing mechanism. Incoming and outgoing traffic on the loopback interface and on other interfaces can be enabled or disabled through separate policy controls, with an additional option governing whether BPF may still receive traffic. This can be useful for appliances, staged startup procedures, emergency isolation and systems which should become network-capable only after a trusted initialization sequence has completed. It is not intended to replace a packet firewall; it provides a policy-level decision about whether network data flow is permitted at all.</p>

<p>The newer <code class="language-plaintext highlighter-rouge">mac_ipacl</code> policy addresses another problem which becomes important with VNET jails. It allows the host administrator to specify which IPv4 and IPv6 addresses or subnets a particular jail may assign to particular interfaces. Delegating a virtual network stack to a jail therefore does not have to mean allowing that jail to select arbitrary addresses available on the surrounding network. The host can authorize the exact address ranges belonging to the jail and reject everything else, including more specific exceptions within otherwise permitted subnets.</p>

<h3 id="the-optional-superuser">The optional superuser</h3>

<p>Perhaps the most unusual possibility, however, is that FreeBSD can disable the traditional superuser privilege associated with UID 0 altogether. The tunable</p>

<div class="language-text highlighter-rouge"><div class="highlight"><pre class="highlight"><code>security.bsd.suser_enabled=0
</code></pre></div></div>

<p>can be placed in <code class="language-plaintext highlighter-rouge">/boot/loader.conf</code>, or the corresponding sysctl can be changed while the system is running. When disabled, processes with an effective UID of zero no longer automatically satisfy the kernel’s privilege checks merely because they are <code class="language-plaintext highlighter-rouge">root</code>. The setting also exists on a per-jail basis, allowing a jail to contain an account named <code class="language-plaintext highlighter-rouge">root</code> for ownership and compatibility purposes without granting that account the usual collection of jail-local superuser privileges.</p>

<p>This distinction deserves some precision. UID 0 does not cease to exist, and ordinary filesystem ownership can still make it different from other accounts: files owned by UID 0 remain owned by UID 0, and their mode bits continue to be evaluated normally. What disappears is the general kernel rule that a process with effective UID 0 should be exempt from ordinary privilege checks. A system which uses this facility therefore has to be designed around explicitly delegated resources and narrowly defined mechanisms rather than assuming that an administrator can always become omnipotent later.</p>

<p>Such configurations are often constructed around a small number of carefully audited set-ID helpers, service-specific accounts and resources whose ownership has been arranged in advance. There is an important subtlety here: once <code class="language-plaintext highlighter-rouge">security.bsd.suser_enabled</code> is zero, merely making a program setuid-root does not restore the kernel privileges which were just disabled. The helper can still change its effective identity and gain access to files, sockets or other resources permitted to that identity by ordinary ownership and configured policies, but it does not regain universal privilege merely because the resulting UID is zero. Operations which normally require kernel privilege must instead be eliminated from the running design, performed during an earlier trusted initialization phase, or delegated through an explicit mechanism.</p>

<p>Recent FreeBSD versions also provide <code class="language-plaintext highlighter-rouge">mac_do</code> together with <code class="language-plaintext highlighter-rouge">mdo</code>, allowing an administrator to authorize narrowly specified credential transitions without granting unrestricted superuser access. Rules can describe which user or group may transition to which target credentials, and the policy can restrict those transitions to invocation through approved executables. This is much closer to the security model I prefer: instead of asking whether a process is “root”, the system can ask which exact transition or operation has been authorized for this particular caller.</p>

<p>A machine without an effective universal superuser is naturally not suitable for every ordinary workstation or general-purpose server. Package installation, hardware reconfiguration and emergency repairs become considerably less convenient when no running process can acquire broad kernel privileges. For a sealed appliance, dedicated network service, embedded controller or carefully constructed jail, however, this can be an extremely powerful design. Once initialization has completed, there need not be any account whose compromise automatically grants authority over the entire running environment.</p>

<p>What I like about all of these mechanisms is not that every FreeBSD installation has to use them. Most of my systems do not run a full MLS or Biba configuration, and introducing mandatory labels without a clear threat model would add complexity without necessarily improving security. The important point is that the operating system provides the mechanisms in a coherent, documented and inspectable form. I can choose ordinary Unix permissions for a simple workstation, add a filesystem firewall for a service host, allocate individual low-numbered ports to unprivileged daemons, constrain VNET jail addresses, introduce integrity labels for a sensitive appliance or construct a running system in which UID 0 no longer represents an all-powerful escape hatch.</p>

<h2 id="the-alleged-software-problem">The alleged software problem</h2>

<p>One of the most common arguments against using FreeBSD - or really any system other than Windows - is that one supposedly needs Windows for all the so called <em>“standard software”</em> (which is no standard anyways). According to this view, alternative operating systems may be suitable for servers, routers or programmers who enjoy spending their evenings compiling obscure utilities, but it would not be possible to perform ordinary productive work on them. As soon as documents have to be written, images edited, measurements evaluated, videos recorded or machines designed, one allegedly has to return to Windows.</p>

<p>This confuses two entirely different statements. It can be perfectly true that a particular organization has built its workflow around one specific proprietary application (which is a bad idea to be honest) which is only available for Windows. A manufacturer may distribute a configuration program only as a Windows executable, a customer may require files in the native format of a particular commercial CAD system, or some laboratory instrument may come with control software which cannot reasonably be replaced (though reverse engineering capabilities of modern LLMs make much more possible than it was a few years ago). In such a case, Windows may indeed be at first glance the easier choice for that particular task. What does not follow is that useful software in general is missing from FreeBSD, or that serious technical, scientific and creative work cannot be performed there. My daily work is almost entirely based on open-source tools, and in most areas I do not regard them as emergency replacements for something supposedly more professional. They are the tools I would choose independently of the operating system.</p>

<p>For writing documents, scientific publications and longer technical notes, I use <a href="https://www.latex-project.org/">LaTeX</a>. I have never found anything better for documents whose structure, typography, equations, references and reproducibility actually matter. A LaTeX document is source code for a publication: it can be placed under version control, compared meaningfully between revisions, generated from scripts and built again years later without manually reconstructing a collection of hidden formatting decisions. Bibliographies, equations, figures and cross-references belong to the document structure rather than being fragile decorations attached through a graphical interface. And everything is searchable via <code class="language-plaintext highlighter-rouge">grep</code> and accessible to programmatic tools too. For typesetting music, the corresponding tool in my workflow is <a href="https://lilypond.org/index.de.html">LilyPond</a>, which applies much the same idea to musical notation. Neither system is necessarily the fastest way to produce a two-line shopping list, but for material which is intended to remain readable, maintainable and correctly typeset, they are difficult to replace. For quick note taking markdown documents and <a href="https://pandoc.org/">pandoc</a> have turned out to be a very useful combination.</p>

<p>For calculations which are too exploratory for a standalone program, I use <a href="https://jupyter.org/">Jupyter notebooks</a>. They are useful not only for numerical experiments but also for formatted technical note-taking, because explanations, equations, plots and executable code can remain together. A calculation does not have to be described retrospectively in a document after it has already been performed somewhere else; the reasoning, implementation and resulting figures can form one reproducible object. And <a href="/2025/06/03/jupyterhtml.html">one can build labbooks or diaries with Jupyter very well</a>. For larger programs and ordinary text editing, my preferred editor is still <a href="https://www.vim.org/">Vim</a>. Yes, really. Its interaction model initially appears strange because it assumes that editing text is a language of operations rather than a sequence of mouse movements, but after becoming accustomed to it, navigating and transforming text becomes extremely fast. More importantly, the same editor is available in a graphical terminal on my workstation, through SSH on a server and on a serial console connected to an embedded system. Once again, the mental model does not have to change merely because the machine does.</p>

<p>Vector graphics are usually produced with <a href="https://inkscape.org">Inkscape</a>, while <a href="https://www.gimp.org/">GIMP</a> is used for photographs, rendered images and other pixel-based graphics. These tools cover most of what I need when preparing illustrations for articles, presentations, publications and project documentation. For video recording and screencasts, I use <a href="https://obsproject.com">OBS Studio</a>. <a href="https://www.blender.org">Blender</a> is used for editing and rendering three-dimensional objects, but it also provides a surprisingly capable video editor when recorded material has to be assembled, cut or annotated. The idea that image and video work intrinsically requires an Adobe subscription is therefore rather foreign to my experience. There may be particular commercial workflows which require proprietary exchange formats or plugins, but that is very different from claiming that graphics or video cannot be handled without Windows.</p>

<p>Mechanical design is performed in <a href="https://www.freecad.org/">FreeCAD</a>. It is used for the printable mechanisms, housings, optical components, robot parts and various other engineering constructions which regularly appear in my projects. I also use it extensively to design our parts at work. For finite-element simulations, <a href="https://github.com/elmercsc/elmerfem">Elmer</a> and <a href="https://www.calculix.de/">CalculiX</a> provide the numerical machinery required for many structural, thermal and multiphysics problems. The resulting geometry can be prepared for 3D printing using <a href="https://ultimaker.com/de/software/ultimaker-cura/">Cura</a>. These tools are not always as polished in every corner as expensive commercial engineering suites. Nevertheless, the combination is perfectly capable of producing real parts and evaluating real engineering questions. More importantly, it is scriptable, inspectable and can be integrated into automated workflows instead of existing only as a sequence of mouse operations inside an opaque application.</p>

<p>Much of my scientific and technical work is naturally performed in Python, together with NumPy, Matplotlib and the surrounding numerical ecosystem. PyOpenCL is used where larger numerical operations can profit from execution on GPUs or other OpenCL devices. PyTorch is also used for machine-learning work, although obtaining a current and fully functional installation on FreeBSD can be considerably more annoying than I would like. This is one of the areas in which Linux has a genuine practical advantage because the machine-learning ecosystem is developed almost entirely around Linux and current vendor-specific GPU stacks - and many developers there currently move fast and love to break things as well as don’t care much about portability. It is nevertheless possible to perform a large amount of machine learning and local inference on FreeBSD, and Ollama is used for running local language models where supported configurations are sufficient.</p>

<p>For LLM-assisted work, I use <a href="https://github.com/openai/codex">Codex</a> alongside the usual editors, compilers and development tools. I do not see this as replacing the traditional toolchain. It is another component within it: source code is still compiled, tested, reviewed and stored in version control, but an LLM can assist with implementation, code review, exploration of unfamiliar codebases and repetitive transformations. Local inference through Ollama is useful where data should remain on the local machine or where a small specialized model is sufficient. Remote tools are used where their additional capabilities justify them. The important point is that the operating system does not prevent modern AI-assisted workflows merely because it is not the operating system currently receiving the largest number of glossy desktop applications.</p>

<p>For conventional software development, Clang is the C and C++ compiler supplied with the FreeBSD base system. I also use Erlang, Python and many other language runtimes depending on the project. Git manages source code, articles, configuration, CAD scripts and practically everything else which can sensibly be represented as a collection of files. Rsync is used to move and synchronize those files between systems. These are simple tools, but they scale from a small embedded project to substantial repositories and infrastructure. A Git repository created on the workstation behaves the same way on a server, and an <code class="language-plaintext highlighter-rouge">rsync</code> invocation does not care whether its target is a storage machine, a Raspberry Pi or a jail. This consistency is far more valuable to me than having a different graphical synchronization product for every type of device.</p>

<p>Structured data is commonly stored in <a href="https://www.postgresql.org/">PostgreSQL</a>, which is suitable for far more than the stereotypical web application and has become one of the most useful general-purpose data-management systems available. Geospatial data is handled with PostGIS and <code class="language-plaintext highlighter-rouge">pgvector</code> allows efficient vector indices. Neo4j is used when the relationships between objects are more naturally represented as a graph than as conventional tables. Small datasets and quick calculations may remain in notebooks or ordinary files, but once data has to be queried, validated, shared between processes or retained for a longer project, using an actual database is usually preferable to constructing yet another collection of increasingly complicated spreadsheets.</p>

<p><a href="https://imagej.net/ij/">ImageJ</a> and Fiji deserve special mention because they are among those rare scientific tools whose usefulness extends far beyond the field in which one first encounters them. I use them for analysing microscopy images from electron and optical microscopes, but the same environment can display and process MRI and computed-tomography DICOM data, reconstruct three-dimensional volumes, recover physical scales, measure structures and evaluate image sequences. It can also be used for astronomical data and many other forms of scientific imaging. The plugin ecosystem is enormous, the operations are sufficiently transparent for serious analysis, and repetitive processing can be scripted. It is difficult to think of another single utility which has solved such a diverse collection of image-analysis problems for me.</p>

<p>Laboratory work also involves a large number of smaller programs and scripts which communicate with instruments, collect measurements, transform data and automate experiments. These are often written in Python or C and talk to equipment through serial links, Ethernet, USB devices or vendor-defined protocols. This is an area in which a Unix system is particularly pleasant because devices, processes, sockets, pipes and files can be combined without requiring a monolithic laboratory-management application. A measurement program can produce data which is immediately processed by another tool, inserted into PostgreSQL, plotted through Matplotlib and archived through ordinary filesystem mechanisms. When a vendor supplies only a Windows application, it may occasionally have to be placed in a virtual machine or reproduced through the documented protocol, but most instruments do not fundamentally care which operating system sends commands to their interface.</p>

<p>For ordinary communication, I use <a href="https://www.thunderbird.net/de/">Thunderbird</a> for email. I remain unconvinced that a web page should be involved in reading and writing email at all. Email is an established network service with standardized protocols, local caching, folders, filters, multiple identities and the possibility of retaining an archive independently of whichever provider currently hosts the mailbox. Turning it into a branded website removes many of those advantages and makes a basic communications protocol unnecessarily dependent on one browser session and one provider’s interface. Thunderbird allows multiple accounts to be handled in one place and keeps email functioning as email rather than as another cloud application.</p>

<p><a href="https://www.pidgin.im">Pidgin</a> is used for XMPP instant messaging. Chromium is my usual browser where the modern web cannot be avoided, which unfortunately is rather often. Scanner access is provided by SANE, and HPLIP handles communication with HP printers. These are not exciting parts of the toolchain, but that is precisely the point: printing, scanning, browsing and messaging are ordinary computer tasks, and they work without requiring the operating system to become a delivery mechanism for one vendor’s online account and bundled services.</p>

<p>The graphical environment around all of this is <a href="https://www.xfce.org/">Xfce</a>. It provides windows, panels, menus, keyboard shortcuts and a file manager while remaining light enough to run fluidly on old hardware. It does not attempt to define how applications store their data, how services are managed or which online identity should own the session. Most of the important tools are independent applications which communicate through files, pipes, sockets and documented formats. Xfce merely provides a convenient graphical environment in which they can be used.</p>

<p>There are many other programs in my daily environment which do not immediately come to mind, and I am still planning a separate article about the complete open-source toolchain I use. The list above is therefore not intended as a comprehensive catalogue. It is simply the set of tools which I encounter regularly while writing publications, developing software, evaluating experiments, designing mechanical parts, administering infrastructure, producing graphics and communicating with other people.</p>

<p>The relevant point is that none of this feels like working around the absence of <em>“real”</em> software. I am not sitting in front of FreeBSD wishing that I could finally return to an operating system on which productive work is possible, on the contrary it is the most productive environment I have at hands and the tools feel way more native and consistent than what I was used to in the Windows ecosystem during my youth. The tools are already there, and in many cases they are better suited to my work because they use open formats, can be automated, integrate with version control and remain usable independently of a vendor account or subscription. They also tend to be available across architectures and machine classes, which means that the same software environment can follow me from a workstation to a server or embedded platform.</p>

<p>There are naturally proprietary programs for which no complete open-source replacement exists. Some engineering suites (especially for high end FPGAs), vendor configuration utilities, some games (though for example Factorio runs perfectly well on FreeBSD), some GPU compute frameworks and organization-specific office workflows (which are in my opinion a sign of misdesign already) genuinely require Windows or Linux. When such a requirement exists, the corresponding operating system can be used in a virtual machine, on a dedicated computer or for the particular workload which needs it. What I reject is the much broader claim that one cannot perform ordinary or professional work without Windows. My daily work consists of scientific computing, software engineering, document preparation, CAD, image analysis, system administration and a fair amount of rather unusual hardware development, and <em>all</em> of it is performed with this toolchain on FreeBSD.</p>

<p>The software is not missing. It is simply not always packaged as a collection of subscriptions, launchers and web pages.</p>

<h2 id="the-operating-system-underneath-the-work">The operating system underneath the work</h2>

<p>Ultimately, I prefer FreeBSD because it behaves like infrastructure. It starts with little enabled, keeps configuration in predictable locations, treats standards as meaningful contracts and develops the kernel and userland as one system. Its documentation is part of the installation, its source is readable, compatibility is considered during interface design, jails provide lightweight isolation, Xen provides full virtualization, ZFS provides an exceptionally capable storage model, and the network stack remains fast and dependable.</p>

<p>The same system can be used on my workstation, on servers, on virtualization hosts and on embedded controllers. This is not merely aesthetically pleasing. It means that I do not have to change mental models every time I connect to another machine. The commands, configuration conventions, diagnostic procedures and accumulated knowledge remain useful everywhere. The hardware and workload change, but the operating system does not arbitrarily redefine how a computer is administered.</p>

<p>A computer should spend its resources on the work for which it exists. It should not require new hardware merely to continue displaying a desktop. It should not start services because somebody else decided that they might be useful. It should not force cloud accounts into local administration, replace meaningful failure information with progress animations or demand constant attention for its own maintenance.</p>

<p>I do not need the operating system itself to be exciting. The physics, software, machines and strange projects built on top of it are allowed to be exciting. FreeBSD stays underneath them, quietly and consistently doing its job.</p>

<h2 id="references">References</h2>

<ul>
  <li><a href="https://www.freebsd.org">FreeBSD</a></li>
  <li>Virtualization and Hypervisors:
    <ul>
      <li><a href="https://xenproject.org/">Xen</a></li>
      <li><a href="https://bhyve.org/">bhyve</a></li>
    </ul>
  </li>
  <li>Graphical environments:
    <ul>
      <li><a href="https://www.x.org/">Xorg</a>, the main X11 server</li>
      <li><a href="https://www.xfce.org/">Xfce</a>, a lightweight desktop environment</li>
    </ul>
  </li>
  <li><a href="https://man.freebsd.org/cgi/man.cgi?query=binmiscctl">binmiscctl</a>, the utility to manage binary image activators</li>
  <li><a href="https://man.freebsd.org/cgi/man.cgi?brandelf">brandelf</a>, the utility to mark a binary for a specific ABI</li>
  <li>The <code class="language-plaintext highlighter-rouge">IEEE 1003</code> series: <a href="https://pubs.opengroup.org/onlinepubs/009695399/">Portable Operating System Interface (POSIX)</a></li>
  <li>The <a href="https://cgit.freebsd.org/src/">FreeBSD source tree</a>, there is a read only <a href="https://github.com/freebsd/freebsd-src">mirror on GitHub</a></li>
  <li>Compatibility, storage and system software:
    <ul>
      <li><a href="https://openzfs.org/">OpenZFS</a>, the OpenZFS storage platform used by FreeBSD</li>
      <li><a href="https://btrfs.readthedocs.io/">Btrfs</a>, a copy-on-write filesystem commonly used on Linux</li>
      <li><a href="https://www.qemu.org/">QEMU</a>, machine emulator and virtualizer, also usable for transparent foreign-architecture execution</li>
      <li><a href="https://www.winehq.org/">Wine</a>, a compatibility layer for running Windows applications</li>
      <li><a href="https://systemd.io/">systemd</a>, the service and system manager used by many Linux distributions</li>
      <li><a href="https://www.tcpdump.org/">tcpdump</a>, command-line packet analyzer</li>
      <li><a href="https://man.freebsd.org/cgi/man.cgi?query=ipfw">ipfw</a>, FreeBSD’s firewall and traffic-control framework</li>
    </ul>
  </li>
  <li>Document preparation and text processing:
    <ul>
      <li><a href="https://www.latex-project.org/">LaTeX</a>, document preparation and typesetting system</li>
      <li><a href="https://lilypond.org/">LilyPond</a>, music engraving and typesetting system</li>
      <li><a href="https://pandoc.org/">Pandoc</a>, document-format conversion and publishing tool</li>
      <li><a href="https://jupyter.org/">Jupyter</a>, interactive notebooks for computation and technical documentation</li>
      <li><a href="https://www.vim.org/">Vim</a>, modal text editor</li>
    </ul>
  </li>
  <li>Graphics, video and media:
    <ul>
      <li><a href="https://inkscape.org/">Inkscape</a>, vector graphics editor</li>
      <li><a href="https://www.gimp.org/">GIMP</a>, image editor for raster graphics</li>
      <li><a href="https://obsproject.com/">OBS Studio</a>, video recording and streaming software</li>
      <li><a href="https://www.blender.org/">Blender</a>, 3D modelling, rendering and video-editing software</li>
    </ul>
  </li>
  <li>CAD, simulation and manufacturing:
    <ul>
      <li><a href="https://www.freecad.org/">FreeCAD</a>, parametric open-source CAD system</li>
      <li><a href="https://github.com/ElmerCSC/elmerfem">Elmer</a>, multiphysics finite-element simulation software</li>
      <li><a href="https://www.calculix.de/">CalculiX</a>, finite-element analysis software</li>
      <li><a href="https://ultimaker.com/software/ultimaker-cura/">Ultimaker Cura</a>, slicer for additive manufacturing</li>
    </ul>
  </li>
  <li>Scientific computing and machine learning:
    <ul>
      <li><a href="https://www.python.org/">Python</a>, general-purpose programming language widely used for scientific computing</li>
      <li><a href="https://numpy.org/">NumPy</a>, numerical array and scientific-computing library for Python</li>
      <li><a href="https://matplotlib.org/">Matplotlib</a>, plotting and visualization library for Python</li>
      <li><a href="https://documen.tician.de/pyopencl/">PyOpenCL</a>, Python interface to OpenCL</li>
      <li><a href="https://pytorch.org/">PyTorch</a>, machine-learning and tensor-computation framework</li>
      <li><a href="https://www.khronos.org/opencl/">OpenCL</a>, heterogeneous parallel-computing API</li>
      <li><a href="https://www.vulkan.org/">Vulkan</a>, cross-platform graphics and compute API</li>
      <li><a href="https://developer.nvidia.com/cuda-toolkit">CUDA</a>, NVIDIA’s GPU computing platform and programming model</li>
    </ul>
  </li>
  <li>LLM and AI tools:
    <ul>
      <li><a href="https://ollama.com/">Ollama</a>, software for running and serving language models</li>
      <li><a href="https://github.com/openai/codex">Codex</a>, LLM-assisted software-development tool</li>
    </ul>
  </li>
  <li>Programming and development tools:
    <ul>
      <li><a href="https://clang.llvm.org/">Clang</a>, C, C++, Objective-C and related language frontend for LLVM</li>
      <li><a href="https://www.erlang.org/">Erlang</a>, programming language and runtime for concurrent and distributed systems</li>
      <li><a href="https://git-scm.com/">Git</a>, distributed version-control system</li>
      <li><a href="https://rsync.samba.org/">rsync</a>, file synchronization and transfer utility</li>
    </ul>
  </li>
  <li>Databases and data processing:
    <ul>
      <li><a href="https://www.postgresql.org/">PostgreSQL</a>, relational database management system</li>
      <li><a href="https://postgis.net/">PostGIS</a>, geospatial extension for PostgreSQL</li>
      <li><a href="https://github.com/pgvector/pgvector">pgvector</a>, vector-similarity search extension for PostgreSQL</li>
      <li><a href="https://neo4j.com/">Neo4j</a>, graph database management system</li>
    </ul>
  </li>
  <li>Scientific imaging:
    <ul>
      <li><a href="https://imagej.net/ij/">ImageJ</a>, scientific image-processing and analysis software</li>
      <li><a href="https://fiji.sc/">Fiji</a>, scientific image-processing distribution based on ImageJ</li>
    </ul>
  </li>
  <li>Communication, web and peripheral support:
    <ul>
      <li><a href="https://www.thunderbird.net/">Thunderbird</a>, email client</li>
      <li><a href="https://pidgin.im/">Pidgin</a>, multi-protocol instant-messaging client</li>
      <li><a href="https://www.chromium.org/">Chromium</a>, open-source web browser project</li>
      <li><a href="https://www.sane-project.org/">SANE</a>, scanner-access framework</li>
      <li><a href="https://developers.hp.com/hp-linux-imaging-and-printing">HPLIP</a>, HP’s open-source printing and imaging software</li>
    </ul>
  </li>
</ul>]]></content><author><name>tsp</name></author><category term="Opinion" /><category term="FreeBSD" /><category term="System administration" /><category term="Administration" /><category term="Computer" /><category term="DIY" /><summary type="html"><![CDATA[FreeBSD is often treated as an operating system for servers, storage appliances and network infrastructure. I have never really understood that distinction. A workstation, a virtualization host and a Raspberry Pi are all computers - and one of the things I value most about FreeBSD is being able to administer all of them using the same tools, conventions and mental model. This article explains why I prefer FreeBSD almost everywhere I can use it: its quiet defaults, integrated base system, predictable administration, documentation, compatibility, jails, ZFS, networking and security architecture - but also simply because it works well as an ordinary graphical workstation. And despite the recurring claim that one supposedly needs Windows for serious work, nearly my entire scientific, engineering and software-development workflow already runs perfectly well on top of it.]]></summary></entry><entry><title type="html">No, My VPN Does Not Support Countries</title><link href="https://www.tspi.at/2026/08/29/vpnnocountry.html" rel="alternate" type="text/html" title="No, My VPN Does Not Support Countries" /><published>2026-08-29T00:00:00+02:00</published><updated>2026-08-29T21:45:18+02:00</updated><id>https://www.tspi.at/2026/08/29/vpnnocountry</id><content type="html" xml:base="https://www.tspi.at/2026/08/29/vpnnocountry.html"><![CDATA[<blockquote>
  <p><em>An IP address is not a geographic coordinate, and a VPN is not a country selector</em></p>
</blockquote>

<p>This is an opinion article about the terminology surrounding virtual private networks, commercial Internet egress services and IP geolocation. It is not claimed that commercial <em>“privacy VPN”</em> services never have legitimate uses, nor that the encrypted tunnels used by them are technically not VPNs. The problem is that one very specific application has captured the name of a much broader networking concept - and that it is commonly marketed using a geographic model the Internet itself does not possess.</p>

<ul>
  <li><a href="#introduction">Introduction</a></li>
  <li><a href="#what-a-vpn-actually-is">What a VPN Actually is</a></li>
  <li><a href="#what-the-commercial-service-actually-provides">What the Commercial Service Actually Provides</a></li>
  <li><a href="#a-vpn-supports-routes-not-countries">A VPN Supports Routes, not Countries</a></li>
  <li><a href="#an-ip-address-is-not-a-geographic-coordinate">An IP Address is not a Geographic Coordinate</a></li>
  <li><a href="#an-address-registry-is-not-a-land-registry">An Address Registry is not a Land Registry</a></li>
  <li><a href="#anycast-makes-the-question-where-is-this-address-ill-defined">Anycast Makes the Question “Where is This Address?” Ill-defined</a></li>
  <li><a href="#a-database-opinion-becomes-a-legal-oracle">A Database Opinion Becomes a Legal Oracle</a></li>
  <li><a href="#then-an-industry-appears-to-route-around-the-friction">Then an Industry Appears to Route Around the Fiction</a></li>
  <li><a href="#privacy-by-choosing-a-different-upstream-provider">Privacy by Choosing a Different Upstream Provider</a></li>
  <li><a href="#geographic-databases-have-become-a-shadow-control-plane">Geographic Databases Have Become a Shadow Control Plane</a></li>
  <li><a href="#conclusion">Conclusion</a></li>
  <li><a href="#references">References</a></li>
</ul>

<p><img src="/assets/images/png/vpnnocountry05.png" alt="" /></p>

<h2 id="introduction">Introduction</h2>

<p>One of the surprisingly reliable ways to discover how completely a technical term has been captured by marketing is to tell someone that one has built a VPN.</p>

<p>The first question is often not which protocol is used, how peers authenticate, whether the system transports Ethernet frames or IP packets, whether it uses a hub-and-spoke or mesh topology, how routing information is distributed, whether roaming is supported, or whether the implementation handles MTU discovery correctly. The first question often is:</p>

<blockquote>
  <p>Which countries does it support?</p>
</blockquote>

<p>At that point I usually have to suppress the urge to ask whether their Ethernet switch supports Belgium.</p>

<p>The question is not entirely irrational. A large part of the <em>non-technical</em> public now thinks to understand <em>“VPN”</em> to mean a subscription service that sends all traffic through a server operated by some - often shady or at least not trustworthy in the strict sense - third party and then forwards it from there to the public Internet. Such providers often advertise lists of countries, flags, maps and promises that the user may appear to be somewhere else.</p>

<p><strong>But this is not what the general term <em>Virtual Private Network</em> means.</strong></p>

<p>The commercial product may <em>contain</em> a VPN. It may even use an entirely respectable VPN protocol. But the list of countries is not a capability of the VPN. It is a property of an additional Internet egress service attached to one end of it. It’s a list of points of presence they operate.</p>

<p>Confusing those two things is rather like calling a railway system a <em>“holiday destination selector”</em> because some trains happen to terminate in tourist cities.</p>

<h2 id="what-a-vpn-actually-is">What a VPN Actually is</h2>

<p>A virtual private network provides a restricted logical connectivity domain over infrastructure that is also used for other traffic. Hosts, routers or complete networks become members of that domain and can communicate according to its routing and access policy while remaining logically separated from systems outside it.</p>

<p>The classical case is a site-to-site connection:</p>

<p><img src="/assets/images/png/vpnnocountry01.drawio.png" alt="Private network A is connected via a virtual network over shared infrastructure with private network B" /></p>

<!--
```text
Private network A                 Private network B
192.168.10.0/24                   192.168.20.0/24
        │                                 │
        └──── virtual network over ───────┘
              shared infrastructure
```
-->

<p>The shared infrastructure may be the public Internet, a provider backbone, an MPLS network or some other transport system. The private network may be implemented using cryptographic tunnels, provider-controlled forwarding tables, unencrypted encapsulation (think of <a href="https://man.freebsd.org/cgi/man.cgi?query=gre">gre</a> or <a href="https://man.freebsd.org/cgi/man.cgi?query=gif">gif</a>), labels or combinations of these mechanisms.</p>

<p>Encryption is extremely common and frequently essential, but it is not by itself <a href="https://datatracker.ietf.org/doc/html/rfc2764">the definition of a VPN</a>. Provider-provisioned Layer 3 VPNs can provide separation through routing and forwarding state without necessarily providing cryptographic confidentiality against the provider. Conversely, an encrypted SSH connection does not automatically create a general-purpose virtual network.</p>

<p>The IETF literature has long acknowledged that <em>VPN</em> is a broad and somewhat confused term. <code class="language-plaintext highlighter-rouge">RFC 2764</code> describes a VPN as the emulation of private WAN facilities using IP infrastructure, while <code class="language-plaintext highlighter-rouge">RFC 4110</code> formulates it as a restricted set of communicating sites using infrastructure shared with systems outside that set. Hosts may also be attached directly, so remote-access and host-to-network VPNs are equally valid. A VPN does not even have to belong to one legal organization: extranets and provider VPNs may connect participants from different organizations under a common connectivity policy[<a href="#ref1">1</a>, <a href="#ref9">9</a>].</p>

<p>My own default mental model is still the site-to-site or host-to-private-network case. It captures the important part: there is a defined private connectivity domain. There are members, routes, resources and a policy governing communication between them.</p>

<p>__It has peers and prefixes.</p>

<p>It does not have countries.__</p>

<h2 id="what-the-commercial-service-actually-provides">What the Commercial Service Actually Provides</h2>

<p>A typical consumer “VPN” product looks approximately like this:</p>

<p><img src="/assets/images/png/vpnnocountry02.drawio.png" alt="The user device is connected with an encrypted tunnel with the provider gateway that then routes through the public internet unencrypted towards the destination" /></p>

<!--
```text
                                      Public Internet
                                             │
                                             ▼
User device ── encrypted tunnel ── provider gateway ── destination
            <── actual VPN path ──>             <── ordinary routing ──>
```
-->

<p>The client normally installs a virtual interface and directs either selected routes or the default route through it. In a so-called full-tunnel configuration, nearly all traffic is sent to the provider. The provider decapsulates the packets and forwards them to the public Internet, often after network address translation. <code class="language-plaintext highlighter-rouge">RFC 7359</code> explicitly distinguishes this <em>send all traffic through the VPN</em> configuration from split tunnelling, where only selected traffic uses the tunnel[<a href="#ref2">2</a>].</p>

<p>The tunnel between the device and the provider is a valid remote-access VPN.</p>

<p>But the destination website is not part of that VPN. The public Internet beyond the provider gateway has not suddenly become private. The provider is simply acting as the user’s new upstream router and Internet transit provider.</p>

<p>The complete commercial product is therefore better described as remote-access VPN plus forced or selected routes plus third-party Internet transit plus provider-controlled egress addresses.</p>

<p>Calling the entire product merely a <em>VPN</em> is technically not completely false, but it hides almost everything interesting about what is being sold. The VPN is one component of the service. The feature represented by all the little national flags is the provider’s collection of Internet egress points.</p>

<p>A more precise description would be an <strong>encrypted Internet egress service</strong>, a <strong>tunnelled egress relay</strong>, or - if one wants to retain the established term - a <strong>remote-access VPN with selectable Internet egress gateways</strong>.</p>

<p>That formulation also makes the <em>trust model</em> rather more obvious.</p>

<h2 id="a-vpn-supports-routes-not-countries">A VPN Supports Routes, not Countries</h2>

<p>When evaluating a VPN implementation, sensible questions include whether it supports IPv4 and IPv6, how peers are authenticated, which cryptographic algorithms are available, how keys are rotated, how routes are distributed, whether overlapping address spaces can be handled, whether broadcast or multicast traffic is supported, how NAT traversal works, whether roaming between physical interfaces is possible and what happens when a peer disappears.</p>

<p>A VPN may support:</p>

<ul>
  <li>IPv4</li>
  <li>IPv6</li>
  <li>Ethernet frames</li>
  <li>point-to-point links</li>
  <li>site-to-site links</li>
  <li>mesh connectivity</li>
  <li>split tunnelling</li>
  <li>full tunnelling</li>
  <li>dynamic routes</li>
  <li>multiple administrative tenants</li>
  <li>multicast routing</li>
</ul>

<p><em>“France”</em> is not a network protocol.</p>

<p>When a commercial provider claims to support France, Canada or Japan, it normally means that the provider can arrange for traffic to emerge from an address that external systems are expected to classify as belonging to the selected country.</p>

<p>That expectation may correspond to the physical location of a server. It may correspond to operator-supplied geolocation metadata. It may correspond merely to the current opinion of one or more commercial geolocation databases.</p>

<p><strong>None of these is a VPN capability.</strong></p>

<h2 id="an-ip-address-is-not-a-geographic-coordinate">An IP Address is not a Geographic Coordinate</h2>

<p>An IPv4 address is a 32-bit protocol address. An IPv6 address is a 128-bit protocol address. They are protocol-layer identifiers used by the routing and forwarding architecture. Their bit patterns do not contain standardized geographic coordinates or national jurisdiction information.</p>

<ul>
  <li><strong>There is no country field in an IP packet header.</strong></li>
  <li>There is no latitude field.</li>
  <li>There is no longitude field.</li>
  <li><strong>There is no border-control bit telling a router that a packet has now left Austria and entered Germany.</strong></li>
</ul>

<p>IPv4 historically described an address in terms of a network part and a local part. The IPv6 addressing architecture defines routing prefixes, subnet identifiers and interface identifiers, and explicitly warns nodes not to infer arbitrary structure beyond boundaries that are known from their routing context. An operator may voluntarily construct an internal address plan based on cities, buildings or continents, but that is a local convention, not a globally defined meaning of the address bits[<a href="#ref3">3</a>\, <a href="#ref10">10</a>].</p>

<p>The important distinction can be written rather simply:</p>

[
\operatorname{country} \ne f(\operatorname{IP\ address\ bits})
]

<p>What actually exists is something more like:</p>

[
\widehat{C}_D(a,t)
=
f_D(
    a,
    \text{registry data},
    \text{routing observations},
    \text{operator hints},
    \text{latency measurements},
    \text{reverse DNS},
    \text{commercial observations},
    t
)
]

<p>Here, $a$ is an address, $D$ is a particular geolocation database and $t$ is the time at which it is queried. The result $\widehat{C}_D$ is an estimate produced by that database.</p>

<p>Another database may return another country. The result may change tomorrow without the address or server moving. The user associated with the traffic may be in an entirely different place.</p>

<p><strong>Any location remains a guess. It is not information encoded in the address.</strong></p>

<h2 id="an-address-registry-is-not-a-land-registry">An Address Registry is not a Land Registry</h2>

<p>A common source of confusion is the regional allocation of Internet number resources.</p>

<p>IP address space is administered hierarchically. <code class="language-plaintext highlighter-rouge">IANA</code> delegates resources to Regional Internet Registries, which in turn allocate and register resources for network operators and other organizations. Registry records are important for uniqueness, coordination, abuse handling, transfers and operational contact.</p>

<p>But the fact that an address block was allocated through a particular regional registry <strong>does not transform it into geographically anchored property.</strong></p>

<p>The RIPE Database contains registration information and contact details for network resources. RIPE itself warns that its country information should not be treated as perfectly accurate, and its documentation has historically been explicit that some country attributes did not possess a single reliable geolocation meaning. APNIC similarly states that allocation data can at most provide an approximate indication of an address blocks <em>original</em> allocation and that <strong>it cannot accurately map resources to specific countries</strong>[<a href="#ref4">4</a>].</p>

<p>There may, of course, be contractual and policy requirements governing how number resources are obtained and used. Different registries have different rules for in-region and out-of-region use. ARIN, for example, <strong>explicitly recognizes out-of-region use under defined conditions</strong>. These are administrative rules surrounding resource management; they are not properties enforced by the IP or routing protocols[<a href="#ref5">5</a>].</p>

<p>This distinction matters:</p>

<blockquote>
  <p>Registration identifies <em>responsibility</em> for a resource. It does <strong>not</strong> assign the resource a physical position.</p>
</blockquote>

<p>To improve geolocation data, an operator can publish a geofeed: an external mapping between prefixes and approximate locations. <code class="language-plaintext highlighter-rouge">RFC 8805</code> defines a format for these feeds, while <code class="language-plaintext highlighter-rouge">RFC 9632</code> describes how they can be discovered and used. The very existence of a separate geofeed mechanism demonstrates the point. Geographic information has to be attached as additional metadata because it is not present in the IP address itself[<a href="#ref6">6</a>, <a href="#ref11">11</a>].</p>

<p>A geofeed may be useful. It may even be supplied by the operator that knows the deployment better than anyone else.</p>

<p>It is still metadata.</p>

<h2 id="anycast-makes-the-question-where-is-this-address-ill-defined">Anycast Makes the Question “Where is this Address?” Ill-defined</h2>

<p>The assumption that each IP address corresponds to one physical place fails particularly spectacularly with anycast.</p>

<p>In an anycast service, the same service address is made available from multiple discrete locations. Routing delivers a client’s packets to one of those instances according to network topology and routing policy. Exactly the same address may therefore reach a server in Vienna for one client, Frankfurt for another and Amsterdam for a third - even for clients residing all in the same origin country. <code class="language-plaintext highlighter-rouge">RFC 4786</code> defines this operational model, and <code class="language-plaintext highlighter-rouge">RFC 7094</code> discusses the architectural consequences of placing equivalent instances of an address in multiple locations[<a href="#ref7">7</a>, <a href="#ref12">12</a>].</p>

<p>For an anycast address $a$, physical location is not even a single-valued function:</p>

[
L(a,t)=\{\ell_1,\ell_2,\ldots,\ell_n\}
]

<p><strong>The address simultaneously represents multiple service instances.</strong></p>

<p>Which one receives a packet depends on the routing state seen by that packet’s source. A routing change can cause subsequent packets to reach a different site without the address changing at all.</p>

<p>The natural question <em>“where is this IP address?”</em> therefore <strong>has no answer</strong>.</p>

<p>One might instead ask:</p>

<ul>
  <li>Where is the organization operating it incorporated?</li>
  <li>Through which registry was the prefix allocated?</li>
  <li>Which anycast instance receives traffic from this client?</li>
  <li>What country does a particular database currently assign to it?</li>
  <li>Under which jurisdiction is a <em>contract</em> performed?</li>
</ul>

<p>Those are different questions. Their answers need not agree.</p>

<p>Tunnels, mobile access networks, carrier-grade NAT, satellite networks, cloud systems, remote desktops and ordinary corporate gateways separate them even further. A person in Vienna can connect to a machine in Zurich through a gateway in Frankfurt using an address registered to an organization in Texas.</p>

<p>The address still performs its actual job perfectly: packets can be routed toward it. <strong>The failure occurs only when an external system demands that it also serve as a geographic identity document.</strong></p>

<h2 id="a-database-opinion-becomes-a-legal-oracle">A Database Opinion becomes a Legal Oracle</h2>

<p>Why, then, are IP addresses treated as countries? Because the source address is readily observable.</p>

<p>A website may not know where a person is. It may not have access to GPS, nearby wireless networks, a verified postal address or any other stronger location signal. But it necessarily sees some network endpoint from which the connection arrives.</p>

<p>The <em>temptation</em> is obvious: take that address, query a database and <em>pretend</em> that the result is location.</p>

<p>What begins as a rough heuristic then becomes a policy boundary.</p>

<p>Content contracts may grant distribution rights only in certain territories. Governments impose territorially different taxation, trade, censorship, gambling, media and financial rules. Companies divide markets, vary prices and limit products by jurisdiction. <code class="language-plaintext highlighter-rouge">RFC 6740</code> itself notes that legal requirements and geographically limited content licences have motivated <em>attempts</em> to map IP blocks to physical locations[<a href="#ref8">8</a>].</p>

<p>Some of these requirements may have legitimate intentions. Most may not. That is a separate political question.</p>

<p>The technical problem remains the same:</p>

[
\text{legal importance}
\not\Rightarrow
\text{technical observability}
]

<p><strong>A law cannot add location information to an IP address.</strong> A contract cannot make an anycast address exist at only one site. A lawyer writing <em>“users in country X”</em> does not create a reliable function that determines whether a packet was generated by such a user.</p>

<p>Nevertheless, systems routinely collapse the whole problem into something like:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>if geoip_country(source_ip) not in permitted_countries:
    deny_access()
</code></pre></div></div>

<p>A probabilistic estimate has become an authorization decision. This is equivalent to taking a noisy sensor, discarding its uncertainty and <em>declaring</em> its output legally authoritative.</p>

<h2 id="then-an-industry-appears-to-route-around-the-fiction">Then an Industry Appears to Route Around the Fiction</h2>

<p>Once services use source-address classification as a territorial gate, the workaround is nearly inevitable. The user establishes a tunnel to a provider. The provider forwards the connection from an address classified as belonging to the desired country. The destination service sees the provider’s address rather than the user’s ordinary access-network address.</p>

<ul>
  <li>Nothing about the user’s physical location has changed.</li>
  <li>Nothing about the content has changed.</li>
  <li>The packet has not presented a passport at a border.</li>
  <li>Only the input to a database lookup has changed.</li>
</ul>

<p>The providers list of <em>“supported countries”</em> is therefore largely a list of of geographic classifications that its selectable egress addresses are intended to obtain from external systems. It does not even have to be a physical machine in the destination country - in fact many <em>“VPN providers”</em> not not operate real machines in the countries but operate IP networks that have the matching classification in prominent databases.</p>

<p>This produces an absurd circular economy:</p>

<blockquote>
  <p>First, global services are artificially divided using an <em>unreliable</em> geographic inference. Then users pay another company to provide a different input to that inference. And no legal entity, government or company can make the underlying inference technically true merely by requiring it to be true. They may block known relays, regulate providers or make circumvention difficult, but they cannot turn an IP address into a geographic coordinate.</p>
</blockquote>

<p>We built a global packet network, installed national turnstiles above it and then created a subscription industry selling routes around the turnstiles. It is difficult not to see this as <em>institutional damage</em> converted into <em>recurring revenue</em>. Commercial egress providers are not solely responsible for this situation. They satisfy a demand produced by territorial contracts, censorship, surveillance concerns, market segmentation and other restrictions. In some situations they provide an important escape route.</p>

<p>But calling the resulting product simply a <em>VPN</em> hides the whole chain of causes. It makes the tunnel itself appear to provide geography, privacy and anonymity as intrinsic properties.</p>

<p>It provides none of them automatically.</p>

<h2 id="privacy-by-choosing-a-different-upstream-provider">Privacy by Choosing a Different Upstream Provider</h2>

<p>The privacy marketing deserves its own distinction.</p>

<p>Without a commercial VPN service, traffic might follow this simplified path:</p>

<!--
```text
user → local access provider → Internet destination
```
-->

<p><img src="/assets/images/png/vpnnocountry03.drawio.png" alt="The user is sending traffic directly unencrypted to his local access provider and towards the Internet destination" /></p>

<p>With one, the path becomes:</p>

<!--
```text
user → local access provider → encrypted tunnel
     → VPN provider → Internet destination
```
-->

<p><img src="/assets/images/png/vpnnocountry04.drawio.png" alt="The user is sending traffic encrypted via his local access provider to the VPN provider where it gets decrypted and forwarded towards the Internet destination" /></p>

<p>The local access provider can no longer inspect the inner network traffic directly. It primarily sees an encrypted exchange with the VPN endpoint, together with timing and traffic-volume information.</p>

<p>But the VPN provider is now the users immediate upstream network operator. At its egress it can normally observe destination addresses, timing and traffic volumes, and potentially DNS traffic depending on the chosen configuration. Application-layer encryption such as HTTPS continues to protect the actual encrypted content from the VPN operator, but the operator has not vanished from the trust model. <em>The trusted intermediary has been moved.</em></p>

<p>It may have been moved to a transparent, technically competent and carefully audited provider. It may also have been moved from a known local telecommunications company to a brand name whose infrastructure, ownership, resellers and logging practices the user has never examined. That can still be a rational trade. It is <em>not</em> the elimination of trust.</p>

<p>It certainly is <strong>not anonymity by definition</strong>. Accounts, payment information, browser fingerprints, cookies, application logins, traffic correlation and endpoint compromise all exist outside the VPN tunnel. Calling this entire arrangement <em>privacy</em> without explaining which observer loses access and which observer gains it is just marketing.</p>

<h2 id="geographic-databases-have-become-a-shadow-control-plane">Geographic Databases have become a Shadow Control Plane</h2>

<p>The Internet already has a control plane. Routing protocols distribute reachability information and select paths according to network policy. GeoIP systems add another, unofficial control plane above it.</p>

<p>This shadow control plane decides which language a person sees, which price is offered, which media may be played, which account may be created and sometimes whether access is allowed at all. Yet its data are neither globally standardized nor perfectly consistent. Different providers may disagree. Updates propagate at different speeds. Operator-published information may conflict with measurement-derived information. Cached decisions may remain wrong long after a network has changed.</p>

<p>From an engineering perspective this is an extraordinarily weak basis for hard authorization. It also punishes perfectly normal network architectures. Corporate gateways, cloud systems, universities, mobile operators, satellite networks, travellers, anycast services and privacy-preserving relays routinely separate a user’s physical location from a visible source address.</p>

<p>These are not attacks against the Internet. They are normal uses of the Internet. The territorial policy layer treats them as suspicious because they expose the false assumption underneath it.</p>

<h2 id="conclusion">Conclusion</h2>

<p>The consumer use of the word <em>VPN</em> is not entirely technically wrong. A genuine VPN tunnel normally exists between the user and the provider. But it is an <em>inadequate</em> name for the complete service, and it has become actively <em>misleading</em>.</p>

<p>The geographically selectable feature is not the VPN. It is third-party Internet transit through addresses that external databases associate with particular territories. Those territories are not encoded in the addresses. They are estimates and administrative annotations layered on top of a routing architecture that was not designed as a map of nation states. Anycast alone is sufficient to show that a single address may have multiple simultaneous physical locations.</p>

<p>This is more than semantic pedantry. Precise terminology exposes system boundaries, and system boundaries expose trust. A user should know whether one is joining a private network, encrypting a path, moving a default route, replacing an upstream provider, changing an externally visible source address or attempting to manipulate a geographic classifier.</p>

<p>Those are different operations.</p>

<p><strong>A VPN does not support countries. A VPN supports connectivity policy. And packets do not carry passports.</strong></p>

<h2 id="references">References</h2>

<ul>
  <li>[<span id="ref1">1</span>] <a href="https://www.rfc-editor.org/info/rfc2764/">RFC 2764: A Framework for IP Based Virtual Private Networks</a></li>
  <li>[<span id="ref2">2</span>] <a href="https://www.rfc-editor.org/info/rfc7359/">RFC 7359: Layer 3 Virtual Private Network (VPN) Tunnel …</a></li>
  <li>[<span id="ref3">3</span>] <a href="https://www.rfc-editor.org/info/rfc791/">RFC 791: Internet Protocol</a></li>
  <li>[<span id="ref4">4</span>] <a href="https://docs.db.ripe.net/FAQ/">FAQ - RIPE Database docs</a></li>
  <li>[<span id="ref5">5</span>] <a href="https://www.arin.net/participate/policy/nrpm/">Number Resource Policy Manual</a></li>
  <li>[<span id="ref6">6</span>] <a href="https://www.rfc-editor.org/info/rfc8805/">RFC 8805: A Format for Self-Published IP Geolocation Feeds</a></li>
  <li>[<span id="ref7">7</span>] <a href="https://www.rfc-editor.org/info/rfc4786/">RFC 4786: Operation of Anycast Services</a></li>
  <li>[<span id="ref8">8</span>] <a href="https://www.rfc-editor.org/info/rfc6740/">RFC 6740: Identifier-Locator Network Protocol (ILNP) …</a></li>
  <li>[<span id="ref9">9</span>] <a href="https://www.rfc-editor.org/rfc/rfc4110">RFC 4110: A Framework for Layer 3 Provider-Provisioned Virtual Private …</a></li>
  <li>[<span id="ref10">10</span>] <a href="https://www.rfc-editor.org/info/rfc4291/">RFC 4291: IP Version 6 Addressing Architecture</a></li>
  <li>[<span id="ref11">11</span>] <a href="https://www.rfc-editor.org/info/rfc9632/">RFC 9632: Finding and Using Geofeed Data</a></li>
  <li>[<span id="ref12">12</span>] <a href="https://www.rfc-editor.org/info/rfc7094/">RFC 7094: Architectural Considerations of IP Anycast</a></li>
</ul>]]></content><author><name>tsp</name></author><category term="Opinion" /><category term="Security" /><category term="How stuff works" /><category term="Web" /><category term="Internet" /><category term="Network" /><summary type="html"><![CDATA[Tell someone you built a VPN and there is a surprisingly good chance the first question will be: Which countries does it support? That question says more about how completely commercial privacy services have captured the term VPN than it does about virtual private networks themselves. A VPN provides private connectivity, routes and policy over shared infrastructure. France, Canada or Japan are not VPN capabilities; they are labels attached to selectable Internet egress points whose addresses external databases are expected to classify geographically. This article looks at where that distinction gets lost, why IP addresses are not geographic coordinates, how anycast makes the whole idea even stranger and why a large industry now exists to route around a geographic fiction layered on top of the Internet.]]></summary></entry><entry><title type="html">Nobody Needs This</title><link href="https://www.tspi.at/2026/08/21/nobofyneedsthis.html" rel="alternate" type="text/html" title="Nobody Needs This" /><published>2026-08-21T00:00:00+02:00</published><updated>2026-08-21T13:57:10+02:00</updated><id>https://www.tspi.at/2026/08/21/nobofyneedsthis</id><content type="html" xml:base="https://www.tspi.at/2026/08/21/nobofyneedsthis.html"><![CDATA[<ul>
  <li><a href="#introduction">Introduction</a></li>
  <li><a href="#need-is-not-an-objective-and-uniform-quantity">Need is not an Objective and Uniform Quantity</a></li>
  <li><a href="#preferences-do-not-require-external-justification">Preferences do not Require External Justification</a></li>
  <li><a href="#time-effort-and-comfort-are-parts-of-life">Time, Effort and Comfort are Parts of Life</a></li>
  <li><a href="#unnecessary-things-are-often-where-new-things-begin">Unnecessary Things are Often Where New Things Begin</a></li>
  <li><a href="#the-private-laboratory-is-still-a-laboratory">The private laboratory is still a laboratory</a></li>
  <li><a href="#the-argument-is-applied-selectively">The Argument is Applied Selectively</a></li>
  <li><a href="#harm-is-a-legitimate-question-need-is-usually-not">Harm is a Legitimate Question; Need is Usually not</a></li>
  <li><a href="#you-can-still-live-without-it-is-too-low-a-standard">You Can Still Live Without It is Too Low a Standard</a></li>
  <li><a href="#other-peoples-lives-are-not-optimisation-problems">Other Peoples Lives are not Optimisation Problems</a></li>
  <li><a href="#a-society-should-provide-room-not-a-single-approved-life">A Society Should Provide Room, not a Single Approved Life</a></li>
</ul>

<p><img src="/assets/images/png/nooneneedsthis01.png" alt="" /></p>

<h2 id="introduction">Introduction</h2>

<p>One of the stranger arguments used in favour of restrictions is the claim that the restricted object, activity or service is not important anyways because <em>“nobody needs it”</em>. It appears in discussions about everything from vehicles and tools to communication systems, entertainment, travel, clothing, food, privacy and access to information. Sometimes the proposed restriction is only a tax or an additional administrative burden, sometimes it is a licensing requirement and sometimes it approaches an outright prohibition. In all these cases the same reassuring sentence can be heard: the restriction is not a serious problem because nobody really needs the affected thing anyway.</p>

<p>This argument may initially sound reasonable because it presents the restriction as harmless. Something indispensable is not being taken away, or so the argument goes; only an unnecessary luxury, an eccentric hobby or some obscure technical possibility is affected. Yet this reasoning contains a much larger and more dangerous assumption: somebody has appointed themselves to decide which parts of other people’s lives are necessary, and therefore worthy of being available, and which parts may be made expensive, difficult or impossible without anything meaningful being lost.</p>

<p>The problem begins with the word <em>“need”</em>. Human beings have remarkably few strict material needs. <a href="https://en.wikipedia.org/wiki/Maslow%27s_hierarchy_of_needs">We need</a> some amount of food, water, protection from lethal environmental conditions. Even many things commonly regarded as necessities are not necessities in the narrowest possible sense. Nobody needs a bed because a sleeping bag or a pile of blankets can prevent death during the night. Nobody needs a house because a sufficiently good tent can provide shelter. Nobody needs a varied diet because some inexpensive combination of staple foods can provide enough calories and nutrients to survive. Nobody needs a chair because sitting on the floor is possible, nobody needs a washing machine because clothes can be washed by hand and nobody needs heating in every room if enough warm clothing is available.</p>

<p>Nobody needs a bicycle because it is possible to walk. Nobody needs a car because one could walk, cycle, wait for public transport or simply refrain from travelling to places that are difficult to reach. Nobody needs a train when a bus could perform approximately the same task and nobody needs a bus when sufficiently determined people could travel on foot. Nobody needs a smartphone because fixed telephone lines, letters and public notice boards existed before it. Nobody needs a computer because calculations can be performed on paper and nobody needs paper because information was once transmitted orally. Nobody needs books because stories can be remembered, nobody needs musical instruments because people can sing, and nobody needs recorded music because silence is not fatal.</p>

<p>The same reduction can be applied to practically <em>every</em> pleasant, useful or culturally significant part of life. There is no need for food beyond a nutritionally sufficient selection of cheap ingredients. There is no need for coffee, tea, chocolate, spices, cakes, restaurants or the cultivation of hundreds of varieties of fruit and vegetables. There is no need for beautiful clothes when a few durable and shapeless garments would provide sufficient protection from the weather. There is no need for jewellery, paintings, gardens, toys, cameras, telescopes, aquariums, model railways, sports equipment or musical recordings. There is no need to travel for pleasure, to decorate a room, to own more than one cup or to choose between different colours of paint.</p>

<p>Once <em>“need”</em> is interpreted as physical necessity, nearly the whole of civilisation turns out to be unnecessary.</p>

<p>This is not a useful discovery about civilisation. It is evidence that mere necessity is the wrong criterion by which to judge it. Civilisation consists to a considerable extent of things that are not strictly required for survival. The purpose of social and technological development has never been merely to keep human organisms alive with the smallest possible expenditure of resources. It has been to give people more possibilities: to reduce effort, increase comfort, overcome distance, communicate more freely, explore interests, express themselves, care for one another and build lives that differ from those of their neighbours.</p>

<p>A bed is not valuable because sleeping on the floor would otherwise be impossible. It is valuable because comfort matters. A bicycle is not valuable because walking is impossible. It is valuable because time and range matter. A smartphone is not valuable because communication without it is impossible. It is valuable because convenient access to people and information matters. Spices do not have to prevent starvation to enrich a meal and a garden does not have to produce the maximum possible number of calories to be worth cultivating.</p>

<h2 id="need-is-not-an-objective-and-uniform-quantity">Need is not an Objective and Uniform Quantity</h2>

<p>Even if one wanted to distinguish needs from mere preferences, the distinction would not be as simple as its casual use suggests. People have different bodies, abilities, professions, responsibilities, environments and interests. Something that appears redundant from the outside may solve a very real problem for the person using it.</p>

<p>A car may look unnecessary to somebody living beside an underground station, working in an office and buying groceries at a nearby supermarket. It may be essential in practice to a person living in a rural area, transporting equipment, working irregular hours or caring for relatives in several locations. A smartphone may appear to be a luxury until it is used as an accessibility device, a navigation aid, a medical interface or the only practical connection to a distant family. An unusually specialised tool may be pointless to almost everybody and still be indispensable to the few people who repair a particular machine. A powerful computer may be entertainment equipment in one household and a scientific instrument in another.</p>

<p>It is rarely possible to infer the value of an object from its appearance, and it is even less possible to infer its value from the fact that most people would not personally buy it. Majorities naturally regard many minority interests as unnecessary because a minority interest is, by definition, something most people do not share. Most people do not need laboratory equipment, amateur-radio transmitters, climbing gear, weaving looms, large-format cameras, specialist software, obscure books or replacement components for thirty-year-old machines. The people who do need or value them are nevertheless real people, and their interests do not become meaningless merely because they are statistically uncommon.</p>

<p>The sentence <em>“nobody needs this”</em> therefore very often means something quite different: <em>“I do not need this, and I cannot immediately imagine the life of somebody who does”</em>. That is not a factual assessment of necessity. It is a failure of imagination converted into a political argument.</p>

<h2 id="preferences-do-not-require-external-justification">Preferences do not Require External Justification</h2>

<p>There is also no reason why a person should have to demonstrate that something is necessary before being allowed to obtain or use it. If an activity does not impose an unacceptable burden on others, personal preference is already a sufficient reason. A person may prefer a bicycle even though walking is possible. They may prefer a fountain pen even though a cheap ballpoint pen writes. They may want a particular computer because experimenting with it is enjoyable, wear elaborate clothes because they like their appearance or cultivate flowers that cannot be eaten.</p>

<p>The demand for an objectively valid need reverses the proper relationship between individuals and institutions. A free person does not normally have to submit an application explaining why a harmless choice should be permitted. Restrictions require justification; ordinary choices do not. The person proposing a prohibition, a discriminatory tax or an administrative obstacle should have to identify the concrete harm being prevented. The affected person should not have to prove that their interest is serious enough to survive somebody else’s inspection.</p>

<p>This distinction matters because <em>“need”</em> is an almost infinitely flexible criterion. If the possibility of an inferior substitute is enough to show that something is unnecessary, then nearly everything can be restricted. A person does not need private transport because public transport exists. They do not need private communication because they can speak in public. They do not need encryption because they have nothing that must be secret. They do not need a particular book because other books remain available. They do not need to visit a distant country because photographs exist. They do not need a large home because a smaller one contains enough physical space to survive.</p>

<p>The argument never reaches a natural stopping point. Every human activity can be replaced by a less convenient, less comfortable, less expressive or less capable alternative until only bare subsistence remains. If this reasoning is accepted, the remaining question is not whether arbitrary restrictions are legitimate but merely who is permitted to impose their preferred definition of an adequate life upon everybody else.</p>

<h2 id="time-effort-and-comfort-are-parts-of-life">Time, Effort and Comfort are Parts of Life</h2>

<p>The <em>“nobody needs it”</em> argument also treats inconvenience as though it had no cost. A person can walk instead of cycling, wash clothes by hand, cook every ingredient from its raw state, repair everything with primitive tools and travel for hours to avoid using a nearby service that has been restricted. None of these alternatives necessarily makes survival impossible. They merely consume time and effort.</p>

<p>But a human life consists of a finite amount of time and effort. Saving an hour is not an irrelevant luxury simply because losing that hour would not kill anybody. A tool that reduces a repetitive task from two hours to ten minutes gives its user part of their life back. A vehicle that makes a distant place reachable creates practical possibilities that theoretically being able to walk there does not. A comfortable bed may improve sleep, health and the ability to work during the following day even though an uncomfortable bed would also prevent death.</p>

<p>Convenience is sometimes discussed as if it were a morally suspicious desire. In reality, much of technological progress is organised convenience. Running water is more convenient than carrying buckets. Refrigeration is more convenient than purchasing food every day. Electric lighting is more convenient than arranging all activity around daylight. Computers are more convenient than performing calculations manually. Each convenience releases time, attention and physical energy for something else.</p>

<p>The fact that people managed without something in the past does not show that they should be made to manage without it now. Earlier generations also managed with higher infant mortality, exhausting manual labour, slower communication and much more limited access to knowledge. Human adaptability proves that people can endure deprivation; it does not transform deprivation into a desirable policy.</p>

<h2 id="unnecessary-things-are-often-where-new-things-begin">Unnecessary Things are Often Where New Things Begin</h2>

<p>Many useful developments begin as unnecessary experiments. Early computers were not needed by ordinary households. The first cameras, aircraft, radio transmitters, 3D printers and personal computers were expensive curiosities with limited immediate applications. A person judging them only by established needs could easily have concluded that society already had adequate ways to calculate, communicate, travel and manufacture objects.</p>

<p>New applications are discovered because people are allowed to experiment before they can prove the final utility of what they are doing. Hobbyists learn technologies that later become professionally relevant. Artists misuse technical equipment in ways its designers did not anticipate. Researchers combine instruments intended for unrelated purposes. Small communities preserve knowledge and equipment that larger organisations have abandoned. Repairs, adaptations and inventions are often performed with objects that would look unnecessary to an administrator evaluating only their most common use.</p>

<p>Demanding a recognised need before permitting access therefore favours the existing world over every possible future world. Established uses can defend themselves because their value is already known. Experiments cannot do so because their purpose is to discover value that is not known yet. A society that permits only what can already be justified by conventional needs may remain functional for some time, but it gradually loses the conditions under which unusual ideas and new practices emerge.</p>

<p>This does not mean that every eccentric product will become important. Most will not. That is precisely why no central authority can reliably select the successful ones in advance. Exploration requires the freedom to try things that may turn out to be useless. The possibility of failure is not an unfortunate defect of innovation; it is an unavoidable property of searching through possibilities whose value is not yet known.</p>

<h2 id="the-private-laboratory-is-still-a-laboratory">The Private Laboratory is Still a Laboratory</h2>

<p>The claim that <em>nobody needs this</em> becomes particularly troublesome when it is applied to scientific and technical equipment. Laser diodes, optical filters, vacuum pumps, photodetectors, high-voltage supplies, methanol, sulfuric acid, laboratory glassware, radio-frequency components and countless other specialist products are unnecessary to most people. That is hardly surprising. Most people are not building spectrometers, repairing optical instruments, testing vacuum systems, preparing chemical samples or developing unconventional measurement techniques in their spare time.</p>

<p>But <em>“most people do not need it”</em> is not the same statement as <em>“nobody needs it”</em>. A laser diode may be a meaningless little component to one person and the central light source of another persons interferometer, fluorescence experiment, optical communication system, leak detector or home-built microscope. Methanol may be merely a toxic liquid to somebody who has never entered a laboratory, while somebody else uses it as a solvent, fuel, cleaning agent, reference material or part of a chemical process. Sulfuric acid may be associated primarily with dramatic accident reports, but it is also used in batteries, electrochemistry, etching, sample preparation, chemical synthesis and numerous perfectly ordinary technical procedures.</p>

<p>The fact that these materials <em>can</em> be dangerous is a legitimate reason for suitable packaging, labelling, storage rules and restrictions of buyable amounts proportionate to their actual risks. It is also perfectly legitimate to <em>ask</em> what a person needs it for and check for plausibility where an item poses a substantial intrinsic hazard to a third party. It is not a reason to pretend that they have no legitimate private use. Risk and need are separate questions. A substance does not become harmless because an officially recognised profession needs it, and it does not become illegitimate because a private person needs it for an experiment rather than for commercial production. A litre in a home laboratory, a tanker load at an industrial plant and an unrestricted sale to children are not the same situation and should not be discussed as though they were.</p>

<p>When somebody says that private individuals do not need laser diodes, laboratory chemicals or vacuum equipment, what they often mean is that private individuals are not expected to perform experiments requiring them. This turns into circular reasoning remarkably quickly. Private experimentation is declared unrealistic because individuals supposedly have no legitimate reason to obtain laboratory equipment, and their inability to obtain laboratory equipment is then presented as evidence that serious experimentation belongs exclusively inside established institutions.</p>

<p>This view ignores a substantial and valuable population of hobby scientists, amateur astronomers, radio amateurs, electronics developers, independent researchers, instrument builders, restorers and simply curious people. Some are highly qualified professionals pursuing a different subject outside their employment. Some are students learning through projects that no course has assigned to them. Some are retired engineers or scientists who have not lost their knowledge merely because they no longer have an institutional purchasing department. Others begin without formal credentials and acquire considerable expertise precisely because components and materials are available to experiment with.</p>

<p>The boundary between professional and amateur science is not a boundary between real and imaginary science. It usually describes employment and institutional affiliation, not the quality of a person’s reasoning or measurements. A badly planned experiment does not become good because it is performed at a university, while a carefully constructed instrument does not become a toy because it stands in a cellar, garage or living room.</p>

<p>A particularly striking example is the development of photoactivated localization microscopy (PALM). Eric Betzig and Harald Hess built the first PALM microscope in Hess’s living room in La Jolla. Both were unemployed at the time, and Hess still possessed some equipment from his earlier work at Bell Laboratories. Their improvised private laboratory nevertheless produced an important super-resolution microscopy technique. Betzig later shared the 2014 Nobel Prize in Chemistry for the development of super-resolved fluorescence microscopy. In his Nobel biography he describes the arrangement quite plainly: the first PALM microscope was built in Harald Hess’s living room. <a href="https://www.nobelprize.org/prizes/chemistry/2014/betzig/biographical/">The account is available in Betzig’s official Nobel Prize biography.</a></p>

<p>This example should not be misunderstood as an argument that every private experiment will produce Nobel Prize-winning work. Of course it will not, just as almost no experiment performed in an institutional laboratory will receive a Nobel Prize. Its relevance is that the value of an experiment cannot be inferred from the postal address at which it is performed. Had somebody examined two unemployed researchers buying laser components and asked whether they <em>really needed</em> them, the honest answer would have depended entirely on whether that person understood an experiment that did not yet exist.</p>

<p>Nor should access to scientific equipment be defended only by searching for exceptional success stories. A home-built spectrometer does not have to transform microscopy to justify its existence. An experiment may be worthwhile because its builder learns something, verifies a published result, repairs an old instrument, teaches other people, develops a useful technique or simply experiences the pleasure of understanding a physical phenomenon directly. We do not demand that every privately owned musical instrument produce a famous composer, and we should not demand that every privately owned laser or vacuum chamber produce a Nobel laureate.</p>

<p>There is a broader social value in retaining scientific and technical capability outside large institutions. Knowledge is more resilient when it is distributed. Old techniques survive because somebody continues to use them after commercial and academic attention has moved elsewhere. Instruments that manufacturers no longer support remain operable because independent people investigate them. Unusual ideas can be tested without first convincing a funding agency, employer or committee that the outcome will be useful. Students can learn by actually constructing something rather than merely observing equipment that they are not permitted to touch.</p>

<p>Many experiments require materials that appear unrelated when viewed individually. A person building an optical instrument may need lasers, solvents, adhesives, precision mechanics, electronic components, optical glass, vacuum fittings and chemicals for cleaning or sample preparation. An administrator considering each purchase in isolation may find every item unnecessary because the purpose lies in the combination. This is another reason why outsiders are poorly positioned to evaluate need: they see a bottle, diode or pump, while the experimenter sees a measurement chain.</p>

<p>It is reasonable to regulate genuine hazards according to concentration, quantity, storage conditions, competence where this is actually relevant (though the formal requirements should not be set too high or hard to achieve), and the credible consequences of misuse. It is not reasonable to replace risk assessment with social classification, under which industrial users are assumed to possess legitimate purposes while private users are assumed to have none. Companies can be careless, institutions can make mistakes, and private experimenters can be highly competent. The name printed on the delivery address is not a physical safety property.</p>

<p>A society that regards scientific equipment as something ordinary people should neither possess nor understand gradually turns science into a spectator activity. Citizens are then encouraged to admire technology, purchase finished products and trust authorised experts, but not to investigate, reproduce, modify or build anything themselves. This may create tidy administrative categories, but it weakens the technical culture on which science, engineering, repair and informed public discussion depend.</p>

<p>Nobody needs a laser diode in the same sense that nobody needs a telescope, a musical instrument or a box of electronic components. Yet somebody may need that particular diode to measure a spectrum, transmit information, capture particles, build a microscope or test an idea that nobody else has considered. The person dismissing it as unnecessary usually does not know which of these things is being attempted. More importantly, it is not their experiment and not their decision to make.</p>

<h2 id="the-argument-is-applied-selectively">The Argument is Applied Selectively</h2>

<p>It is also noticeable that calls to restrict unnecessary things are rarely based on a consistent commitment to austere living. The people making them usually own many things that are not strictly needed. They may live in houses larger than the minimum required for shelter, eat food selected for flavour, travel for pleasure, purchase decorative objects, use entertainment devices and replace functioning products with newer ones. Their own preferences are experienced as ordinary parts of life, while unfamiliar preferences are more readily classified as dispensable luxuries.</p>

<p>This asymmetry is understandable at a psychological level. We know the small practical and emotional reasons for our own choices, while somebody else’s choice is visible only as an object. We know why our particular chair, vehicle, computer, holiday or hobby matters to us. When looking at another person’s equipment, we may see only unnecessary consumption. The appropriate conclusion is not that everybody should become better at judging strangers needs. It is that such judgements should carry little authority.</p>

<p>A society containing many different ways of living will necessarily contain activities that each individual considers pointless. One person sees no purpose in sports cars, another in gaming computers, another in expensive kitchens, another in musical instruments, another in travel, another in football stadiums, another in private gardens and another in collecting old machines. If the absence of personal understanding were enough to justify restrictions, everybody could construct a convincing list of things that other people should lose. The combined result would not be a rational society stripped of waste. It would be a society in which nearly every interest is suppressed by the indifference of those who do not share it.</p>

<p>Tolerance does not mean approving of every preference. It means accepting that other people do not require our approval for harmless choices.</p>

<h2 id="harm-is-a-legitimate-question-need-is-usually-not">Harm is a Legitimate Question; Need is Usually not</h2>

<p>Of course, rejecting the <em>“nobody needs it”</em> argument does not imply that every object or activity must be allowed without any conditions. Some activities create substantial risks or impose costs on other people. Heavier vehicles require rules because collisions can injure others. Industrial processes may release pollutants. Weapons, some hazardous chemicals (please not the basics like sulfric acid or methanole) can create risks beyond the owners property. Scarce public space may have to be allocated and infrastructure has to be financed somehow.</p>

<p>But these are arguments about harm, risk, external costs and the use of shared resources. They should be stated and examined as such. If a vehicle creates dangerous emissions, the relevant questions concern the magnitude of those emissions, the resulting harm and the effectiveness and proportionality of possible remedies. If a device interferes with communication systems, the relevant matter is interference. If an activity consumes a scarce communal resource, the discussion concerns allocation and cost.</p>

<p><em>“Nobody needs it”</em> contributes nothing to this analysis. An unnecessary activity can be harmless, while a necessary activity can be extremely harmful. Food production is necessary and still requires environmental and safety rules. Decorative painting is unnecessary and usually requires little public concern. Necessity neither proves innocence nor establishes guilt.</p>

<p>Keeping these questions separate improves regulation. It forces restrictions to address an identifiable problem and makes it possible to ask whether a less intrusive solution exists. Perhaps emissions can be limited without banning a whole class of machines. Perhaps users can pay for a genuinely measurable infrastructure cost without being discouraged merely because their activity is unpopular. Perhaps safety can be improved through technical standards rather than a licensing procedure that effectively excludes private users. Once the discussion is framed around a concrete harm, evidence and proportionality become possible. Once it is framed around supposed need, the discussion becomes a contest over whose life choices deserve recognition.</p>

<p>There may be exceptional situations in which essential uses deserve priority. During a severe shortage, medicine may reasonably receive resources before decorative manufacturing. Emergency vehicles may receive priority on roads. Basic household energy consumption may be protected differently from extremely large discretionary consumption during a supply crisis. But priority for urgent needs is not the same as a general authority to suppress everything considered nonessential. An exceptional allocation problem should not be converted into a permanent philosophy of everyday life.</p>

<h2 id="you-can-still-live-without-it-is-too-low-a-standard">You Can Still Live Without It is Too Low a Standard</h2>

<p>Restrictions are often defended by pointing out that the affected people can continue living without the restricted option. This establishes very little. People can remain alive under a great many unpleasant, limiting and humiliating conditions. The standard for a decent society cannot be that every interference is acceptable unless it directly prevents biological survival.</p>

<p>A restriction can be serious because it eliminates a hobby around which somebody has built a community. It can be serious because it makes an independent life impractical for a person with unusual circumstances. It can be serious because it removes access to information, prevents experimentation, consumes limited income through compliance costs or forces people to request permission for ordinary conduct. None of these consequences has to be fatal to be relevant.</p>

<p>Small restrictions also accumulate. One fee may appear negligible, one permit may appear easy to obtain, one prohibited product may appear obscure and one discontinued service may affect only a few people. But a life is composed of many such details. If each restriction is assessed only in isolation and dismissed because nobody absolutely needs the affected choice, it becomes possible to construct an extremely narrow society through thousands of individually <em>“minor”</em> limitations.</p>

<p>The same reasoning particularly disadvantages people with little money, little institutional influence or unusual requirements. Wealthy people can often substitute another product, hire assistance, travel to another jurisdiction or absorb a new fee. Others cannot. A regulation described as harmless because alternatives technically exist may in practice reserve the activity for those able to navigate its obstacles.</p>

<h2 id="other-peoples-lives-are-not-optimisation-problems">Other Peoples Lives are not Optimisation Problems</h2>

<p>Behind the language of necessity there is often an image of society as an optimisation problem. Resources should be directed toward useful purposes, unnecessary consumption should be removed and everyone should use the most efficient adequate solution. This may be appropriate when designing a tightly specified technical system. It is a poor model for human life.</p>

<p>There is no single objective function shared by everybody. One person wants more free time, another a larger workshop, another a quiet home, another the ability to travel, another an elaborate garden and another access to every obscure piece of information they can find. These goals cannot be reduced to a universal ranking without somebodys preferences being treated as authoritative.</p>

<p>Efficiency itself depends on the chosen objective. A small apartment may be efficient as shelter and unsuitable as a workshop, library, social space or home for several animals. A bus may be efficient in energy per passenger and inefficient for a journey involving several remote destinations and heavy equipment. Basic food may be efficient in calories per euro and a miserable basis for hospitality, culture or enjoyment. Objects cannot be classified as efficient or wasteful independently of the life in which they are used.</p>

<p>This is one reason decentralised choice is so important. Individuals possess detailed knowledge of their own circumstances that no distant observer has: which inconveniences matter, which risks they accept, which interests sustain them, which tools might help and which pleasures make expenditure worthwhile. They may make mistakes, as everybody does, but the possibility of error does not give strangers superior knowledge or a general claim to command them.</p>

<h2 id="a-society-should-provide-room-not-a-single-approved-life">A Society Should Provide Room, not a Single Approved Life</h2>

<p>The strongest objection to the <em>“nobody needs this”</em> argument is ultimately not about any particular product. It is about the kind of society implied by the argument.</p>

<p>A pluralistic society does not exist merely because people hold different opinions. It exists because people are permitted to construct materially different lives. They read different books, use different tools, travel in different ways, build different homes, pursue obscure interests, communicate through different systems and spend their resources on things that others might never choose. Diversity requires practical room. It cannot survive if every uncommon choice must first pass a test of necessity administered according to majority preferences.</p>

<p>This does not create an unlimited entitlement to harm others or consume shared resources without restraint. It creates a presumption that peaceful choices belong to the people making them. When intervention is proposed, its justification should identify a real conflict with the rights, safety or resources of others. Disapproval, unfamiliarity and the existence of a more primitive substitute are not enough.</p>

<p>Nobody needs a painting. Nobody needs a telescope. Nobody needs a garden containing flowers rather than potatoes. Nobody needs a fast computer, a soft bed, an elegant coat, a collection of old radios or a journey taken only to see what lies elsewhere. Nobody needs to write a novel, climb a mountain, restore an obsolete machine or prepare a meal that takes three hours when something edible could be heated in ten minutes.</p>

<p>And yet these unnecessary things are not marginal leftovers surrounding the serious business of human existence. Taken together, they are much of what human existence is for.</p>

<p>The question should therefore not be whether somebody else <em>needs</em> the things they value. The question should be whether there is a concrete and sufficient reason to interfere with them. If there is no such reason, their preference does not require our understanding, our approval or our certification of necessity.</p>

<p><em>They want it. That is reason enough.</em></p>]]></content><author><name>tsp</name></author><category term="Opinion" /><category term="Society" /><category term="Privacy" /><summary type="html"><![CDATA[Nobody needs this sounds like a reassuring argument for a restriction. After all, if something is merely an unnecessary luxury, hobby or convenience, little is lost by making it expensive, difficult or impossible to obtain. But taken seriously, the same reasoning applies to almost everything beyond bare survival: comfortable beds, bicycles, spices, musical instruments, travel, gardens, powerful computers, telescopes and countless other things that make human lives richer, easier or simply different. The fact that somebody could live without something tells us surprisingly little about whether taking it away is justified. This becomes especially obvious with scientific and technical equipment. Most people do not need laser diodes, vacuum pumps, laboratory glassware or specialist chemicals - but the person building an interferometer, repairing an old instrument or trying an experiment very well might. Eric Betzig and Harald Hess famously built the first PALM super-resolution microscope, for which they received a Nobel Prize, in Hess’s living room while both were unemployed. Harm, risk and external costs are legitimate reasons to discuss restrictions. The fact that an outsider does not understand somebody else’s use is not. Other people’s lives are not optimisation problems, and harmless preferences do not require a certificate of necessity. They want it. That is reason enough.]]></summary></entry></feed>