This one's pretty fucking weird. Almost immediately after I set up hibernation on my system as per the Arch wiki guide, I've wound up in a situation where my environment variables are no longer sourced for either the shell or the KDE graphical session.
My current environment setup is as follows. I have the script /etc/profile.d/xdgbase.sh which first defines the XDG base directory variables system-wide.
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-"$HOME/.config"}"
export XDG_CACHE_HOME="${XDG_CACHE_HOME:-"$HOME/.cache"}"
export XDG_DATA_HOME="${XDG_DATA_HOME:-"$HOME/.local/share"}"
export XDG_STATE_HOME="${XDG_STATE_HOME:-"$HOME/.local/state"}"
After this, I have .bashrc and .bash_profile source my separate alias and env var setups respectively.
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
shopt -s autocd
source $XDG_CONFIG_HOME/shell/aliasrc
[[ -f ~/.bashrc ]] && . ~/.bashrc
export HISTFILE="$XDG_STATE_HOME"/bash_history
HISTIGNORE=" cd *: clear"
source $XDG_CONFIG_HOME/shell/envrc
I also have the pre-startup script env.sh for KDE Plasma to simply source my envrc config for the graphical session.
source $XDG_CONFIG_HOME/shell/envrc
However, now after setting up hibernation, both .bash_profile and env.sh consistently fail to automatically source envrc, causing every variable in that file to be empty/undefined. Even after attempting to revert the hibernation setup, this is still a problem now and I have no idea what might have gone wrong on the way.
How could this have possibly happened, and how might I be able to rework my current setup to fix this?