<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: A. Ababa</title>
    <description>The latest articles on DEV Community by A. Ababa (@better_call_sriz).</description>
    <link>https://dev.to/better_call_sriz</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1074047%2Ffa2a9e98-39e8-40e2-9213-401a370a998d.jpg</url>
      <title>DEV Community: A. Ababa</title>
      <link>https://dev.to/better_call_sriz</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/better_call_sriz"/>
    <language>en</language>
    <item>
      <title>Fix: Linux PC Wakes Up Instantly After You Suspend It</title>
      <dc:creator>A. Ababa</dc:creator>
      <pubDate>Thu, 13 Aug 2026 05:43:49 +0000</pubDate>
      <link>https://dev.to/better_call_sriz/fix-linux-pc-wakes-up-instantly-after-you-suspend-it-30bp</link>
      <guid>https://dev.to/better_call_sriz/fix-linux-pc-wakes-up-instantly-after-you-suspend-it-30bp</guid>
      <description>&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;You hit suspend. Screen goes black. A second later, it's back on, showing the lock screen. Every time.&lt;/p&gt;

&lt;p&gt;This isn't random, and it isn't just your machine being weird. Something in your hardware is sending a wake signal the moment the system tries to sleep, so the kernel just does what it's told.&lt;/p&gt;

&lt;h2&gt;
  
  
  This Is a Known, Recurring Bug
&lt;/h2&gt;

&lt;p&gt;This exact issue has been reported for years across Arch, Ubuntu, Fedora, Linux Mint, and Unraid, showing up on laptops, desktops, and even AMD B550 and X670E motherboards. It's been discussed on the Arch forums, Ubuntu's bug tracker, Linux Mint forums, GitHub issues, and even the kernel.org bug tracker itself. An AMD kernel engineer has confirmed it's a long-standing hardware quirk rather than a new bug, and it just started showing up more clearly in logs after kernel 5.17.&lt;/p&gt;

&lt;p&gt;So if you're stuck on this at 1am, you're not the only one, and it's fixable.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Actually Causing It
&lt;/h2&gt;

&lt;p&gt;Two components are responsible for almost every case:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Your NVMe SSD's PCIe port&lt;/strong&gt;&lt;br&gt;
Your NVMe drive sits on a PCIe root port that has "wake-up" enabled by default. Sometimes that port sends a wake signal, called a PME, and it gets stuck "on" instead of clearing properly. The next time you suspend, the kernel sees that stuck signal and immediately wakes the system back up.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Your USB controller (xHCI)&lt;/strong&gt;&lt;br&gt;
Check your logs, and if you see something like this right after a failed suspend, this is your culprit:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;xhci_hcd 0000:02:00.0: xHC error in resume, USBSTS 0x401, Reinit
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That means your USB controller couldn't cleanly suspend, so it had to restart itself. This is common with wireless mouse and keyboard dongles or USB touchscreens.&lt;/p&gt;

&lt;p&gt;Both problems look identical from the outside, since either one causes the same pattern: suspend, then instant wake, every time.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 1: Confirm What's Happening
&lt;/h2&gt;

&lt;p&gt;Before fixing anything, check what's actually going on.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Check if it's really an instant wake:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;journalctl &lt;span class="nt"&gt;--since&lt;/span&gt; &lt;span class="s2"&gt;"10 minutes ago"&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; &lt;span class="s2"&gt;"PM:|resume|suspend"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Look for a suspend entry immediately followed by resume lines, within a second or two of each other. If you also see &lt;code&gt;xhci_hcd&lt;/code&gt; and &lt;code&gt;USBSTS&lt;/code&gt; mentioned, that's your USB-side clue.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Check which PCI devices can wake your system:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-l&lt;/span&gt; enabled /sys/bus/pci/devices/&lt;span class="k"&gt;*&lt;/span&gt;/power/wakeup
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This usually points to one PCIe bridge, and that's your suspect.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Find which PCIe port your NVMe drive sits on:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;lspci &lt;span class="nt"&gt;-tv&lt;/span&gt; | &lt;span class="nb"&gt;head&lt;/span&gt; &lt;span class="nt"&gt;-30&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Look for your SSD in the tree, then note the address just above it, something like &lt;code&gt;00:01.1&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Confirm that port has actually fired a wake signal:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; /sys/bus/pci/devices/0000:00:01.1/power/wakeup_count
&lt;span class="nb"&gt;cat&lt;/span&gt; /sys/bus/pci/devices/0000:00:01.1/power/wakeup_last_time_ms
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A number above zero means it's really happened, not just a theory.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Also check ACPI-level wake sources:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; /proc/acpi/wakeup
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Look for anything marked &lt;code&gt;*enabled&lt;/code&gt;, especially entries starting with &lt;code&gt;XHC&lt;/code&gt; (USB controller) or &lt;code&gt;GPP&lt;/code&gt; (PCIe root port). Keep in mind this list won't always match the sysfs check above, so treat the sysfs check as the real answer for the NVMe issue, and this list as the real answer for the USB issue.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 2: Fix It
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Fix A: a udev rule that runs at boot
&lt;/h3&gt;

&lt;p&gt;Replace &lt;code&gt;0000:00:01.1&lt;/code&gt; with the address you found above:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s1"&gt;'ACTION=="add", SUBSYSTEM=="pci", KERNEL=="0000:00:01.1", ATTR{power/wakeup}="disabled"'&lt;/span&gt; | &lt;span class="nb"&gt;sudo tee&lt;/span&gt; /etc/udev/rules.d/99-disable-nvme-pme-wake.rules

&lt;span class="nb"&gt;sudo &lt;/span&gt;udevadm control &lt;span class="nt"&gt;--reload-rules&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;udevadm trigger &lt;span class="nt"&gt;--action&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;add &lt;span class="nt"&gt;--sysname-match&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;0000:00:01.1
&lt;span class="nb"&gt;sudo &lt;/span&gt;udevadm settle

&lt;span class="nb"&gt;cat&lt;/span&gt; /sys/bus/pci/devices/0000:00:01.1/power/wakeup   &lt;span class="c"&gt;# should now say "disabled"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Fix B: a systemd service that runs before every suspend
&lt;/h3&gt;

&lt;p&gt;A udev rule only applies once at boot, so if anything re-enables the wake flag later, whether that's a driver, a power tool, or a kernel update, the udev rule won't catch it again until your next reboot. This service re-applies the fix every single time you suspend, so it's the one that actually closes the loop:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo tee&lt;/span&gt; /etc/systemd/system/disable-nvme-wake.service &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="no"&gt;EOF&lt;/span&gt;&lt;span class="sh"&gt;'
[Unit]
Description=Disable NVMe PCIe PME wake before suspend
Before=suspend.target systemd-suspend.service

[Service]
Type=oneshot
ExecStart=/bin/sh -c 'echo disabled &amp;gt; /sys/bus/pci/devices/0000:00:01.1/power/wakeup'

[Install]
WantedBy=suspend.target
&lt;/span&gt;&lt;span class="no"&gt;EOF

&lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl &lt;span class="nb"&gt;enable&lt;/span&gt; &lt;span class="nt"&gt;--now&lt;/span&gt; disable-nvme-wake
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;If it's a USB controller&lt;/strong&gt; rather than a PCIe bridge, use the same service, but point it at the USB entry instead:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;ExecStart&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/bin/sh &lt;span class="nt"&gt;-c&lt;/span&gt; &lt;span class="s1"&gt;'echo XHC0 &amp;gt; /proc/acpi/wakeup'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Other Things Worth Trying First
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Check your BIOS/UEFI.&lt;/strong&gt; Look for "Wake on PCI-E," "PCIe device wake," or "Wake on PME." Turning this off in firmware fixes it before Linux even gets involved, and it survives reinstalls. Be careful with a setting called "ErP Ready," since it can also affect suspend, sometimes for better and sometimes for worse.&lt;/p&gt;




&lt;h2&gt;
  
  
  How to Actually Test It
&lt;/h2&gt;

&lt;p&gt;One successful suspend doesn't prove anything, so test it properly:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Reboot, then check the flag is already disabled with no manual steps.&lt;/li&gt;
&lt;li&gt;Suspend once, and confirm it actually stays asleep for a couple of minutes.&lt;/li&gt;
&lt;li&gt;Wake it, then suspend again immediately. This second suspend is the real test, since it tells you whether something re-armed the wake flag after the first resume.
If both rounds stay asleep, you're done.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Undo It (If You Ever Need To)
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo rm&lt;/span&gt; /etc/udev/rules.d/99-disable-nvme-pme-wake.rules
&lt;span class="nb"&gt;sudo &lt;/span&gt;udevadm control &lt;span class="nt"&gt;--reload-rules&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl disable &lt;span class="nt"&gt;--now&lt;/span&gt; disable-nvme-wake
&lt;span class="nb"&gt;sudo rm&lt;/span&gt; /etc/systemd/system/disable-nvme-wake.service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Quick Reference
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Symptom&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Suspend, then instant wake, every time&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Cause&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;A stuck PCIe wake signal, usually from your NVMe's port, or a USB controller failing to suspend cleanly&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Find it&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;grep -l enabled /sys/bus/pci/devices/*/power/wakeup&lt;/code&gt;, &lt;code&gt;lspci -tv&lt;/code&gt;, &lt;code&gt;cat /proc/acpi/wakeup&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Fix it&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;A udev rule paired with a systemd service, both disabling wake-up on the port&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Test it&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Reboot, then suspend, then wake, then suspend again&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;This has been independently reported on AMD B550 and X670E boards, NVMe laptops, and USB touchscreen all-in-ones, across Arch, Ubuntu, Mint, and more. It's a well-known issue with a well-known fix.&lt;/p&gt;

</description>
      <category>linux</category>
      <category>opensource</category>
      <category>amd</category>
      <category>kernel</category>
    </item>
    <item>
      <title>My Journey With Linux</title>
      <dc:creator>A. Ababa</dc:creator>
      <pubDate>Mon, 10 Aug 2026 05:34:39 +0000</pubDate>
      <link>https://dev.to/better_call_sriz/my-journey-with-linux-58ga</link>
      <guid>https://dev.to/better_call_sriz/my-journey-with-linux-58ga</guid>
      <description>&lt;p&gt;Looking back, my path to Linux was less of a conscious decision and more of a slow drift, one small moment leading to the next, until one day I realised Windows isn't really my gig anymore. At least it hasn't been since Windows 7.&lt;/p&gt;

&lt;p&gt;So, this is my story on how I ended up using Linux.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Disc I Didn't Install
&lt;/h2&gt;

&lt;p&gt;I was a teenager when I first saw a disc of Ubuntu at one of my school teacher's places. I asked him what it was, and he said it was an operating system, like Windows is.&lt;/p&gt;

&lt;p&gt;Didn't really understand anything, but the name stuck with me. I came home and searched it up on the internet with my Android tablet (tablets were popular back then) using 3G internet, but got even more confused.&lt;/p&gt;

&lt;p&gt;That was the day, however, I first got introduced to the name Linux.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F70py4e0fxbio8tlt7jdc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F70py4e0fxbio8tlt7jdc.png" alt=" " width="738" height="258"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The First Go
&lt;/h2&gt;

&lt;p&gt;It took years before curiosity turned into action. Around six to seven years ago, I finally decided to try Linux out for real, and I installed Zorin OS.&lt;/p&gt;

&lt;p&gt;It made sense as a starting point, built specifically to feel familiar to Windows users making the jump. It was genuinely great. Clean, functional, easy to use.&lt;/p&gt;

&lt;p&gt;But it didn't strike a chord with me yet, mostly because I only used my PC at the time for playing cracked games (don't call the police on me, I know you're guilty as well), and gaming wasn't really a thing on Linux at the time. To be more modest, it wasn't a practical choice for gaming, to say the least.&lt;/p&gt;

&lt;p&gt;I used Zorin, appreciated it, and moved back to Windows. Sometimes the timing just isn't right.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where It Actually Proved Itself
&lt;/h2&gt;

&lt;p&gt;The moment Linux earned my respect had nothing to do with me.&lt;/p&gt;

&lt;p&gt;It was my sister's laptop, an old, underpowered machine that struggled to run Windows 10 (which it shipped with out of the box) without lagging on the simplest tasks. She mostly used it for light browsing and watching videos, so I installed Zorin on it, added VLC and Chrome, and that's it.&lt;/p&gt;

&lt;p&gt;A laptop that used to choke on Windows was suddenly usable, actually more than usable, again. It was snappy and it got the job done. Funny thing is, she didn't even notice a difference in usability.&lt;/p&gt;

&lt;p&gt;This was the moment Linux truly made its place in my heart.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcul3p9cx887grjo627d8.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcul3p9cx887grjo627d8.webp" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Living Two Lives
&lt;/h2&gt;

&lt;p&gt;Not long after, I set up Zorin alongside Windows 11 in a dual boot on my own PC. At first, it was just something I'd boot into out of curiosity every once in a while.&lt;/p&gt;

&lt;p&gt;But slowly, without ever really deciding to, I noticed I was reaching for the Zorin side more and more. My PC wasn't powerful enough for serious gaming at the time anyway, so I was still playing the occasional casual title, strictly on Windows.&lt;/p&gt;

&lt;p&gt;Gaming on Linux wasn't even on my radar yet. Linux was quietly becoming the OS for everything else, while Windows stayed the place I went to play.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Reset
&lt;/h2&gt;

&lt;p&gt;Then life got in the way, as it tends to (by now I know, that's just how life is).&lt;/p&gt;

&lt;p&gt;I got busy with things that didn't really need my PC, took what was basically a sabbatical from casual gaming, and at one point barely touched the machine at all.&lt;/p&gt;

&lt;p&gt;Then my CPU broke. I brought it home from servicing and found my primary SSD wiped clean, freshly loaded with Windows 11.&lt;/p&gt;

&lt;p&gt;Since I wasn't using the PC much anyway, I didn't even bother dual booting Linux back onto it. For a while, that chapter just quietly closed, without any real goodbye.&lt;/p&gt;

&lt;h2&gt;
  
  
  Round Two, For a Familiar Reason
&lt;/h2&gt;

&lt;p&gt;They say history repeats itself. Apparently, so does my history with Linux.&lt;/p&gt;

&lt;p&gt;My wife's laptop was showing its age and struggling under the heavy load (and bloat) of Windows 11. So I did what I did with my sister's laptop years prior: installing Linux.&lt;/p&gt;

&lt;p&gt;And once again, Linux did its magic and replenished an almost dying device. Apps opened and closed faster than ever, the barely audible speakers on the laptop became audible again (thanks Pipewire), and even the battery life was noticeably better. The OS was Arch Linux (BTW) and the desktop environment was KDE Plasma with this one.&lt;/p&gt;

&lt;p&gt;My wife was happy, so I was happy, and life was happy.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0s8kdjdntl3lyvk58q8i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0s8kdjdntl3lyvk58q8i.png" alt=" " width="600" height="199"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Down the Ricing Rabbit Hole
&lt;/h2&gt;

&lt;p&gt;Around the same time, a friend who had been deep into Linux for a while got me interested in something new: window managers, tiling windows, and the never ending spiral of Linux ricing.&lt;/p&gt;

&lt;p&gt;That sent me straight down the rabbit hole of customising every graphical component of your desktop until it truly became your own. I used my wife's laptop as my testing ground, still running Arch through the whole phase (hands down the best distro for doing whatever-you-want stuff).&lt;/p&gt;

&lt;p&gt;I broke that installation more times than I'd like to admit, re-installing and re-configuring over and over. But every time I rebuilt it, I understood a little more about how the system actually worked underneath the surface.&lt;/p&gt;

&lt;p&gt;That understanding is what turned Linux from something I merely used into something I genuinely enjoyed using.&lt;/p&gt;

&lt;p&gt;By the end of this stretch, I wasn't dual booting out of necessity anymore, and I wasn't fixing someone else's slow laptop. I was choosing Linux because I wanted to be there.&lt;/p&gt;

&lt;p&gt;Gaming was still firmly a Windows thing in my mind. That was about to change too, but not just yet.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxbp5xa4hcr692d425agd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxbp5xa4hcr692d425agd.png" alt=" " width="800" height="276"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  All That Shines Ain't No Gold
&lt;/h2&gt;

&lt;p&gt;The ricing phase taught me a lot about Linux, but it also taught me something about myself. As you mature, stability, though it may be boring, matters more than the latest and greatest.&lt;/p&gt;

&lt;p&gt;Constantly rebuilding a broken Arch install is fun for a while, and I don't regret a single hour of it (or maybe a few, but whatever). But eventually I wanted a system I could just use and rely on.&lt;/p&gt;

&lt;p&gt;A system I knew wouldn't break on me while I'm focusing on my work, doing important stuff that earns the bread. A machine with a heart, one that I know will open up my workspace without any hiccups, every single time I press the power button.&lt;/p&gt;

&lt;p&gt;That's what led me to settle on Fedora, specifically the KDE Plasma Spin.&lt;/p&gt;

&lt;p&gt;I know what some of you are already thinking. Fedora is still pretty bleeding edge in the grand scheme of distros. That's fair.&lt;/p&gt;

&lt;p&gt;But it's backed by a large, active community and a genuinely massive corporation behind the scenes. I'll be upfront about it, I don't fully trust corporations either.&lt;/p&gt;

&lt;p&gt;But in the world of open source, having that kind of infrastructure and a dedicated team keeping things running matters more than you realise. It gives me confidence and a sense of credibility in what I choose to run every single day, something a smaller, less resourced project just cannot match.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0zw0yq246kci3cn7s232.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0zw0yq246kci3cn7s232.webp" alt=" " width="800" height="225"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The KDE of It All
&lt;/h2&gt;

&lt;p&gt;KDE itself has always been my desktop environment of choice, over GNOME and everything else I've tried along the way.&lt;/p&gt;

&lt;p&gt;I don't love every single thing about it, no desktop environment is perfect. But there's so much I genuinely appreciate about how it works and how much control it hands back to you.&lt;/p&gt;

&lt;p&gt;That's honestly a whole article on its own, and I'll get to it eventually.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bringing It Into the Workplace
&lt;/h2&gt;

&lt;p&gt;When I started my new job, the very first thing I did on my office PC was replicate the exact Fedora KDE setup I'd already built on my wife's laptop. No hesitation, no second guessing which OS to pick.&lt;/p&gt;

&lt;p&gt;For the kind of work I do day-to-day, document processing, web browsing, communication, and everything in between, Fedora has been a stable, reliable, and genuinely functional tool. That's also a topic I'll get into properly in a dedicated article some day in the future.&lt;/p&gt;

&lt;p&gt;By now, Linux wasn't just something I used at home as a hobby. It had become the operating system I trusted for actual work, every single day.&lt;/p&gt;

&lt;p&gt;Gaming was still the last piece of the puzzle to put the whole picture together. And in 2026, thanks to Valve, Proton, and all the hobbyists and professionals behind them, gaming on Linux ain't so puzzling no more as it was a few years ago.&lt;/p&gt;

&lt;h2&gt;
  
  
  Finally, the Gaming Machine
&lt;/h2&gt;

&lt;p&gt;Today, I'm running Fedora Kinoite (it's the atomic desktop version of Fedora KDE) on a new PC I built specifically for gaming and development work. As it genuinely deserves its own space, I'll go deep into what atomic desktops are, and why I made the switch, in the article I'll write about my choice of distro, Fedora.&lt;/p&gt;

&lt;p&gt;Throughout this whole journey, LLMs like Gemini, Claude, DeepSeek, and ChatGPT were a constant part of my troubleshooting process, and for the most part, they worked.&lt;/p&gt;

&lt;p&gt;Linux troubleshooting often involves spending substantial time in the terminal (if the issue is substantial as well), and in the world of intuitive GUIs, it takes a while to get used to. You must accept the terminal for what it is, work through it, and let yourself learn its way from the mistakes you'll inevitably make.&lt;/p&gt;

&lt;p&gt;You can go nuts with Linux, if you want, and don't be afraid to do so either. You can also have a rock-solid daily driver on Linux, if that's what you want instead. The choice is yours.&lt;/p&gt;

&lt;p&gt;And having that choice is what I think is the most beautiful thing about Linux and the open source world.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fv0g5m2f3f5wucc6k9sy1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fv0g5m2f3f5wucc6k9sy1.png" alt=" " width="800" height="203"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Where That Leaves Me
&lt;/h2&gt;

&lt;p&gt;Linux has matured to a point where it can genuinely serve as a reliable daily driver, even for people who have zero interest in tinkering under the hood.&lt;/p&gt;

&lt;p&gt;As I'm using an immutable distro, I barely touch the terminal. Maybe for installing a few apps that I need for some particular workflow.&lt;/p&gt;

&lt;p&gt;For example, for typing in Bangla, I needed an input method (OpenBangla Keyboard, to be specific), and there isn't really a GUI way of getting it on my system. However, in the age of generative AI, it was as easy as asking Claude what I wanted and pasting a few commands into the terminal. A couple of minutes later, boom, I was typing in Bangla.&lt;/p&gt;

&lt;p&gt;That kind of usability and reliability has largely belonged to macOS and Windows for decades. Linux has finally caught up, and in more ways than one, I'd say it's overtaken them.&lt;/p&gt;

&lt;p&gt;With the right tools and the right choices, Linux can be truly yours, a piece of software you actually admire and enjoy using every day.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A tool you can trust and rely on. A tool that doesn't spy on you, a tool that respects your decisions, and a tool that genuinely does what it says on the box.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  The Toolkit That Made It Stick
&lt;/h2&gt;

&lt;p&gt;Finally, to end this article, here are a few apps I've daily driven since day one of going all in on Linux.&lt;/p&gt;

&lt;p&gt;And not just for me. Below is a list of apps that I genuinely believe will help everyone switching to Linux feel right at home:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;KDE Connect: Keeps your phone and PC connected at all times. It syncs notifications and clipboard, and you can even browse your phone's internal storage from your desktop.&lt;/li&gt;
&lt;li&gt;Flatseal: Simple and intuitive. Flatpak apps run sandboxed in a containerized environment for security reasons, which comes with some restrictions by design. Flatseal gives you an easy way to manage those permissions without a fight. I'll write about Flatpaks and Linux app packaging in a later article.&lt;/li&gt;
&lt;li&gt;Okular: A simple yet fully featured PDF viewer.&lt;/li&gt;
&lt;li&gt;LocalSend: Transfers files instantly to any device on the same WiFi network. Works flawlessly across everything I own, and it's cross platform too.&lt;/li&gt;
&lt;li&gt;OnlyOffice: I primarily live in Google Workspace for work, but for opening files locally and getting the best compatibility with Microsoft Office formats, which are still dominant everywhere, OnlyOffice is the way to go. The UI is clean, familiar, and intuitive.&lt;/li&gt;
&lt;li&gt;qBittorrent: My default torrent client since my Windows days. It just works, and that's really all I need from it.&lt;/li&gt;
&lt;li&gt;Thunderbird: My email client. I don't really need it (I mostly use Gmail on my browser), but it's there and it's solid.&lt;/li&gt;
&lt;li&gt;VLC: The undisputed GOAT of media players. The automatic subtitle loading feature they recently added through a plugin is genuinely all it took to fully sell me on it, all over again.&lt;/li&gt;
&lt;li&gt;Web App Hub: You can technically turn any webpage into a web app straight from Chrome, but you can't really blend it into your system with native window decorations. This app solves that. It also isolates each web app so the system doesn't lump them all together as just another Chrome window, so that's another plus.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's the journey then: from a disc I never even got around to installing, all the way to a Kinoite gaming rig I now trust completely.&lt;/p&gt;

&lt;p&gt;The gaming part itself, Proton, Steam Play, and everything I had to figure out along the way, deserves its own telling. That one's coming next.&lt;/p&gt;

</description>
      <category>linux</category>
      <category>archlinux</category>
      <category>fedora</category>
      <category>ubuntu</category>
    </item>
    <item>
      <title>RAMageddon: How the AI Gold Rush Is Emptying Your Wallet, One Gigabyte at a Time</title>
      <dc:creator>A. Ababa</dc:creator>
      <pubDate>Tue, 21 Jul 2026 07:41:20 +0000</pubDate>
      <link>https://dev.to/better_call_sriz/ramageddon-how-the-ai-gold-rush-is-emptying-your-wallet-one-gigabyte-at-a-time-5h9o</link>
      <guid>https://dev.to/better_call_sriz/ramageddon-how-the-ai-gold-rush-is-emptying-your-wallet-one-gigabyte-at-a-time-5h9o</guid>
      <description>&lt;p&gt;If you've priced a new laptop, phone, or gaming console this summer, you've probably felt it: the same product now costs hundreds of dollars more than it did a year ago. This isn't garden-variety inflation. It's the fallout of a silent war for a component that most of us never think about: memory chips.&lt;/p&gt;

&lt;p&gt;The industry has started calling it "RAMageddon." It's not hype. It's now backed by a federal lawsuit.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Bill Has Arrived
&lt;/h2&gt;

&lt;p&gt;On June 25, 2026, Apple and Microsoft both announced sweeping price hikes across their most popular products on the very same day, and both cited the same cause: an AI-driven global memory shortage.&lt;/p&gt;

&lt;p&gt;📈 Apple: MacBook Air jumped from $1,099 to $1,299. The entry MacBook Pro went from $1,699 to $1,999. iPad Air rose from $599 to $749, and iPad Pro from $999 to $1,199, increases of up to $300 in a single announcement. Apple said it had been absorbing rising component costs for months and had simply run out of room. Tim Cook, in a Wall Street Journal interview, described the memory crunch as a "hundred-year flood." Analysts now expect the iPhone 18 to carry a $150 to $200 premium when it launches in September, even though phones were spared this round.&lt;/p&gt;

&lt;p&gt;🎮 Microsoft: Hours later, Microsoft raised Xbox console prices by $100 to $150 and discontinued its highest-storage configuration entirely. The company said console memory and storage costs have already risen more than 150%, and it expects another doubling by fall 2027.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fb149t3gwnbbb87qni3m5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fb149t3gwnbbb87qni3m5.png" alt="Same products, same day." width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This isn't limited to two giants. Valve just launched its new Steam Machine at $1,919 for the top configuration, pricier than originally planned, the company said, specifically because of the RAM shortage. IDC now projects the worst annual smartphone shipment decline on record (nearly 14%) and an 11%+ drop in PC shipments for 2026, driven almost entirely by memory-driven price increases pricing out everyday buyers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Whos Actually Holding the Supply
&lt;/h2&gt;

&lt;p&gt;Three companies, Samsung, SK Hynix, and Micron, control roughly &lt;strong&gt;90%&lt;/strong&gt; of the world's DRAM supply. Building a new fab costs &lt;strong&gt;$15 to 20 billion&lt;/strong&gt; and takes years, so that concentration isn't changing anytime soon.&lt;/p&gt;

&lt;p&gt;Here's the mechanism driving the squeeze: manufacturing one gigabyte of High-Bandwidth Memory (HBM), the specialized chip that AI accelerators need, consumes roughly &lt;strong&gt;3-times&lt;/strong&gt; the wafer capacity of standard DDR5 used in your laptop. Every wafer redirected to HBM is a wafer pulled straight out of the consumer supply chain.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6t5fp5q5337c0me5bj8r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6t5fp5q5337c0me5bj8r.png" alt="The math behind the shortage." width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And the redirection has been dramatic:&lt;/p&gt;

&lt;p&gt;SK Hynix has reportedly locked in &lt;strong&gt;60 to 70%&lt;/strong&gt; of its next-generation HBM4 capacity for Nvidia alone, tied to Nvidia's upcoming "Vera Rubin" AI platform. Nvidia has reportedly prepaid SK Hynix and Micron &lt;strong&gt;$540 to 770 million&lt;/strong&gt; each just to secure the allocation. Preliminary agreements for OpenAI's &lt;strong&gt;$500 billion&lt;/strong&gt; &lt;em&gt;Stargate project&lt;/em&gt; point to demand of up to &lt;strong&gt;900,000 DRAM wafers per month&lt;/strong&gt;, which could represent as much as &lt;strong&gt;40%&lt;/strong&gt; of total global DRAM output.&lt;/p&gt;

&lt;p&gt;Micron formally exited the consumer DRAM business in December 2025.&lt;br&gt;
The payoff for manufacturers has been staggering, since SK Hynix's Q1 2026 operating profit rose &lt;strong&gt;405% year-over-yea&lt;/strong&gt;r to a &lt;strong&gt;72%&lt;/strong&gt; operating margin, which was reportedly higher than Nvidia's. Micron posted record quarterly revenue of &lt;strong&gt;$41.5 billion&lt;/strong&gt; with an &lt;strong&gt;85%&lt;/strong&gt; gross margin, and it is guiding toward &lt;strong&gt;$50 billion&lt;/strong&gt; next quarter.&lt;/p&gt;

&lt;p&gt;Meanwhile, TrendForce data shows conventional DRAM contract prices jumped &lt;strong&gt;80 to 98%&lt;/strong&gt; in Q1 2026 alone, with further double-digit increases still forecast through the rest of the year.&lt;/p&gt;

&lt;h2&gt;
  
  
  Now, It's in Court
&lt;/h2&gt;

&lt;p&gt;This is where it stops being just an industry story. On June 25, 2026, 17 plaintiffs (14 consumers and three small PC-building businesses) filed a federal antitrust class action against Samsung, SK Hynix, and Micron in the Northern District of California &lt;em&gt;(Garciaguirre v. Samsung Electronics)&lt;/em&gt;. The complaint alleges the three companies used the shift to AI-focused HBM production as cover to deliberately choke output of legacy DDR3 and DDR4 memory, driving conventional DRAM prices up by roughly &lt;strong&gt;700% over four years&lt;/strong&gt;. It even points to Apple's own price hikes as evidence of the downstream damage. The suit seeks an injunction and treble damages.&lt;/p&gt;

&lt;p&gt;It's worth being precise here, since these are allegations, not findings. Micron has publicly denied wrongdoing, saying it competes lawfully and vigorously. History cuts both ways for the plaintiffs, too. Samsung and SK Hynix's predecessor did plead guilty to real, criminal DRAM price-fixing in the mid-2000s, resulting in over &lt;strong&gt;$700 million&lt;/strong&gt; in combined fines and prison time for several executives. But a nearly identical class action filed in 2018, which alleged collusion during the 2016 to 2017 DRAM price spike, was dismissed in 2020 and upheld on appeal in 2022. The courts ruled that three companies independently cutting output in a concentrated market, a practice antitrust law calls "conscious parallelism," isn't automatically illegal. Proving an actual agreement, rather than three firms rationally chasing the same profits, is a much higher legal bar, and that's precisely the question this new case will have to answer.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsrsb402vetbmmp7qadhq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsrsb402vetbmmp7qadhq.png" alt="This isn't the industry's first price-fixing accusation." width="800" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  A Familiar Pattern, With a Twist
&lt;/h2&gt;

&lt;p&gt;For anyone who's watched commodity markets in South Asia, the shape of this story feels familiar. Cold storage syndicates hoarding potatoes and onions during peak harvest, releasing them gradually at inflated prices while blaming weather or crop failure, is a well-worn playbook for engineering artificial scarcity.&lt;/p&gt;

&lt;p&gt;The DRAM story rhymes with that pattern: a concentrated handful of players, control of the bottleneck, advance deals that lock up supply years ahead, and a convenient external narrative ("it's just AI demand") to explain the squeeze. But there's a crucial difference, and it's the one a US federal court now has to untangle: unlike a black-market syndicate, none of what Samsung, SK Hynix, and Micron have done is obviously illegal. Chasing the most profitable product a factory can make is, on its face, ordinary capitalism. Whether it crosses into an unlawful agreement to hurt consumers is exactly what Garciaguirre v. Samsung will need to prove.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Real Question
&lt;/h2&gt;

&lt;p&gt;Is this simply supply and demand doing what markets do when a once-in-a-generation technology shock hits a genuinely scarce resource? Or is a market this concentrated, with three players controlling 90% of global supply and multibillion-dollar barriers to entry, structurally incapable of behaving competitively once the incentives align?&lt;/p&gt;

&lt;p&gt;Either way, the person paying the "AI tax" isn't Nvidia, OpenAI, or the hyperscalers. It's the student buying their first laptop, the small business upgrading office PCs, and the family replacing a broken Xbox.&lt;/p&gt;

&lt;p&gt;What do you think: is this free market at work, or a supply chain concentrated enough that "independent" decisions start looking a lot like coordination?&lt;/p&gt;




&lt;p&gt;Sources: Tom's Hardware, CNBC, CBS News, Al Jazeera, Reuters/TrendForce, Fortune, Yahoo Finance, Notebookcheck, and court filings in Garciaguirre v. Samsung Electronics (N.D. Cal., No. 5:26-cv-06345).&lt;/p&gt;

</description>
      <category>ai</category>
      <category>news</category>
      <category>discuss</category>
      <category>chatgpt</category>
    </item>
    <item>
      <title>Porting a Pygame Game from Arch (BTW) to Android (By losing my mind so you don’t have to)</title>
      <dc:creator>A. Ababa</dc:creator>
      <pubDate>Tue, 20 Jan 2026 21:32:31 +0000</pubDate>
      <link>https://dev.to/better_call_sriz/porting-a-pygame-game-from-arch-btw-to-android-by-losing-my-mind-so-you-dont-have-to-19d4</link>
      <guid>https://dev.to/better_call_sriz/porting-a-pygame-game-from-arch-btw-to-android-by-losing-my-mind-so-you-dont-have-to-19d4</guid>
      <description>&lt;h3&gt;
  
  
  &lt;strong&gt;Introduction&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;If you have ever tried to run &lt;code&gt;buildozer android debug&lt;/code&gt; on a rolling-release distribution like Arch Linux, you probably know the pain. It usually starts with a simple command and ends with you staring at &lt;em&gt;gcc compiler logs&lt;/em&gt; at 3 AM, wondering why &lt;em&gt;longintrepr.h&lt;/em&gt; is missing.&lt;/p&gt;

&lt;h4&gt;
  
  
  Table of Contents
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;The Golden Stack (TL;DR)&lt;/li&gt;
&lt;li&gt;Step 1: System Prerequisites&lt;/li&gt;
&lt;li&gt;Step 2: The Virtual Environment&lt;/li&gt;
&lt;li&gt;Step 3: The "Flag Sanitization" Patch&lt;/li&gt;
&lt;li&gt;Step 4: Building the APK&lt;/li&gt;
&lt;li&gt;Troubleshooting Cheatsheet&lt;/li&gt;
&lt;li&gt;Final Thoughts&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;The Golden Stack (TL;DR)&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Android cross-compilation is fragile. If you mix the wrong versions of &lt;em&gt;Python, Cython,&lt;/em&gt; and &lt;em&gt;Java&lt;/em&gt;, the build fails. Here is the exact combination that works in 2026:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;Version&lt;/th&gt;
&lt;th&gt;The Why&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Python&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;3.11&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;3.12+ removed &lt;code&gt;distutils&lt;/code&gt;, breaking many Android recipes.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Cython&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;&amp;lt; 3.0.0&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Cython 3.0 removed &lt;code&gt;longintrepr.h&lt;/code&gt;, breaking Kivy/Pygame recipes.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Java&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;JDK 17&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Required by the latest Android SDK/Gradle.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h4&gt;
  
  
  Step 1: System Prerequisites
&lt;/h4&gt;

&lt;p&gt;Arch is "bare bones," so we need to manually fetch the headers that &lt;em&gt;&lt;code&gt;python-for-android&lt;/code&gt; (p4a)&lt;/em&gt; needs to compile the recipes.&lt;/p&gt;

&lt;p&gt;Run the following in your terminal to install the build toolchain and headers:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Update everything first
sudo pacman -Syu


# Install the build toolchain and headers
# We need jdk17-openjdk for Gradle and base-devel for gcc/make
sudo pacman -S git zip unzip jdk17-openjdk python pip python-virtualenv \
    base-devel autoconf libtool pkg-config zlib ncurses cmake libffi openssl
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Step 2: The Virtual Environment (DO NOT SKIP THIS)
&lt;/h4&gt;

&lt;p&gt;Never install &lt;em&gt;Buildozer&lt;/em&gt; or &lt;em&gt;Cython&lt;/em&gt; globally on Arch. System updates will break your build toolchain. We need an isolated environment where we can pin older versions of &lt;em&gt;Cython&lt;/em&gt; without messing up the system.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# 1. Create the venv with Python 3.11
python3.11 -m venv .venv


# 2. Activate it
source .venv/bin/activate


# 3. Install the specific versions
# We pin Cython &amp;lt; 3.0 to fix the "longintrepr.h" error
pip install "Cython&amp;lt;3.0" "setuptools&amp;lt;71.0.0" buildozer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Step 3: The "Flag Sanitization" Patch
&lt;/h4&gt;

&lt;p&gt;This was the hardest bug to track down.&lt;/p&gt;

&lt;p&gt;On Arch Linux, the system compilers are configured with aggressive security and optimization flags like &lt;code&gt;-fcf-protection&lt;/code&gt; (Intel Control-flow enforcement) and &lt;code&gt;-march=x86-64&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;When &lt;em&gt;Buildozer&lt;/em&gt; runs, it sometimes leaks these Host Flags into the Target (Android) build process. The Android NDK compiler sees &lt;code&gt;-march=x86-64&lt;/code&gt;, panics because it's trying to build for ARM, and crashes with cryptic errors.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Fix:&lt;/strong&gt; We need to "sanitize" the environment variables in the recipe before the build starts.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Navigate to the pygame recipe inside your hidden .buildozer directory. It is usually located here: &lt;code&gt;.buildozer/android/platform/python-for-android/pythonforandroid/recipes/pygame/__init__.py&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Locate the &lt;code&gt;build_armeabi_v7a&lt;/code&gt; method and inject this sanitation logic:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import re


# ... inside the build_armeabi_v7a method ...
env = self.get_recipe_env(arch)


# 🧹 THE SANITIZER
# Strip flags that break ARM builds (like x86 specific protections)
bad_flags = [
    r'-m(arch|tune|cpu)=\S+',      # e.g., -march=x86-64
    r'-fcf-protection(=\S+)?',     # Intel specific
    r'-fno-plt'                    # PLT hardening
]


for var in ['CFLAGS', 'LDFLAGS']:
    if var in env:
        for pattern in bad_flags:
            env[var] = re.sub(pattern, '', env[var])


# ... proceed with the build ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This simple script strips the x86 flags before they reach the NDK.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 4: Building the APK
&lt;/h4&gt;

&lt;p&gt;Now that our environment is clean and our flags are sanitized, we can build.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CRITICAL:&lt;/strong&gt; You must export your local &lt;code&gt;venv&lt;/code&gt; path before building. If you don't, &lt;em&gt;Buildozer&lt;/em&gt; might use the system &lt;em&gt;Cython (v3.0+)&lt;/em&gt; and fail.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Force the build to use our local venv tools
export PATH="$(pwd)/.venv/bin:$PATH"


# Build the debug APK
buildozer android debug
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Download the Android SDK/NDK (takes a while the first time).&lt;/li&gt;
&lt;li&gt;Compile Python 3.11 for ARM.&lt;/li&gt;
&lt;li&gt;Package your Pygame app.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If everything goes well, you’ll see the glorious &lt;code&gt;Application pushed.&lt;/code&gt; message.&lt;/p&gt;

&lt;h3&gt;
  
  
  Troubleshooting Cheatsheet
&lt;/h3&gt;

&lt;p&gt;If (when) things break, here is your rescue kit.&lt;/p&gt;

&lt;h4&gt;
  
  
  1. The &lt;strong&gt;"longintrepr.h not found"&lt;/strong&gt; Error
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cause:&lt;/strong&gt; You are using &lt;em&gt;Cython 3.0+&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fix:&lt;/strong&gt; Run &lt;code&gt;pip install "Cython&amp;lt;3.0"&lt;/code&gt; and check your &lt;code&gt;PATH&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  2. The App Crashes Immediately
&lt;/h4&gt;

&lt;p&gt;Buildozer hides the Python errors. You need &lt;code&gt;logcat&lt;/code&gt; to see why your game crashed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Filter specifically for Python crashes
adb logcat -s python studio.flappybird.game
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  3. "Get Android SDK" Hangs
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Cause: You need to accept a license agreement.&lt;/li&gt;
&lt;li&gt;Fix: Run the command in the foreground first, or check your internet connection.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Final Thoughts
&lt;/h3&gt;

&lt;p&gt;Porting to Android doesn't have to be a nightmare, but on Linux (Arch BTW), you have to respect the toolchain. By pinning your dependencies and sanitizing your compiler flags, you can build reliable APKs even on a bleeding-edge distro like Arch.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Happy Coding!&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>android</category>
      <category>archlinux</category>
      <category>gamedev</category>
    </item>
  </channel>
</rss>
