Post-install fixes: LUKS unlock delay, Rsibreak logs, Nvidia, Zsh, sleep issues

Hello, new here.
I used Debian before and CachyOS for 2 days, but wanted to try something new…
I encountered some problems after installation, and managed to solve most of them:

  1. Long unlock time with Btrfs/LUKS1/full disk encryption/GRUB2 – about 1 minute:
    Solution:
part="/dev/nvme0n1p2" # my root partition (check with lsblk)
sudo cryptsetup luksDump $part  # Shows iterations in each slot.
sudo cryptsetup luksOpen --test-passphrase --key-slot 0 $part  # Tests if the password is in slot 0; two slots were occupied.
sudo cryptsetup luksChangeKey --pbkdf-force-iterations 500000 $part  # Force fewer iterations (I reduced them 10×).
sudo cryptsetup luksChangeKey --pbkdf-force-iterations 500000 $part  # Run again to land in slot 0.
  1. Rsibreak on KDE/Wayland is polluting the log every second.
    Fix:
sudo sed -i \
's|^Exec=rsibreak --autostart *$|Exec=sh -c '\''QT_LOGGING_RULES="kf5idletime_wayland.debug=false;kf5idletime_wayland.warning=false" rsibreak --autostart'\''|' \
/etc/xdg/autostart/rsibreak_autostart.desktop
  1. 2–3s delay when opening Konsole, KCalc, etc.
    Problem was resolved after installing proprietary drivers for my Nvidia 3050M:

  2. Zsh doesn’t accept inline # comments.
    Fix:
    echo 'set -k' >> .zshrc

  3. I moved Zsh configuration files to .zsh to avoid clutter in $HOME.
    Then I created .zshenv in $HOME with:
    export ZDOTDIR="$HOME/.zsh"
    And at the end of .zshrc:
    export HISTFILE="$ZDOTDIR/.zhistory"
    I wanted to keep .zsh in $HOME/s/ (with my scripts) but it always failed — not sure why. I gave up.

  4. Kernel panic when resuming from [deep] sleep on AC power, and more battery drain with [s2idle] sleep.
    Workaround:

sudo mkdir -p /lib/systemd/system-sleep/
sudo tee /lib/systemd/system-sleep/sleep_deep_batt <<"EOB"
#!/bin/sh
case "$1/$2" in
         pre/*)
             if [ -f /sys/class/power_supply/AC0/online ] && [ "$(cat /sys/class/power_supply/AC0/online)" -eq 1 ]; then
                 echo s2idle > /sys/power/mem_sleep
             else
                 echo deep > /sys/power/mem_sleep
             fi
             ;;
esac
EOB
sudo chmod ugo+x /lib/systemd/system-sleep/sleep_deep_batt

Just need to remember not to resume on AC power if it was suspended on battery.

  1. Double ESC to prepend sudo to a command, without installing all of Oh My Zsh:
cd .zsh
wget https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/refs/heads/master/plugins/sudo/sudo.plugin.zsh
echo "source sudo.plugin.zsh" >> .zshrc

Hope you find this useful :slight_smile:

2 Likes

That is correct - it is a shortcoming of GRUB

You can however change to use LUKS2 but you will have to use another bootloader

Part of this guide [How To] PoC dual-boot Manjaro LUKS / Windows BitLocker can be used for your purpose too.