...
for a some months my firefox instances crash, when I update my computers (pacman -Syyu, laptop & pc).
...
1. At a minimum, when updating, I would not have any GUI open. If you want to go to the next level, only do an update on a tty.
2. Check the system log.
# Look for when you began the install and then firefox.
journalctl -b
# To narrow it down a bit:
journalctl --since '2024-03-18 18:00:00' --until '2024-03-18 19:30:00'
3. Look for posts in this forum that mention **do-not-udevadm-trigger-on-update**. It resides in /usr/share/libalpm/scripts/systemd-hook. Perhaps there was something updated or some action occurred and udev took action that affected systemd, all bets are off --- end result, terminate applications.
On a side note, I always reboot after an upgrade because system files were updated and it just takes a minute. Just prior to the reboot I do some of the following:
- Review the pacman output. I capture the output of the command
- sudo pacman -Fy
- sudo DIFFPROG=meld pacdiff
Try moving the microcode hook before autodetect and see if it changes anything.
]]>didnt run mkinitcpio -P as sudo :facepalm:
]]>systemctl suspend
the lock-screen gets fullly applied and then system suspends but
systemctl suspend-then-hibernate
is too fast and hyprlock only gets partially applied, rest is applied after system resumes from suspend/hibernate.
I found these two methods from ArchWiki ->
Custom_systemd_-sleep-units
Systemd-sleep-Hooks
All i want is system to wait for few seconds when `suspend-then-hibernate` commands run so that lock-screen gets applied completely. Are there any other way to do this or the above is to be followed?
]]>and make use of
/etc/crypttab.initramfs
Note the main difference for you:
sd-encrypt HOOK: "Passwords entered during boot are cached in the kernel keyring by systemd-cryptsetup(8), so if multiple devices can be unlocked with the same password (this includes devices in crypttab that are unlocked after boot), then you will only need to input each password once."
encrypt HOOK : "Only one device can be unlocked in the initramfs."
So you would give data in addition to the key-file a normal password, same as home, as further slot in LUKS, and unlock both during boot in one step with the sd-encryp HOOK.
]]>You get events for plugging the charger?
When the status is "Not charging", the charger is plugged while the battery is can't charge anymore, then, when I unplug it, the script gets to know that it has been unplugged.
(reason: I have stated "echo 'true' > /tmp/has_noti_is_charged" when the "full battery" notification is sent, so when "if grep -Fxq 'true' /tmp/has_noti_is_charged && [ ! "$status" = "Not charging" ] && [ ! "$status" = "Full" ]" happens (when the battery is not "Not charging" while at the same time existing a "full battery" notification, which means I unplugged the charger), the notification gets closed)
For the "low battery level" case is similar.
Do you start your session using xinit?
Yes, through "~/.config/x11/xinitrc"
are you running the service as a --user service?
Yes.
]]>what is a little weird is the below
sudo snapper list-configs
Config | Subvolume
-------+----------
root | /
sudo snapper create-config /home
Creating config failed (config already exists).
sudo ls -la /home/.snapshots
total 0
drwxr-xr-x 1 root root 32 Jan 22 18:27 1
sudo ls -l /etc/snapper/configs/
total 4
-rw-r----- 1 root root 1506 Jan 22 15:57 root
So there seems to be a config known to snapper, even though no config file in etc/snapper/configs exists
1. what am I missing here?
2. I do not care about the content of the 1 existing snapshot for /home, so is it safe to just delete the config for home and re-creating it?
or can I just copy the /root config and adjust it to fit my needs for /home?
]]>Thank you all so much!
]]>System is booting correctly again.
Thanks, marking this as solved.
]]>system-backup.sh
#!/bin/bash
#
IMAGE=/mnt/NTFS/Backups/system-backup.img
BACKUP_MNT=/mnt/system-backup
LOCK=/tmp/system-backup.lock
IMAGE_SIZE=500GB
do_backup() {
if [ -f "$LOCK" ]; then
echo "Lock file detected in $LOCK. Bailing out!"
exit 100
else
touch $LOCK
do_mnt_image
echo "### $(date) Starting backup ..."
rsync -aAXv --delete --quiet / --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found","/home","/var/log/*","/var/tmp/*"} $BACKUP_MNT
do_cleanup
echo "### $(date) Backup complete!"
fi
}
do_restore() {
if [ -f "$LOCK" ]; then
echo "Lock file detected in $LOCK. Bailing out!"
exit 100
else
touch $LOCK
do_mnt_image
echo "### $(date) Staring restore..."
sync
rsync -aAXv --delete $BACKUP_MNT /
do_cleanup
sync
echo "### $(date) Restore complete!"
fi
}
do_mnt_image() {
ERROR=""
if [ ! -f $IMAGE ]; then
echo -n "Backup image does not exist! Creating image .."
dd bs=1 count=1 if=/dev/zero of=$IMAGE seek=$IMAGE_SIZE
mkfs.ext4 $IMAGE
echo "..done!"
fi
mkdir $BACKUP_MNT || ERROR=1
mount -t ext4 -o loop $IMAGE $BACKUP_MNT || ERROR=1
if [ -n "$ERROR" ]; then
echo "There was an error mounting the container image! Bailing out!"
do_cleanup
exit 1
fi
return 0
}
do_cleanup() {
SAFE=""
umount $BACKUP_MNT && SAFE=1
[ -n "$SAFE" ] && rm -rfd $BACKUP_MNT
rm $LOCK
}
case "$1" in
--restore|-r)
do_restore
exit $?
;;
--backup|-b)
# Default behavior
do_backup
exit $?
;;
--help)
do_help
exit 0
;;
*)
do_backup
exit $?
;;
esac
exit 200
# /etc/mkinitcpio.d/linux-lts.preset
PRESETS=('default' 'fallback')
default_config="/etc/mkinitcpio-myoptimized.conf"
fallback_config="/etc/mkinitcpio.conf"
While fallback could point to the current, not-modified, arch default,
and default to my optimized one ?
Edit: Thanks, it works:
# /etc/mkinitcpio-custom.conf
HOOKS=( systemd autodetect microcode modconf keyboard sd-vconsole block filesystems fsck)
# /etc/mkinitcpio.d/linux-lts.preset
...
default_config="/etc/mkinitcpio-custom.conf"
=> Building image from preset: /etc/mkinitcpio.d/linux-lts.preset: 'default'
==> Using configuration file: '/etc/mkinitcpio-custom.conf'
-> -k /boot/vmlinuz-linux-lts -c /etc/mkinitcpio-custom.conf -g /boot/initramfs-linux-lts.img
==> Starting build: '6.6.21-1-lts'
-> Running build hook: [systemd]
-> Running build hook: [autodetect]
-> Running build hook: [microcode]
-> Running build hook: [modconf]
-> Running build hook: [keyboard]
-> Running build hook: [sd-vconsole]
-> Running build hook: [block]
-> Running build hook: [filesystems]
-> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: '/boot/initramfs-linux-lts.img'
-> Early uncompressed CPIO image generation successful
==> Initcpio image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux-lts.preset: 'fallback'
==> Using default configuration file: '/etc/mkinitcpio.conf'
-> -k /boot/vmlinuz-linux-lts -g /boot/initramfs-linux-lts-fallback.img -S autodetect
==> Starting build: '6.6.21-1-lts'
-> Running build hook: [base]
-> Running build hook: [udev]
-> Running build hook: [microcode]
-> Running build hook: [modconf]
-> Running build hook: [kms]
==> WARNING: Possibly missing firmware for module: 'ast'
-> Running build hook: [keyboard]
==> WARNING: Possibly missing firmware for module: 'xhci_pci'
-> Running build hook: [keymap]
-> Running build hook: [consolefont]
==> WARNING: consolefont: no font found in configuration
-> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: 'qla2xxx'
==> WARNING: Possibly missing firmware for module: 'qla1280'
==> WARNING: Possibly missing firmware for module: 'qed'
==> WARNING: Possibly missing firmware for module: 'aic94xx'
==> WARNING: Possibly missing firmware for module: 'wd719x'
==> WARNING: Possibly missing firmware for module: 'bfa'
-> Running build hook: [filesystems]
-> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: '/boot/initramfs-linux-lts-fallback.img'
-> Early uncompressed CPIO image generation successful
==> Initcpio image generation successful