Downloads are interrupted by sleep, but they can be safely interrupted.
Installing packages or other core changes are not interrupted by entering sleep mode. Although, they would be interrupted by shutdown/rebooting, sometimes to catastrophic consequences.
Other distros are a bit more resilient, with things like installing and managing multiple kernels, that way even if one breaks (like via a borked/interrupted update), you can still boot.
But pacman/Arch Linux is designed with a certain philosphy in mind. You are supposed to be reading the pacman output, that way you can respond if anything needs to be done. If you don’t respond accordingly when certain manual changes are needed, then bad things can happen. For example, if the grub package gets updated, then you might need to manually generate a new grub config file. If the grub config file and grub itself are out of sync, your system could be rendered unbootable.
So then Unix philosophy way just yes pacman -Syyu && systemctl suspend or whatever. It only runs if the update is successful, and waits until it’s finished, or pacman -Syyu; systemctl suspend if you want it to suspend regardless of success or failure
Edit: misread, thought the question was about making the computer sleep after being finished. Keeping it awake is a blessing and curse about Linux because what is keeping that specific arch build awake, lightdm? Sddm? Systemd? Ideally this would be a systemd capability, but then people would complain about more systemd ownership of bespoke os features. So then use something like https://wakepy.readthedocs.io/stable/index.html I guess otherwise you’re using KDE or gnome or whatever apps
Thanks for answering. I guess having a laptop fully charged but not on AC-power doing even the smallest update still enters sleep for some reason, even during installation of new files for me
Why should it?
Downloads are interrupted by sleep, but they can be safely interrupted.
Installing packages or other core changes are not interrupted by entering sleep mode. Although, they would be interrupted by shutdown/rebooting, sometimes to catastrophic consequences.
Other distros are a bit more resilient, with things like installing and managing multiple kernels, that way even if one breaks (like via a borked/interrupted update), you can still boot.
But pacman/Arch Linux is designed with a certain philosphy in mind. You are supposed to be reading the pacman output, that way you can respond if anything needs to be done. If you don’t respond accordingly when certain manual changes are needed, then bad things can happen. For example, if the grub package gets updated, then you might need to manually generate a new grub config file. If the grub config file and grub itself are out of sync, your system could be rendered unbootable.
https://wiki.archlinux.org/title/Arch_Linux#User_centrality
One good reason is so that you can start an update, walk away, and it’ll run to completion.
So then Unix philosophy way just
yes pacman -Syyu && systemctl suspendor whatever. It only runs if the update is successful, and waits until it’s finished, orpacman -Syyu; systemctl suspendif you want it to suspend regardless of success or failureEdit: misread, thought the question was about making the computer sleep after being finished. Keeping it awake is a blessing and curse about Linux because what is keeping that specific arch build awake, lightdm? Sddm? Systemd? Ideally this would be a systemd capability, but then people would complain about more systemd ownership of bespoke os features. So then use something like https://wakepy.readthedocs.io/stable/index.html I guess otherwise you’re using KDE or gnome or whatever apps
Neither of these actually inhibit sleep during the update though…
Thanks for answering. I guess having a laptop fully charged but not on AC-power doing even the smallest update still enters sleep for some reason, even during installation of new files for me