<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Posts on Paolo Mainardi</title><link>https://www.paolomainardi.com/posts/</link><description>Recent content in Posts on Paolo Mainardi</description><generator>Hugo</generator><language>en</language><lastBuildDate>Sun, 11 May 2025 00:00:00 +0000</lastBuildDate><atom:link href="https://www.paolomainardi.com/posts/index.xml" rel="self" type="application/rss+xml"/><item><title>Tackling Bluetooth Mouse Lag on Linux</title><link>https://www.paolomainardi.com/posts/11-linux-bluetooth-lags/</link><pubDate>Sun, 11 May 2025 00:00:00 +0000</pubDate><guid>https://www.paolomainardi.com/posts/11-linux-bluetooth-lags/</guid><description>&lt;h2 id="introduction">
 Introduction
 &lt;a class="heading-link" href="#introduction">
 &lt;i class="fa-solid fa-link" aria-hidden="true" title="Link to heading">&lt;/i>
 &lt;span class="sr-only">Link to heading&lt;/span>
 &lt;/a>
&lt;/h2>
&lt;p>If you&amp;rsquo;re experiencing &lt;strong>annoying lag or stutter&lt;/strong> with your Bluetooth mouse or trackpad on Linux, this post might help you fix it.&lt;/p>
&lt;p>This approach works by directly adjusting &lt;strong>Bluetooth connection parameters&lt;/strong> through the &lt;code>debugfs&lt;/code> interface.&lt;/p>
&lt;p>I was seeing serious &lt;strong>stutters&lt;/strong> with my &lt;strong>MX Master 3S&lt;/strong>, especially under heavy load. It became almost unusable. I also had similar problems with an &lt;strong>Apple Magic Trackpad 2&lt;/strong>. The trackpad performs well on Linux and Sway &lt;em>(yes, even gestures)&lt;/em>, but it was stuttering a lot, which made it impossible to use.&lt;/p></description></item><item><title>Docker on MacOS is still slow?</title><link>https://www.paolomainardi.com/posts/docker-performance-macos-2025/</link><pubDate>Sat, 04 Jan 2025 00:00:00 +0000</pubDate><guid>https://www.paolomainardi.com/posts/docker-performance-macos-2025/</guid><description>&lt;div class="notice info">
 &lt;div class="notice-title">
 &lt;i class="fa-solid fa-exclamation-circle" aria-hidden="true">&lt;/i>Info
 &lt;/div>
 &lt;div class="notice-content">&lt;strong>06/01/2025&lt;/strong> Update: Many readers requested the inclusion of &lt;a href="https://orbstack.dev" class="external-link" target="_blank" rel="noopener">OrbStack&lt;/a> in the benchmarks. This update introduces OrbStack&amp;rsquo;s performance data, along with updated insights and comparisons.&lt;/div>
&lt;/div>

&lt;h2 id="tldr">
 TLDR
 &lt;a class="heading-link" href="#tldr">
 &lt;i class="fa-solid fa-link" aria-hidden="true" title="Link to heading">&lt;/i>
 &lt;span class="sr-only">Link to heading&lt;/span>
 &lt;/a>
&lt;/h2>
&lt;p>&lt;a href="https://www.paolomainardi.com/posts/docker-performance-macos/" class="external-link" target="_blank" rel="noopener">Two years after my first analysis&lt;/a> &lt;strong>of Docker performance on MacOS&lt;/strong>, things have &lt;strong>improved significantly&lt;/strong>. &lt;strong>VirtioFS&lt;/strong> is now much faster &lt;em>(bind mounts are only 3x slower instead of 5-6x)&lt;/em>, and we have new solutions in the ecosystem. &lt;strong>&lt;a href="https://github.com/lima-vm/lima" class="external-link" target="_blank" rel="noopener">Lima&lt;/a>&lt;/strong> (open-source) &lt;strong>performs well and sometimes better than Docker Desktop&lt;/strong>, while Docker&amp;rsquo;s new &lt;strong>file synchronization&lt;/strong> feature &lt;strong>offers impressive speed improvements&lt;/strong> (59% faster) but &lt;strong>requires a paid subscription&lt;/strong>. Additionally, &lt;strong>&lt;a href="https://orbstack.dev/" class="external-link" target="_blank" rel="noopener">OrbStack&lt;/a>&lt;/strong> has emerged as a strong contender, offering excellent performance with bind mounts and native operations. For the most stable performance, the &lt;strong>hybrid approach&lt;/strong> (combining bind mounts with volumes) remains the best practice. Choose your setup based on your needs:&lt;/p></description></item><item><title>Mastering Key Remapping on Linux: A Practical Guide with xremap</title><link>https://www.paolomainardi.com/posts/linux-remapping-keys-with-xremap/</link><pubDate>Sat, 28 Dec 2024 00:00:00 +0000</pubDate><guid>https://www.paolomainardi.com/posts/linux-remapping-keys-with-xremap/</guid><description>&lt;h2 id="introduction">
 Introduction
 &lt;a class="heading-link" href="#introduction">
 &lt;i class="fa-solid fa-link" aria-hidden="true" title="Link to heading">&lt;/i>
 &lt;span class="sr-only">Link to heading&lt;/span>
 &lt;/a>
&lt;/h2>
&lt;p>I have a huge collection of mechanical keyboards (&amp;gt; 15 and counting); when I started the journey, I mainly chose TKL layouts, which seemed the simplest choice for a desktop keyboard; they have all the keys I need, such as &lt;strong>Home, End, PgUp, PgDown&lt;/strong>, that at least for me are essential for my writing habits. The issue with this layout is that you have to move your hands a lot to reach some keys, and the mouse is far away from the keyboard, so I started to look for smaller keyboards, such as &lt;strong>60%, 65%, and 75% sizes&lt;/strong>.&lt;/p></description></item><item><title>docker run --init: to the rescue of zombie processes</title><link>https://www.paolomainardi.com/posts/docker-run-init/</link><pubDate>Tue, 12 Dec 2023 00:00:00 +0000</pubDate><guid>https://www.paolomainardi.com/posts/docker-run-init/</guid><description>&lt;p>This is a short post to remind myself that is always time to learn something new or to refresh memories that sit there in the back of your head, maybe wrong, maybe right. In this case, they were very wrong.&lt;/p>
&lt;p>I was building a Docker image to be used both as a development environment and as a cli tool. To simplify it, it was something like this:&lt;/p>
&lt;div class="highlight">&lt;div style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">
&lt;table style="border-spacing:0;padding:0;margin:0;border:0;">&lt;tr>&lt;td style="vertical-align:top;padding:0;margin:0;border:0;">
&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">1
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">2
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">3
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">4
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">5
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">6
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td style="vertical-align:top;padding:0;margin:0;border:0;;width:100%">
&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-dockerfile" data-lang="dockerfile">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ff79c6">FROM&lt;/span>&lt;span style="color:#f1fa8c"> node:20-lts&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ff79c6">COPY&lt;/span> entrypoint.sh /entrypoint.sh
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ff79c6">RUN&lt;/span> chmod +x /entrypoint.sh
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ff79c6">ENTRYPOINT&lt;/span> [&lt;span style="color:#f1fa8c">&amp;#34;/entrypoint.sh&amp;#34;&lt;/span>]
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>The entrypoint script was something like this:&lt;/p></description></item><item><title>Have we reached a point of no return on managing software dependencies?</title><link>https://www.paolomainardi.com/posts/point-of-no-return-on-managing-software-dependencies/</link><pubDate>Sun, 09 Jul 2023 00:00:00 +0000</pubDate><guid>https://www.paolomainardi.com/posts/point-of-no-return-on-managing-software-dependencies/</guid><description>&lt;p>&lt;strong>Software Supply Chain security&lt;/strong> issues are hitting hard the whole OSS ecosystem; &lt;a href="https://www.sonatype.com/resources/vulnerability-timeline" class="external-link" target="_blank" rel="noopener">not a day goes by without a security incident&lt;/a> going into the wild, affecting unaware users and companies with software built with the modern patterns of &lt;strong>&lt;strong>&lt;strong>&lt;strong>&lt;strong>&lt;strong>&lt;strong>&lt;strong>&lt;strong>&lt;strong>ultra composability&lt;/strong>&lt;/strong>&lt;/strong>&lt;/strong>&lt;/strong>&lt;/strong>&lt;/strong>&lt;/strong>&lt;/strong>&lt;/strong> made of a dense number of external dependencies in multiple layers.&lt;/p>
&lt;p>According to the research conducted by Sonatype in their annual &lt;a href="https://www.sonatype.com/state-of-the-software-supply-chain/open-source-supply-demand-security" class="external-link" target="_blank" rel="noopener">State of Software Supply Chain&lt;/a>, Supply Chain attacks have an average increase of &lt;strong>742% per year.&lt;/strong>&lt;/p></description></item><item><title>How I Built My Perfect Linux Workstation</title><link>https://www.paolomainardi.com/posts/linux-workstation-build/</link><pubDate>Sun, 14 May 2023 00:00:00 +0000</pubDate><guid>https://www.paolomainardi.com/posts/linux-workstation-build/</guid><description>&lt;blockquote>
&lt;p>How the actual build look like.&lt;/p>&lt;/blockquote>
&lt;h2 id="tldr">
 TL;DR
 &lt;a class="heading-link" href="#tldr">
 &lt;i class="fa-solid fa-link" aria-hidden="true" title="Link to heading">&lt;/i>
 &lt;span class="sr-only">Link to heading&lt;/span>
 &lt;/a>
&lt;/h2>
&lt;p>This is not a guide on how-to install and configure Linux, but a list of the components I used to build my personal Linux workstation, to avoid any compatibility issue and to exploit the best in terms of performance and stability. For who&amp;rsquo;s asking, I am using &lt;a href="https://archlinux.org/" class="external-link" target="_blank" rel="noopener">Arch Linux&lt;/a> as my daily driver and it is configured through the &lt;a href="https://github.com/paolomainardi/archlinux-ansible-provisioner" class="external-link" target="_blank" rel="noopener">Ansible playbook&lt;/a> i made.&lt;/p></description></item><item><title>How to make a process running in a container feel at home</title><link>https://www.paolomainardi.com/posts/container-process-feel-at-home/</link><pubDate>Fri, 24 Mar 2023 00:00:00 +0000</pubDate><guid>https://www.paolomainardi.com/posts/container-process-feel-at-home/</guid><description>&lt;p>If you know me, you know how much I love the container ecosystem (and Docker) and how breakthrough they have been in the market the last 10 years, containers changed everything.&lt;/p>
&lt;p>Even tho Docker/Podman have become an essential tool in the world of software development, as they allow developers to create, deploy and run applications in containers, sometimes a process needs more than just a container to run; maybe it assumes something from the env vars or a system socket (e.g., like X11).&lt;/p></description></item><item><title>Docker on MacOS is slow and how to fix it</title><link>https://www.paolomainardi.com/posts/docker-performance-macos/</link><pubDate>Sun, 04 Dec 2022 00:00:00 +0000</pubDate><guid>https://www.paolomainardi.com/posts/docker-performance-macos/</guid><description>&lt;div class="notice note">
 &lt;div class="notice-title">
 &lt;i class="fa-solid fa-sticky-note" aria-hidden="true">&lt;/i>Note
 &lt;/div>
 &lt;div class="notice-content">&lt;strong>05/01/2024&lt;/strong>: Hello there, you can find an update version of this &lt;a href="https://www.paolomainardi.com/posts/docker-performance-macos-2025" >article here&lt;/a>, with the latest findings, improvements and new tools.&lt;/div>
&lt;/div>

&lt;p>Thanks to the &lt;a href="https://openai.com/dall-e-2/" class="external-link" target="_blank" rel="noopener">&lt;strong>DALL·E 2&lt;/strong>&lt;/a>, we finally have a very nice graphic representation of
&lt;strong>the feelings&lt;/strong> of a Docker container inside a macOS environment, I will try with this article to make this poor container safe to the coast.&lt;/p>
&lt;h2 id="tldr">
 TL;DR
 &lt;a class="heading-link" href="#tldr">
 &lt;i class="fa-solid fa-link" aria-hidden="true" title="Link to heading">&lt;/i>
 &lt;span class="sr-only">Link to heading&lt;/span>
 &lt;/a>
&lt;/h2>
&lt;p>At the time of writing, the only viable option to have a &lt;em>decent performance&lt;/em>
and a &lt;em>good DX&lt;/em> are:&lt;/p></description></item><item><title>How to open apps with keyboard shortcuts on macOS with skhd</title><link>https://www.paolomainardi.com/posts/macos-apps-shortcuts-skhd/</link><pubDate>Sun, 11 Sep 2022 00:00:00 +0000</pubDate><guid>https://www.paolomainardi.com/posts/macos-apps-shortcuts-skhd/</guid><description>&lt;p>What I&amp;rsquo;ve always loved about &lt;strong>Linux&lt;/strong> is its &lt;strong>customizability&lt;/strong> and the &lt;strong>freedom&lt;/strong> you have to configure your &lt;a href="https://thatnixguy.github.io/posts/ricing/#:~:text=The%20term%20%27rice%27%20is%20used,system%20becomes%20much%20more%20involved." class="external-link" target="_blank" rel="noopener">rice&lt;/a> exactly you like it, especially when you pass the line of &lt;strong>D&lt;/strong>esktop &lt;strong>E&lt;/strong>nvironments to embrace more straightforward environments like &lt;a href="https://en.wikipedia.org/wiki/Tiling_window_manager" class="external-link" target="_blank" rel="noopener">tiling manager&lt;/a>; this is where &lt;a href="https://www.reddit.com/r/unixporn/" class="external-link" target="_blank" rel="noopener">Linux on the desktop shines&lt;/a>.&lt;/p>
&lt;p>&lt;strong>Tiling managers&lt;/strong> allow &lt;strong>arranging windows&lt;/strong> in non-overlapping &lt;strong>frames&lt;/strong> and controlling any aspect using the &lt;strong>keyboard&lt;/strong>, including opening, closing, moving, and resizing.&lt;/p>
&lt;p>Like the most known desktop environments (including &lt;strong>macOS&lt;/strong>), they also have the concept of &lt;strong>workspaces&lt;/strong>, where you can organize your windows in a way you feel more productive.&lt;/p></description></item><item><title>Hello world, and deep dive into procrastination</title><link>https://www.paolomainardi.com/posts/hello-world/</link><pubDate>Sat, 03 Sep 2022 00:00:00 +0000</pubDate><guid>https://www.paolomainardi.com/posts/hello-world/</guid><description>&lt;figure>&lt;img src="https://www.paolomainardi.com/images/posts/hello-world/procrastination.webp">&lt;figcaption>
 &lt;h4>Procrastination&lt;/h4>
 &lt;/figcaption>
&lt;/figure>

&lt;p>After years of &lt;strong>procrastination,&lt;/strong> I&amp;rsquo;ve finally decided to give a chance to this simple space (based on &lt;a href="https://www.gohugo.io" class="external-link" target="_blank" rel="noopener">Hugo&lt;/a>), and just focus on writing contents.&lt;/p>
&lt;p>I will try to force the &lt;strong>nerd side of me&lt;/strong> not to waste time on &lt;strong>techy stuff&lt;/strong>, which is &lt;strong>most of the time&lt;/strong> the way to &lt;strong>mark the bitter destiny&lt;/strong> of personal &lt;strong>side projects&lt;/strong>.&lt;/p>
&lt;figure>&lt;img src="https://www.paolomainardi.com/images/posts/hello-world/side-projects.webp">&lt;figcaption>
 &lt;h4>Side projects&lt;/h4>
 &lt;/figcaption>
&lt;/figure>

&lt;p>&lt;strong>Writing is hard&lt;/strong> - it requires &lt;em>focus, skills, and time&lt;/em>; ideas are unshaped, and training and patience are needed to transform them into understandable and compelling words.&lt;/p></description></item></channel></rss>