Since this last update, which was applied without issues, pamac/pacman seem to somehow ‘forget’ their mirrors from time to time.
Happened three times for me thus far, pamac GUI complains that there are no mirrors configured when trying to install a package and, indeed, /etc/pacman.d/mirrorlist somehow got emptied out:
##
## Manjaro Linux custom mirrorlist
## Generated on 2025-07-31 11:02
##
## Please use 'pacman-mirrors -id' To reset custom mirrorlist
## Please use 'pacman-mirrors -c all' To reset custom mirrorlist
## To remove custom config run 'pacman-mirrors -c all'
##
Running pacman-mirrors fixes the issue, /etc/pacman.d/mirrorlist gets refilled.
Judging from journal entries, this seems to coincide with the system waking up from sleep/suspend:
I’d assume that Starting Generate mirrorlist... fails due to the network interface still being down this early after waking up the system. However, the service behind this (pamac-mirrorlist.service) should account for this (by depending on network-online.target). So… some sort of race condition perhaps?
Not meaning to hijack this thread, I had the same experience, the journal shows a.o:
aug 07 20:44:12 manja systemd[1]: Starting Generate mirrorlist...
aug 07 20:44:12 manja pacman-mirrors[67751]: ::INFO Internet connection appears to be down
aug 07 20:44:12 manja pacman-mirrors[67751]: ::INFO Mirror ranking is not available
aug 07 20:44:12 manja pacman-mirrors[67751]: ::INFO Mirror list is generated using random method
aug 07 20:44:12 manja pacman-mirrors[67751]: ::INFO Writing mirror list
I changed the trigger to update the mirror list to 1 minute after boot:
I have not specified my own mirrors anywhere if that is what you are referring to, but I did set a specific country for mirror selection - is that also considered a custom mirror pool?
I checked the journal for the service in question:
So it would seem the service actively kicks out all of the mirrors. The question is why, though. My guess would still be an inactive network connection right after waking up from sleep.
The mirrors that get kicked out are exactly the same that get re-added after refreshing the mirrors. In other words, those are not mirrors that somehow became unavailable or inactive.
From the journal I can tell this happened three times thus far, always with the same messages, starting July 24th.
Not necessary… when pacman-mirrors creates the mirror list, it uses the flag set by the repo server - a flag that indicates if the mirror is up-to-date - and since the mirrors are included in the mirror list - they are up-to-date.
This can be verified by checking the repo status at repo.manjaro.org
I don’t know why pamac provides the timer - my guess is the intention is to ensure the mirror list is always up-to-date.
I am opposed to having such timer - but alas - it is how it is - and I am not into the update-nagging thing, my personal preference is to disable the timer, use only one mirror and update when I have time to deal with the potential fallout.
I think the question is why that timer runs right after resuming the system - which is bound to fail, as you pointed out, as there is no way for the timer to know whether the network connection has already been reestablished or not.
I’ll dig into the logs a bit more to check if I can pinpoint what might be causing that.
That one is easy - the timer expired while suspended - thus it will run at the first given opportunity.
And as your system suspended when network-online was true the service will run - but there is no internet connection - which makes pacman-mirrors fail, printing the network error messages.
But the possibility that pacman-mirrors can write an empty mirror list when it happens - that I don’t like - and I will look at the options to prevent it from happening.
If you want to change the service invocation you can do so in the service definition by adding a sleep statement as ExecStartPre with the number of seconds to wait before ExecStart
Thanks, so that might be an option - or disabling the timer like you suggested. I mean, how often do mirrors actually change? Not that often, I’d presume.
That I usually do, but I’m always looking for a way to stay as vanilla as possible when issues arise. Customizations and hacks have to be maintained over time, that’s why I try to avoid them whenever possible.
Another option is to use the Static option in pacman-mirrors-conf.
## Static configuration
## Add a comma separated list of urls to use
## e.g. Static = https://mirror1.tld/manjaro/,https://mirror2.tld/manjaro/
Static = https://manjaro.kurdy.org/
Which is useful in enterprise environments and offline environments.