<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>Colas.Nahaboo.net - hardware</title>
    <subtitle>Colas Nahaboo personal site, with discussions about programming code, web and computing topics, surfing and SUPing, and various musings.</subtitle>
    <link rel="self" type="application/atom+xml" href="https://colas.nahaboo.net/tags/hardware/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://colas.nahaboo.net"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2026-08-27T00:00:00+00:00</updated>
    <id>https://colas.nahaboo.net/tags/hardware/atom.xml</id>
    <entry xml:lang="en">
        <title>Magnets, magnets everywhere</title>
        <published>2026-08-27T00:00:00+00:00</published>
        <updated>2026-08-27T00:00:00+00:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://colas.nahaboo.net/blog/magnets-magnets-everywhere/"/>
        <id>https://colas.nahaboo.net/blog/magnets-magnets-everywhere/</id>
        
        <content type="html" xml:base="https://colas.nahaboo.net/blog/magnets-magnets-everywhere/">&lt;p&gt;I have started putting magnets on small things around my desk. A cable that was wandering around now stays where I need it, and a USB hub now sits on the top of my PC case instead of taking space on the desk.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://colas.nahaboo.net/blog/magnets-magnets-everywhere/magnets-meme.jpg&quot; alt=&quot;Magnets, magnets everywhere&quot; /&gt;&lt;/p&gt;
&lt;h2 id=&quot;cables&quot;&gt;Cables&lt;a class=&quot;zola-anchor&quot; href=&quot;#cables&quot; aria-label=&quot;Anchor link for: cables&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;For cables, I use round magnets with a hole in the middle. A small tie goes through the hole and loops over the cable. The cable rests on top of the magnet, and the magnet holds the whole thing to a magnetic surface.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://colas.nahaboo.net/blog/magnets-magnets-everywhere/3.jpg&quot; alt=&quot;A cable held by a ring magnet and a small tie&quot; /&gt;&lt;/p&gt;
&lt;p&gt;I can move the cable, pull it away when I need it, and put it back without fighting a fixed clip. The magnet stays with the cable, so I do not have another small part to lose.&lt;/p&gt;
&lt;p&gt;The photo below also shows another version. I bolted a double-sided Velcro band through the central hole of a round magnet. It makes a reusable strap for a thicker cable or a small bundle.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://colas.nahaboo.net/blog/magnets-magnets-everywhere/4.jpg&quot; alt=&quot;Ring magnets with a cable tie and double-sided Velcro bands&quot; /&gt;&lt;/p&gt;
&lt;h2 id=&quot;usb-hubs&quot;&gt;USB hubs&lt;a class=&quot;zola-anchor&quot; href=&quot;#usb-hubs&quot; aria-label=&quot;Anchor link for: usb-hubs&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;I glued square magnets (the leftlmost ones on the photo above)  made for cabinet doors to the sides of the USB hub. I used MS polymer glue and waited for it to cure. The magnets now attach the hub to the steel side of my PC case.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://colas.nahaboo.net/blog/magnets-magnets-everywhere/2.jpg&quot; alt=&quot;Square cabinet-door magnets glued to the sides of a USB hub&quot; /&gt;&lt;/p&gt;
&lt;p&gt;The hub remains removable, but it stays put. The same trick should work with metallic desk legs, provided that the metal is magnetic.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://colas.nahaboo.net/blog/magnets-magnets-everywhere/1.jpg&quot; alt=&quot;USB hub attached to the side of a PC case&quot; /&gt;&lt;/p&gt;
&lt;p&gt;One small detail matters: a metal surface is not necessarily magnetic. I test it with one of the magnets first. I also let the glue cure fully before hanging the hub and keep strong magnets away from cards and magnetic storage.&lt;/p&gt;
&lt;p&gt;This is the kind of DIY I like: cheap parts, no drilling, and an arrangement I can change later.&lt;/p&gt;
&lt;p&gt;Buzz was right. Magnets, magnets everywhere. :-)&lt;/p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Remediate subpixel color fringing on Linux</title>
        <published>2026-08-14T00:00:00+00:00</published>
        <updated>2026-08-14T00:00:00+00:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://colas.nahaboo.net/blog/remediate-subpixel-color-fringing-on-linux/"/>
        <id>https://colas.nahaboo.net/blog/remediate-subpixel-color-fringing-on-linux/</id>
        
        <content type="html" xml:base="https://colas.nahaboo.net/blog/remediate-subpixel-color-fringing-on-linux/">&lt;p&gt;I plugged in my new MSI 491CQPX, a QD-OLED ultrawide, and the first thing I noticed was that text looked dirty: every letter bordered by a red fringe on one side, a green one on the other. Not blurry, but colored — as if my glasses had chromatic aberration.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://colas.nahaboo.net/blog/remediate-subpixel-color-fringing-on-linux/fringing.jpeg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;That is &lt;strong&gt;subpixel color fringing&lt;/strong&gt;. QD-OLED panels arrange their red, green, and blue subpixels in a triangle, while font rendering engines — ClearType, FreeType, all of them — assume the classic RGB stripes of LCD panels. Subpixel antialiasing is the culprit: it lights up individual subpixels to fake a higher resolution, and on a triangular layout the colors bleed sideways into a fringe.&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https://pcmonitors.info/articles/qd-oled-and-woled-fringing-issues/&quot;&gt;PC Monitors&lt;/a&gt; has the full story, with macro photos (QD-OLED and WOLED both suffer). &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https://nuxx.net/blog/2026/01/09/oled-not-for-me/&quot;&gt;nuxx&lt;/a&gt; was so bothered that he returned his OLED — it made his eyes feel funny. I did not return mine: on Linux the fix is one setting.&lt;/p&gt;
&lt;h2 id=&quot;the-fix-grayscale-antialiasing&quot;&gt;The fix: grayscale antialiasing&lt;a class=&quot;zola-anchor&quot; href=&quot;#the-fix-grayscale-antialiasing&quot; aria-label=&quot;Anchor link for: the-fix-grayscale-antialiasing&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Subpixel rendering is the problem, so I stopped using it. Set your fonts to plain grayscale antialiasing and the fringes disappear. On GNOME:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Install GNOME Tweaks: &lt;code&gt;sudo apt install gnome-tweaks&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Open &lt;strong&gt;Tweaks → Fonts&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Set &lt;strong&gt;Antialiasing&lt;/strong&gt; to &lt;strong&gt;Grayscale&lt;/strong&gt; — this is the whole fix&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The letters lose a bit of the LCD-crisp sharpness, but I had to look hard to tell the difference. Hinting is a matter of taste, not part of the fix: I left it alone.&lt;/p&gt;
&lt;h2 id=&quot;not-on-gnome&quot;&gt;Not on GNOME?&lt;a class=&quot;zola-anchor&quot; href=&quot;#not-on-gnome&quot; aria-label=&quot;Anchor link for: not-on-gnome&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Any desktop works — the switch is in fontconfig, the config file every Linux font stack reads. Create &lt;code&gt;~/.config/fontconfig/fonts.conf&lt;/code&gt; with this:&lt;/p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #4C4F69; background-color: #EFF1F5;&quot; &gt;&lt;code data-lang=&quot;xml&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #179299;&quot;&gt;&amp;lt;?&lt;/span&gt;&lt;span style=&quot;color: #1E66F5;&quot;&gt;xml&lt;/span&gt;&lt;span style=&quot;color: #DF8E1D;&quot;&gt; version&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt;&amp;quot;1.0&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #179299;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;&amp;lt;!DOCTYPE&lt;/span&gt;&lt;span&gt; fontconfig SYSTEM &amp;quot;fonts.dtd&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #8839EF;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #179299;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #1E66F5;&quot;&gt;fontconfig&lt;/span&gt;&lt;span style=&quot;color: #179299;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #179299;&quot;&gt;  &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #1E66F5;&quot;&gt;match&lt;/span&gt;&lt;span style=&quot;color: #DF8E1D;&quot;&gt; target&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt;&amp;quot;font&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #179299;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #179299;&quot;&gt;    &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #1E66F5;&quot;&gt;edit&lt;/span&gt;&lt;span style=&quot;color: #DF8E1D;&quot;&gt; name&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt;&amp;quot;rgba&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #DF8E1D;&quot;&gt; mode&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span style=&quot;color: #40A02B;&quot;&gt;&amp;quot;assign&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #179299;&quot;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #1E66F5;&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;color: #179299;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span&gt;none&lt;/span&gt;&lt;span style=&quot;color: #179299;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #1E66F5;&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;color: #179299;&quot;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #1E66F5;&quot;&gt;edit&lt;/span&gt;&lt;span style=&quot;color: #179299;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #179299;&quot;&gt;  &amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #1E66F5;&quot;&gt;match&lt;/span&gt;&lt;span style=&quot;color: #179299;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #179299;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #1E66F5;&quot;&gt;fontconfig&lt;/span&gt;&lt;span style=&quot;color: #179299;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;run &lt;code&gt;fc-cache -f&lt;/code&gt;, log out and back in. Setting &lt;code&gt;rgba&lt;/code&gt; to &lt;code&gt;none&lt;/code&gt; is precisely what turns subpixel rendering off.&lt;/p&gt;
&lt;h2 id=&quot;black-is-too-black&quot;&gt;Black is too black&lt;a class=&quot;zola-anchor&quot; href=&quot;#black-is-too-black&quot; aria-label=&quot;Anchor link for: black-is-too-black&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The fringes are most visible at maximum contrast — white text on pure black. I keep my editor and terminal backgrounds at a very dark gray (#121212) instead of #000000, which calms things down further and looks just as &quot;OLED&quot; to me.&lt;/p&gt;
&lt;h2 id=&quot;do-not-try-the-cleartype-tuner-under-wine&quot;&gt;Do not try the ClearType Tuner under Wine&lt;a class=&quot;zola-anchor&quot; href=&quot;#do-not-try-the-cleartype-tuner-under-wine&quot; aria-label=&quot;Anchor link for: do-not-try-the-cleartype-tuner-under-wine&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Tempting, I know, but do not. The tuner writes Windows registry keys (&lt;code&gt;Software\Microsoft\Avalon.Graphics&lt;/code&gt;), which FreeType and Wayland never read — zero effect. And on Windows it would not help either: the tuner cannot adapt ClearType to a triangular layout, which is why there is a long-running &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https://github.com/microsoft/PowerToys/issues/25595&quot;&gt;PowerToys issue&lt;/a&gt; begging Microsoft for OLED subpixel support.&lt;/p&gt;
&lt;p&gt;Alas, the Linux advantage here is real: Windows users are still waiting for Microsoft, while I fixed my monitor with one toggle. Done.&lt;/p&gt;
&lt;h2 id=&quot;but-still-annoyed-by-the-pixel-refresh&quot;&gt;... But still annoyed by the pixel refresh&lt;a class=&quot;zola-anchor&quot; href=&quot;#but-still-annoyed-by-the-pixel-refresh&quot; aria-label=&quot;Anchor link for: but-still-annoyed-by-the-pixel-refresh&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;However, I still have to cope with the other trouble with OLED monitors: They just stop working for 10 minutes at least once a day... at the most inconvenmient times: the dreaded &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https://burnintest.org/blog/oled-pixel-refresh-explained/&quot;&gt;pixel refresh&lt;/a&gt;.&lt;/p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>ups-monitor.sh: staged shutdowns when the power goes out</title>
        <published>2026-08-12T00:00:00+00:00</published>
        <updated>2026-08-12T00:00:00+00:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://colas.nahaboo.net/code/ups-monitor-staged-shutdowns-when-the-power-goes-out/"/>
        <id>https://colas.nahaboo.net/code/ups-monitor-staged-shutdowns-when-the-power-goes-out/</id>
        
        <content type="html" xml:base="https://colas.nahaboo.net/code/ups-monitor-staged-shutdowns-when-the-power-goes-out/">&lt;img src=&quot;ups-monitor-overview.png&quot;&gt;
&lt;p&gt;I released &lt;strong&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https://github.com/ColasNahaboo/ups-monitor.sh&quot;&gt;ups-monitor.sh&lt;/a&gt;&lt;/strong&gt;, a bash script that decides what happens when the power goes out.&lt;/p&gt;
&lt;p&gt;My UPS powers my servers, NAS, main switch and wifi access point. I want to cut off first my workstations in a clean way, to keep as much battery power to provide my main file server access via wifi for my phones and tablets.&lt;/p&gt;
&lt;p&gt;Configuring &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https://networkupstools.org/&quot;&gt;NUT&lt;/a&gt; scripts for this seemed verbose and complex for my small setup, so I basically coded a simple but flexible bash control layer over the NUT infrastructure&lt;/p&gt;
&lt;h2 id=&quot;the-staged-shutdown&quot;&gt;The staged shutdown&lt;a class=&quot;zola-anchor&quot; href=&quot;#the-staged-shutdown&quot; aria-label=&quot;Anchor link for: the-staged-shutdown&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;So the script shuts things down in stages, as the battery drains:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;90% battery&lt;/strong&gt;: shut down the non-essential &quot;first&quot; servers — storage, backups, the toy boxes.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;80% battery&lt;/strong&gt;: shut down the &quot;extra&quot; servers.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;20% battery&lt;/strong&gt;: shut down the monitoring host itself, and put the UPS in standby.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The UPS on the final step powers everything off and goes to sleep; when the mains come back, it wakes up, powers the equipment, and the machines can boot again. Recovery is automatic.&lt;/p&gt;
&lt;p&gt;The staging is fully configurable: the thresholds and the server lists live in &lt;code&gt;/etc/ups-monitor.conf&lt;/code&gt;, and servers can be prefixed &lt;code&gt;h:&lt;/code&gt; to hibernate instead of shutdown, or &lt;code&gt;wh:&lt;/code&gt;/&lt;code&gt;ws:&lt;/code&gt; for Windows hosts.&lt;/p&gt;
&lt;h2 id=&quot;the-config-is-bash&quot;&gt;The config is bash&lt;a class=&quot;zola-anchor&quot; href=&quot;#the-config-is-bash&quot; aria-label=&quot;Anchor link for: the-config-is-bash&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;As I often set up my scripts, the config file is &lt;em&gt;sourced&lt;/em&gt; by the script, so it is not a list of options in some syntax, it is pure bash. You can override any variable — and any &lt;strong&gt;function&lt;/strong&gt;. Redefine &lt;code&gt;info&lt;/code&gt; to text you instead of mailing you. Redefine &lt;code&gt;remoteshut&lt;/code&gt; to do whatever exotic thing your network needs. You can even write &quot;pseudo servers&quot; as &lt;code&gt;funcname:params&lt;/code&gt; in the server lists, and the script will run that function before shutting down — say, dump the databases before the machine dies. The anti-framework approach, same as my &lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https://github.com/ColasNahaboo/colas-bash-lib&quot;&gt;colas-bash-lib&lt;/a&gt; collection.&lt;/p&gt;
&lt;p&gt;It just polls the UPS every five seconds, so bash provides simplicity, stability and flexibility with a negligible overhead.&lt;/p&gt;
&lt;h2 id=&quot;goodies&quot;&gt;Goodies&lt;a class=&quot;zola-anchor&quot; href=&quot;#goodies&quot; aria-label=&quot;Anchor link for: goodies&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;A dry-run mode toggled by &lt;code&gt;touch /tmp/NOUPSMON&lt;/code&gt; — no restart needed — so you can unplug the UPS and watch the logs before trusting it for real.&lt;/li&gt;
&lt;li&gt;Email alerts for power lost and restored, overload, and battery-to-replace. AVR events (TRIM/BOOST) logged with the exact input voltage, for info. Logs rotated monthly, and a &lt;code&gt;clean&lt;/code&gt; command for the cron.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;compatible-ups&quot;&gt;Compatible UPS&lt;a class=&quot;zola-anchor&quot; href=&quot;#compatible-ups&quot; aria-label=&quot;Anchor link for: compatible-ups&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;One advice: choose a &lt;strong&gt;pure sine wave&lt;/strong&gt; UPS, otherwise some active-PFC power supplies may panic and shut down abruptly when the UPS switches to batteries. Save yourself the uncertainty.&lt;/p&gt;
&lt;h2 id=&quot;installation-usage-and-more-info&quot;&gt;Installation, Usage, and more info&lt;a class=&quot;zola-anchor&quot; href=&quot;#installation-usage-and-more-info&quot; aria-label=&quot;Anchor link for: installation-usage-and-more-info&quot;&gt;🔗&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a rel=&quot;noopener external&quot; target=&quot;_blank&quot; href=&quot;https://github.com/ColasNahaboo/ups-monitor.sh&quot;&gt;github.com/ColasNahaboo/ups-monitor.sh&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Note: This is AI-co-advised: chatting with Gemini helped me as a UPS novice, but it did not write the code or the docs.&lt;/p&gt;
</content>
        
    </entry>
</feed>
