<?xml version="1.0" encoding="utf-8" standalone="yes"?><?xml-stylesheet type="text/xsl" href="/index.xsl"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>./techtipsy</title><link>https://ounapuu.ee/tags/thinkpad/</link><description>Recent content on ./techtipsy, a blog written by Herman Õunapuu.</description><generator>Hugo -- gohugo.io</generator><language>en-GB</language><managingEditor>ihavesomethoughtsonyourblog@ounapuu.ee (Herman Õunapuu)</managingEditor><webMaster>ihavesomethoughtsonyourblog@ounapuu.ee (Herman Õunapuu)</webMaster><lastBuildDate>Mon, 09 Feb 2026 06:00:00 +0200</lastBuildDate><atom:link href="https://ounapuu.ee/tags/thinkpad/index.xml" rel="self" type="application/rss+xml"/><item><title>SteamOS on a ThinkPad P14s gen 4 (AMD) is quite nice</title><link>https://ounapuu.ee/posts/2026/02/09/year-of-the-linux-desktop/</link><pubDate>Mon, 09 Feb 2026 06:00:00 +0200</pubDate><author>ihavesomethoughtsonyourblog@ounapuu.ee (Herman Õunapuu)</author><guid>https://ounapuu.ee/posts/2026/02/09/year-of-the-linux-desktop/</guid><description>This is the year of the Linux (gaming) desktop. Or laptop.</description><content:encoded><![CDATA[<img src="https://ounapuu.ee/posts/2026/02/09/year-of-the-linux-desktop/media/cover_hu_fedc9f8a0aa21ac7.jpg" width="1200" height="630" alt="SteamOS on a ThinkPad P14s gen 4 (AMD) is quite nice" /><p>In April 2024, I wrote on the Lenovo ThinkPad P14s gen 4
and <a href="/posts/2024/04/12/lenovo-p14s-gen4/">how it does not suck under Linux.</a></p>
<p>That is still true. It&rsquo;s been fantastic, and a very reliable laptop during all that time.</p>
<p>The P14s gen 4 comes with a CPU that is still solid today, the AMD Ryzen 7 PRO 7840U, and that comes with impressive
integrated graphics in the form of an AMD Radeon 780M.</p>
<p><a href="/posts/2024/06/02/steam-deck/">I&rsquo;ve had a Steam Deck.</a></p>
<p><a href="/posts/2025/12/01/steam-machine/">I&rsquo;ve also accidentally built a Steam Machine.</a></p>
<p>I <em>had</em> to put SteamOS on this laptop to see how well it does. I did a quick Bazzite test the last time around, but
after being impressed with how well the stock SteamOS image runs on a random machine with an AMD GPU, I had to test
that, too.</p>
<h2 id="installing-steamos-on-usb-storage">
  <a class="heading-anchor" href="#installing-steamos-on-usb-storage">Installing SteamOS on USB storage<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>The normal way to install SteamOS on a machine is
to <a href="https://help.steampowered.com/en/faqs/view/65B4-2AA3-5F37-4227">take the Steam Deck recovery image</a> and to install
it on your own machine that has one NVMe SSD.</p>
<p>I didn&rsquo;t want to do <em>exactly</em> that, I wanted to run it off of an USB SATA SSD, which the recovery image does not
support, as it hard-codes the target SSD for the SteamOS installation to <code>/dev/nvme0n1</code>. There&rsquo;s a handy project out
there <a href="https://github.com/louij2/steamos_custom_install">that customizes the recovery script</a> to allow you to install
SteamOS to <em>any</em> target device, but I learned about that after the fact.</p>
<p>I went a slightly different route: I imaged the SteamOS installation from
my <a href="/posts/2025/12/01/steam-machine/">DIY Steam Machine build,</a> wrote it to the 4TB USB SSD that I had available for
testing, and after that I resized the <code>/home</code> partition to take up the full disk. <em>Bam,</em> clean SteamOS on a USB SSD!</p>
<p>Oh, and before I did that, I did the same process but to a 128 GB Samsung FIT USB 3.0 thumb drive.</p>
<p><strong><em>It worked.</em></strong></p>
<p>The game library images did load a bit slowly, but it was a great demonstration of how low you can go with the hardware
requirements. I wouldn&rsquo;t recommend <em>actually</em> installing games on such a setup as that would likely kill the USB thumb
drive very quickly.</p>
<h2 id="performance">
  <a class="heading-anchor" href="#performance">Performance<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>I ran the SteamOS setup on this laptop over a USB-C dock that only supports running at up to 4K at 30Hz, so I did
testing at 1080p 60Hz setup. You&rsquo;re unlikely to want to run this setup at 4K anyway, unless you&rsquo;re a fan of light, easy
to run games like Katamari or Donut County.</p>
<p>In most games, the experience was enjoyable. 1080p resolution, maybe change the settings to medium or low in some cases,
and you&rsquo;ll likely have a solid gaming experience.</p>
<p>Forza Horizon 4? No problem, 1080p high settings and a solid, consistent experience.</p>
<p>Need for Speed Hot Pursuit Remastered was an equally enjoyable experience, and I did not have to turn the settings down
from high/ultra.</p>
<p>God of War Ragnarök was pushing the setup to the limits. With 1080p, low/medium settings you can expect 30+ FPS. If you
include AMD FSR settings in the mix and also enable FSR frame generation, you can have a perfectly enjoyable 50-60 FPS
experience. Some UI hints were a bit &ldquo;laggy&rdquo; with frame generation, but I&rsquo;m genuinely surprised how well that rendering
trick worked. I&rsquo;ll admit it, my eyesight is not the best, but given the choice of a crisp but laggy picture, and a
slightly blurrier but smoother experience, I&rsquo;d pick the latter. After a pint of Winter Stout, you won&rsquo;t even notice the
difference.<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup></p>
<p>Wreckfest was also heaps fun. It did push the limits of the GPU at times, but running it at 1080p and medium/high
settings is perfectly enjoyable.</p>
<p>The observed power usage throughout the heaviest games measured via SteamOS performance metrics (<code>mangohud</code>) were around
30-40 W, with the GPU using up the most of that budget. In most games, the CPU was less heavily loaded, and in the games
that required good single thread performance, it could provide it.</p>
<h2 id="the-steamos-revolution">
  <a class="heading-anchor" href="#the-steamos-revolution">The SteamOS revolution<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>I like SteamOS. It&rsquo;s intentionally locked down in some aspects (but you can unlock it with one command), and the
Flatpak-only approach to software installation will make some people mad, but I like this balance. It almost feels like
a proper console-type experience, <em>almost</em>.</p>
<p>Valve does not officially support running SteamOS on random devices, but they haven&rsquo;t explicitly prevented it either.
I <em><strong>love</strong></em> that.</p>
<p>Take any computer from AMD that has been manufactured from the last 5 years, slap SteamOS on it, and there is a very
high chance that you&rsquo;ll have a lovely gaming experience, with the level of detail and resolution varying depending on
what hardware you pick.</p>
<p>A top of the line APU from AMD seems to do the job well enough for most casual gamers like
myself, and if <a href="https://frame.work/ee/en/desktop?tab=gaming">the AMD Strix Halo based systems were more affordable,</a> I
would definitely recommend getting one if you want a small but efficient SteamOS machine.</p>
<p>Last year, we saw the proliferation of gaming-oriented Linux distros.</p>
<p>The Steam Machine is shipping this year.</p>
<p><a href="https://www.youtube.com/watch?v=URbW3j_GYKg">DankPods is covering gaming on Linux.</a></p>
<p>2026 <em><strong>has</strong></em> to be the year of the Linux (gaming) desktop.</p>
<div class="footnotes" role="doc-endnotes">
<hr>
<ol>
<li id="fn:1">
<p>that&rsquo;s the <em>tipsy</em> part in <em>techtipsy</em>&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
</ol>
</div>
]]></content:encoded></item><item><title>ThinkPad as a server: third time's the charm</title><link>https://ounapuu.ee/posts/2024/10/16/third-times-the-charm/</link><pubDate>Wed, 16 Oct 2024 06:00:00 +0300</pubDate><author>ihavesomethoughtsonyourblog@ounapuu.ee (Herman Õunapuu)</author><guid>https://ounapuu.ee/posts/2024/10/16/third-times-the-charm/</guid><description>Turns out that using stable and performant computers as a home server is way too boring for me.</description><content:encoded><![CDATA[<img src="https://ounapuu.ee/posts/2024/10/16/third-times-the-charm/media/cover_hu_89504c7029e38e7c.jpg" width="1200" height="630" alt="ThinkPad as a server: third time's the charm" /><p>This is a follow-up to my two previous attempts on this topic:</p>
<ul>
<li><a href="/posts/2022/05/10/thinkpad-as-a-home-server/">Can a laptop from 2012 be a viable home server?</a></li>
<li><a href="/posts/2023/01/27/thinkpad-as-server-followup/">ThinkPad as a server: the follow-up</a></li>
</ul>
<p>Since then, I&rsquo;ve had quite a few changes to my home server setup:</p>
<ul>
<li><a href="/posts/2023/09/07/ikea-powered-homelab/">I put my home server stuff on an IKEA pegboard</a></li>
<li><a href="/posts/2023/10/09/zimaboard/">I tried the Zimaboard</a></li>
<li><a href="/posts/2022/01/17/asrock-x300-future-of-desktops/">I switched back to the ASRock DeskMini</a></li>
<li><a href="/posts/2024/06/24/back-to-roots/">I got fiber again!</a></li>
</ul>
<p>Zimaboard was
great, <a href="/posts/2023/10/09/zimaboard/#2024-08-20-update">until the CPU became just a little bit too slow for my needs.</a></p>
<p>ASRock Deskmini X300 was great, until I learned that it&rsquo;s actually relatively bad at idle power usage due to lack of
lower sleep states.</p>
<p>Combined with my recent tech cleanup, I am now proudly running all of my services on a single home server, powered by
<a href="/posts/2022/01/09/why-i-went-back-to-using-a-thinkpad-from-2012/">my trusty ThinkPad T430.</a></p>
<p>The promise of USB-C <em>everything</em> was too good to pass up, so I stopped resisting.</p>
<p>Doesn&rsquo;t mean that I won&rsquo;t run hardware into the ground.</p>
<p>Compared to last two attempts, I&rsquo;ve made a couple of important changes to the setup.</p>
<p>There is a weekly <code>tlp recalibrate BAT0</code> job scheduled that completely drains the battery and charges it up again, which
should make sure that the laptop battery survives for a longer time.
The battery charge threshold is set to 80%.</p>
<p>I&rsquo;ve used a knock-off Honeywell PTM7950 thermal pad on the CPU. The cooling performance is comparable to using thermal
paste, but hopefully it doesn&rsquo;t drip out.</p>
<p>The whole setup is mounted to an IKEA pegboard using
a <a href="https://nillkin.org/accessories/nillkin-prodesk-adjustable-laptop-stand">Nillkin ProDesk laptop stand</a>
and a generous amount of zip ties. The combination of zip ties and the rubber feet on the stand result in the stand
barely moving once mounted. The laptop stand itself is very sturdy, and you&rsquo;ll have to use a lot of force to change its
angle.</p>
<p>The CPU uses less power compared to the previous one. The one in the server is
the <a href="https://ark.intel.com/content/www/us/en/ark/products/71670/intel-core-i7-3632qm-processor-6m-cache-up-to-3-20-ghz-bga.html">Intel i7-3632QM</a>,
a quad-core CPU with a 35W TDP.</p>
<p>I still have some scripts running to limit the CPU temperatures to 85°C, just to be on the safe side and avoid
overheating at all costs.</p>









<figure class="center">
  <a href="/posts/2024/10/16/third-times-the-charm/media/setup-1.jpg">
    <img src="/posts/2024/10/16/third-times-the-charm/media/setup-1_hu_6bfa23fe0219b7ab.webp"
     width="1000"
     height="750"
     loading="lazy"
     decoding="async"
     alt="Took me 20 minutes to migrate the server along with the drives, and 2 hours to get the zip tie mounting just right.">

  </a>
  <figcaption class="center">Took me 20 minutes to migrate the server along with the drives, and 2 hours to get the zip tie mounting just right.</figcaption>
</figure>










<figure class="center">
  <a href="/posts/2024/10/16/third-times-the-charm/media/setup-2.jpg">
    <img src="/posts/2024/10/16/third-times-the-charm/media/setup-2_hu_f3b73da4eba708e0.webp"
     width="1000"
     height="750"
     loading="lazy"
     decoding="async"
     alt="The small shelf attachment holds two external drives and the power adapter.">

  </a>
  <figcaption class="center">The small shelf attachment holds two external drives and the power adapter.</figcaption>
</figure>










<figure class="center">
  <a href="/posts/2024/10/16/third-times-the-charm/media/setup-3.jpg">
    <img src="/posts/2024/10/16/third-times-the-charm/media/setup-3_hu_b808797e960a9df9.webp"
     width="750"
     height="1000"
     loading="lazy"
     decoding="async"
     alt="Another angle.">

  </a>
  <figcaption class="center">Another angle.</figcaption>
</figure>










<figure class="center">
  <a href="/posts/2024/10/16/third-times-the-charm/media/setup-4.jpg">
    <img src="/posts/2024/10/16/third-times-the-charm/media/setup-4_hu_cb7b9f9356456759.webp"
     width="750"
     height="1000"
     loading="lazy"
     decoding="async"
     alt="Plenty of clearance for adequate cooling.">

  </a>
  <figcaption class="center">Plenty of clearance for adequate cooling.</figcaption>
</figure>

<p>The power consumption is improved on this setup:</p>
<ul>
<li>mean: 27 W</li>
<li>min: 23 W</li>
<li>max: 70 W</li>
</ul>
<p>Results on the DeskMini on a typical day:</p>
<ul>
<li>mean: 34.8 W</li>
<li>min: 28 W</li>
<li>max: 89 W</li>
</ul>
<p>All measurements include the power consumption of the UPS, fiber PON and the router, which is around 10 W.</p>
<p>And the performance is good enough.</p>
<p>I&rsquo;m happy with it.</p>
<p>It&rsquo;s also handy that I now have that one laptop that I can sticker bomb without feeling guilty about removing them later
on.</p>
<h2 id="2025-june-update">
  <a class="heading-anchor" href="#2025-june-update">2025 June update<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>I have been running the ThinkPad T430 as a home server for a long time now. In fact, it&rsquo;s one of the longest stints I&rsquo;ve
had with a specific home server setup. The battery recalibration was <a href="/posts/2025/05/15/home/">temporarily disabled</a>
because of it interfering with UPower configuration that I had in place for shutting down the laptop at a higher battery
percentage (40%), but in all other aspects it&rsquo;s doing fine, and after removing UPower, the battery recalibration works
again.</p>
<p>There was <a href="/posts/2025/06/06/thinkcentre-m900-tiny/">a short week-long experiment with a ThinkCentre M900 Tiny,</a> but
that got put on pause because the USB-connected drives were a bit flaky. The ThinkPad T430 has proven itself to be a
more stable server platform as a result.</p>
]]></content:encoded></item><item><title>Running my ThinkPad T430 with an eGPU in 2024</title><link>https://ounapuu.ee/posts/2024/08/07/thinkpad-t430-egpu/</link><pubDate>Wed, 07 Aug 2024 06:00:00 +0300</pubDate><author>ihavesomethoughtsonyourblog@ounapuu.ee (Herman Õunapuu)</author><guid>https://ounapuu.ee/posts/2024/08/07/thinkpad-t430-egpu/</guid><description>Not all experiments end up being successful.</description><content:encoded><![CDATA[<img src="https://ounapuu.ee/posts/2024/08/07/thinkpad-t430-egpu/media/cover_hu_7607aeacfc765e1e.jpg" width="1200" height="630" alt="Running my ThinkPad T430 with an eGPU in 2024" /><p>I probably shouldn&rsquo;t have written down <a href="/posts/2024/07/03/thinkpad-t430-egpu/">my notes on the eGPU setup I had years ago.</a></p>
<blockquote>
<p>I’d be lying if I wasn’t considering remaking this setup with everything I’ve learned 6 years later.</p>
</blockquote>
<p>Oops.</p>
<p>I got access to an allegedly-faulty AMD Radeon RX 480 and an NVIDIA GTX 1650 for free thanks to my friend, so I ordered
the EXP GDC Beast v8.5c, two sorts of 6/8pin power cables, and a 12V 12A DC power supply.</p>
<p>The idea was to take a ThinkPad T430, bolt a GPU to it, and use it as a stationary workstation until the laptop
dies or gets too slow for modern tasks. The resale value of the T430 is too low for me to justify selling it, and if there&rsquo;s anyone
out there who can run a T430 into the ground 5+ years from now, then it&rsquo;s probably going to be me.</p>
<p>Quick specs:</p>
<ul>
<li>CPU: Intel i7-3820QM</li>
<li>RAM: 16GB DDR3</li>
<li>Storage: 4TB Samsung 870 QVO</li>
</ul>
<p>Side-note: I also went ahead and replaced the thermal paste with a bootleg Honeywell PTM7950 phase-changing
thermal pad. It works just as well as fresh thermal paste, but hopefully it won&rsquo;t drip out if the laptop is running
up-right, in a vertical laptop stand.</p>









<figure class="center">
  <a href="/posts/2024/08/07/thinkpad-t430-egpu/media/egpu-adapter-1.jpg">
    <img src="/posts/2024/08/07/thinkpad-t430-egpu/media/egpu-adapter-1_hu_a8376f85c0f96b27.webp"
     width="800"
     height="600"
     loading="lazy"
     decoding="async"
     alt="Side-view of the EXP GDC Beast adapter.">

  </a>
  <figcaption class="center">Side-view of the EXP GDC Beast adapter.</figcaption>
</figure>










<figure class="center">
  <a href="/posts/2024/08/07/thinkpad-t430-egpu/media/egpu-adapter-2.jpg">
    <img src="/posts/2024/08/07/thinkpad-t430-egpu/media/egpu-adapter-2_hu_9646ac571f827866.webp"
     width="800"
     height="600"
     loading="lazy"
     decoding="async"
     alt="Top-down view.">

  </a>
  <figcaption class="center">Top-down view.</figcaption>
</figure>










<figure class="center">
  <a href="/posts/2024/08/07/thinkpad-t430-egpu/media/egpu-adapter-3.jpg">
    <img src="/posts/2024/08/07/thinkpad-t430-egpu/media/egpu-adapter-3_hu_45028255a3f303c.webp"
     width="800"
     height="600"
     loading="lazy"
     decoding="async"
     alt="Backside of the adapter, with the AMD RX 480 attached.">

  </a>
  <figcaption class="center">Backside of the adapter, with the AMD RX 480 attached.</figcaption>
</figure>










<figure class="center">
  <a href="/posts/2024/08/07/thinkpad-t430-egpu/media/egpu-closeup.jpg">
    <img src="/posts/2024/08/07/thinkpad-t430-egpu/media/egpu-closeup_hu_4a851ee24fa4d474.webp"
     width="800"
     height="600"
     loading="lazy"
     decoding="async"
     alt="The extra power cable was barely long enough to fit.">

  </a>
  <figcaption class="center">The extra power cable was barely long enough to fit.</figcaption>
</figure>

<h2 id="testing">
  <a class="heading-anchor" href="#testing">Testing<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>My testing with the GTX 1650 was brief, as the open source <code>nouveau</code> driver crashed on the Wayland desktop<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup>, the proprietary
drivers under Fedora did not seem to work, and under Windows
the NVIDIA driver intentionally triggers the <code>error code 43</code> issue. <a href="https://egpu.io/forums/expresscard-mpcie-m-2-adapters/script-nvidia-error43-fixer/">A tweak exists for the Windows issue,</a> but
that didn&rsquo;t help much either.</p>
<p>The AMD Radeon RX 480 seems to work well out of the box on Windows 11, plug-and-play. However, it wasn&rsquo;t that stable,
but that could be related to the possibly faulty GPU itself or the power supply that can barely drive it under load.
Or the fact that Windows itself was running off of a 128GB Samsung USB 3.0 flash drive. Probably the latter, given that the
USB stick died as a result of this experiment.</p>









<figure class="center">
  <a href="/posts/2024/08/07/thinkpad-t430-egpu/media/egpu-win11.jpg">
    <img src="/posts/2024/08/07/thinkpad-t430-egpu/media/egpu-win11_hu_d6ea1e4bee937dd2.webp"
     width="800"
     height="600"
     loading="lazy"
     decoding="async"
     alt="Microsoft does not approve of this setup for at least 3 reasons.">

  </a>
  <figcaption class="center">Microsoft does not approve of this setup for at least 3 reasons.</figcaption>
</figure>

<p>On Fedora Linux 40, I discovered that eGPU-s aren&rsquo;t really plug and play. Sure, the image is there, but on my
ultrawide monitor I saw a whopping 11 frames per second! Turns out that by default GNOME on Wayland doesn&rsquo;t like
to use the eGPU as the main rendering device, even on more legitimate Thunderbolt-based eGPU setups.
It&rsquo;s a common enough problem that there exist <a href="https://github.com/hertg/egpu-switcher">multiple</a> <a href="https://github.com/ewagner12/all-ways-egpu">solutions</a> to this issue.</p>
<p>I didn&rsquo;t like any of them<sup id="fnref:2"><a href="#fn:2" class="footnote-ref" role="doc-noteref">2</a></sup>, so I disabled the <code>i915</code> kernel driver responsible for driving the iGPU, which did the trick.
The 3440x1440p ultrawide monitor was being rendered by the eGPU and for the most part the experience was very smooth.</p>









<figure class="center">
  <a href="/posts/2024/08/07/thinkpad-t430-egpu/media/egpu-linux.jpg">
    <img src="/posts/2024/08/07/thinkpad-t430-egpu/media/egpu-linux_hu_3f10c6f9f7d8ff15.webp"
     width="800"
     height="600"
     loading="lazy"
     decoding="async"
     alt="It&#39;s booting Linux!">

  </a>
  <figcaption class="center">It&#39;s booting Linux!</figcaption>
</figure>

<p>The iGPU in the T430 can also run the ultrawide monitor at 60 Hz via the DisplayPort port on the dock, but it can&rsquo;t
run things at 60 FPS at all times because it&rsquo;s really, really weak.</p>
<p>The eGPU ran things much smoother, which made the whole setup feel more responsive
and great to use. It&rsquo;s not the fastest setup in the world, but the GUI running smoothly certainly makes it feel like one.</p>
<p>I didn&rsquo;t have a ton of games installed for testing, but I did give Minecraft a try, and it ran just fine. The CPU was
struggling when building new parts of the map, but the visuals were doing fine and I could see myself playing on this
setup for hours.</p>
<p>There were some things that weren&rsquo;t running smoothly even with the eGPU. For example, 1080p H.265 video playback was awfully
choppy. Using <code>radeontop</code> revealed around 80% GPU usage, so either the decoding engine is crap on this GPU, or the very limited
PCIe bandwidth and CPU-GPU data transferring is the culprit.</p>
<p>I also tested LibreELEC to see how it handles the eGPU and I&rsquo;m happy to report that it renders Kodi on it by default,
with the UI running very smoothly.</p>
<p>On Linux I also saw some stability issues and crashes, but those could also be down to the faulty GPU or the PSU
being underpowered. I can probably rule out the latter by limiting the GPU clock speeds, and <a href="https://wiki.archlinux.org/title/AMDGPU#Manually">the Arch wiki</a>
has some great instructions for that. Those toggles do work, but I noticed that GNOME can be a bit choppier when the GPU
switches between lower power states to higher ones.</p>
<p>The physical stability of this setup is questionable, especially if you use a bigger GPU. Most prefabricated cases
for this eGPU adapter assume that you&rsquo;re running it with an ATX/SFX PSU, so those are out of the question for me.
There exist some 3D printable designs out there, but they can sometimes be very specific to a particular setup or GPU,
so I&rsquo;d have to design my own.</p>









<figure class="center">
  <a href="/posts/2024/08/07/thinkpad-t430-egpu/media/egpu-setup-2.jpg">
    <img src="/posts/2024/08/07/thinkpad-t430-egpu/media/egpu-setup-2_hu_cd6d8588c5f6c78c.webp"
     width="800"
     height="600"
     loading="lazy"
     decoding="async"
     alt="Work in progress.">

  </a>
  <figcaption class="center">Work in progress.</figcaption>
</figure>










<figure class="center">
  <a href="/posts/2024/08/07/thinkpad-t430-egpu/media/egpu-setup-3.jpg">
    <img src="/posts/2024/08/07/thinkpad-t430-egpu/media/egpu-setup-3_hu_d7e920a5e3276e9.webp"
     width="800"
     height="600"
     loading="lazy"
     decoding="async"
     alt="I really like the look of the GPU, no need to worry about a case. Unless you have cats, which I do have. Uh-oh.">

  </a>
  <figcaption class="center">I really like the look of the GPU, no need to worry about a case. Unless you have cats, which I do have. Uh-oh.</figcaption>
</figure>










<figure class="center">
  <a href="/posts/2024/08/07/thinkpad-t430-egpu/media/egpu-setup-1.jpg">
    <img src="/posts/2024/08/07/thinkpad-t430-egpu/media/egpu-setup-1_hu_4c6b14621f6471a0.webp"
     width="800"
     height="600"
     loading="lazy"
     decoding="async"
     alt="The final setup.">

  </a>
  <figcaption class="center">The final setup.</figcaption>
</figure>

<p>The power consumption of this setup isn&rsquo;t great, unfortunately. Using a smart plug I measured the idle power of the
eGPU component to be about 20W. Typical desktop usage and video playback results in around 50W and peaks around 120-130W,
which is right on the limit of the shoddy PSU I&rsquo;m using.</p>
<p>If I had the choice to pick any GPU for this setup, then I&rsquo;d likely opt for a modern AMD GPU that didn&rsquo;t require additional
power via the 6/8 pin power connector as that option would likely be a lot more efficient while yielding similar performance.</p>
<p>I ended up disassembling the setup in the end, partly because I
misdiagnosed <a href="https://gitlab.freedesktop.org/mesa/mesa/-/issues/11566">a Mesa bug</a> to be a GPU issue,
and because the RX 480 really was acting weird from time to time, even with LibreELEC.</p>









<figure class="center">
  <a href="/posts/2024/08/07/thinkpad-t430-egpu/media/egpu-error.jpg">
    <img src="/posts/2024/08/07/thinkpad-t430-egpu/media/egpu-error_hu_680842c76ceb91fe.webp"
     width="800"
     height="600"
     loading="lazy"
     decoding="async"
     alt="That can&#39;t be good.">

  </a>
  <figcaption class="center">That can&#39;t be good.</figcaption>
</figure>

<p>Not all experiments end up being successful.</p>
<h2 id="conclusion">
  <a class="heading-anchor" href="#conclusion">Conclusion<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>I think that these types of eGPU adapters are great even in 2024, but only for a small number of very specific use cases,
and with GPU-s that actually work.</p>
<p>If you already have an older laptop around, and a compatible spare GPU collecting dust, then this setup will make sense for
desktop or media playback machines, and perhaps gaming if your demands are not very high.</p>
<p>I don&rsquo;t suggest building this setup from scratch, it&rsquo;s probably not worth the money and hassle. Used gaming PC-s
that have similar specifications to this eGPU build, but with no funny PCIe bandwidth limitations, go for less than
200 EUR at this point.</p>
<div class="footnotes" role="doc-endnotes">
<hr>
<ol>
<li id="fn:1">
<p><code>nouveau</code>? More like <code>novideo</code>, am I right?&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
<li id="fn:2">
<p>not that they&rsquo;re bad, they are just made for a different type of setup.&#160;<a href="#fnref:2" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
</ol>
</div>
]]></content:encoded></item><item><title>No HDMI port on the ThinkPad T430? No problem!</title><link>https://ounapuu.ee/posts/2024/07/08/thinkpad-t430-hdmi/</link><pubDate>Mon, 08 Jul 2024 13:00:00 +0300</pubDate><author>ihavesomethoughtsonyourblog@ounapuu.ee (Herman Õunapuu)</author><guid>https://ounapuu.ee/posts/2024/07/08/thinkpad-t430-hdmi/</guid><description>Yes, you can fit a HDMI port in the ThinkPad T430, no crazy modifications required.</description><content:encoded><![CDATA[<img src="https://ounapuu.ee/posts/2024/07/08/thinkpad-t430-hdmi/media/cover_hu_4ddbd24444d473b3.jpg" width="1200" height="630" alt="No HDMI port on the ThinkPad T430? No problem!" /><p>The ThinkPad T430 has a few options for running it with an external display:</p>
<ul>
<li>VGA port, which is pretty much obsolete at this point</li>
<li>mini DisplayPort connector on the laptop itself</li>
<li>DVI or DisplayPort on a dock</li>
</ul>
<p>The mini DisplayPort port has annoyed me for as long as I&rsquo;ve had this machine.</p>
<p>Most places where I&rsquo;ve had to present something only offer an HDMI cable,
which means that I always have to carry a dongle around, and I keep forgetting
to bring one everywhere I happen to go.</p>
<p>Until now.</p>
<p>I have a few of these SATA HDD adapters that replace the optical drive on
the ThinkPad T430, and I discovered that my mini DisplayPort to HDMI adapter
can fit in one without a problem.</p>









<figure class="center">
  <a href="/posts/2024/07/08/thinkpad-t430-hdmi/media/adapter-out.jpg">
    <img src="/posts/2024/07/08/thinkpad-t430-hdmi/media/adapter-out_hu_1eee9bb795c46d67.webp"
     width="800"
     height="600"
     loading="lazy"
     decoding="async"
     alt="It&#39;s a snug fit so it doesn&#39;t fall out.">

  </a>
  <figcaption class="center">It&#39;s a snug fit so it doesn&#39;t fall out.</figcaption>
</figure>










<figure class="center">
  <a href="/posts/2024/07/08/thinkpad-t430-hdmi/media/adapter-closed.jpg">
    <img src="/posts/2024/07/08/thinkpad-t430-hdmi/media/adapter-closed_hu_c3b02f2f4bc02f66.webp"
     width="800"
     height="600"
     loading="lazy"
     decoding="async"
     alt="You&#39;d never know the adapter was in here.">

  </a>
  <figcaption class="center">You&#39;d never know the adapter was in here.</figcaption>
</figure>

<p>I don&rsquo;t currently have a need for a second SSD in my T430, so this &ldquo;mod&rdquo;
makes perfect sense to me.</p>
<p>I bet there is someone out there who is capable of routing an <em>actual</em> HDMI
port in place of this adapter. The existence of FHD mods for this laptop
suggests that this is possible. If you&rsquo;re <em>that</em> person and created that mod,
let me know.</p>
]]></content:encoded></item><item><title>About the time my ThinkPad T430 ran with an external GPU</title><link>https://ounapuu.ee/posts/2024/07/03/thinkpad-t430-egpu/</link><pubDate>Wed, 03 Jul 2024 06:00:00 +0300</pubDate><author>ihavesomethoughtsonyourblog@ounapuu.ee (Herman Õunapuu)</author><guid>https://ounapuu.ee/posts/2024/07/03/thinkpad-t430-egpu/</guid><description>I had dumb ideas during my university days as well, but the budget was smaller.</description><content:encoded><![CDATA[<img src="https://ounapuu.ee/posts/2024/07/03/thinkpad-t430-egpu/media/cover_hu_edb0986a7ce4b00b.jpg" width="1200" height="630" alt="About the time my ThinkPad T430 ran with an external GPU" /><p>The ThinkPad T430 is not a remarkable laptop. It&rsquo;s thick, bulky and built like
a tank. I got mine in 2016 when the first university scholarship money dropped,
and it&rsquo;s still my backup laptop of choice.</p>
<p>Around 2017 I did something every reasonable poor computer science student
would do: I got an eGPU adapter for it to play some games. I never ended up
playing many games, but I loved tinkering with and testing this setup a lot.</p>
<p>These are my notes on the setup that I used to have. The notes used to be on
Reddit, but after yet another user-hostile change<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup> I deleted my account
and all the content associated with it.</p>
<h2 id="the-specs">
  <a class="heading-anchor" href="#the-specs">The specs<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>The ThinkPad T430 that I used had a CPU swap at one point, running an Intel
i7-3820QM. This upgrade doubled the CPU performance on the laptop compared
to the dual-core CPU that was in it before. This change was critical because
it opened the door to running lots of modern games at reasonable performance.</p>
<p>The eGPU adapter I ran with was the EXP GDC Beast v8.4, using the ExpressCard34
connector. This adapter turned the ExpressCard34 slot into a PCIe 2.0 x1 slot.
It&rsquo;s not really hotpluggable, but using this connector instead of something
like the internal Wi-Fi adapter slot made this setup much more portable. Done
gaming? Shut down, disconnect the ExpressCard cable and you&rsquo;re good to go!</p>
<p>This adapter is also a good example of connector reuse. The other end of the
ExpressCard plug is an HDMI port. Video signals require good quality cables, and
so does PCI Express.</p>









<figure class="center">
  <a href="/posts/2024/07/03/thinkpad-t430-egpu/media/egpu-connector.jpg">
    <img src="/posts/2024/07/03/thinkpad-t430-egpu/media/egpu-connector_hu_bcf4ea89c1948520.webp"
     width="800"
     height="600"
     loading="lazy"
     decoding="async"
     alt="Close-up of the ExpressCard34 connector.">

  </a>
  <figcaption class="center">Close-up of the ExpressCard34 connector.</figcaption>
</figure>

<p>The eGPU was once powered by a simple ATX PSU with the jumper wire set on the
24-pin connector, but eventually I bought a Dell DA-2 power supply. The adapter
has a power connector designed specifically for that pinout and it made the setup
a lot cleaner.</p>









<figure class="center">
  <a href="/posts/2024/07/03/thinkpad-t430-egpu/media/egpu-atx.jpg">
    <img src="/posts/2024/07/03/thinkpad-t430-egpu/media/egpu-atx_hu_c7488d9aa2981290.webp"
     width="800"
     height="600"
     loading="lazy"
     decoding="async"
     alt="The setup with an ATX PSU.">

  </a>
  <figcaption class="center">The setup with an ATX PSU.</figcaption>
</figure>










<figure class="center">
  <a href="/posts/2024/07/03/thinkpad-t430-egpu/media/egpu-psu.jpg">
    <img src="/posts/2024/07/03/thinkpad-t430-egpu/media/egpu-psu_hu_367576f51290bf0e.webp"
     width="800"
     height="600"
     loading="lazy"
     decoding="async"
     alt="The setup with a Dell DA-2 PSU. Much cleaner, isn&#39;t it?">

  </a>
  <figcaption class="center">The setup with a Dell DA-2 PSU. Much cleaner, isn&#39;t it?</figcaption>
</figure>

<p>At one point I got a fully metal case for the eGPU. It made the setup a lot cleaner
and the risk of the GPU tipping over while turned on was also substantially reduced.</p>









<figure class="center">
  <a href="/posts/2024/07/03/thinkpad-t430-egpu/media/egpu-case.jpg">
    <img src="/posts/2024/07/03/thinkpad-t430-egpu/media/egpu-case_hu_aaa43de0ce81aed3.webp"
     width="800"
     height="600"
     loading="lazy"
     decoding="async"
     alt="The case had no right to be this good for a janky setup.">

  </a>
  <figcaption class="center">The case had no right to be this good for a janky setup.</figcaption>
</figure>

<p>I tested a few GPU-s:</p>
<ul>
<li>AMD Radeon HD 6870</li>
<li>nVidia GTX 950</li>
<li>nVidia GTX 1080</li>
<li>AMD Radeon RX 480</li>
</ul>
<p>The HD 6870 was an old card back in 2017, and it did not run great at all with
this eGPU adapter. It was buggy and the performance sucked.</p>
<p>Loaner GPU-s, such as the RX 480 and GTX 1080 were much better experiences, as
long as you output the video signal to an external display right from the GPU.</p>
<p>The nVidia GTX 950 was the card I ran with for the longest time in this setup.
It worked well with this setup and had decent gaming performance.</p>









<figure class="center">
  <a href="/posts/2024/07/03/thinkpad-t430-egpu/media/gpuz-info.jpg">
    <img src="/posts/2024/07/03/thinkpad-t430-egpu/media/gpuz-info_hu_e074ca0f223b64ac.webp"
     width="600"
     height="800"
     loading="lazy"
     decoding="async"
     alt="GPU-z info while the GPU is idle. Note that the PCIe link speed is set to gen 1.1 under &#34;Bus Interface&#34;.">

  </a>
  <figcaption class="center">GPU-z info while the GPU is idle. Note that the PCIe link speed is set to gen 1.1 under &#34;Bus Interface&#34;.</figcaption>
</figure>










<figure class="center">
  <a href="/posts/2024/07/03/thinkpad-t430-egpu/media/gpuz-linkspeed.jpg">
    <img src="/posts/2024/07/03/thinkpad-t430-egpu/media/gpuz-linkspeed_hu_c99b51ff47cc1c11.webp"
     width="800"
     height="600"
     loading="lazy"
     decoding="async"
     alt="When the GPU is under load, the PCIe connection switches to PCIe 2.0.">

  </a>
  <figcaption class="center">When the GPU is under load, the PCIe connection switches to PCIe 2.0.</figcaption>
</figure>

<h2 id="egpu-tech-tips">
  <a class="heading-anchor" href="#egpu-tech-tips">eGPU tech tips<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>You will want to use an eGPU adapter with an external monitor for the best performance.
The PCIe bandwidth is very limited in a setup like this. Using the internal
display of the laptop will mean that the final rendered image will have to be
sent back from the eGPU to the CPU. 1x PCIe 2.0 lane is about 500 MB/s of bandwidth.
Sending 60+ frames in the native resolution (1600x900) will eat it all up.
The higher the resolution on the internal display, the fewer frames you&rsquo;ll get.</p>
<p>I tested out these two scenarios in CSGO. The internal display yielded about 61 FPS
while an external display would result in 100-180+ FPS.</p>
<p>The PCIe link bandwidth was not actually that noticeable in a lot of games, such
as GTA V, Rocket League and Dirt 3.</p>
<p>In some games, such as Dirt Rally (2015), it did not matter what settings
you went with, something about the game made it run poorly no matter what
graphics settings you went with. In cases like that you might as well cap the
framerate to something tolerable like 30 FPS and crank the graphics settings up.</p>
<h2 id="vfio-on-a-laptop">
  <a class="heading-anchor" href="#vfio-on-a-laptop">VFIO on a laptop???<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>This setup was also around the time when I first learned about <a href="https://youtu.be/16dbAUrtMX4">the magical world
of VFIO and GPU passthrough.</a></p>
<p>The logical continuation of that discovery was to try it out on my laptop, and
to my surprise it actually worked. I could pass the eGPU to a VM and play GTA V
on it!</p>
<p>This setup ran on Antergos OS, a flavor of Arch Linux. <a href="https://en.wikipedia.org/wiki/Antergos">It&rsquo;s been so long since then that the flavor
of Arch Linux is now discontinued.</a><sup id="fnref:2"><a href="#fn:2" class="footnote-ref" role="doc-noteref">2</a></sup></p>









<figure class="center">
  <a href="/posts/2024/07/03/thinkpad-t430-egpu/media/egpu-vfio.jpg">
    <img src="/posts/2024/07/03/thinkpad-t430-egpu/media/egpu-vfio_hu_b6f5e698500d56ab.webp"
     width="800"
     height="600"
     loading="lazy"
     decoding="async"
     alt="Antergos OS on the host, Windows 10 on the guest VM running Furmark.">

  </a>
  <figcaption class="center">Antergos OS on the host, Windows 10 on the guest VM running Furmark.</figcaption>
</figure>

<p>The laptop was ideal for this purpose as well. You have the integrated GPU, display,
keyboard and mouse for the host system, and you can pass USB devices and the eGPU
to the VM.</p>
<p>There were the usual VFIO tricks that I had to try out to avoid the dreaded
<code>error code 43</code> issue, but after that it was smooth sailing.</p>
<p>The performance was very similar to what I saw on the host system.</p>


<figure class="center">
  <video class="post-video" width="1280" height="720" style="aspect-ratio: 1280 / 720;" controls poster="/posts/2024/07/03/thinkpad-t430-egpu/media/egpu-poster.webp" playsinline preload="none">
    <source src="/posts/2024/07/03/thinkpad-t430-egpu/media/egpu.webm" type="video/webm">
    GTA V? On a laptop? With an eGPU? In a VM? On Arch? It&#39;s more likely than you think.
  </video>
  <figcaption class="center">GTA V? On a laptop? With an eGPU? In a VM? On Arch? It&#39;s more likely than you think.</figcaption>
</figure>

<p>Smartphone cameras have
come a long way since then.</p>
<h2 id="expresscard-egpu-s-in-2024">
  <a class="heading-anchor" href="#expresscard-egpu-s-in-2024">ExpressCard eGPU-s in 2024?<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>What got me started with writing down my notes were <a href="https://youtu.be/390FuyadPIw">some YouTube videos that were
made on this topic recently.</a></p>
<p>A pimped-out ThinkPad T430 can still be a perfectly serviceable computer in 2024,
and an eGPU will completely sidestep the problem of the weak integrated GPU.</p>
<p>The T430 is not powerful enough to natively run a 3440x1440 ultrawide monitor at
60 Hz. It is even struggling to do it at 30 Hz. An eGPU adapter with a modern
low-power GPU, such as the AMD Radeon RX 6400, could solve this issue nicely and
give the ThinkPad T430 a new lease of life.</p>
<p>I&rsquo;d be lying if I wasn&rsquo;t considering remaking this setup with everything I&rsquo;ve
learned 6 years later. GPU pricing sucks, though.<sup id="fnref:3"><a href="#fn:3" class="footnote-ref" role="doc-noteref">3</a></sup>
They still sell these eGPU kits in various forms, however the price has doubled
or even tripled over the years.</p>
<p>If you&rsquo;re interested in building a similar setup, then do check out <a href="https://egpu.io/">egpu.io</a>.
With an M.2 or Thunderbolt connector you can build a much more capable eGPU setup.</p>
<p><a href="https://www.youtube.com/watch?v=SH9RUpK4SsM">If you can get a PCI Express signal out of a computer, then you can probably
rig a GPU up to it.</a> Unless you&rsquo;re
Jeff Geerling, in which case you might need to <a href="https://www.jeffgeerling.com/blog/2023/external-gpus-working-on-raspberry-pi-5">recompile the kernel a few times.</a></p>
<div class="footnotes" role="doc-endnotes">
<hr>
<ol>
<li id="fn:1">
<p>guess which one.&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
<li id="fn:2">
<p>validates my view that it&rsquo;s still a good idea to stick to the big distros
that these short-lived Linux distros are based off of.&#160;<a href="#fnref:2" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
<li id="fn:3">
<p>I&rsquo;ve survived two cryptocurrency mining hype cycles, and now we are in an
LLM bubble. Great.&#160;<a href="#fnref:3" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
</ol>
</div>
]]></content:encoded></item><item><title>ThinkPad T40: it can still run modern Linux, for now</title><link>https://ounapuu.ee/posts/2024/05/24/thinkpad-t40/</link><pubDate>Fri, 24 May 2024 06:00:00 +0300</pubDate><author>ihavesomethoughtsonyourblog@ounapuu.ee (Herman Õunapuu)</author><guid>https://ounapuu.ee/posts/2024/05/24/thinkpad-t40/</guid><description>Not bad for a laptop originally released in 2003.</description><content:encoded><![CDATA[<img src="https://ounapuu.ee/posts/2024/05/24/thinkpad-t40/media/cover_hu_8db5f66bd4f9d1cd.jpg" width="1200" height="630" alt="ThinkPad T40: it can still run modern Linux, for now" /><p>I recently busted out my old ThinkPad T40, the last of the OG IBM ThinkPads.</p>
<p>I picked it up some time around my university days because I liked collecting
ThinkPads at the time, and it was a nice complement to my existing ThinkPad T60
and T430.</p>









<figure class="center">
  <a href="/posts/2024/05/24/thinkpad-t40/media/old-vs-new.jpg">
    <img src="/posts/2024/05/24/thinkpad-t40/media/old-vs-new_hu_ba2f2078cac7a2c3.webp"
     width="1067"
     height="800"
     loading="lazy"
     decoding="async"
     alt="20 years difference, but they still look similar. ">

  </a>
  <figcaption class="center">20 years difference, but they still look similar. </figcaption>
</figure>

<p>The battery is dead, but everything else still works. Checking a few online
listings,
I&rsquo;m surprised that I can still find batteries sold for this model. Probably old stock
that&rsquo;s been sitting around in a warehouse slowly discharging to death, but hey,
you might get lucky!</p>
<p>I also learned that I had
replaced the internal IDE hard drive with a 16 GB mSATA SSD via an adapter at
one point. I don&rsquo;t think they even sell SSD-s that small nowadays, but the size
feels age-appropriate.</p>
<p>I had already installed a flavor of Linux on this, but had completely forgotten
the password.<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup> This was a good excuse to wipe it and see if I can install a
modern mainstream Linux distro on it.</p>
<p>I went with Debian 12 (Bookworm). It&rsquo;s the newest Debian release, and unlike
many other distros, <a href="https://www.debian.org/distrib/netinst">they still offer 32-bit installers.</a></p>









<figure class="center">
  <a href="/posts/2024/05/24/thinkpad-t40/media/debian-install.jpg">
    <img src="/posts/2024/05/24/thinkpad-t40/media/debian-install_hu_713e76cda7f87c0c.webp"
     width="600"
     height="800"
     loading="lazy"
     decoding="async"
     alt="Modern Linux on an ancient laptop.">

  </a>
  <figcaption class="center">Modern Linux on an ancient laptop.</figcaption>
</figure>

<p>It had been a while since I had last installed Debian via the terminal user
interface.
The experience felt surprisingly snappy.</p>









<figure class="center">
  <a href="/posts/2024/05/24/thinkpad-t40/media/debian-wip.jpg">
    <img src="/posts/2024/05/24/thinkpad-t40/media/debian-wip_hu_257e194361a44b84.webp"
     width="1067"
     height="800"
     loading="lazy"
     decoding="async"
     alt="It&#39;s probably been 5&#43; years since I last installed Debian on a machine. What a throwback!">

  </a>
  <figcaption class="center">It&#39;s probably been 5&#43; years since I last installed Debian on a machine. What a throwback!</figcaption>
</figure>

<p>I went with the good old XFCE desktop environment. It strikes a good balance of
being lightweight, simple and usable.</p>
<p>Things were great until I started up Firefox. It works, but man, is it slow. All
the years of browser complexity have caught up with this laptop and made the web
barely usable.</p>
<p>It does pass the <em>techtipsy</em> test.</p>









<figure class="center">
  <a href="/posts/2024/05/24/thinkpad-t40/media/techtipsy.jpg">
    <img src="/posts/2024/05/24/thinkpad-t40/media/techtipsy_hu_6d8c1bd6ce6d177f.webp"
     width="1067"
     height="800"
     loading="lazy"
     decoding="async"
     alt="Insert joke about recursion.">

  </a>
  <figcaption class="center">Insert joke about recursion.</figcaption>
</figure>

<p>This will likely be the last time this laptop runs a modern OS. 32-bit CPU-s
are losing support both in x86 and ARM ecosystems,
and <a href="https://en.wikipedia.org/wiki/Year_2038_problem">the year 2038</a> is not that
far away any more.</p>
<p>So long, and thanks for all the fish!</p>
<div class="footnotes" role="doc-endnotes">
<hr>
<ol>
<li id="fn:1">
<p>note to future self: the username is <code>thinkpad</code>, and the password
is <code>thinkpad</code>.&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
</ol>
</div>
]]></content:encoded></item><item><title>The hidden media play/pause/stop keys on the Lenovo ThinkPad L390 Yoga</title><link>https://ounapuu.ee/posts/2024/05/07/thinkpad-l390-hidden-media-keys/</link><pubDate>Tue, 07 May 2024 06:00:00 +0300</pubDate><author>ihavesomethoughtsonyourblog@ounapuu.ee (Herman Õunapuu)</author><guid>https://ounapuu.ee/posts/2024/05/07/thinkpad-l390-hidden-media-keys/</guid><description>How a few accidental key presses revealed the presence of media playback control keys on my ThinkPad L390 Yoga.</description><content:encoded><![CDATA[<img src="https://ounapuu.ee/posts/2024/05/07/thinkpad-l390-hidden-media-keys/media/cover_hu_a6666e239a0c3efa.jpg" width="1200" height="630" alt="The hidden media play/pause/stop keys on the Lenovo ThinkPad L390 Yoga" /><p>ThinkPad keyboards were once well known for their great layouts, feel and
functionality. This included the media playback control keys.</p>









<figure class="center">
  <a href="/posts/2024/05/07/thinkpad-l390-hidden-media-keys/media/T420.jpg">
    <img src="/posts/2024/05/07/thinkpad-l390-hidden-media-keys/media/T420_hu_3a0505d7634368c6.webp"
     width="463"
     height="302"
     loading="lazy"
     decoding="async"
     alt="Media playback control keys on a ThinkPad T420 keyboard.">

  </a>
  <figcaption class="center">Media playback control keys on a ThinkPad T420 keyboard.</figcaption>
</figure>

<p>On the ThinkPad T430, the new chiclet keyboard layout moved the media keys to
the function row. Still there, but less convenient to access.</p>









<figure class="center">
  <a href="/posts/2024/05/07/thinkpad-l390-hidden-media-keys/media/T430.jpg">
    <img src="/posts/2024/05/07/thinkpad-l390-hidden-media-keys/media/T430_hu_619b1ebe964a53f4.webp"
     width="1067"
     height="800"
     loading="lazy"
     decoding="async"
     alt="Media playback control keys on a ThinkPad T430 keyboard.">

  </a>
  <figcaption class="center">Media playback control keys on a ThinkPad T430 keyboard.</figcaption>
</figure>

<p>The ThinkPad L390 Yoga doesn&rsquo;t have any visible function keys for controlling
media playback. However, I found that the play/pause and stop
buttons are still functional on the up/down arrow keys. Left/right arrow keys
act as <code>Home</code> and <code>End</code> keys.</p>
<p><code>evtest</code> output for play/pause key combination:</p>
<pre tabindex="0"><code>Event: time 1714716211.222697, type 4 (EV_MSC), code 4 (MSC_SCAN), value e3
Event: time 1714716211.222697, type 1 (EV_KEY), code 143 (KEY_WAKEUP), value 1
Event: time 1714716211.222697, -------------- SYN_REPORT ------------
Event: time 1714716212.291293, type 4 (EV_MSC), code 4 (MSC_SCAN), value a2
Event: time 1714716212.291293, type 1 (EV_KEY), code 164 (KEY_PLAYPAUSE), value 1
Event: time 1714716212.291293, -------------- SYN_REPORT ------------
Event: time 1714716212.366568, type 4 (EV_MSC), code 4 (MSC_SCAN), value a2
Event: time 1714716212.366568, type 1 (EV_KEY), code 164 (KEY_PLAYPAUSE), value 0
Event: time 1714716212.366568, -------------- SYN_REPORT ------------
Event: time 1714716214.026847, type 4 (EV_MSC), code 4 (MSC_SCAN), value e3
Event: time 1714716214.026847, type 1 (EV_KEY), code 143 (KEY_WAKEUP), value 0
Event: time 1714716214.026847, -------------- SYN_REPORT ------------
</code></pre><p><code>evtest</code> output for stop key combination:</p>
<pre tabindex="0"><code>Event: time 1714716254.780584, type 4 (EV_MSC), code 4 (MSC_SCAN), value e3
Event: time 1714716254.780584, type 1 (EV_KEY), code 143 (KEY_WAKEUP), value 1
Event: time 1714716254.780584, -------------- SYN_REPORT ------------
Event: time 1714716255.614775, type 4 (EV_MSC), code 4 (MSC_SCAN), value a4
Event: time 1714716255.614775, type 1 (EV_KEY), code 166 (KEY_STOPCD), value 1
Event: time 1714716255.614775, -------------- SYN_REPORT ------------
Event: time 1714716255.658388, type 4 (EV_MSC), code 4 (MSC_SCAN), value a4
Event: time 1714716255.658388, type 1 (EV_KEY), code 166 (KEY_STOPCD), value 0
Event: time 1714716255.658388, -------------- SYN_REPORT ------------
Event: time 1714716256.961601, type 4 (EV_MSC), code 4 (MSC_SCAN), value e3
Event: time 1714716256.961601, type 1 (EV_KEY), code 143 (KEY_WAKEUP), value 0
Event: time 1714716256.961601, -------------- SYN_REPORT ------------
</code></pre><p>On a very recent laptop, <a href="/posts/2024/04/12/lenovo-p14s-gen4/">the ThinkPad P14s gen4</a>, the media playback keys seem to
be gone. Left/right arrow keys do still work as <code>Home</code> and <code>End</code> keys, though.</p>
<p>If you also miss your media playback control keys on your ThinkPad, then hit
that <code>Fn</code> key and give it a go, you might get lucky!</p>
]]></content:encoded></item><item><title>Lenovo ThinkPad P14s gen 4 (AMD): it doesn't suck under Linux</title><link>https://ounapuu.ee/posts/2024/04/12/lenovo-p14s-gen4/</link><pubDate>Fri, 12 Apr 2024 06:00:00 +0300</pubDate><author>ihavesomethoughtsonyourblog@ounapuu.ee (Herman Õunapuu)</author><guid>https://ounapuu.ee/posts/2024/04/12/lenovo-p14s-gen4/</guid><description>I'm just as surprised as you are.</description><content:encoded><![CDATA[<img src="https://ounapuu.ee/posts/2024/04/12/lenovo-p14s-gen4/media/cover_hu_26b1ddd0d2beb2d6.jpg" width="1200" height="630" alt="Lenovo ThinkPad P14s gen 4 (AMD): it doesn't suck under Linux" /><p>I&rsquo;ve had the opportunity to try out another new laptop at work. I&rsquo;ve used a brand new laptop recently, <a href="/posts/2022/11/21/hp-elitebook-845-g9/">and it was horrible.</a></p>
<p>But this time I&rsquo;m pleasantly surprised.</p>
<p>The <a href="https://www.lenovo.com/us/en/p/laptops/thinkpad/thinkpadp/thinkpad-p14s-gen-4-%2814-inch-amd%29-mobile-workstation/len101t0070">Lenovo ThinkPad P14s gen 4</a> has great specs:</p>
<ul>
<li>CPU: <a href="https://www.amd.com/en/products/apu/amd-ryzen-7-7840u">AMD Ryzen 7 PRO 7840U (8 cores, 16 threads, up to 5.1 GHz)</a></li>
<li>GPU: AMD Radeon 780M (integrated)</li>
<li>RAM: 32GB DDR5, soldered</li>
<li>SSD: 1 TB NVMe</li>
<li>Display: 1920x1200 resolution</li>
<li>Two USB-C ports</li>
<li>Two USB-A ports</li>
<li>HDMI out</li>
<li><strong>A full-sized Ethernet port!</strong></li>
</ul>
<p>I have used it for about a month at work, and so far I have not noticed anything outright broken about it.
The Fedora Linux 39 installation that I copied over from the previous laptop (Dell Latitude 5411) simply works, no modifications required.
The CPU is blazing fast. The GPU driver does not crash. No issues with Wi-Fi or Bluetooth so far. USB-C docks and
monitors that I have just work. The webcam is also functional and has an acceptable image quality for meetings. CPU and GPU temperature data is present with <code>lm-sensors</code>.</p>
<p>The build quality is what you&rsquo;d expect from a modern ThinkPad: better than consumer-grade crap, but not as solid as a ThinkPad T430.
The case has a soft-feeling light gray finish to it, which will likely look horrible after a few years of use.</p>
<p>The battery life is not great: don&rsquo;t expect to last a full 8-hour work day on battery with this thing. It&rsquo;s been years
since Apple has released Apple Silicon laptops with great battery life and somehow the rest of the industry still
hasn&rsquo;t caught up.</p>
<p>The fan has a really annoying high-pitched whine to it. You only hear it when pushing the CPU hard, like you&rsquo;d do
when compiling a legacy Java monolith, but in a quiet room it&rsquo;s really annoying. I&rsquo;m not even sure that the fan has to
be run that hard, the AMD Ryzen CPU inside is very efficient and can regulate its power consumption based on the current
temperature. You <em>can</em> tweak the fan curve on this laptop <a href="/posts/2022/09/26/minimum-viable-fan-control-script/">with a basic script.</a></p>
<p>I haven&rsquo;t tried functionality that I don&rsquo;t use myself, such as the fingerprint reader, so I cannot comment on that.</p>
<p>This laptop can also play games. I took an external SSD, installed <a href="https://bazzite.gg/">Bazzite on it (GNOME + gamemode version)</a>, set
everything up, and installed Forza Horizon 4 on it. It runs, and for an integrated GPU surprisingly well. I could push the
game to run with medium-high settings on the internal 1920x1200 display at a solid 60 FPS, with very rare dips below it.
That&rsquo;s even better than what I got with the Steam Deck, and the CPU running near the 5 GHz mark certainly contributed
to it. This makes the laptop a great candidate for a LAN party after work, unless you favor more demanding games, in
which case you might want to temper your expectations a little bit.</p>
<p>It&rsquo;s the first time that I&rsquo;ve had a brand new laptop that just works on Linux.
Hats off to the FOSS community for making this happen, AMD for getting their act
together, and Lenovo for not completely fucking it up this time.</p>
]]></content:encoded></item><item><title>ThinkPad as a server: the follow-up</title><link>https://ounapuu.ee/posts/2023/01/27/thinkpad-as-server-followup/</link><pubDate>Fri, 27 Jan 2023 06:00:00 +0200</pubDate><author>ihavesomethoughtsonyourblog@ounapuu.ee (Herman Õunapuu)</author><guid>https://ounapuu.ee/posts/2023/01/27/thinkpad-as-server-followup/</guid><description>The ThinkPad as a server is back, this time with a couple of adjustments.</description><content:encoded><![CDATA[<img src="https://ounapuu.ee/posts/2023/01/27/thinkpad-as-server-followup/media/cover_hu_cbe0fc525453c7fc.jpg" width="1200" height="630" alt="ThinkPad as a server: the follow-up" /><p>It&rsquo;s been a while since I last wrote about my <a href="/posts/2022/05/10/thinkpad-as-a-home-server/">ThinkPad T430 that was tasked with being a home server.</a>
After doing some experiments with my setup a couple of times, it is once again the main server for all my self-hosting
needs. However, this time I have made some adjustments.</p>
<h2 id="background">
  <a class="heading-anchor" href="#background">Background<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>The monstrosity that you&rsquo;re looking at is what I&rsquo;d call &ldquo;the minimum viable ThinkPad as a server&rdquo;. To be fair, you <em>could</em>
go even more minimal by ripping out everything but the motherboard and the drives, but for my use case this is how far I
was willing to go.</p>
<p>In my previous post about this setup, I mentioned that the T430 suffered unexpected shutdowns under certain situations,
which usually involved running the fan at the lowest speed, moderate to high CPU load, and a lot of storage activity.
It wasn&rsquo;t the CPU as the temperatures were way below the critical point, so I suspected either the motherboard or the
storage running hot and tripping some sensor that I wasn&rsquo;t aware of.</p>
<p>For a while now, I have been thinking about running the T430 as bare as possible. One idea involved taking the bare
motherboard and the storage and slapping it on an acrylic sheet with some stand-offs, which should give it the best
chance at cooling. Unfortunately I didn&rsquo;t have enough time to commit to this, and that setup would have had some
downsides as well. At some point an idea popped to my mind: I could probably achieve a similar result by stripping
everything but the bare necessities from the laptop and improve the cooling as a result. That&rsquo;s how I ended up with
what you just saw.</p>
<h2 id="t430-stripped">
  <a class="heading-anchor" href="#t430-stripped">T430, stripped<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>I ended up removing the following from the T430:</p>
<ul>
<li>palm rest</li>
<li>smart card reader</li>
<li>Bluetooth chip</li>
<li>WiFi chip</li>
<li>the whole display assembly</li>
</ul>
<p>This was in part motivated by the fact that those parts are the ones that are not in the best shape on my main ThinkPad
T430 that I use as an actual laptop. The other part was this nagging feeling that the most powerful PC that I own
<a href="/posts/2022/01/17/asrock-x300-future-of-desktops/">(the ASRock DeskMini X300)</a> was woefully underutilized as my home
server.</p>
<p>The keyboard had to stay because the power button is part of the keyboard assembly. There are ways to power on the
laptop without the keyboard:</p>
<ul>
<li>put the laptop in a dock and use the power button that is present on the dock</li>
<li>short a specific pin on the keyboard connector to ground</li>
</ul>
<p>I do have some extra ThinkPad docks around that I could have used for this purpose, but it would have made the setup
bulkier, which is why I did not go for that, at least not yet.</p>
<p>There is also an option in UEFI settings that can be used to turn the laptop on by connecting the charger
(&ldquo;Power on with AC attach&rdquo;), but that only seems to work if you have a battery connected and after you have turned the
laptop on manually once. The same caveat applies for Wake on LAN functionality. If the laptop overheats or it runs out
of battery completely, then you need to manually power it on.</p>
<h2 id="the-cooling-situation">
  <a class="heading-anchor" href="#the-cooling-situation">The cooling situation<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>Removing the palm rest reveals something that might be related to the unexpected shutdowns that I observed with this
setup previously.</p>









<figure class="center">
  <a href="/posts/2023/01/27/thinkpad-as-server-followup/media/image-0.jpg" aria-label="View full-size image">
    <img src="/posts/2023/01/27/thinkpad-as-server-followup/media/image-0_hu_1c812eb038d9345b.webp"
     width="1067"
     height="800"
     loading="lazy"
     decoding="async"
     alt="">

  </a>
  
</figure>

<p>Under this area is a chip on the motherboard that seems to generate a modest amount of heat. While the machine is running,
it gets warm to touch and gets hot if you throw a high load at the system, especially if you include storage in the
mix. With the laptop lid closed and the palm rest being present, the cooling situation for this area can be quite bad
indeed. Now that the palm rest is removed, this area of the laptop is now exposed, which should help with the cooling
for this chip.</p>
<p>Having the keyboard connected in this state isn&rsquo;t too bad. It does restrict the airflow a bit, yes, but at least it can
be fastened using two screws, which means that it won&rsquo;t move around and cause any other issues.</p>









<figure class="center">
  <a href="/posts/2023/01/27/thinkpad-as-server-followup/media/image-1.jpg" aria-label="View full-size image">
    <img src="/posts/2023/01/27/thinkpad-as-server-followup/media/image-1_hu_4e06712e1cdb52a4.webp"
     width="600"
     height="800"
     loading="lazy"
     decoding="async"
     alt="">

  </a>
  
</figure>

<p>With this setup, the cooling has improved noticeably. Unfortunately it didn&rsquo;t come to my mind to make a before/after
comparison to better illustrate this, so I will just write about how well it operates in this configuration.</p>
<p>Currently, I have the laptop fan controlled by a modified version of <a href="/posts/2022/09/26/minimum-viable-fan-control-script/">the minimum viable fan control script</a>.
The fan only kicks in after the CPU reaches 60°C, ramps up to a moderate speed at over 85°C, and lets the default fan
behaviour handle everything if the temperatures reaches over 95°C. This results in the fan being off completely for most
of the day as the server is idling at around 5-10% CPU usage and temperatures being anywhere between 45-60°C. When there
is a workload on the system that taxes the CPU, the fan will kick on with a small delay.</p>
<p>I&rsquo;ve also disabled turbo boost on the Intel i7-3632QM that is currently in this T430, which limits the clock speed to
2.2 GHz max. Performance takes a small hit, but the CPU is now running much more efficiently. This is one of the tweaks
that allows the laptop to be near silent. At a full 8 thread CPU load using <code>stress -c 8</code>, the CPU core temperatures
peak at 70°C at 22°C ambient temperature, with the fan running at around 2600 RPM.</p>
<p>As a result of all of this, the T430 is very quiet while using about 10-12W of power while idling.
Under the maximum CPU load generated by <code>stress</code>, the total system power usage is around 34W.</p>
<h2 id="putting-the-paste-in-thermal-paste">
  <a class="heading-anchor" href="#putting-the-paste-in-thermal-paste">Putting the &ldquo;paste&rdquo; in thermal paste<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>Originally, the T430-as-a-server ran vertically using a basic laptop vertical stand. Back when I concluded the initial
test in 2022, I disassembled the machine and noticed something very odd with the thermal paste.</p>









<figure class="center">
  <a href="/posts/2023/01/27/thinkpad-as-server-followup/media/image-2.jpg" aria-label="View full-size image">
    <img src="/posts/2023/01/27/thinkpad-as-server-followup/media/image-2_hu_b6ce887f6e02fc08.webp"
     width="600"
     height="800"
     loading="lazy"
     decoding="async"
     alt="">

  </a>
  
</figure>

<p>Based on this image and the fact that I ran the machine quite warm most of the time (CPU temperatures around 60-80°C),
I assume that the excess thermal paste started slowly dripping down. The part that concerns me the most is that the top
of the chip was barely covered by the thermal paste. Either that part of the chip had great contact with the heatsink,
or the thermal paste drooped down with time and left it mostly uncovered. It could explain some of the issues, but
I&rsquo;ll avoid making any definitive conclusions from this alone.</p>
<p>To avoid similar issues in the future, the laptop is now on a stand at about 60° angle. Not sure if it will work,
but it&rsquo;s worth a shot.</p>
<h2 id="closing-thoughts">
  <a class="heading-anchor" href="#closing-thoughts">Closing thoughts<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>Overall, I&rsquo;m happy with how this experiment turned out. Cooling is no longer an issue, and the T430 that I initially
got for spare parts is actually being useful. The amount of performance this machine offers while using very little
power seems to be a good balance for the workloads that I run on my home server.</p>
]]></content:encoded></item><item><title>What changing the CPU on a laptop looks like</title><link>https://ounapuu.ee/posts/2022/12/09/changing-cpu-in-a-laptop/</link><pubDate>Fri, 09 Dec 2022 07:00:00 +0200</pubDate><author>ihavesomethoughtsonyourblog@ounapuu.ee (Herman Õunapuu)</author><guid>https://ounapuu.ee/posts/2022/12/09/changing-cpu-in-a-laptop/</guid><description>Quick demonstration of a CPU replacement in a ThinkPad T430.</description><content:encoded><![CDATA[<img src="https://ounapuu.ee/media/cover_hu_4fe4cf2661554252.jpg" width="1200" height="630" alt="What changing the CPU on a laptop looks like" /><p>This post illustrates something that is not common on modern laptops:
changing the CPU.</p>









<figure class="center">
  <a href="/posts/2022/12/09/changing-cpu-in-a-laptop/media/0-cover.jpg">
    <img src="/posts/2022/12/09/changing-cpu-in-a-laptop/media/0-cover_hu_4c83819246e9e445.webp"
     width="1067"
     height="800"
     loading="lazy"
     decoding="async"
     alt="The CPU we&#39;re replacing in the T430: a 45W Intel i7-3820QM.">

  </a>
  <figcaption class="center">The CPU we&#39;re replacing in the T430: a 45W Intel i7-3820QM.</figcaption>
</figure>










<figure class="center">
  <a href="/posts/2022/12/09/changing-cpu-in-a-laptop/media/1-unscrew.jpg">
    <img src="/posts/2022/12/09/changing-cpu-in-a-laptop/media/1-unscrew_hu_9919a14cced4cfe2.webp"
     width="1067"
     height="800"
     loading="lazy"
     decoding="async"
     alt="Loosen the CPU by turning the screw with a flathead screwdriver.">

  </a>
  <figcaption class="center">Loosen the CPU by turning the screw with a flathead screwdriver.</figcaption>
</figure>










<figure class="center">
  <a href="/posts/2022/12/09/changing-cpu-in-a-laptop/media/2-socket.jpg">
    <img src="/posts/2022/12/09/changing-cpu-in-a-laptop/media/2-socket_hu_b741f6f45086469.webp"
     width="1067"
     height="800"
     loading="lazy"
     decoding="async"
     alt="A CPU socket in a laptop.">

  </a>
  <figcaption class="center">A CPU socket in a laptop.</figcaption>
</figure>










<figure class="center">
  <a href="/posts/2022/12/09/changing-cpu-in-a-laptop/media/3-replacement.jpg">
    <img src="/posts/2022/12/09/changing-cpu-in-a-laptop/media/3-replacement_hu_4b76c681c5159ef6.webp"
     width="1067"
     height="800"
     loading="lazy"
     decoding="async"
     alt="Make sure the golden triangle aligns with the marking on the socket, and pop that new CPU in.">

  </a>
  <figcaption class="center">Make sure the golden triangle aligns with the marking on the socket, and pop that new CPU in.</figcaption>
</figure>










<figure class="center">
  <a href="/posts/2022/12/09/changing-cpu-in-a-laptop/media/4-cleaned-up.jpg">
    <img src="/posts/2022/12/09/changing-cpu-in-a-laptop/media/4-cleaned-up_hu_bd97f26bd4d33882.webp"
     width="1067"
     height="800"
     loading="lazy"
     decoding="async"
     alt="A bit of 98% alcohol goes a long way.">

  </a>
  <figcaption class="center">A bit of 98% alcohol goes a long way.</figcaption>
</figure>

<h2 id="background">
  <a class="heading-anchor" href="#background">Background<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>One of the modifications that you can do to a ThinkPad T430 laptop is changing
the CPU to a more powerful quad core model. That&rsquo;s exactly what I did back in 2017,
but due to the poor availability of compatible CPU-s in my region I went for
one with a 45W TDP, which is a bit much for a laptop designed for CPU-s with a
35W TDP.</p>
<p><a href="/posts/2022/09/26/minimum-viable-fan-control-script/">You could work around this issue with software</a>,
and that&rsquo;s what I also did for a long time. Since I now own two T430-s and the
availability of 35W parts is better now, I decided to go for one to see how
well these two options compare (result: it doesn&rsquo;t overheat as often, but it
managed to do it once anyway).</p>
<p>Unlike my T430, most modern laptops come with a soldered CPU.
<a href="https://www.tech-critter.com/review-level51-forge-15r/">There do exist laptops that come with a socketed CPU</a>,
but those are not that common and are designed for very specific use cases.</p>
<p>Soldering the CPU right to the board has its benefits, such as the machine
being thinner, and CPU-s don&rsquo;t really die all that often. However, what we have
lost out on is the option to upgrade older machines with more powerful
components, extending the useful lifetime of the device.</p>
<p>Yes, you <em>can</em> replace soldered CPU-s, but that requires a skillset and
equipment that few people have.</p>
]]></content:encoded></item><item><title>Recovering a password-protected ThinkPad T60</title><link>https://ounapuu.ee/posts/2022/10/13/recovering-password-locked-thinkpad-t60/</link><pubDate>Thu, 13 Oct 2022 08:00:00 +0300</pubDate><author>ihavesomethoughtsonyourblog@ounapuu.ee (Herman Õunapuu)</author><guid>https://ounapuu.ee/posts/2022/10/13/recovering-password-locked-thinkpad-t60/</guid><description>An illustrated overview about the process of clearing the supervisor password from a ThinkPad T60, based on guides that some smart and persistent people have written.</description><content:encoded><![CDATA[<img src="https://ounapuu.ee/media/cover_hu_4fe4cf2661554252.jpg" width="1200" height="630" alt="Recovering a password-protected ThinkPad T60" /><p>A couple of years ago, I worked on a ThinkPad T60. That ThinkPad had been in use
by a family member before that, and I started its cleanup by disassembling the
whole machine and making sure that it was pristine. However, once I put it all
back together, I saw that it was password protected. I wasn&rsquo;t even able to access
the BIOS. After repeatedly asking for hints for the password and trying some
simple cases myself, I never cracked it.</p>
<p>Not too long ago I got curious and looked for a way to overcome this issue.
That&rsquo;s when I stumbled upon <a href="https://superuser.com/questions/393922/how-to-remove-the-supervisor-bios-password-for-an-ibm-thinkpad">this SuperUser post about resetting the supervisor password on a ThinkPad.</a></p>
<p>Once my to-do list was down to a reasonable size, I decided to finally give this
a go, since it didn&rsquo;t seem that difficult. Here&rsquo;s an illustrated guide on how
I approached this task.</p>
<p>Sources that are relevant to this topic:</p>
<ul>
<li>
<p><a href="https://superuser.com/questions/393922/how-to-remove-the-supervisor-bios-password-for-an-ibm-thinkpad">How to remove the Supervisor BIOS password for an IBM ThinkPad</a></p>
</li>
<li>
<p><a href="http://www.ja.axxs.net/t60_t60p.htm">www.ja.axxs.net</a></p>
</li>
<li>
<p><a href="https://www.youtube.com/watch?v=FW-RLkzjAS8">&ldquo;How to unlock BIOS Supervisor Password from Lenovo Thinkpad Laptop (no damage to laptop)&rdquo; by Arpan Dubey</a></p>
</li>
</ul>









<figure class="center">
  <a href="/posts/2022/10/13/recovering-password-locked-thinkpad-t60/media/0-cover.jpg" aria-label="View full-size image">
    <img src="/posts/2022/10/13/recovering-password-locked-thinkpad-t60/media/0-cover_hu_e7878d9bc5fd3e19.webp"
     width="1280"
     height="753"
     loading="lazy"
     decoding="async"
     alt="">

  </a>
  
</figure>

<h2 id="setup">
  <a class="heading-anchor" href="#setup">Setup<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>What you&rsquo;ll need to pull this off:</p>
<ul>
<li>your ThinkPad T60 laptop that has a supervisor password enabled</li>
<li>a screwdriver</li>
<li>anything that conducts electricity and can be used to short two pins</li>
<li>a steady hand</li>
<li>a magnifier, if your eyesight isn&rsquo;t that great</li>
</ul>









<figure class="center">
  <a href="/posts/2022/10/13/recovering-password-locked-thinkpad-t60/media/1-the-big-short.jpg">
    <img src="/posts/2022/10/13/recovering-password-locked-thinkpad-t60/media/1-the-big-short_hu_ab68aee36d70d2b3.webp"
     width="922"
     height="800"
     loading="lazy"
     decoding="async"
     alt="For shorting pins, I came up with this contraption.">

  </a>
  <figcaption class="center">For shorting pins, I came up with this contraption.</figcaption>
</figure>

<p>To begin the process, you need to remove the palm rest of the ThinkPad. Follow
the service manual if needed. Removing the keyboard screws is optional, but
it might help you access the correct pins better.</p>









<figure class="center">
  <a href="/posts/2022/10/13/recovering-password-locked-thinkpad-t60/media/2-disassembly.jpg">
    <img src="/posts/2022/10/13/recovering-password-locked-thinkpad-t60/media/2-disassembly_hu_48b0223a797b6e0c.webp"
     width="600"
     height="800"
     loading="lazy"
     decoding="async"
     alt="T60, slightly disassembled.">

  </a>
  <figcaption class="center">T60, slightly disassembled.</figcaption>
</figure>

<h2 id="the-process">
  <a class="heading-anchor" href="#the-process">The process<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>The steps for performing the supervisor password clearing:</p>
<ul>
<li>turn on the laptop</li>
<li>when you see the ThinkPad logo, short two specific pins</li>
<li>keep shorting those pins!</li>
<li>press F1 to go to the BIOS</li>
<li>navigate to the section in BIOS where you can set the Supervisor Password</li>
<li>enter the supervisor password setting prompt and enter a blank password in
the first field</li>
<li>stop shorting the pins, and then enter an empty password to the second field</li>
<li>save settings and restart</li>
<li>after rebooting, you should be able to boot without having to enter a password</li>
</ul>
<p>What follows is an illustrated guide of the process.</p>









<figure class="center">
  <a href="/posts/2022/10/13/recovering-password-locked-thinkpad-t60/media/3-pins.jpg">
    <img src="/posts/2022/10/13/recovering-password-locked-thinkpad-t60/media/3-pins_hu_74ffbfde9c6e201d.webp"
     width="1103"
     height="800"
     loading="lazy"
     decoding="async"
     alt="The pins you need to short are located on the left side of the laptop, under the palmrest.">

  </a>
  <figcaption class="center">The pins you need to short are located on the left side of the laptop, under the palmrest.</figcaption>
</figure>










<figure class="center">
  <a href="/posts/2022/10/13/recovering-password-locked-thinkpad-t60/media/4-startup.jpg">
    <img src="/posts/2022/10/13/recovering-password-locked-thinkpad-t60/media/4-startup_hu_5a1a5f4a00212719.webp"
     width="600"
     height="800"
     loading="lazy"
     decoding="async"
     alt="Once you see this, short those pins!">

  </a>
  <figcaption class="center">Once you see this, short those pins!</figcaption>
</figure>










<figure class="center">
  <a href="/posts/2022/10/13/recovering-password-locked-thinkpad-t60/media/5-short.jpg">
    <img src="/posts/2022/10/13/recovering-password-locked-thinkpad-t60/media/5-short_hu_b2486b50ca7b7282.webp"
     width="1067"
     height="800"
     loading="lazy"
     decoding="async"
     alt="Just apply pressure to those pads and make sure the contact is solid.">

  </a>
  <figcaption class="center">Just apply pressure to those pads and make sure the contact is solid.</figcaption>
</figure>

<p>This is the step where I messed up initially. The contact between the pins was
not good and I got prompted with the supervisor password prompt. Power the machine
off and try again if you face the same issue.</p>
<p>Once the pins are shorted, you should be able to access the BIOS with a little
bit of F1 key spamming.</p>









<figure class="center">
  <a href="/posts/2022/10/13/recovering-password-locked-thinkpad-t60/media/6-bios.jpg">
    <img src="/posts/2022/10/13/recovering-password-locked-thinkpad-t60/media/6-bios_hu_c8c5216d8283d52d.webp"
     width="600"
     height="800"
     loading="lazy"
     decoding="async"
     alt="While the pins are still shorted, you should be able to get access to the BIOS.">

  </a>
  <figcaption class="center">While the pins are still shorted, you should be able to get access to the BIOS.</figcaption>
</figure>










<figure class="center">
  <a href="/posts/2022/10/13/recovering-password-locked-thinkpad-t60/media/7-password.jpg">
    <img src="/posts/2022/10/13/recovering-password-locked-thinkpad-t60/media/7-password_hu_627c5b3973c8cc7c.webp"
     width="600"
     height="800"
     loading="lazy"
     decoding="async"
     alt="Leave the first field blank, stop shorting the pins, and leave the other field blank as well.">

  </a>
  <figcaption class="center">Leave the first field blank, stop shorting the pins, and leave the other field blank as well.</figcaption>
</figure>

<p>After saving the settings and rebooting, you should be greeted with a successful
boot.</p>









<figure class="center">
  <a href="/posts/2022/10/13/recovering-password-locked-thinkpad-t60/media/8-its-booting.jpg">
    <img src="/posts/2022/10/13/recovering-password-locked-thinkpad-t60/media/8-its-booting_hu_33261b36e6e8f758.webp"
     width="600"
     height="800"
     loading="lazy"
     decoding="async"
     alt="It&#39;s booting! Not into Linux, since the SSD is removed, but still, it works!">

  </a>
  <figcaption class="center">It&#39;s booting! Not into Linux, since the SSD is removed, but still, it works!</figcaption>
</figure>

<p>Once you&rsquo;ve confirmed that everything&rsquo;s OK, assemble the machine again and enjoy
the laptop that you just saved from becoming e-waste.</p>
<h2 id="caveats">
  <a class="heading-anchor" href="#caveats">Caveats<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>This guide might not be terribly relevant in 2022. I still remember starting
my software development career in 2016 with a ThinkPad T60 and it was painful
even back then. These laptops are classics, but they are really starting to show
their age. I&rsquo;ve even encountered issues like the WiFi chip causing lots of
trouble, with the connection being very spotty and borderline unusable.</p>
<p>But hey, at least it&rsquo;s not completely unusable any more!</p>
]]></content:encoded></item><item><title>Testing a cheap ExpressCard to NVMe SSD adapter on my ThinkPad T430</title><link>https://ounapuu.ee/posts/2022/10/04/testing-expresscard-nvme-ssd-adapter/</link><pubDate>Tue, 04 Oct 2022 05:00:00 +0300</pubDate><author>ihavesomethoughtsonyourblog@ounapuu.ee (Herman Õunapuu)</author><guid>https://ounapuu.ee/posts/2022/10/04/testing-expresscard-nvme-ssd-adapter/</guid><description>I got curious about an ExpressCard to NVMe M.2 NGFF adapter I saw on Reddit, so I got one to try out myself, ending up with a total of 4 SSD-s on my ThinkPad T430. Yes, four.</description><content:encoded><![CDATA[<img src="https://ounapuu.ee/media/cover_hu_4fe4cf2661554252.jpg" width="1200" height="630" alt="Testing a cheap ExpressCard to NVMe SSD adapter on my ThinkPad T430" /><p>I stumbled upon <a href="https://www.reddit.com/r/thinkpad/comments/urvkeb/expresscard_to_m2_nvme_key_m_adapter_from/">this post in /r/thinkpad</a>,
which got my attention. It showcases an ExpressCard to M.2 NGFF adapter that
they purchased from AliExpress. The adapter has a similar purpose to the one
designed by <a href="https://thinkmods.store/">thinkmods.store</a>, with the added bonus
that it could fit longer NVMe SSD-s if you didn&rsquo;t mind them sticking out of the
case. You could also order one instantly, so I did.</p>
<p>For those interested, the title of the listing at the time of writing of this
article is &ldquo;ExpressCard interface to m.2 NGFF nvme solid state disc x201 t430 hp8570 w520&rdquo;.
The listing I chose was <a href="https://www.aliexpress.com/item/1005002023877404.html?spm=a2g0o.order_list.0.0.74c21802cTrI3L">this one.</a>
I&rsquo;m not affiliated with the manufacturer or the seller in any way.</p>









<figure class="center">
  <a href="/posts/2022/10/04/testing-expresscard-nvme-ssd-adapter/media/0-cover.jpg">
    <img src="/posts/2022/10/04/testing-expresscard-nvme-ssd-adapter/media/0-cover_hu_b7132969bcfb8a95.webp"
     width="1067"
     height="800"
     loading="lazy"
     decoding="async"
     alt="Bits and pieces.">

  </a>
  <figcaption class="center">Bits and pieces.</figcaption>
</figure>

<h2 id="the-idea">
  <a class="heading-anchor" href="#the-idea">The idea<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>I try to avoid buying things that I don&rsquo;t need, which is why I came up with an
excuse for getting this adapter: adding a cache SSD to my <a href="/posts/2022/05/10/thinkpad-as-a-home-server/">ThinkPad-as-a-server</a>.</p>
<p>The OS is running off of an mSATA SSD that I could theoretically use for the
same purpose, but eventually killing the SSD that also hosts the OS with constant
writes sounded like a really bad idea. I also didn&rsquo;t want to have excessive writes
on my pair of Samsung 870 QVO 4TB SATA SSD-s, because replacing those will be
quite expensive down the line.</p>
<p>Here&rsquo;s what we&rsquo;re working with:</p>
<ul>
<li><a href="https://sabrent.com/collections/memory-and-storage/products/sb-1342-512">Sabrent Rocket Nano NVMe 2242 SSD (512GB)</a></li>
<li>the aforementioned ExpressCard to M.2 NGFF adapter</li>
<li>ThinkPad T430 with an ExpressCard34 slot</li>
</ul>
<p>Quick word on the packaging: it was packaged in a small cardboard box, which
held up okay, but a more rough treatment of the box would probably have broken
the tiny PCB.</p>









<figure class="center">
  <a href="/posts/2022/10/04/testing-expresscard-nvme-ssd-adapter/media/1-parts.jpg">
    <img src="/posts/2022/10/04/testing-expresscard-nvme-ssd-adapter/media/1-parts_hu_392afbeee6a2ca65.webp"
     width="1067"
     height="800"
     loading="lazy"
     decoding="async"
     alt="The SSD, adapter PCB, and the case.">

  </a>
  <figcaption class="center">The SSD, adapter PCB, and the case.</figcaption>
</figure>

<h2 id="assembly">
  <a class="heading-anchor" href="#assembly">Assembly<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>According to comments I saw before purchasing the adapter, I expected the assembly
to be a bit tricky, and after assembling it I have to agree with that sentiment.</p>
<p>First, you&rsquo;ll have to squeeze the SSD in there. Unlike M.2 slots that are common
in laptops and desktops alike, this one requires you to horizontally push the SSD
in without breaking anything. Don&rsquo;t be afraid to use a bit of force here, but be
careful in how you apply it.</p>









<figure class="center">
  <a href="/posts/2022/10/04/testing-expresscard-nvme-ssd-adapter/media/2-assembly.jpg">
    <img src="/posts/2022/10/04/testing-expresscard-nvme-ssd-adapter/media/2-assembly_hu_2f837f858065178e.webp"
     width="1067"
     height="800"
     loading="lazy"
     decoding="async"
     alt="na-no">

  </a>
  <figcaption class="center">na-no</figcaption>
</figure>










<figure class="center">
  <a href="/posts/2022/10/04/testing-expresscard-nvme-ssd-adapter/media/3-underside.jpg">
    <img src="/posts/2022/10/04/testing-expresscard-nvme-ssd-adapter/media/3-underside_hu_af7b21b7b9fbcb6f.webp"
     width="1067"
     height="800"
     loading="lazy"
     decoding="async"
     alt="Bottom of the adapter.">

  </a>
  <figcaption class="center">Bottom of the adapter.</figcaption>
</figure>

<p>After the SSD is in, screw it in properly and place the assembly on one of the
metal parts.</p>
<p>Now comes the fun part: you&rsquo;ll have to clip on the top part as well. My
recommendation is to first clip in the part that sits near the contact pins,
then the one at the other end of the adapter, and then push in the metal
shielding at the edges.</p>









<figure class="center">
  <a href="/posts/2022/10/04/testing-expresscard-nvme-ssd-adapter/media/4-assembled.jpg">
    <img src="/posts/2022/10/04/testing-expresscard-nvme-ssd-adapter/media/4-assembled_hu_fbd612045f68d2d4.webp"
     width="1067"
     height="800"
     loading="lazy"
     decoding="async"
     alt="The adapter, 100% assembled.">

  </a>
  <figcaption class="center">The adapter, 100% assembled.</figcaption>
</figure>










<figure class="center">
  <a href="/posts/2022/10/04/testing-expresscard-nvme-ssd-adapter/media/5-sideview.jpg">
    <img src="/posts/2022/10/04/testing-expresscard-nvme-ssd-adapter/media/5-sideview_hu_2ada239f212695b8.webp"
     width="1067"
     height="800"
     loading="lazy"
     decoding="async"
     alt="For some reason, mine ended up a bit crooked near the connector.">

  </a>
  <figcaption class="center">For some reason, mine ended up a bit crooked near the connector.</figcaption>
</figure>










<figure class="center">
  <a href="/posts/2022/10/04/testing-expresscard-nvme-ssd-adapter/media/6-opening.jpg">
    <img src="/posts/2022/10/04/testing-expresscard-nvme-ssd-adapter/media/6-opening_hu_828eb1cfc210cb27.webp"
     width="1067"
     height="800"
     loading="lazy"
     decoding="async"
     alt="This opening allows for the installation of longer M.2 SSD-s.">

  </a>
  <figcaption class="center">This opening allows for the installation of longer M.2 SSD-s.</figcaption>
</figure>

<h2 id="tests">
  <a class="heading-anchor" href="#tests">Tests<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>To test this adapter out, I just plugged it into my main ThinkPad T430 running
Fedora 36 and Linux kernel version 5.19.12. It worked right out of the box.</p>









<figure class="center">
  <a href="/posts/2022/10/04/testing-expresscard-nvme-ssd-adapter/media/7-led.jpg">
    <img src="/posts/2022/10/04/testing-expresscard-nvme-ssd-adapter/media/7-led_hu_4c08dbca18a1ec54.webp"
     width="600"
     height="800"
     loading="lazy"
     decoding="async"
     alt="Yes, it has a blue LED that blinks.">

  </a>
  <figcaption class="center">Yes, it has a blue LED that blinks.</figcaption>
</figure>










<figure class="center">
  <a href="/posts/2022/10/04/testing-expresscard-nvme-ssd-adapter/media/8-installed.jpg">
    <img src="/posts/2022/10/04/testing-expresscard-nvme-ssd-adapter/media/8-installed_hu_42af8bb4aeb094a2.webp"
     width="600"
     height="800"
     loading="lazy"
     decoding="async"
     alt="When not blinking, it looks something like this.">

  </a>
  <figcaption class="center">When not blinking, it looks something like this.</figcaption>
</figure>










<figure class="center">
  <a href="/posts/2022/10/04/testing-expresscard-nvme-ssd-adapter/media/9-dmesg.png">
    <img src="/posts/2022/10/04/testing-expresscard-nvme-ssd-adapter/media/9-dmesg_hu_9268cddb4b78501c.webp"
     width="957"
     height="200"
     loading="lazy"
     decoding="async"
     alt="Fedora picked it up with no issues.">

  </a>
  <figcaption class="center">Fedora picked it up with no issues.</figcaption>
</figure>

<p>My ThinkPad T430 can now support hotpluggable NVMe SSD-s, and 4 internal SSD-s
in total. Not quite tricked out as <a href="https://youtu.be/tHNQOJ_nsLc">this setup</a>,
but not bad for a 10 year old laptop.</p>









<figure class="center">
  <a href="/posts/2022/10/04/testing-expresscard-nvme-ssd-adapter/media/10-gnome-disks.png">
    <img src="/posts/2022/10/04/testing-expresscard-nvme-ssd-adapter/media/10-gnome-disks_hu_774bb68429c0cb0d.webp"
     width="960"
     height="392"
     loading="lazy"
     decoding="async"
     alt="4 SSD-s on a ThinkPad T430. Bonkers.">

  </a>
  <figcaption class="center">4 SSD-s on a ThinkPad T430. Bonkers.</figcaption>
</figure>

<p>Please note that these tests are not done with any meaningful testing methodology
and are just quick one-off tests that aim to showcase what to expect when using
this adapter with the configuration I&rsquo;m using it with.</p>
<p>To check how well the adapter performs, I opened <code>gnome-disks</code> and did a quick
benchmark offered by it.</p>









<figure class="center">
  <a href="/posts/2022/10/04/testing-expresscard-nvme-ssd-adapter/media/11-benchmark.png">
    <img src="/posts/2022/10/04/testing-expresscard-nvme-ssd-adapter/media/11-benchmark_hu_2d0b5109e530e691.webp"
     width="634"
     height="594"
     loading="lazy"
     decoding="async"
     alt="Results of the quick one-off benchmark.">

  </a>
  <figcaption class="center">Results of the quick one-off benchmark.</figcaption>
</figure>

<p>The average read speed is at 411.2 MB/s, and writes at 366.7 MB/s.</p>
<p>The results are in line with the limitations of a PCIe 2.0 x1 link, which has a
theoretical cap of 500 MB/s.</p>
<p>What&rsquo;s more noteworthy is the latency. Average access time is at 0.03 ms,
which compares well to a Samsung 870 EVO 1TB SATA SSD that&rsquo;s connected to the
same machine, which reports an average access time of 0.07 ms.</p>
<p>When copying files to the SSD, the temperature sensor reported a maximum of 60°C.
Additional read operations in the form of an ZFS scrub hit 63°C, which was the
maximum I observed during my quick testing.</p>
<p>When I threw both read and write operations to the SSD, the total I/O bandwidth
for both operations was capped at around 390 MB/s according to <code>zpool iostat 1 -v</code>.
If your workloads do a lot of read-write operations in parallel, then take this
into account.</p>









<figure class="center">
  <a href="/posts/2022/10/04/testing-expresscard-nvme-ssd-adapter/media/12-zfs-bandwidth.png">
    <img src="/posts/2022/10/04/testing-expresscard-nvme-ssd-adapter/media/12-zfs-bandwidth_hu_11738924d5bce375.webp"
     width="729"
     height="120"
     loading="lazy"
     decoding="async"
     alt="I/O stats during heavy read-write operations.">

  </a>
  <figcaption class="center">I/O stats during heavy read-write operations.</figcaption>
</figure>

<p>As for my use case, it seems to be holding up okay. I&rsquo;ll have to report back
after this adapter and SSD combo has been in use for a longer time.</p>
]]></content:encoded></item><item><title>The minimum viable fan control script</title><link>https://ounapuu.ee/posts/2022/09/26/minimum-viable-fan-control-script/</link><pubDate>Mon, 26 Sep 2022 08:00:00 +0300</pubDate><author>ihavesomethoughtsonyourblog@ounapuu.ee (Herman Õunapuu)</author><guid>https://ounapuu.ee/posts/2022/09/26/minimum-viable-fan-control-script/</guid><description>Some assembly required. No, not _that_ one.</description><content:encoded><![CDATA[<img src="https://ounapuu.ee/media/cover_hu_4fe4cf2661554252.jpg" width="1200" height="630" alt="The minimum viable fan control script" /><p>I&rsquo;ve always been a fan of tinkering with cooling setups on my computers.
I&rsquo;ve even went as far as writing <a href="https://github.com/Hermanio/linux-cpu-manager">crappy</a>
<a href="https://github.com/Hermanio/linux-gpu-manager">solutions</a> to make up for
deficiencies on the hardware level. After years of dumb experiments I&rsquo;ve seen
how little you can get away with in cooling and how to run your machines as
quietly as possible without giving up too much performance.</p>
<p>I also appreciate simplicity, which is why I&rsquo;m currently running the simplest
damn solution you can imagine to control how my ThinkPad T430 and ASRock
DeskMini X300 run: a shell script.</p>
<p>It also comes with some added benefits:</p>
<ul>
<li>self-documenting</li>
<li>highly customizable</li>
<li>low resource usage</li>
</ul>
<p>These scripts are not &ldquo;battle-hardened&rdquo; and using them incorrectly may or
may not result in hardware failure. Use at your own risk. The only guarantee
I can give is that <em>it works on my machine™</em>.</p>
<p>If you&rsquo;re someone who doesn&rsquo;t like tinkering with their computers and wants
their machines to &ldquo;just work&rdquo;, then this article likely isn&rsquo;t for you.</p>









<figure class="center">
  <a href="/posts/2022/09/26/minimum-viable-fan-control-script/media/image.png" aria-label="View full-size image">
    <img src="/posts/2022/09/26/minimum-viable-fan-control-script/media/image_hu_cf274236fe7bd4f.webp"
     width="473"
     height="209"
     loading="lazy"
     decoding="async"
     alt="">

  </a>
  
</figure>

<h2 id="thinkpad-t430">
  <a class="heading-anchor" href="#thinkpad-t430">ThinkPad T430<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>With the ThinkPad T430, the script does two things:</p>
<ul>
<li>control the fan speed</li>
<li>preemptively throttle the CPU and GPU</li>
</ul>
<p>This type of behaviour is optimized for mostly quiet operation. The fan is
running at its lowest speed when under a small load, and the CPU/GPU throttling
has an added benefit of reducing the overall power usage, too. The difference
between non-turbo and turbo speeds on the Intel i7-3820QM can be as much as
13-15 watts.</p>
<p><a href="https://wiki.archlinux.org/title/fan_speed_control#ThinkPad_laptops">To enable fan control on ThinkPads</a>,
you need to have a file at <code>/usr/lib/modprobe.d/thinkpad_acpi.conf</code> with the
following contents:</p>
<pre tabindex="0"><code>options thinkpad_acpi fan_control=1
</code></pre><p>Reboot, and you can now have full control over the fan speed in your ThinkPad!</p>
<p>The script itself looks like this:</p>
<pre tabindex="0"><code>#!/bin/bash

set -e

while true; do

  temp=$(cat /sys/class/thermal/thermal_zone1/temp)

  if ((temp &gt; 90000)); then
    echo level 7 &gt;/proc/acpi/ibm/fan
  elif ((temp &gt; 75000)); then
    echo level 5 &gt;/proc/acpi/ibm/fan
  elif ((temp &gt; 60000)); then
    echo level 3 &gt;/proc/acpi/ibm/fan
  elif ((temp &gt; 30000)); then
    echo level 1 &gt;/proc/acpi/ibm/fan
  else
    echo level 0 &gt;/proc/acpi/ibm/fan
  fi

  if ((temp &gt; 97000)); then
    echo 350 &gt;/sys/class/drm/card*/gt_max_freq_mhz
    echo 350 &gt;/sys/class/drm/card*/gt_boost_freq_mhz
  elif ((temp &gt; 90000)); then
    echo 650 &gt;/sys/class/drm/card*/gt_max_freq_mhz
    echo 650 &gt;/sys/class/drm/card*/gt_boost_freq_mhz
  else
    echo 1250 &gt;/sys/class/drm/card*/gt_max_freq_mhz
    echo 1250 &gt;/sys/class/drm/card*/gt_boost_freq_mhz
  fi

  if ((temp &gt; 70000)); then
    echo 1 &gt;/sys/devices/system/cpu/intel_pstate/no_turbo
  else
    echo 0 &gt;/sys/devices/system/cpu/intel_pstate/no_turbo
  fi

  sleep 0.5
done
</code></pre><p>What we&rsquo;re doing is reading the temperature of the CPU package and then setting
the fan speed and throttling based on that. Note that the temperatures are
represented without any decimal places. A reading of 78000 means that the chip
is running at 78 °C.</p>
<p>On my ThinkPad T430, the fan speed levels can be roughly described as such:</p>
<ul>
<li>level 1: lowest speed, barely audible</li>
<li>level 3: audible, but tolerable</li>
<li>level 5 and above: it&rsquo;s probably loud enough to bother you</li>
</ul>
<p>The second section controls the integrated GPU. What I&rsquo;ve found in my testing
is that a weak integrated GPU can still chug up to 20 watts, which is a
considerable amount, especially on a laptop. The <code>card*</code> wildcard is there
because the integrated GPU may change between <code>card0</code> and <code>card1</code>, and I&rsquo;m too
lazy to make the script any smarter.</p>
<p>The values written there correspond to the maximum GPU clock speed. <code>1250</code> happens
to be the max clock speed (in MHz) and at that speed the GPU is using a lot of
power. <code>650</code> is the speed at which the integrated GPU is running most
efficiently. <code>350</code> is the lowest speed, and you will notice it due to the
performance being extra crappy.</p>
<p>With the CPU, I chose to just turn the turbo boost on or off. With turbo boost
off, the CPU will top out at 2.7 GHz and around 22 watts of power usage. With
turbo boost, the CPU can run anywhere between 3.4-3.7 GHz, depending on the number
of cores under load. You&rsquo;ll likely notice much higher CPU temperatures and power
usage climbing to around 35 watts. Fast at short and bursty workloads, and yet
efficient and relatively cool at sustained loads.</p>
<p>And at the very end, you have a simple <code>sleep</code> statement. I&rsquo;ve set it to half a
second, but feel free to set it as you see fit. Higher intervals might not be
that good of an idea because the script may not be able to respond quickly enough
to changing thermals, just keep that in mind.</p>
<h2 id="asrock-deskmini-x300">
  <a class="heading-anchor" href="#asrock-deskmini-x300">ASRock DeskMini X300<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>Although I&rsquo;ve opted for a more experimental setup with my home server and the
ASRock DeskMini X300 is no longer running as one, I think it&rsquo;s still worthwhile
to share how I configured the fan control logic on this machine.</p>
<p>With the ASRock DeskMini X300, my goal was simple: let it run as quietly as
reasonably possible without losing too much performance.</p>
<p>This machine was running 24/7 as a server and has a powerful 8-core AMD Ryzen 7
5700G CPU in it. One thing this script is heavily relying on is the fact that Ryzen
CPU-s have well-engineered boosting logic in them, meaning that they&rsquo;re already
designed to run at the highest speed possible and only limit their speed if they
hit power or thermal limits.</p>
<p>One thing you may need to do first is installing <code>lm-sensors</code> and running
<code>sudo sensors-detect</code>. By default the CPU fan speed controls were not properly
exposed, but after running <code>sensors-detect</code> and saying yes at every prompt,
they were picked up.</p>
<p>The script looks like this:</p>
<pre tabindex="0"><code>#!/bin/bash

set -e

# /sys/devices/platform/nct6775.656/hwmon/hwmon3

echo 1 &gt;/sys/devices/platform/nct6775.656/hwmon/hwmon3/pwm2_enable

while true; do

  temp=$(cat /sys/class/hwmon/hwmon4/temp1_input)

  if ((temp &gt; 94000)); then
    echo 170 &gt;/sys/devices/platform/nct6775.656/hwmon/hwmon3/pwm2
  elif ((temp &gt; 90000)); then
    echo 140 &gt;/sys/devices/platform/nct6775.656/hwmon/hwmon3/pwm2
  elif ((temp &gt; 70000)); then
    echo 120 &gt;/sys/devices/platform/nct6775.656/hwmon/hwmon3/pwm2
  elif ((temp &gt; 40000)); then
    echo 30 &gt;/sys/devices/platform/nct6775.656/hwmon/hwmon3/pwm2
  else
    echo 0 &gt;/sys/devices/platform/nct6775.656/hwmon/hwmon3/pwm2
  fi

  sleep 5
done
</code></pre><p>The <code>hwmon</code> values and which fan you&rsquo;re controlling is likely different on your
own PC. Take a look at the paths found in the script and poke around while also
physically looking at your PC. Try enabling PWM control by writing to <code>pwm*_enable</code>
handles and then setting the fan speed. As a result of your poking, you should
see the CPU fan change its speed. If it doesn&rsquo;t, try another value.</p>
<p>The values you can write are in the range 0-255, where the higher value corresponds
to a higher speed.</p>
<p>I&rsquo;ve limited the TDP of my CPU to 35 watts using a setting found in UEFI
settings. This results in the CPU running cool and quiet even under a full load.</p>
<h2 id="systemd-service">
  <a class="heading-anchor" href="#systemd-service">systemd service<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>To run your fan control script as a systemd service, drop the script to your
preferred location (I placed it in <code>/root/.local/bin/fancontrol</code>), then create
a file <code>/etc/systemd/system/fancontrol.service</code> with the following contents:</p>
<pre tabindex="0"><code>[Unit]
Description=Quick fan control software

[Service]
ExecStart=/root/.local/bin/fancontrol

[Install]
WantedBy=multi-user.target
</code></pre><p>And once that is done, enable and start your fan control service with
<code>sudo systemctl enable --now fancontrol.service</code>.</p>
<p>If you encounter issues or something isn&rsquo;t working right, check the status of
the service with <code>systemctl status fancontrol.service</code> or full logs with
<code>journalctl -u fancontrol.service</code>.</p>
<h2 id="conclusion">
  <a class="heading-anchor" href="#conclusion">Conclusion<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>If you want something that works out of the box and does the smart stuff for you,
then <a href="https://wiki.archlinux.org/title/fan_speed_control">give this Arch Linux wiki page a look</a>.
If you&rsquo;re not into that and want to easily tune the behaviour of your machine,
then feel free to use these scripts as a baseline for your own experimentation.</p>
]]></content:encoded></item><item><title>Disabling the crappy Broadcom Bluetooth adapter in your ThinkPad T430 running Linux</title><link>https://ounapuu.ee/posts/2022/06/01/thinkpad-t430-bluetooth-shenanigans/</link><pubDate>Wed, 01 Jun 2022 12:00:00 +0300</pubDate><author>ihavesomethoughtsonyourblog@ounapuu.ee (Herman Õunapuu)</author><guid>https://ounapuu.ee/posts/2022/06/01/thinkpad-t430-bluetooth-shenanigans/</guid><description>If you have ever felt frustated with the Bluetooth experience that your ThinkPad T430 offers you, especially after upgrading the WiFi adapter to one that also has Bluetooth capabilities, then this article might help you out.</description><content:encoded><![CDATA[<img src="https://ounapuu.ee/media/cover_hu_4fe4cf2661554252.jpg" width="1200" height="630" alt="Disabling the crappy Broadcom Bluetooth adapter in your ThinkPad T430 running Linux" /><p>You&rsquo;ve disabled the boneheaded Lenovo WiFi adapter whitelist using a tool like
<a href="https://github.com/n4ru/1vyrain">1vyrain</a>, installed a better adapter like the
<a href="https://ark.intel.com/content/www/us/en/ark/products/75439/intel-dual-band-wirelessac-7260.html">Intel Dual Band Wireless-AC 7260</a>,
and found that Bluetooth is not working as intended on your ThinkPad T430
running Linux?</p>
<p>Here&rsquo;s a guide on what you can try to resolve some issues you may encounter.</p>
<h2 id="the-integrated-bluetooth-adapter">
  <a class="heading-anchor" href="#the-integrated-bluetooth-adapter">The integrated Bluetooth adapter<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>The ThinkPad T430 comes with Bluetooth out of the box. Mine is this one:</p>
<pre tabindex="0"><code>Bus 001 Device 004: ID 0a5c:21e6 Broadcom Corp. BCM20702 Bluetooth 4.0 [ThinkPad]
</code></pre>








<figure class="center">
  <a href="/posts/2022/06/01/thinkpad-t430-bluetooth-shenanigans/media/image.jpg">
    <img src="/posts/2022/06/01/thinkpad-t430-bluetooth-shenanigans/media/image_hu_7f58e7068cea5d7a.webp"
     width="1280"
     height="775"
     loading="lazy"
     decoding="async"
     alt="And it looks something like this.">

  </a>
  <figcaption class="center">And it looks something like this.</figcaption>
</figure>

<p>I run Fedora Linux and frankly the experience with the stock adapter is horrible.
Getting stuck while pairing a device or the GNOME Bluetooth settings GUI hanging
isn&rsquo;t a rare sight. Sometimes I&rsquo;ve had to run a script to reset all USB devices
to get things sorted out, or restart the machine altogether. This is not fun
when a work call started 3 minutes ago and your Bluetooth headset is just not
working.</p>
<p>After installing the new Intel WiFi adapter, I thought that I&rsquo;d just disable the
integrated Bluetooth controller via the UEFI settings. That should do the trick,
right?</p>
<p>Nope. Apparently this disabled ALL bluetooth devices, including the one provided
by the Intel adapter.</p>
<p>Well, no problem, I&rsquo;ll just physically remove the Broadcom device and that
should force the ThinkPad to use the Intel adapter, right?</p>
<p>Nope. Now the machine just shows no Bluetooth devices.</p>
<h2 id="udev-to-the-rescue">
  <a class="heading-anchor" href="#udev-to-the-rescue">udev to the rescue<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>If you install the Intel adapter and don&rsquo;t touch any of the settings, you&rsquo;ll have
two Bluetooth adapters. On my laptop, the OS used the Broadcom adapter by default,
which was evident by all GUI interactions interfacing with the Broadcom one and
throwing out errors in <code>dmesg -w</code> as a result.</p>
<p>Since disabling the Broadcom bluetooth adapter via other means did not work, I
had to look for some solutions. One that I stumbled upon relied on <code>udev</code> rules.</p>
<p>Essentially, what you want to do is drop a file in <code>/etc/udev/rules.d/</code>, name it
something like <code>81-bluetooth-hci.rules</code> and make the contents something like
this:</p>
<pre tabindex="0"><code>SUBSYSTEM==&#34;usb&#34;, ATTRS{idVendor}==&#34;0a5c&#34;, ATTRS{idProduct}==&#34;21e6&#34;, ATTR{authorized}=&#34;0&#34;
</code></pre><p>Make sure to replace the <code>idVendor</code> and <code>idProduct</code> with the correct values for
your Bluetooth adapter. Output of <code>lsusb</code> will likely contain those values.</p>
<p>In my case, the output of <code>lsusb</code> is</p>
<p><code>Bus 001 Device 004: ID 0a5c:21e6 Broadcom Corp. BCM20702 Bluetooth 4.0 [ThinkPad]</code></p>
<p>The <code>idVendor</code> and <code>idProduct</code> info is in this string: <code>ID 0a5c:21e6</code>.</p>
<p>After making this change and restarting, you should see that<code>bluetoothctl list</code>
outputs only one Bluetooth device.</p>
<pre tabindex="0"><code>[host@T430 ~]$ bluetoothctl list
Controller AC:FD:CE:30:EB:BA T430 [default]
</code></pre><p>Because Bluetooth is still a hot mess in 2022, I still have to occasionally beat
it with a hammer. However, the experience with the Intel adapter is much better
and a simple &ldquo;turn the adapter off and on again in the GUI&rdquo; solved 99% of the
issues I&rsquo;ve encountered since then.</p>
<h3 id="have-you-tried-turning-it-off-and-on-again">
  <a class="heading-anchor" href="#have-you-tried-turning-it-off-and-on-again">&ldquo;Have you tried turning it off and on again?&rdquo;<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h3>
<p>If for whatever reason this solution does not apply to you, and you feel like
you want to hit your machine with a big hammer without having to restart it, then
<a href="https://askubuntu.com/a/290519">here&rsquo;s a script</a> that resets all the USB
devices on your machine. I&rsquo;ve observed that most Bluetooth adapters run over USB,
which is why this script works with those as well.</p>
<p>It has helped me countless times when desperate for a quick Bluetooth fix on
various desktops and laptops that I&rsquo;ve used.</p>
<p>Run it at your own risk.</p>
<pre tabindex="0"><code>#!/bin/bash

for i in /sys/bus/pci/drivers/[uoex]hci_hcd/*:*; do
  [ -e &#34;$i&#34; ] || continue
  echo &#34;${i##*/}&#34; &gt; &#34;${i%/*}/unbind&#34;
  echo &#34;${i##*/}&#34; &gt; &#34;${i%/*}/bind&#34;
done
</code></pre>]]></content:encoded></item><item><title>Can a laptop from 2012 be a viable home server?</title><link>https://ounapuu.ee/posts/2022/05/10/thinkpad-as-a-home-server/</link><pubDate>Tue, 10 May 2022 09:00:00 +0300</pubDate><author>ihavesomethoughtsonyourblog@ounapuu.ee (Herman Õunapuu)</author><guid>https://ounapuu.ee/posts/2022/05/10/thinkpad-as-a-home-server/</guid><description>I took a spare ThinkPad T430 and put all my home server workloads on it. Here's how it went.</description><content:encoded><![CDATA[<img src="https://ounapuu.ee/media/cover_hu_4fe4cf2661554252.jpg" width="1200" height="630" alt="Can a laptop from 2012 be a viable home server?" /><p>I&rsquo;m a man of many ideas. It&rsquo;s a shame that most of them are quite stupid.</p>
<p>This is one of them, but at least it makes for a fun experiment.</p>
<h2 id="intro">
  <a class="heading-anchor" href="#intro">Intro<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>After <a href="/posts/2022/03/21/ups-i-did-it-again/">adding an UPS to accompany my server,</a>
my setup was as complete as it could reasonably be. The server is low power,
but packs quite a punch with fast storage and plenty of compute power around.
The UPS provides a battery backup for both my server and the router.</p>
<p>There was still one annoyance lingering at the back of my head: this setup took
40 watts of power in idle. That&rsquo;s a lot for something that runs 24/7. Yes,
<a href="https://www.reddit.com/r/homelab/">/r/homelab</a> regularly showcases more
power hungry setups, but my standards are quite high when it comes to power use.
I want to go as low as reasonably possible.</p>
<p>I recently bought a spare ThinkPad T430 so that I can have a backup machine in case
something happens to <a href="/posts/2022/01/09/why-i-went-back-to-using-a-thinkpad-from-2012/">my laptop that doesn&rsquo;t suck</a>.
I&rsquo;ve also <a href="/posts/2020/08/22/stupid-project-ideas-1/">had ideas about a server setup involving this laptop.</a></p>
<p>That&rsquo;s when I decided to try running my services off of the ThinkPad T430.</p>









<figure class="center">
  <a href="/posts/2022/05/10/thinkpad-as-a-home-server/media/image1.jpg">
    <img src="/posts/2022/05/10/thinkpad-as-a-home-server/media/image1_hu_60bcdba190871e52.webp"
     width="600"
     height="800"
     loading="lazy"
     decoding="async"
     alt="The setup.">

  </a>
  <figcaption class="center">The setup.</figcaption>
</figure>










<figure class="center">
  <a href="/posts/2022/05/10/thinkpad-as-a-home-server/media/image2.jpg">
    <img src="/posts/2022/05/10/thinkpad-as-a-home-server/media/image2_hu_fa9f5efc5d128f8b.webp"
     width="600"
     height="800"
     loading="lazy"
     decoding="async"
     alt="Another angle of the setup.">

  </a>
  <figcaption class="center">Another angle of the setup.</figcaption>
</figure>

<h2 id="the-setup">
  <a class="heading-anchor" href="#the-setup">The setup<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>Here&rsquo;s a quick rundown of the relevant specifications:</p>
<ul>
<li>CPU: Intel i5-3320M, 2 cores 4 threads @ 3.3GHz max</li>
<li>RAM: 16GB DDR3</li>
<li>OS disk: 256GB Micron mSATA SSD</li>
<li>Main storage: 2x 4TB Samsung 870 QVO SSD</li>
</ul>
<p>One of the main reasons that this setup is viable in the first place is the fact
that the ThinkPad T430 supports up to 3 SSD-s if you replace the optical drive
with a HDD caddy. Your OS can run off of an mSATA SSD and your mirrored storage
can utilize the two 2.5&quot; SATA slots.</p>
<p>You probably don&rsquo;t want to use a setup like this if you want to store a lot of
big files, such as your legally obtained media collection. If your data can fit
on a pair of SATA SSD-s, then this setup will be just fine.</p>
<h2 id="why-use-a-laptop-as-a-home-server">
  <a class="heading-anchor" href="#why-use-a-laptop-as-a-home-server">Why use a laptop as a home server?<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>If you don&rsquo;t have a home server yet and want to start off as cheap as possible
while also being mindful of the power usage, then an used laptop with a competent
CPU is a fantastic starting point. In an age where 6 CPU cores is considered
mid-range, two CPU cores might not sound like much, but for most home server
workloads it&rsquo;s absolutely fine.</p>
<p>Laptop CPU-s are designed to use as little power as possible. After all, they
need to run off of a small battery most of the time and have to run cool as well
to make do with the limited cooling setup that they have. This makes them ideal
for a machine that runs 24/7.</p>
<p>I measured the power usage of my ThinkPad T430 in this configuration and found
that it used around 15-20 watts when running with a low load. This is comparable
to the <a href="/posts/2022/01/17/asrock-x300-future-of-desktops/">ASRock DeskMini X300</a>.</p>
<p>What sets laptops apart from the usual desktop-based home server builds is that
they often have a working battery, which can act as a poor man&rsquo;s UPS. If you
momentarily lose power, then the server will happily keep on working until the
battery runs out, which might take 1-2 hours (or more if your battery is in a
good state). This is comparable to the runtime I saw with the DeskMini server
build and the APC Smart-UPS 750.</p>
<p>Most laptops also come with an Ethernet port, and if the laptop is made some
time after 2005, then it&rsquo;s likely running at gigabit speeds. Unless you have a
valid use case for 10 gigabits or more, then this will be plenty of network
bandwidth for most home server use cases.</p>
<p>One aspect that&rsquo;s often overlooked with a laptop-based home server setup is the
inclusion of an integrated keyboard and mouse. If you accidentally mess up your
configuration and your server does not start up properly, then you can just open
the lid and start fixing it on the spot. On any other setup, you&rsquo;d have to find
a monitor to hook the server up to and find a spare keyboard to use as well,
which can be a hassle.</p>
<h2 id="performance">
  <a class="heading-anchor" href="#performance">Performance<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>A home server that serves the needs of a couple of users at most and runs some
scheduled tasks from time to time can run perfectly fine off of a dual core
Intel Core series CPU from 2012. You probably don&rsquo;t want to run intensive
computational workloads off of it, such as transcoding video files on a service
like Jellyfin. However, you can utilize the integrated GPU to off-load specific
workloads to it, and media encode-decode for select video codecs is one of those.
Intel QuickSync is an absolute godsend for situations where you need to transcode
media on a CPU that isn&rsquo;t that powerful.</p>
<p>My home server runs a lot of services: Docker containers, this blog, data archival
jobs, backup jobs etc. When running them on the T430, the average CPU usage was
around 20%. Not ideal, but still leaves plenty of headroom for services.</p>
<p>The overall usability and performance that this machine offers was completely
acceptable. It&rsquo;s not as lightning fast as something that runs a modern CPU,
like the AMD Ryzen 5 PRO 4650G in the DeskMini, but it gets the job done.</p>
<h2 id="caveats-thermals">
  <a class="heading-anchor" href="#caveats-thermals">Caveats: thermals<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>A home server built around a used laptop brings a lot of benefits. However,
it also has some potential downsides that you should be aware of.</p>
<p>Most laptops have fans, and they can be damn loud. The ThinkPad T430 is
notoriously loud if you have the cooling fan manufactured by Toshiba. In a home
setting this can potentially a deal-breaker, unless you can wedge the laptop
into a corner of the room where it&rsquo;s not audible.</p>
<p>There exist solutions to the fan control problem. You can install a tool like
thinkfan or just write your preferred fan level to <code>/proc/acpi/ibm/fan</code> to
avoid the cooling fan running too loud <a href="https://wiki.archlinux.org/title/fan_speed_control#ThinkPad_laptops">(instructions here)</a>.</p>
<p>Running the fan at the lowest speed works fine most of the time since your CPU
can throttle itself when it&rsquo;s running too hot. However, with my setup I had an
odd issue where the machine would power off suddenly when it was doing a lot of
I/O workload, such as scrubbing the ZFS pool on the two 4TB SSD-s. This happened
even when the CPU was not even close to throttling, running around 75 C. I do
not know what the actual reason for the sudden shutdown is, but I suspect that
it may be related to the motherboard overheating or the system treating the hot
SSD-s as hard drives that are over the critical temperature limit of around 60 C.</p>
<p>I was able to work around most of the cooling-related issues by mounting the
laptop vertically and limiting the maximum CPU clock speed to around 2.4 GHz
using the knobs made available with <code>intel_pstate</code>.</p>
<p>The CPU temperatures during normal operation were mostly around 60C, with a high
load reaching max 75C with the tweaks applied and the CPU fan running at the
slowest possible speed.</p>
<h2 id="caveats-maintenance">
  <a class="heading-anchor" href="#caveats-maintenance">Caveats: maintenance<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>If you have a machine that runs 24/7, maintenance will become an issue. No
matter how often you clean your home, dust will accumulate. On desktop PC-s,
cleaning out your CPU heatsink is just a matter of taking off the PC case side
panel, removing the heatsink fan, cleaning off the dust and putting it all back
together. You probably want to replace the thermal paste from time to time as
well.</p>
<p>On most laptops, cleaning out the CPU heatsink is much trickier. You will likely
have to disassemble most of the machine to even access it, which takes up much
more time compared to a desktop PC, which also means more downtime.</p>
<p>Depending on the model, a simple change, such as upgrading your storage or
replacing a faulty drive, can also be more complicated. I&rsquo;ve seen laptops where
you actually have to disassemble the whole machine to access the hard drive.
The ThinkPad T430 has an easily accessible setup when it comes to storage, but
the main storage bay does have an annoying pull-tab setup that probably won&rsquo;t
survive multiple subsequent changes.</p>
<h2 id="conclusion">
  <a class="heading-anchor" href="#conclusion">Conclusion<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>Aside from the setbacks that may or may not be due to the specifics of my setup,
I find that a laptop can make for a good home server. If you have more specific
requirements, then a custom-built server is likely the way to go, but if you&rsquo;re
just starting out, then definitely do consider this option.</p>
<p>After running this setup for a week or two, I decided to go back to my previous
setup based on the ASRock DeskMini. The reliability woes weren&rsquo;t something I
was too happy with, and I didn&rsquo;t really have another use case for the DeskMini
either, so it made sense for me.</p>
]]></content:encoded></item><item><title>Why I went back to using a ThinkPad from 2012</title><link>https://ounapuu.ee/posts/2022/01/09/why-i-went-back-to-using-a-thinkpad-from-2012/</link><pubDate>Sun, 09 Jan 2022 11:00:00 +0200</pubDate><author>ihavesomethoughtsonyourblog@ounapuu.ee (Herman Õunapuu)</author><guid>https://ounapuu.ee/posts/2022/01/09/why-i-went-back-to-using-a-thinkpad-from-2012/</guid><description>How trying out new laptops and messing with my personal computing setup motivated me to go back to a laptop that some would call ancient.</description><content:encoded><![CDATA[<img src="https://ounapuu.ee/media/cover_hu_4fe4cf2661554252.jpg" width="1200" height="630" alt="Why I went back to using a ThinkPad from 2012" /><p><em>This post is inspired by <a href="https://solar.lowtechmagazine.com/2020/12/how-and-why-i-stopped-buying-new-laptops.html">this article from the Low-tech Magazine</a>.
I highly recommend giving that a read as well!</em></p>
<p>Over my lifetime, I&rsquo;ve used a bunch of different computers, mainly due to new
ideas and requirements popping into my mind every time I&rsquo;m content with my
current setup. One of my last changes might be a bit of a headscratcher for some.</p>









<figure class="center">
  <a href="/posts/2022/01/09/why-i-went-back-to-using-a-thinkpad-from-2012/media/t430.jpg">
    <img src="/posts/2022/01/09/why-i-went-back-to-using-a-thinkpad-from-2012/media/t430_hu_2d4404a123679511.webp"
     width="1067"
     height="800"
     loading="lazy"
     decoding="async"
     alt="ThinkPad T430 in all its glory.">

  </a>
  <figcaption class="center">ThinkPad T430 in all its glory.</figcaption>
</figure>

<h2 id="background">
  <a class="heading-anchor" href="#background">Background<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>At my current place of employment, I&rsquo;ve had the opportunity to try out recently
released laptops from Lenovo and Dell, with the goal of evaluating them for
software development workloads and pick a default option for new hires. My work
laptop at the time was the Lenovo ThinkPad T480 with some decent specs and an
NVIDIA GeForce MX 150 GPU that was weak and throttled itself whenever it hit 70
degrees Celsius in Windows 10, making it absolutely useless.</p>
<p>I tried out a fair number of makes and models: Lenovo ThinkPad P14/T14 (gen 1
and 2) in both Intel 11th gen and AMD Ryzen 4000/5000 series configurations, plus
some Dell Latitudes with Intel 11th gen CPU-s as well. And the result? A lot of
disappointment.</p>
<p>The non-exhaustive list of issues I ran into with these machines on Fedora
Linux 34:</p>
<ul>
<li>The touchpad would sometimes randomly not work on one of the ThinkPads.</li>
<li>On AMD models, performance was less than stellar for my workloads and not a
significant jump over a laptop from 2018.</li>
<li>The Intel CPU-s had throttling issues that made them unusable for basic
things like calls over Google Meet as they would throttle to 400 MHz.</li>
<li>On one of the Dell machines, it was very easy to overheat the SSD, which lead
to the CPU throttling to 400 MHz. Yes, the SSD caused the CPU to throttle.</li>
<li>Wi-Fi/Bluetooth would not work on one of the laptops, even when I was using an
up-to-date Linux distro. Likely related to the type of adapter used (not Intel).</li>
</ul>
<p>Once that experiment was done, we settled on the least crappy version of the
ThinkPads that had an AMD Ryzen CPU, at least those didn&rsquo;t sound like jet
engines under load and didn&rsquo;t have insane throttling issues.</p>
<p>It&rsquo;s not all that bad, though. I was now committed to using my current ThinkPad
T480 for as long as possible. It, too, had a rough start, but at least all the
issues it came with have been ironed out over time.</p>
<h2 id="hopping-between-machines">
  <a class="heading-anchor" href="#hopping-between-machines">Hopping between machines<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>At this point in time, I had three machines:</p>
<ul>
<li>desktop PC (for work and personal stuff)</li>
<li>work laptop (for work stuff only)</li>
<li>personal laptop (for personal stuff, of course)</li>
</ul>
<p>I could not rely on the work laptop for personal use as it has limited storage
options. Call me a freak, but I feel very uneasy running on a single SSD, even
if my data is backed up to my NAS and on external backup drives. With my <a href="/posts/2021/12/29/vr-vfio-latency/">desktop
PC use case affecting other workloads as well</a>, I
had to come up with a solution.</p>
<p>Syncing data between machines was not the issue here. <a href="https://syncthing.net/">Syncthing</a>
is an absolute open-source gem and had no issues with things like
<code>node_modules</code> folders. The main issue was the fact that I didn&rsquo;t want to carry
two laptops around or buy an extra USB-C dock for use at home.</p>
<p>I took the risk and jumped back to the ThinkPad T430 for both my personal and
work use cases.</p>
<h2 id="thinkpad-t430-the-history">
  <a class="heading-anchor" href="#thinkpad-t430-the-history">ThinkPad T430: the history<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>My ThinkPad T430 has a rich history. I got it in 2016 to replace my aging
ThinkPad T60. Getting this laptop felt similar to that time a desktop PC that ran
Windows 98 got replaced with a dual-core &ldquo;beast&rdquo; in 2006.</p>
<p>In 2006, my webpage load times went from 30 seconds to a second. Getting
Android app build times from 60 seconds to around 10 seconds on the T430 felt
the same.</p>
<p>This ThinkPad T430 has survived all the following:</p>
<ul>
<li>A bicycle crash while it was in a backpack. The latch mechanism broke and
there are a couple of cracks in the palm rest, but the rest is working fine.</li>
<li>A coffee spill, which luckily only discoloured the casing of two USB 3.0 ports.</li>
<li>Liquid metal experiments, had some pretty close calls there with my dumb ass
almost shorting the system out.</li>
<li>Use as a budget low-power server machine for a bit.</li>
</ul>
<p>5 years later, it&rsquo;s back in my possession again after a short stint at a family
members&rsquo; hands.</p>
<p>There&rsquo;s more to this than simply a rich history, though.</p>
<h2 id="the-modifications">
  <a class="heading-anchor" href="#the-modifications">The modifications<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>Over the years, I&rsquo;ve been inspired by whatever modifications people over at
<a href="https://www.reddit.com/r/thinkpad/">/r/thinkpad</a> have come up with. If you
want a short summary, you can check out
<a href="https://medium.com/@n4ru/the-definitive-t430-modding-guide-3dff3f6a8e2e">the definitive T430 modding guide</a>
to get some inspiration.</p>
<p>To make this machine viable in 2021, you need the CPU, RAM and SSD upgrades at
the very minimum.</p>
<p>Here&rsquo;s the list of upgrades I&rsquo;ve done:</p>
<ul>
<li>CPU upgrade to a quad-core Intel i7-3820QM (45W TDP).</li>
<li>RAM upgrade to 16 GB DDR3 memory.</li>
<li>Storage: 250GB mSATA for OS, 2x 1TB SATA SSD-s for data, made possible with a
HDD caddy that replaces the optical drive.</li>
<li>New third party 9-cell battery. I&rsquo;ve had mixed experiences with these, but
the one I have now seems to be good enough.</li>
<li>Replaced the heatsink and fan assembly with one that has a Delta fan
(FRU 04W3270). It&rsquo;s quieter and doesn&rsquo;t have the high-pitched whine that the
Toshiba fan exhibits.</li>
<li>At one point, I ran an external GPU off of the ExpressCard34 slot.</li>
<li>Installed <a href="https://github.com/n4ru/1vyrain">1vyrain</a> to get rid of annoying
limitations, such as the Wi-Fi whitelist.</li>
<li>Upgraded the Wi-Fi card to Intel Wireless-AC 7260.</li>
</ul>









<figure class="center">
  <a href="/posts/2022/01/09/why-i-went-back-to-using-a-thinkpad-from-2012/media/fandesign.jpg">
    <img src="/posts/2022/01/09/why-i-went-back-to-using-a-thinkpad-from-2012/media/fandesign_hu_2e4291c1c9feb921.webp"
     width="600"
     height="800"
     loading="lazy"
     decoding="async"
     alt="Delta fan (top) vs the annoyingly loud Toshiba fan (bottom).">

  </a>
  <figcaption class="center">Delta fan (top) vs the annoyingly loud Toshiba fan (bottom).</figcaption>
</figure>

<p>There are some things I&rsquo;d like to eventually tinker with:</p>
<ul>
<li>Replace the display with a compatible 1600x900 panel that has better image
quality. The current screen is awful.</li>
<li>Do something fun with the ExpressCard34 slot. There&rsquo;s the <a href="https://thinkmods.store/collections/all-mods-1/products/expresscard-to-nvme-adapter">thinkmods.store
ExpressCard34 SSD adapter</a>,
but I haven&rsquo;t seen that released yet.</li>
</ul>









<figure class="center">
  <a href="/posts/2022/01/09/why-i-went-back-to-using-a-thinkpad-from-2012/media/egpu.jpg">
    <img src="/posts/2022/01/09/why-i-went-back-to-using-a-thinkpad-from-2012/media/egpu_hu_71bc0f4a5a4cb46a.webp"
     width="1067"
     height="800"
     loading="lazy"
     decoding="async"
     alt="eGPU setup that I used to run back in 2017 with surprisingly good results.">

  </a>
  <figcaption class="center">eGPU setup that I used to run back in 2017 with surprisingly good results.</figcaption>
</figure>

<p>With these modifications, it feels like an usable laptop again.</p>
<h2 id="but-why">
  <a class="heading-anchor" href="#but-why">But why?<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>The reasons why I went back to the T430 are quite simple.</p>
<ul>
<li>Build quality: it has survived a nasty fall, and it will probably survive the
next ones as well.</li>
<li>CPU performance is roughly on par with the T480 under sustained load.</li>
<li>No dedicated GPU that takes up valuable space and power.</li>
<li>Battery life with the 9-cell battery is on par or even better in real
world use scenarios, compared to the T480.</li>
<li>Ridiculous storage configurations: dual-boot, triple-boot, RAID1 setups,
16+TB of solid-state storage, it&rsquo;s all possible on this old laptop!</li>
<li>Decent selection of ports, including VGA and gigabit ethernet.</li>
<li>Docking stations can be dirt cheap and be bought for less than 10 EUR (used).</li>
<li>I have plenty of Lenovo barrel plug chargers, but only one USB-C Lenovo
charger. I really didn&rsquo;t want to buy more chargers when I have plenty of
perfectly working ones.</li>
</ul>
<p>There are some downsides, though:</p>
<ul>
<li>No HDMI, I&rsquo;d need a mini-Displayport to HDMI dongle for that to work.</li>
<li>No USB-C, which might be an issue if your environment at work is optimized
for that.</li>
<li>It runs hot, but doesn&rsquo;t have the same level of on-chip thermal protections
that the T480 has, resulting in <a href="https://github.com/Hermanio/linux-cpu-manager">this awful piece of software I wrote back in 2018.</a></li>
</ul>
<p>That&rsquo;s nothing compared to the unreliability I&rsquo;ve experienced with the T480.
I&rsquo;ve witnessed the keyboard dying once and the motherboard being replaced twice,
once due to charging related issues, and the other time due to random system
crashes and screen glitching.</p>
<h2 id="verdict">
  <a class="heading-anchor" href="#verdict">Verdict<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>I&rsquo;ve been using this setup for over a month now, and it has been surprisingly
adequate. Yes, opening Java projects in IntelliJ will make things slow, and to
record my desktop with OBS and acceptable performance, I had to drop my screen
resolution to 720p. I can&rsquo;t expect everything to work super well on this
machine, but for a computer that&rsquo;s released almost 10 years ago, it&rsquo;s still
holding up well.</p>
<p>I&rsquo;d like to thank Intel here for making this possible. The CPU innovation
stagnation between 2012-2017 has resulted in 4 cores still being an acceptable
low-end CPU in early 2022. Without this, my laptop would likely be obsolete by
now.</p>
<h3 id="2022-01-12-update">
  <a class="heading-anchor" href="#2022-01-12-update">2022-01-12 update<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h3>
<p>This post got a lot of feedback and comments on HackerNews with people sharing
their experiences, feel free to check it out and <a href="https://news.ycombinator.com/item?id=29871693">join the discussion!</a></p>
<h3 id="2022-09-01-update">
  <a class="heading-anchor" href="#2022-09-01-update">2022-09-01 update<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h3>
<p>This post was translated into German and featured on golem.de,
<a href="https://www.golem.de/news/notebook-warum-ich-jetzt-wieder-ein-thinkpad-von-2012-nutze-2209-166195.html">check it out!</a></p>
]]></content:encoded></item><item><title>How to mess up a simple ThinkPad X230 BIOS flash and how to recover from it</title><link>https://ounapuu.ee/posts/2021/06/28/breaking-and-fixing-thinkpad-x230/</link><pubDate>Mon, 28 Jun 2021 07:00:00 +0300</pubDate><author>ihavesomethoughtsonyourblog@ounapuu.ee (Herman Õunapuu)</author><guid>https://ounapuu.ee/posts/2021/06/28/breaking-and-fixing-thinkpad-x230/</guid><description>At least it won't end up in a landfill!</description><content:encoded><![CDATA[<img src="https://ounapuu.ee/media/cover_hu_4fe4cf2661554252.jpg" width="1200" height="630" alt="How to mess up a simple ThinkPad X230 BIOS flash and how to recover from it" /><h2 id="background">
  <a class="heading-anchor" href="#background">Background<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>I have a Lenovo ThinkPad X230. It&rsquo;s a small and good laptop that I&rsquo;ve used as my main laptop and a server as well.</p>
<p>A couple of years ago I messed around with flashing alternative BIOS implementations on the X230, such
as <a href="https://github.com/merge/skulls">the skulls project</a>, which made installing prebuilt coreboot images very simple. Of
course, before doing any testing, I made backups of the stock BIOS implementation (ooh, foreshadowing!).</p>
<p>Skulls was nice, it booted fast, but changing the boot order likely required modifications and rebuilding the coreboot
image (I wanted to set the mSATA SSD as the first bootable device). It was also not UEFI-compatible, which could have
probably been solved with something like TianoCore, but I didn&rsquo;t feel like messing with that too much. Eventually I
flashed the original UEFI implementation back and went on with my life.</p>
<p>Then I stumbled upon <a href="https://1vyra.in/">the 1vyrain project</a> project, which allows you to &ldquo;jailbreak&rdquo; your BIOS. This
modification also enables a lot more bells and whistles in the BIOS under the <em>Advanced</em> menu option, plus it also gets
rid of the WiFi adaptor whitelist that Lenovo has put in place, allowing you to now use any adaptor that&rsquo;s compatible
with the form factor.</p>
<p>The mod was very easy to install and had no issues, until I got myself a DDR3 SODIMM RAM kit. One of the sticks was not
working properly, showing up with graphical glitches and failing a memtest run. To troubleshoot it, I decided to change
the speed at which the memory runs from DDR3-1600 to DDR3-1333. It booted, and still had the issues.</p>
<p>Then I changed it to DDR3-1066.</p>
<p>Black screen. Uh-oh.</p>
<h2 id="initial-troubleshooting">
  <a class="heading-anchor" href="#initial-troubleshooting">Initial troubleshooting<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>Thinking that this is just a simple issue that I could get fixed by clearing the BIOS settings and starting fresh, I
looked up some basic instructions on doing so.</p>
<p>Things I tried:</p>
<ul>
<li>remove the battery (even if it is completely dead, like mine), and hold the power button for 60 seconds, then attach
the battery and turn it on again.</li>
<li>remove both the battery and disconnect the internal CMOS battery that sits under the palmrest and hold the power
button for 60 seconds again.</li>
<li>disconnect all the batteries and leave the laptop sitting on a shelf, then try again.</li>
<li>try <a href="http://www.masnick.com/2007/09/07/the-secret-thinkpad-powerbutton-code-to-bring-dead-laptops-back-to-life/">&ldquo;the secret ThinkPad power button combo&rdquo;</a>:</li>
</ul>
<blockquote>
<p>&hellip; unplug the AC adapter and take out the battery. Then, you push the power button 10 times in a row at one second intervals.
Next, you push and hold the power button for 30 seconds. Then you put the battery back in and push the power button…
and she lives. The computer came back, good as ever.</p>
</blockquote>
<p>After all of that, the laptop was still as good as dead. You could see the light turn on, the fan starts spinning, but
nothing shows up on the screen. At that point I knew that the BIOS reflash was probably my only choice.</p>
<h2 id="flashing-the-bios">
  <a class="heading-anchor" href="#flashing-the-bios">Flashing the BIOS<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>To fix the issue, I had to flash the BIOS externally. Luckily I still had the original BIOS backup images available.</p>
<p>With the help of a good friend, we set everything up and did some tests to ensure that the connection is good and that
read/write operations on the chips return consistent results.</p>









<figure class="center">
  <a href="/posts/2021/06/28/breaking-and-fixing-thinkpad-x230/media/bios-chips-2.jpg">
    <img src="/posts/2021/06/28/breaking-and-fixing-thinkpad-x230/media/bios-chips-2_hu_82eb324a42c768d5.webp"
     width="600"
     height="800"
     loading="lazy"
     decoding="async"
     alt="The chips that we&#39;re going to flash sit behind the left side of the palmrest, making them quite easy to access.">

  </a>
  <figcaption class="center">The chips that we&#39;re going to flash sit behind the left side of the palmrest, making them quite easy to access.</figcaption>
</figure>










<figure class="center">
  <a href="/posts/2021/06/28/breaking-and-fixing-thinkpad-x230/media/bios-chips-1.jpg">
    <img src="/posts/2021/06/28/breaking-and-fixing-thinkpad-x230/media/bios-chips-1_hu_989137a4e63602da.webp"
     width="600"
     height="800"
     loading="lazy"
     decoding="async"
     alt="Left one is generally referred to as the bottom chip and the right one is the top one.">

  </a>
  <figcaption class="center">Left one is generally referred to as the bottom chip and the right one is the top one.</figcaption>
</figure>

<p>Once we had specified the correct chip type by looking at what was written on the chip package itself, we flashed both
the top and bottom chips with the original images that were once made as a backup. After reading the chips back and
comparing checksums using <code>md5sum</code>, it all looked good.</p>
<p>We disconnected the SOIC clip, attached the power cable and tried turning the laptop on. Power button light comes up for
1 second and then turns off. Not a good sign.</p>
<p>We flashed both chips again and made sure that everything is in order. No dice, the symptoms are the same.</p>
<h2 id="a-closer-look">
  <a class="heading-anchor" href="#a-closer-look">A closer look<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>It didn&rsquo;t take too long for me to start thinking about what I could use all these extra laptop parts for. After all, the
screen was good, it had 16GB DDR3 RAM, two SSD-s, a screen assembly in good condition etc. I was stopped in my tracks
when my friend noticed something.</p>









<figure class="center">
  <a href="/posts/2021/06/28/breaking-and-fixing-thinkpad-x230/media/something-missing.jpg">
    <img src="/posts/2021/06/28/breaking-and-fixing-thinkpad-x230/media/something-missing_hu_4572e9842f6a6cc6.webp"
     width="967"
     height="800"
     loading="lazy"
     decoding="async"
     alt="Find the missing resistor.">

  </a>
  <figcaption class="center">Find the missing resistor.</figcaption>
</figure>

<p>It turns out that during this flashing process, we (probably me) had managed to get rid of a resistor that sat next to
the top flash chip. Whoops. Turns out that it was an important one, because over at
Reddit, <a href="https://old.reddit.com/r/coreboot/comments/dhwdss/did_i_just_brick_my_x230/">someone else also ran into this issue and had similar symptoms</a>
.</p>
<p>To resolve this, my friend had the idea of putting a 10K resistor in there to see if it fixes things. The issue was that
the only one available right from the get-go was a very big one, so he had to be clever with it. He ended up positioning
it upright with a piece of wire handling the other side.</p>









<figure class="center">
  <a href="/posts/2021/06/28/breaking-and-fixing-thinkpad-x230/media/resistor-hackjob.jpg">
    <img src="/posts/2021/06/28/breaking-and-fixing-thinkpad-x230/media/resistor-hackjob_hu_34d3505e3b9f8a42.webp"
     width="700"
     height="372"
     loading="lazy"
     decoding="async"
     alt="Isn&#39;t it beautiful?">

  </a>
  <figcaption class="center">Isn&#39;t it beautiful?</figcaption>
</figure>

<p>This, however, didn&rsquo;t improve the situation much.</p>
<h2 id="schematics-to-the-rescue">
  <a class="heading-anchor" href="#schematics-to-the-rescue">Schematics to the rescue<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>To understand the role of the missing resistor better, we started looking for schematics online. I managed to find an OK
looking one from a random forum and started browsing through it. The keyword of the day was &ldquo;SPI&rdquo; and when searching for
it, we found some promising results. My friend found the resistor and found that we could just short it, since the
resistor used to be between two wires. And that he did.</p>









<figure class="center">
  <a href="/posts/2021/06/28/breaking-and-fixing-thinkpad-x230/media/schematics.png">
    <img src="/posts/2021/06/28/breaking-and-fixing-thinkpad-x230/media/schematics_hu_e238f6bcdf0bfede.webp"
     width="1280"
     height="401"
     loading="lazy"
     decoding="async"
     alt="The missing resistor, as shown on the schematic.">

  </a>
  <figcaption class="center">The missing resistor, as shown on the schematic.</figcaption>
</figure>










<figure class="center">
  <a href="/posts/2021/06/28/breaking-and-fixing-thinkpad-x230/media/the-big-short.jpg">
    <img src="/posts/2021/06/28/breaking-and-fixing-thinkpad-x230/media/the-big-short_hu_ea2fb8942d0aab25.webp"
     width="1250"
     height="800"
     loading="lazy"
     decoding="async"
     alt="The big short.">

  </a>
  <figcaption class="center">The big short.</figcaption>
</figure>

<p>We attempted to power on the machine again and this time the error sequence was different as the laptop went into some
sort of a party mode with lights flashing. The usual troubleshooting steps didn&rsquo;t work that well here, either, so it&rsquo;s
possible that the stock BIOS image did not like something here.</p>
<p>What we did have was the option of flashing the known-good skulls image on. I handled that part quite OK, since all the
commands were in my bash history anyway. The excitement, however, got the best of me and I managed to repeat the
original mistake and I bumped the soldered piece of wire off of the board, putting us back to the original issue.</p>
<p>After another session of carefully connecting the two wires, we repeated the steps and after the flash, we finally saw
the Skulls splash screen.</p>
<p>It works!</p>









<figure class="center">
  <a href="/posts/2021/06/28/breaking-and-fixing-thinkpad-x230/media/it-works-1.jpg">
    <img src="/posts/2021/06/28/breaking-and-fixing-thinkpad-x230/media/it-works-1_hu_42b508142a55117a.webp"
     width="1067"
     height="800"
     loading="lazy"
     decoding="async"
     alt="Picture taken after the fact, because I forgot to do it initially.">

  </a>
  <figcaption class="center">Picture taken after the fact, because I forgot to do it initially.</figcaption>
</figure>

<p>After booting into a Fedora 34 liveusb environment with <code>iomem=relaxed</code>, I grabbed the latest release of skulls (
released on 4/20 🔥) and used the internal flashing method to update.</p>
<p>Reboot, and we saw party mode again. Having used skulls in the past, I knew that this was likely down to skulls (or
coreboot) being very picky about RAM. The solution here is to reseat the RAM modules and turn it on again. Why does that
work? Not sure, but it did.</p>
<p>To make this solution more resistant to my unintentional attempts of breaking things, I added a glob of hot glue next to
the top chip to make sure that I don&rsquo;t knock anything off of the board again.</p>
<h2 id="testing">
  <a class="heading-anchor" href="#testing">Testing<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>Once the laptop was assembled again, I did some testing to see if everything still works as intended.</p>
<p>Fedora 34 liveusb boot resulted in a black screen once, but on the second try, it worked again.</p>
<p>Windows 10 installed fine on the machine and while some functions don&rsquo;t work as well (TrackPoint and touchpad being the
prime examples here), it was still usable. Unfortunately I did not manage to write down the original Windows 10 key that
is embedded to the stock BIOS image, so I could not activate it. But hey, at least it works.</p>









<figure class="center">
  <a href="/posts/2021/06/28/breaking-and-fixing-thinkpad-x230/media/it-works-2.jpg">
    <img src="/posts/2021/06/28/breaking-and-fixing-thinkpad-x230/media/it-works-2_hu_fc2369c02a72eb2f.webp"
     width="1067"
     height="800"
     loading="lazy"
     decoding="async"
     alt="Windows 10 also works.">

  </a>
  <figcaption class="center">Windows 10 also works.</figcaption>
</figure>

<h2 id="lessons-learned">
  <a class="heading-anchor" href="#lessons-learned">Lessons learned<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>Even though this adventure started with a self-inflicted wound, I still consider it a success, as I learned a couple of
things.</p>
<ul>
<li>It&rsquo;s very easy to get confused when reviewing how the wires should be set up on the SOIC test clip and the device
that&rsquo;s actually performing the flashing.</li>
<li>If a piece of software exposes a bunch of knobs and levers and warns you about catastrophic failures that might occur
as a result, then trust it and don&rsquo;t mess with things that you have no clue about. With this example case, though, I
didn&rsquo;t expect a memory speed change to result in such a catastrophic failure in the first place&hellip;</li>
<li>Developers that know hardware are worth their weight in gold.</li>
<li>Access to schematics is very valuable when fixing hardware.</li>
</ul>
<p>And on the final note, I would like to give a shout-out to <a href="https://zirk.me/">Arti Zirk</a>, the guy who helped fix the
mess I created. If you need someone who is well-versed in anything related to software development, Linux and embedded
systems, then he is your guy.</p>









<figure class="center">
  <a href="/posts/2021/06/28/breaking-and-fixing-thinkpad-x230/media/the-setup.jpg">
    <img src="/posts/2021/06/28/breaking-and-fixing-thinkpad-x230/media/the-setup_hu_324bc408874b6fe3.webp"
     width="1067"
     height="800"
     loading="lazy"
     decoding="async"
     alt="Genius at work.">

  </a>
  <figcaption class="center">Genius at work.</figcaption>
</figure>

<h2 id="flashrom-references">
  <a class="heading-anchor" href="#flashrom-references">flashrom references<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>This section has some commands that might be useful to you. Unless you&rsquo;re using the exact same flasher, you will probably
need to specify a different programmer with the <code>-p</code> flag.</p>
<p>The names and extensions for the input-output files are arbitrary. A file is a file.</p>
<h3 id="readingwriting-the-top-chip">
  <a class="heading-anchor" href="#readingwriting-the-top-chip">Reading/writing the top chip.<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h3>
<p>Note that I had to specify the chip type, otherwise <code>flashrom</code> would complain.</p>
<p>The top chip is 4MB and the bottom chip is 8MB. This should also be reflected in any output that you get.</p>
<p><code>--verify</code> option is also useful for checking if the results are OK. I also recommend reading the image from the chip
after a write and comparing its checksum using <code>md5sum</code>, just to be extra safe.</p>
<pre tabindex="0"><code># Read the existing image on the chip
flashrom -p ft2232_spi:type=2232H,port=B,divisor=4 -r top.bin -c MX25L3206E/MX25L3208E 

# Write the specified image to the chip
flashrom -p ft2232_spi:type=2232H,port=B,divisor=4 -w top_backup.bin -c MX25L3206E/MX25L3208E 
</code></pre><h3 id="readingwriting-the-bottom-chip">
  <a class="heading-anchor" href="#readingwriting-the-bottom-chip">Reading/writing the bottom chip<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h3>
<pre tabindex="0"><code># Read
flashrom -p ft2232_spi:type=2232H,port=B,divisor=4 -r bottom.bin -c MX25L6406E/MX25L6408E

# Write
flashrom -p ft2232_spi:type=2232H,port=B,divisor=4 -w bottom_backup.bin -c MX25L6406E/MX25L6408E
</code></pre>]]></content:encoded></item><item><title>Stupid project ideas: the War Machine</title><link>https://ounapuu.ee/posts/2020/08/22/stupid-project-ideas-1/</link><pubDate>Sat, 22 Aug 2020 21:24:08 +0300</pubDate><author>ihavesomethoughtsonyourblog@ounapuu.ee (Herman Õunapuu)</author><guid>https://ounapuu.ee/posts/2020/08/22/stupid-project-ideas-1/</guid><description>Maybe not stupid, but definitely stupid expensive.</description><content:encoded><![CDATA[<img src="https://ounapuu.ee/media/cover_hu_4fe4cf2661554252.jpg" width="1200" height="630" alt="Stupid project ideas: the War Machine" /><p><a href="https://www.youtube.com/user/LinusTechTips">LinusTechTips</a> has some pretty great videos about building
insane PC and server setups, such as:</p>
<ul>
<li>
<p><a href="https://youtu.be/EtZXMj_gUjU">unboxing and deploying <em>petabytes</em> of storage</a></p>
</li>
<li>
<p><a href="https://youtu.be/LXOaCkbt4lI">7 gamers, 1 CPU</a></p>
</li>
<li>
<p><a href="https://youtu.be/R_h63IsmvSQ">building sleeper PC-s</a></p>
</li>
<li>
<p><a href="https://youtu.be/uWtU8pGspj0">testing sketchy CPU-s</a></p>
</li>
<li>
<p><a href="https://youtu.be/ZFLiKClKKhs">opening up a 100TB SSD</a></p>
</li>
</ul>
<p>I have the ideas, but not the budget of LinusTechTips, so writing them down and hoping that one day I can test this out
is the best I can do for now.</p>
<h2 id="the-project-itself">
  <a class="heading-anchor" href="#the-project-itself">The project itself<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>The main idea is to have a laptop that has ridiculous amounts of storage and the performance to back it up.
The idea started gaining traction in my head after I realized that my Lenovo ThinkPad T430 can house up to 3 SSD-s, which
makes it a perfect candidate for a system with a ZFS mirror configuration. It also helps that it is powered by a quad-core
CPU and 16GB of RAM.</p>
<p>Additional points:</p>
<ul>
<li>low power, should stay below 60-90W even under the worst case scenarios</li>
<li>portable, just plug in the power and an ethernet cable and you are good to go</li>
<li>built-in UPS in the form of the laptop battery</li>
<li>well built, can survive a fall or two (already has done so, but that&rsquo;s a story for another time)</li>
<li>includes a screen and a keyboard for those times where you really screwed something up and need to fix it fast</li>
<li>supports 1x mSATA SSD (great for / partition) and 2x SATA HDD/SSD (one in the usual drive bay, the other in the HDD caddy that
is replacing the optical drive)</li>
</ul>
<h2 id="storage">
  <a class="heading-anchor" href="#storage">Storage<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>With SSD prices having dropped quite low and capacities increasing with time, it might not be completely unreasonable
to get SSD-s with capacities reaching multiple terabytes. At the time of writing, Samsung, for example, is shipping
<a href="https://www.samsung.com/au/memory-storage/870-qvo-sata-3-2-5-ssd/MZ-77Q1T0BW/">SATA SSD-s with capacities up to 8TB</a>,
which is the same size as the main hard drives in my server right now.</p>
<p>However, these SSD-s are also ridiculously expensive, with the 4 TB model costing ~400 euros and the 8 TB costing almost
800 euros.</p>









<figure class="center">
  <a href="/posts/2020/08/22/stupid-project-ideas-1/media/2020-08-22-21-49-00.png">
    <img src="/posts/2020/08/22/stupid-project-ideas-1/media/2020-08-22-21-49-00_hu_ad198e1e6aaf23cd.webp"
     width="731"
     height="509"
     loading="lazy"
     decoding="async"
     alt="The capacity isn&#39;t the only thing that is big about this SSD.">

  </a>
  <figcaption class="center">The capacity isn&#39;t the only thing that is big about this SSD.</figcaption>
</figure>

<p>Hard drives are generally cheaper per TB, but in this case we don&rsquo;t actually have much better options. 2.5&quot; 9mm hard drives
seem to go up to 2TB at most. You will also have to take into account the fact that hard drives do not like impacts,
such as falls, and they are much slower than SSD-s in most workloads.</p>
<h2 id="cooling">
  <a class="heading-anchor" href="#cooling">Cooling<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>Since I have fitted this T430 with an <a href="https://ark.intel.com/content/www/us/en/ark/products/64889/intel-core-i7-3820qm-processor-8m-cache-up-to-3-70-ghz.html">Intel i7 3820QM</a>
CPU with a 45 watt TDP, cooling is an issue. Liquid metal, beefier heatsinks, fresh thermal paste, I have tried it all, but
the only solution that has actually worked is disabling the turbo boost feature. There is also this other solution I created
that automatically throttles the CPU at a chosen temperature limit using Intel p-state driver, but that solution requires
a rewrite.</p>
<p>With poor cooling comes great noise, so ideally this server should run in a place that does not bother anyone with its
high-pitched fan noise.</p>
<h2 id="performance">
  <a class="heading-anchor" href="#performance">Performance<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>With a quad core CPU, this system can do quite a lot. Running Nextcloud, PostgreSQL, Jellyfin or any other service should
be a breeze, especially since the main storage is SSD based. The amount of RAM is also perfectly suitable for doing quite
a lot. Run a couple of VM-s, transcode your media, it can do it all (with reasonable expectations, though).</p>
<h2 id="portability">
  <a class="heading-anchor" href="#portability">Portability<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>One of the best features of this setup is that you can just grab it and go, should the need arise. Its low power requirement
makes it a much more suitable candidate for powering it in situations where the electrical grid is down and all you have
is a generator or some form of renewable energy. In addition to that, everything you need to work with the machine is already
there, just open up the laptop and start working using the built-in keyboard and screen.</p>
<p>The good build quality of the laptop also means that you do not need to worry much about putting it in your backpack and
throwing it around. Sure, the plastic might break in some places, and if the impact is strong enough then it can still
break, but it is less likely to break when compared to alternative <em>thin and light</em> types of laptops.</p>
<h2 id="practicality">
  <a class="heading-anchor" href="#practicality">Practicality<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>It&rsquo;s not all fun and games, though. This setup does have quite a few downsides:</p>
<ul>
<li>no way to upgrade CPU and RAM any further. What you have is what you will have to live with.</li>
<li>it&rsquo;s expensive simply due to the fact that the SSD-s get very pricy if you require high capacities, hard drives
are still more economical for storing huge amounts of data</li>
<li>the cooling issue will remain unsolveable, unless you invest time and resources into designing a custom solution</li>
</ul>
<h2 id="conclusion">
  <a class="heading-anchor" href="#conclusion">Conclusion<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p><em>Do I still want to build this?</em></p>
<p>Yes.</p>
<p><em>Can I build this?</em></p>
<p>Not unless a delivery truck full of 8TB SSD-s happens to crash in front of me.</p>
<p>Or someone sponsors me. <em>Take a hint, WD/Seagate</em>.</p>
]]></content:encoded></item></channel></rss>