Sunday, July 5, 2026

It Wasn't Cinnamon: How systemd-oomd Was Quietly Murdering My Desktop

Every few days my Cinnamon session would vanish — every open window gone, back to the login screen, hours of unsaved work with it. 

Twenty times, easy. "Cinnamon is buggy," I told myself. It wasn't Cinnamon. It was never Cinnamon.

  The symptom

  A workstation running Cinnamon on X11. Mid-work, the whole desktop would just evaporate — no dialog, no "sorry, something crashed," just an instant cut to the greeter. Everything unsaved died with it.

  The maddening part: the exact same Cinnamon, same version, ran perfectly on every other machine I own. So it felt like a Cinnamon bug specific to this box. 

  That assumption cost me weeks.

  The first rule of debugging: the thing that dies is not always the thing that's broken. Cinnamon was the victim, loudly falling over. The  killer was upstream, and silent.

  

Ruling out the obvious suspects

  Before blaming anything, I wanted evidence, not vibes.

  Did a process actually crash? A real segfault leaves a core dump. So:

  coredumpctl list

  Empty. Across every boot. Nothing — not Cinnamon, not muffin, not Xorg — had ever crashed hard enough to dump core. That already kills the "Cinnamon segfaults" theory. Something was shutting the session down cleanly, not crashing it.

  Did the whole machine crash? A hard lockup or panic leaves a truncated log and a dirty reboot. So I looked at how the previous boot actually  ended:

  journalctl --list-boots          # find the boot that died
  journalctl -b -1 -e              # jump to the tail of it

  The tail was a clean, orderly systemd-poweroff — filesystems unmounted gracefully, poweroff. target reached. No panic. No crash.

I KNOW! I was shutting it down manually and restarting to hopelessly try to clean whatever memory corruption would trigger a cut-n-no-log crash! 

The machine  went down politely. Which meant the desktop had already died earlier, and I'd simply rebooted to recover. The real event was buried further up  the log.

  The smoking gun

  If it wasn't a crash and it wasn't hardware, something was deliberately killing my session. On a modern systemd box, there's exactly one  well-meaning assassin that fits that description:

  journalctl | grep "systemd-oomd killed"

  There it was. Not once — fourteen times in the retained journal alone:

  systemd-oomd[...]: Killed /user.slice/user-1000.slice/user@.../session.slice/dbus.service
      due to memory pressure for .../user@... being 77.55% > 50.00% for > 20s with reclaim activity 
  systemd[...]: dbus.service: systemd-oomd killed 5 process(es) in this unit.

  And immediately after, the desktop's death rattle:

  cinnamon-session-binary[...]: CRITICAL: Unable to start session:
      Lost name on bus: org.gnome.SessionManager
  cinnamon-session-binary[...]: Application 'cinnamon.desktop' killed by signal 15

  Read that chain top to bottom and the whole mystery collapses:

  1. systemd-oomd decided my user session was under memory pressure.
  2. It reached into my session cgroup and SIGKILLed dbus.service — the session bus.
  3. Cinnamon lives on that bus. With the bus gone, it instantly lost org.gnome.SessionManager.
  4. The session manager can't survive losing its own name, so it tore the whole session down — every app with it.
  5. I landed back at the login screen, cursing Cinnamon for a murder it didn't commit.

  On other occasions oomd went even bigger and killed init.scope — the entire user manager — in one shot. Same result, faster.

  Why does this fire on a machine with plenty of RAM?

  This is the counterintuitive core of the whole thing, and it's why it ambushes people.

  systemd-oomd does not act on free memory. It acts on memory pressure — PSI (Pressure Stall Information). PSI measures the percentage of time tasks are stalled waiting on memory, not how many bytes are free. You can have gigabytes free and still register high pressure if a cgroup is  thrashing reclaim in bursts — swapping, dropping and refaulting page cache, that sort of churn.

  Check what oomd is watching and the thresholds it's using:

  oomctl

  Mine reported the trap plainly:

  Default Memory Pressure Duration: 20s
  Memory Pressure Monitored CGroups:
      Path: /user.slice/user-1000.slice/user@....service
          Memory Pressure Limit: 50.00%
          Memory Pressure Duration: 20s

  So the policy was: if my user session spends more than 50% of its time stalled on memory for 20 seconds, start killing processes inside it. On  a busy workstation running VMs, compilers, and browsers, a 20-second pressure spike above 50% is normal Tuesday behavior — not an emergency.
  But oomd treated it as one, and its idea of "relieving pressure" was to shoot whatever cgroup looked heaviest in my session. That kept landing on the session bus or the user manager: the two processes guaranteed to take the whole desktop down.

  Where was that 50% policy coming from? Straight from the vendor default applied to the user manager unit:

  systemctl show "user@$(id -u).service" \
      -p ManagedOOMMemoryPressure -p ManagedOOMMemoryPressureLimit
  # ManagedOOMMemoryPressure=kill
  # ManagedOOMMemoryPressureLimit=2147483648   # <- that's 50% of UINT32_MAX

  kill, at 50%, on the cgroup that contains my entire graphical session. That's the loaded gun.

  The gotcha that wastes an afternoon

  You might think "fine, I'll just disable it":

  systemctl is-enabled systemd-oomd   # disabled
  systemctl is-active  systemd-oomd   # active   (!!)

  Disabled but active. systemd-oomd is socket/D-Bus-activated, so "disabling" the service does nothing — it springs right back to life on demand  and keeps killing you. You have to either exempt your session from it or mask it outright. A plain disable is a no-op here.

  The fix

  Two roads. 

  OptionA - systemctl disable --now systemd-oomd  

Felt good... felt justified after all the work loss and frustration.

BUUUUUT  I took the higher ground and the surgical one.

  Option B — keep oomd, but forbid it from touching my desktop (recommended)

  systemd-oomd is genuinely useful as a last line of defence against a runaway process eating the whole machine. I didn't want to throw that   away — I just wanted it to stop treating a busy interactive session as an OOM emergency.

  Two drop-ins do it. First, tell systemd that oomd may not pressure-kill the user session:

  sudo mkdir -p /etc/systemd/system/user@.service.d
  sudo tee /etc/systemd/system/user@.service.d/99-no-oomd.conf >/dev/null <<'EOF'
  [Service]
  ManagedOOMMemoryPressure=auto
  ManagedOOMSwap=auto
  EOF

  auto means "don't actively manage this — only act if an ancestor explicitly opts in," which nothing does. That removes my session from oomd's watch list entirely.

  Second, make oomd far less twitchy globally, so a brief pressure spike anywhere never trips it. Twenty seconds becomes a full hour:

  sudo mkdir -p /etc/systemd/oomd.conf.d
  sudo tee /etc/systemd/oomd.conf.d/50-relax.conf >/dev/null <<'EOF'
  [OOM]
  DefaultMemoryPressureDurationSec=1h
  EOF

  Apply it live — no reboot, no logout, running programs untouched:

  sudo systemctl daemon-reload
  sudo systemctl restart systemd-oomd

  Both files live under /etc, so they override the vendor defaults in /usr/lib and survive updates and reboots.

  Verify it actually took

  Don't trust, confirm:

  oomctl

  Default Memory Pressure Duration: 1h
  Memory Pressure Monitored CGroups:      <-- empty
  Swap Monitored CGroups:                 <-- empty

  An empty monitored-cgroups list is the win. oomd is still running, still available to catch a genuine machine-wide meltdown — but my desktop session is no longer on its list of things it's allowed to shoot. It cannot kill Cinnamon anymore, because it isn't watching it at all.

  Why not Option A — evict oomd entirely (the blunt and the still desired by revenge... but)

  If you don't care for oomd's protection and just want it gone for good, mask it so socket-activation can't resurrect it:

  sudo systemctl disable --now systemd-oomd
  sudo systemctl mask     systemd-oomd

  On a machine with generous RAM and swap, the kernel's own OOM killer is a perfectly adequate backstop, and this is a defensible choice. I preferred keeping a tamed oomd over removing it.

  Takeaways

  - The process that dies is rarely the process that's broken. Cinnamon was the last domino, not the first. Follow the chain upstream from the visible failure.
  - No core dump means it wasn't a crash — it was a kill. coredumpctl list is a thirty-second test that redirects the entire investigation.
  - systemd-oomd judges pressure, not free memory. "But I have 32 GB free" is not a defence; PSI can spike under reclaim churn while plenty of RAM sits free. oomctl shows you exactly what it's watching and at what thresholds.
  - The default 50% / 20s policy on the user session is hostile to interactive workloads. A busy desktop routinely breaches it without anything actually being wrong.
  - disable is a trap for socket-activated units. Check is-active, not just is-enabled. If you truly want it gone, mask it.

  Twenty "Cinnamon crashes," zero of them Cinnamon's fault. Sometimes the ghost in the machine is just an overzealous babysitter with a SIGKILL and a bad definition of "emergency."


Happy days.. Cinnamon is rock solid. I-m happy again. Lets push the machine to the limit as we usually do...after all I DID PAY FOR 100% of that thing.

Monday, December 30, 2024

WLtoys 14401 is a bang as it is... but mine's better :)

 WLToys 14401 is a 1:14 buggy that, out of the box, comes ready for 75km/h action. 

It's quite the thing. The power is such that the chassis is aluminium from start. 

This is the little brat I'm talking about.




Problem with that is that everything else is vinyl and, at 75km/h accidents tend to make things definitive when it comes to bending the chassis and pulling the threads out of the screws holding things together.

I should know... I brought one, My friend Marco bent it, I replaced with another chassis, my kid Miguel bent it... so:

THIS IS MY 14401:

Cover has been cut to accomodate and ventilate the 80 AMP surpass hobby ESC
I've also cut the airway to the motor active cooling.

Full metal differentials and differential housing
Full metal wishbones

SurpassHobby 80A esc

Better Servo

Surpass Hobby 5200Kv motor

Front foam lip to absorb impact
carbon subframes

ESC tied down and tidy next to RC module.

3S battery and some on-read wheels.

Full carbon chassis, no more bending


 This was something else as a 2S 75km/h car, but like this, it is very very promising. 

First tests indicate that it is powerful, because I've added High grip tires and making a few pulls off the line, it completely unscrewed the differential satellite gears, making me have to open and re-screw them with tighter torque specs.

Videos will soon appear.


Sunday, December 29, 2024

ZDRacing ZMT-10 the best sub 200usd 1:10 rc money can buy... hum sure... but I rather transform :)

 At 160 USD the ZDRacing ZMT-10 9106 is considered by many, as the best  sub 200USD 1:10 monster truck you can buy.




It comes standard with a 3300KV motor and a 45Amp ESC, good for 60km/h out of a 2S battery. 



HOWERVER, I already brought mine with 5400Kv and 60Amp ESC, plus, the 3S. 

This means that my car, from the start managed, not the 60KM/h 24420 rpm, but an astonishing 60480 rpm. This means that each RPM is responsible for 0.002457002 km/h.

So, following a direct propositional math, my car was able to reach 148.599 km/h from the start.

This meant several things:

    1 - Self unscrewing screws - easy fix with nail polish to hold them in.

    2 - Twisting chassis - fortunately there is an aluminium version to buy part for.

    3 - After fixing the chassis, the wishbones started to flex and the towers too. So full metal suspension parts + towers

    4 - Broken semi axle - The next thing to go was the semi axles, so I brought more robust ones and coupled with aluminium hubs to match... now the chassis is all metal. 

    5 - So the suspension started to act and me ineffective. OK, double shocks with oil reservoir.

    6 - Finally.. it went too fast for turning, so let's make the wheels bigger and the car wider. Some spacers and 1:8 wheel s fixed this. 


The Car got way bigger and wider, and the speed was so insane that I managed to destroy the cover, so a new one was installed as per the last image.







The result, way more than 150 km/h, as the wheels got bigger and so the motor gear, so this is close to 200km/h now:









RC Build 1:10 Skyline R34GTR and a 1:10 S2000

It all  starts with the TT01 Tamyia chassis copy from the majority of Chinese manufacturers. 

I chose the PMM chassis because:

    1 - it has a aluminium propeller shaft

    2 - if has aluminium wishbones instead of vinyl ones (however if you are not used to the power of a beast like this, I recommend you buy the vinyl one and later replace the wishbones.

All these chassis come with plastic wheels and plastic main gears. Ditch them, They will crack with the power and fail. Buy Aluminium wheels and SOLID tires. Use Super glue to bind the tires to the wheels.

Replace the main gear that connects to the motor gear-head with metal ones. 

Choose a powerful servo, the rotational speed achieved with this setup is so high that the wheel s will try to keep straight and 3KG servos will not be enought.

use either super glue or nail polish to Fix EACH AND EVERY BOLT

IMPORTANT - YOU WILL NEED engine coolers and high capacity 3S bateries.

I'm using GXF power 5.2Amps because they are light, durable and powerfull on discharge.

For the R34, I Equipped the car with a 60Amp ESC (platinum) from surpasshobby  and a surpasshobby 6000Kv motor


The real world S2000 is known for High RPM engine, so I managed a 150Amp ESC from SurpassHobby coupled, with an Ansmann racing 3.5Turns (10800Kv) motor

R34 cover on and the s2000 is still under preparation.

The result is a VERY chalenging to drive set. Here is the r34 tests with a slick concrete floor in the garage, the s2000 makis things even more chalenging, so I changed back from 2WD to 4WD.

And side by side with the little brother, a WLToys144010 transformed (something for a different article)

and the ZDRacing 1:10 truck, again heavily transformed (another article).



More will follow as I keep modding these babies.

Ok... so the S2000 is waiting on an even more extreme motor and ESC for a good 11000Kv, but I hated the color and overall "cheap" look of the body. So Today we dedicated some time to it:










Carbon Wrapping on the red and china-made body. 
Look something else, now.





Back to 4WD conversion...front diff comes out, shaft, mounts and half shafts go back in.  It's hard enough to control as a 4wd, let alone as a 2WD.

Rubber tires out (they where coming out in pieces anyway)

Foam Tires go in... and super-glued to the aluminium rims.

Chassis screws re-painted with nail polish

Leds Installed and... Voila






The 35 Kg servo is a beast... let's test the response:


NIIIICE

More to update as parts get delivered. Stay tuned.