The fact that your computer is fine for a couple of days and then suddenly shuts down suggests that it might be a intermittent issue. The dmesg output you provided indicates that the system journal was corrupted or not properly shut down, which could be a sign of a crash or unexpected shutdown.
Here are a few potential explanations and next steps:
- Journal corruption: The error message you saw in
dmesg suggests that the system journal was not properly shut down, which could be a sign of a crash or unexpected shutdown. This might be related to a bug in systemd-journald or a problem with the journal storage.
- Systemd issues:
systemd is responsible for managing system services, including power management and suspend. It's possible that there's a bug or configuration issue with systemd that's causing the shutdowns.
- Kernel panic: A kernel panic can cause the system to shut down unexpectedly. Check the
dmesg output for any signs of a kernel panic, such as a message indicating that the system is "rebooting" or "panicking".
- Hardware issues: Although you mentioned that the computer doesn't overheat or run out of power, it's still possible that there's a hardware issue causing the shutdowns. For example, a faulty RAM module or a problem with the power supply could cause the system to crash.
To further diagnose the issue, you can try the following:
- Check the system logs: Run
journalctl -b to check the system logs for any errors or warnings related to the shutdowns. You can also use journalctl -k to check the kernel logs.
- Enable debug logging: You can enable debug logging for
systemd by running sudo systemctl edit systemd-journald and adding the following lines:
[Service]
Environment=SYSTEMD_LOG_LEVEL=debug
Then, restart the systemd-journald service by running sudo systemctl restart systemd-journald.
3. Check for kernel crashes: Run sudo dmesg | grep -i "panic" to check for any kernel panic messages.
4. Run a memory test: You can run a memory test using memtest86+ to check for any issues with your RAM.
5. Check the BIOS settings: Double-check your BIOS settings to ensure that there aren't any settings that could be causing the shutdowns.
To help you further, please provide more information about your setup: