[SOLVED]"Automatic Updates" in Update Manager, haven't been automatic..

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Post Reply
TriggerDingus
Level 1
Level 1
Posts: 28
Joined: Wed Feb 28, 2024 12:33 am

[SOLVED]"Automatic Updates" in Update Manager, haven't been automatic..

Post by TriggerDingus »

According to what I've read, I have auto-updates turned on but I'm still having to do them manually.

Some may chime in and say "it isn't good practice to let your machine be updated automatically." To those, I would respectfully say "you do you and I'll do me."

I'm a recent convert to LMDE and I would really like this to work so I don't have to waste time in Update Manager every day. Any advice?

Screenshot from 2024-03-23 20-31-44.png
Last edited by TriggerDingus on Sun Mar 24, 2024 11:00 am, edited 1 time in total.
bin
Level 4
Level 4
Posts: 233
Joined: Wed Nov 22, 2006 12:12 pm
Location: Wiltshire UK

Re: "Automatic Updates" in Update Manager, haven't been automatic..

Post by bin »

In the standard format the automated update is subject to a random delay which can make it look like it isn't going to happen.
There is also the added bonus that mintupdate cannot update itself.

The solution which I have working happily on LMDE (and is a variation of what I have been using for about 15 years) is as follows

Terminal -

Code: Select all

sudo crontab -e
Go to the empty bottom row of the screen and put in

Code: Select all

@reboot sleep 40 && sudo apt update && sudo apt install mintupdate mint-upgrade-info
and save it. If it has opened in nano that would be Ctrl+O then Ctrl+X
What this does is to wait 40 seconds after booting and then goes off and tries to update mintupdate.

Terminal -

Code: Select all

sudo systemctl edit --full mintupdate-automation-upgrade.timer
Make it look like this -

Code: Select all

[Unit]
Description=Update Manager automatic upgrades

[Timer]
##OnCalendar=daily
OnBootSec=4m
##RandomizedDelaySec=60m
Persistent=true

[Install]
WantedBy=timers.target
Save it via Ctrl+O Ctrl+X

This creates an override file in /etc/systemd/system/ which will not be altered even if the original in /lib/... is updated.

What this does is to wait 4 minutes after boot and then runs mintupdate

Finally I set my Options screen in the update settings as this
options.png
So the whole sequence becomes:-
Boot + 40 seconds - apply any update to mintupdate
Boot + 2 minutes mintupdate looks for any updates
Boot + 4 minutes minyupdate runs and applies any updates

Mintupdate then goes away until it finds any new updates every 4 hours or until next reboot if sooner.

Mintupdate logs in /var/log/mintupdate.log

Do be aware that if you are using a disk with legacy MSDOS structure as opposed to GPT then Grub updates will not complete. I used to exclude updates to grub-pc and check manually once in a while. Got fed up with that and swapped to GPT and that made life a lot easier.
TriggerDingus
Level 1
Level 1
Posts: 28
Joined: Wed Feb 28, 2024 12:33 am

Re: "Automatic Updates" in Update Manager, haven't been automatic..

Post by TriggerDingus »

Thank You!
TriggerDingus
Level 1
Level 1
Posts: 28
Joined: Wed Feb 28, 2024 12:33 am

Re: "Automatic Updates" in Update Manager, haven't been automatic..

Post by TriggerDingus »

bin wrote: Sun Mar 24, 2024 3:18 am In the standard format the automated update is subject to a random delay which can make it look like it isn't going to happen.
There is also the added bonus that mintupdate cannot update itself.

The solution which I have working happily on LMDE (and is a variation of what I have been using for about 15 years) is as follows

Terminal -

Code: Select all

sudo crontab -e
Go to the empty bottom row of the screen and put in

Code: Select all

@reboot sleep 40 && sudo apt update && sudo apt install mintupdate mint-upgrade-info
and save it. If it has opened in nano that would be Ctrl+O then Ctrl+X
What this does is to wait 40 seconds after booting and then goes off and tries to update mintupdate.

Terminal -

Code: Select all

sudo systemctl edit --full mintupdate-automation-upgrade.timer
Make it look like this -

Code: Select all

[Unit]
Description=Update Manager automatic upgrades

[Timer]
##OnCalendar=daily
OnBootSec=4m
##RandomizedDelaySec=60m
Persistent=true

[Install]
WantedBy=timers.target
Save it via Ctrl+O Ctrl+X

This creates an override file in /etc/systemd/system/ which will not be altered even if the original in /lib/... is updated.

What this does is to wait 4 minutes after boot and then runs mintupdate

Finally I set my Options screen in the update settings as this options.png

So the whole sequence becomes:-
Boot + 40 seconds - apply any update to mintupdate
Boot + 2 minutes mintupdate looks for any updates
Boot + 4 minutes minyupdate runs and applies any updates

Mintupdate then goes away until it finds any new updates every 4 hours or until next reboot if sooner.

Mintupdate logs in /var/log/mintupdate.log

Do be aware that if you are using a disk with legacy MSDOS structure as opposed to GPT then Grub updates will not complete. I used to exclude updates to grub-pc and check manually once in a while. Got fed up with that and swapped to GPT and that made life a lot easier.

My updates haven't been working automatically. I've gone over all instructions above a few times and it appears I have everything done exactly as described, but still I'm nagged daily by mint updater. I'd post anything helpful here that might describe where I've failed, but there's no error messages or anything, so I don't even know where to begin troubleshooting. Any ideas?
bin
Level 4
Level 4
Posts: 233
Joined: Wed Nov 22, 2006 12:12 pm
Location: Wiltshire UK

Re: "Automatic Updates" in Update Manager, haven't been automatic..

Post by bin »

TriggerDingus wrote: Fri Apr 12, 2024 7:50 pm My updates haven't been working automatically. I've gone over all instructions above a few times and it appears I have everything done exactly as described, but still I'm nagged daily by mint updater. I'd post anything helpful here that might describe where I've failed, but there's no error messages or anything, so I don't even know where to begin troubleshooting. Any ideas?
Sorry to hear that.

First thing is go back and look for typo(s) in sudo systemctl edit --full mintupdate-automation-upgrade.timer

Next /var/log/mintupdate.log

For example this is the start of the log for this morning

Code: Select all

-- Automatic Upgrade starting Sat 13 Apr 2024 06:32:59 BST:
Reading package lists...
Building dependency tree...
Reading state information...
Recommended packages:
  xcvt
The following packages will be upgraded:
  xserver-common xserver-xephyr xserver-xorg-core xserver-xorg-legacy
4 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 11.8 MB of archives.
After this operation, 4,096 B of additional disk space will be used.
Get:1 http://security.debian.org bookworm-security/main amd64 xserver-common all 2:21.1.7-3+deb12u7 [2,383 kB]
Get:2 http://security.debian.org bookworm-security/main amd64 xserver-xephyr amd64 2:21.1.7-3+deb12u7 [3,293 kB]
Get:3 http://security.debian.org bookworm-security/main amd64 xserver-xorg-legacy amd64 2:21.1.7-3+deb12u7 [2,388 kB]
Get:4 http://security.debian.org bookworm-security/main amd64 xserver-xorg-core amd64 2:21.1.7-3+deb12u7 [3,720 kB]
Preconfiguring packages ...
You're looking for the Automatic Upgrade starting.... line.

The log may also show you if there is an issue with an update.

The update manager will show you which packages are due to update - are there lots or just one or two?

It occurs to me you might never or rarely actually reboot your machine - in which case you'd need to remove the ## in front of OnCalendar=daily in the timer edit.
TriggerDingus
Level 1
Level 1
Posts: 28
Joined: Wed Feb 28, 2024 12:33 am

Re: [SOLVED]"Automatic Updates" in Update Manager, haven't been automatic..

Post by TriggerDingus »

I checked the log you mentioned and there were no paragraphs describing Auto Upgrade, so the upgrade hasn't been running.

I suspect your last suggestion might fix the OS auto-updates, though. You are correct in guessing I might not reboot often: the machine runs several backup schedules and is also my Syncthing hub and so it gets rebooted quite sparingly.

-----Update:

I just rebooted to try and trigger the updates and to re-inspect the log file. There are some peculiar logs from the test run today (see April 13):

Code: Select all

-- Automatic Removal Mon Apr  1 12:21:34 AM EDT 2024:

Reading package lists...
Building dependency tree...
Reading state information...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

-- Automatic Removal Mon Apr  8 12:01:35 AM EDT 2024:

Reading package lists...
Building dependency tree...
Reading state information...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

-- Automatic Upgrade starting Sat 13 Apr 2024 11:43:35 EDT:
-- Power supply not connected, abort automatic update.

-- Automatic Upgrade starting Sat 13 Apr 2024 11:47:08 EDT:
-- Power supply not connected, abort automatic update. 
Strange thing is, the machine is never not connected to a power supply (E.G. A/C wall power).
bin
Level 4
Level 4
Posts: 233
Joined: Wed Nov 22, 2006 12:12 pm
Location: Wiltshire UK

Re: [SOLVED]"Automatic Updates" in Update Manager, haven't been automatic..

Post by bin »

Curious - without knowing more about the machine it's hard to comment. Not a laptop running without a battery is it??

On my desktop machine the log ends

Code: Select all

/sys/class/power_supply/AC/online not found. Ignore power supply check.-- Automatic Upgrade completed
Maybe that will help point you in the right direction?
TriggerDingus
Level 1
Level 1
Posts: 28
Joined: Wed Feb 28, 2024 12:33 am

Re: [SOLVED]"Automatic Updates" in Update Manager, haven't been automatic..

Post by TriggerDingus »

My machine is a laptop with an installed battery, however, it's a big beast of a thing and it's plugged into desktop speakers, monitor etc etc. It's essentially my desktop system.

It's interesting how your log ends, deciding to ignore the power supply check altogether. I'll have to try and figure out how I might be able to configure mine to do that.
bin
Level 4
Level 4
Posts: 233
Joined: Wed Nov 22, 2006 12:12 pm
Location: Wiltshire UK

Re: [SOLVED]"Automatic Updates" in Update Manager, haven't been automatic..

Post by bin »

Just checked on a Thinkpad that has Mint 21.3 clean install.

If the machine is connected to charger which is switched on, or the battery is removed and it is just running on mains, then it just ends

Code: Select all

-- Automatic Upgrade completed
Yesterday I forgot to switch on the charger and the log says

Code: Select all

-- Power supply not connected, abort automatic update.
So, I wonder if you might just want to pop the battery out and just run on mains - see what happens? Possible battery issue?
TriggerDingus
Level 1
Level 1
Posts: 28
Joined: Wed Feb 28, 2024 12:33 am

Re: [SOLVED]"Automatic Updates" in Update Manager, haven't been automatic..

Post by TriggerDingus »

Thanks so much for experimenting with that!
That sounds very promising! I'm removing the battery now - will report results soon!
TriggerDingus
Level 1
Level 1
Posts: 28
Joined: Wed Feb 28, 2024 12:33 am

Re: [SOLVED]"Automatic Updates" in Update Manager, haven't been automatic..

Post by TriggerDingus »

Well, this is confounding. I pulled the battery on the 18th and it's been sitting on my desk since then. I rebooted a few times but the mysterious power supply error messages continue. See log entries from 19th and 20th below.
I'm not expecting you would be able to explain or assist, but I wanted to provide the info for posterity!

Code: Select all

Reading package lists...
Building dependency tree...
Reading state information...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

-- Automatic Upgrade starting Tue 16 Apr 2024 00:00:00 EDT:
-- Power supply not connected, abort automatic update.

-- Automatic Upgrade starting Wed 17 Apr 2024 00:00:21 EDT:
-- Power supply not connected, abort automatic update.

-- Automatic Upgrade starting Thu 18 Apr 2024 00:00:10 EDT:
-- Power supply not connected, abort automatic update.

-- Automatic Upgrade starting Fri 19 Apr 2024 00:00:00 EDT:
-- Power supply not connected, abort automatic update.

-- Automatic Upgrade starting Fri 19 Apr 2024 10:10:27 EDT:
-- Power supply not connected, abort automatic update.

-- Automatic Removal Fri Apr 19 01:25:17 PM EDT 2024:

Reading package lists...
Building dependency tree...
Reading state information...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

-- Automatic Upgrade starting Sat 20 Apr 2024 00:00:09 EDT:
-- Power supply not connected, abort automatic update.
Post Reply

Return to “Software & Applications”