[Question] Disable auto-updates to improve stability?

Hi! I have a question. Recently I have experienced a bit of trouble with Clear Linux (currently waiting for gdb to be fixed on older CPUs that don’t use AVX instructions).

The OS works pretty well and I love it, but I find that lately (and from time to time) it becomes unstable due to the multiple updates it receives.

The only fix that comes to my mind is to disable automatic updates and update only when useful features are added to the kernel / or every 3 months or so.

Is this a viable approach? Will it get even more unstable if I update from an old version to a modern one in the future? Thanks!

Yes. Swupd makes it very easy to update, or roll back, versions of Clear Linux. However, as you point out, running at the bleeding edge of innovation all the time can be painful. We especially run into issues when key components update, and related or dependent components update on a different schedule.
For this reason, it’s not recommended to run Clear Linux ‘as is’ in a production or mission critical environment, but instead to build your own ‘mix’ of Clear Linux, which gives you complete control over which bundles and components to deploy, as and when your testing gives you the confidence to do so.

Rgds,
Chris

2 Likes

I’ve had several updates that broke my install. Definately turn off automatic updates. I also recommend having a backup (rsync or Timeshift (you need to compile that)). Also wait a few days after the update has come out to see if others are reporting a broken system.

2 Likes

So, for anyone interested, Clear Linux has a service enabled by default called swupd-update.service, with an accompanying swupd-update.timer. In order to setup my own automated updates, I’ve masked the timer, and then wrote my own service + timer than depends on the swupd-update.service and then reboots, so that updates are done on my schedule. Seems to be working pretty well. You can, of course, simply mask the timer and never set an automatic update, or change the schedule to your liking, etc.

  1. Mask the timer so it can’t run - we need to keep the service though, so we can use it as a dependency.
    sudo systemctl mask swupd-update.timer
  2. add a custom service and timer
# /etc/systemd/system/update.service
[Unit]
Description=Scheduled Reboot
After=swupd-update.service
Wants=swupd-update.service

[Service]
Type=simple
ExecStart=/usr/bin/systemctl --force reboot
  1. Add a custom timer
# /etc/systemd/system/update.timer
[Unit]
Description=Update and Reboot

[Timer]
OnCalendar=Thu *-*-* 04:00:00 America/Los_Angeles

[Install]
WantedBy=timers.target

If a timer and a service have the exact same name (except for the extension), the timer will trigger the service with the same name by default.

Note:
You can use systemd-analyze calendar if you aren’t very familiar with the systemd timer datetime format.

Example:
image