Table of Contents
- Introduction
- Understanding Log Files
- Common Debugging Scenarios
- Useful Debugging Tools
- Resetting Configuration
- Seeking Further Help
Introduction
Debugging is an essential skill for any Linux user, especially when working with a highly customizable environment like HyprL. This guide will walk you through common debugging techniques, how to interpret log files, and which tools to use to diagnose and resolve issues in your HyprL setup.
Understanding Log Files
Log files are your first line of defense when something goes wrong. They provide valuable clues about errors, warnings, and system behavior.
Hyprland Logs (~/.cache/hyprland/hyprland.log
)
This is the primary log file for the Hyprland compositor. It records startup messages, errors, warnings, and information about window management, rendering, and input.
To view the latest Hyprland logs:
cat ~/.cache/hyprland/hyprland.log
To follow the log in real-time (useful when reproducing an issue):
tail -f ~/.cache/hyprland/hyprland.log
Systemd Journal (journalctl
)
Systemd manages most services on Arch Linux, and journalctl
is the utility to query its journal. This is crucial for debugging user-level services (like PipeWire, Waybar, SwayNC) and system-level issues.
To view all user-specific logs (useful for desktop environment components):
journalctl --user
To view logs for a specific service (e.g., PipeWire):
journalctl --user -u pipewire.service
To follow logs in real-time:
journalctl -f
Waybar Logs
Waybar often logs its output to the systemd journal. You can view its logs specifically:
journalctl --user -u waybar.service -f
Common Debugging Scenarios
Hyprland Not Starting
If Hyprland fails to start (e.g., you’re dropped back to a TTY or login manager):
- Check
~/.cache/hyprland/hyprland.log
: Look for[ERROR]
messages. Common issues include syntax errors inhyprland.conf
or missing dependencies. - Try a minimal config: Temporarily move your
hyprland.conf
and try starting Hyprland. If it works, the issue is in your configuration. You can move it back and comment out sections until you find the culprit.mv ~/.config/hypr/hyprland.conf ~/.config/hypr/hyprland.conf.bak # Try starting Hyprland mv ~/.config/hypr/hyprland.conf.bak ~/.config/hypr/hyprland.conf
- Check
~/.zprofile
: Ensure it correctly executesHyprland
on TTY1.
Application Crashes
If a specific application crashes:
- Run from terminal: Open a terminal (if possible) and launch the application from there. Look for any error messages printed to the console.
- Check application-specific logs: Many applications have their own log files, often in
~/.local/share/
or~/.cache/
. - Systemd Journal: Check
journalctl --user
for any related errors.
Keybindings Not Working
- Verify
hyprctl
: Ensurehyprctl
commands work directly in a terminal (e.g.,hyprctl dispatch exec kitty
). If not, Hyprland might not be running orhyprctl
is not in your PATH. - Check
keybindings.conf
: Review~/.config/hypr/conf/keybindings/default.conf
for typos or incorrect syntax. - Reload Hyprland: After any changes to keybindings, run
hyprctl reload
. - Check for conflicts: Ensure no other application or service is intercepting the keybinding.
Theming/Display Issues
(e.g., Waybar not appearing, wrong resolution, missing icons)
- Waybar: Restart Waybar with
~/.config/waybar/launch.sh
. Checkjournalctl --user -u waybar.service
. - Monitors: Use
hyprctl monitors
to see how Hyprland detects your displays. Check~/.config/hypr/conf/monitors/default.conf
. - Fonts/Icons: Run
fc-cache -fv
to refresh font caches. Ensure icon themes are installed and correctly configured (e.g., in~/.gtkrc-2.0
or application-specific configs). - Wallpaper: Check
~/.wallpaper/
for images. Manually set withswww img /path/to/image.jpg
. Checkswww query
.
Audio Problems
- Check PipeWire status:
systemctl --user status pipewire pipewire-pulse wireplumber
. - Restart audio services:
systemctl --user restart pipewire pipewire-pulse wireplumber
. - Check devices: Use
pactl list sinks
andpactl list sources
to see detected audio devices. - Volume control: Use
pavucontrol
to check volume levels and output devices.
Useful Debugging Tools
hyprctl
The command-line utility for interacting with a running Hyprland instance. Essential for querying state and dispatching commands.
hyprctl clients # List active windows
hyprctl monitors # List connected monitors
hyprctl workspaces # List workspaces
hyprctl dispatch <cmd> # Dispatch a command
fastfetch
A system information tool that provides a quick overview of your hardware and software environment. Useful for sharing system specs when seeking help.
fastfetch
yay
Your AUR helper for installing and managing packages. Use it to check if packages are installed or to reinstall them.
yay -Qi <package_name> # Query installed package info
yay -S <package_name> # Install/reinstall a package
pacman
The official Arch Linux package manager.
pacman -Qi <package_name> # Query installed package info
pacman -Syu # Update system
strace
(Advanced) Traces system calls and signals. Can be very verbose but powerful for deep debugging.
strace <command> # e.g., strace kitty
Resetting Configuration
As a last resort, if you suspect your configuration is corrupted, you can reset parts of it to the HyprL defaults. Always back up your current configuration first!
- Backup:
cp -r ~/.config ~/.config-backup-$(date +%s)
- Remove problematic configs:
rm -rf ~/.config/hypr ~/.config/waybar ~/.config/rofi
(or specific files) - Re-run installer:
bash <(curl -sL https://raw.githubusercontent.com/Manpreet113/hyprL/master/main/setup.sh)
(this will redeploy default configs).
Seeking Further Help
If you’ve exhausted these options and still can’t resolve your issue:
- Check
TROUBLESHOOTING.md
: The top-levelTROUBLESHOOTING.md
file in the project root contains a concise list of common issues and solutions. - GitHub Issues: Search the HyprL GitHub Issues page for similar problems.
- Create a new issue: If your problem isn’t listed, create a new issue. Include:
- Your system information (
fastfetch
output). - A detailed description of the problem.
- Steps to reproduce the issue.
- Any relevant log file snippets (Hyprland, journalctl, etc.).
- Your system information (
- Community Support: Join the HyprL Discord server for real-time assistance from the community.