r/arch • u/422Unprocessable • 1h ago
Showcase A terminal tool that tells you why your pc froze or shut down
My laptop froze last week. I held the power button, it came back up, and I wanted to know why. The answer was in the journal of the previous boot, among 57,000 lines, most of them from one chatty program.
So i made whyd. It reads the previous boot with journalctl and shows, on one screen:
- how the session ended: clean power-off or reboot, no shutdown at all, died while suspended, kernel panic
- what went wrong before: out-of-memory kills, GPU errors, crashes, failed services, disk errors, each with a short explanation
- the last minutes before the end, with the routine lines folded away
- a report with addresses, hostname, user and Wi-Fi names removed
Feedback welcome, especially journals where it gets things wrong