Ubuntu 22.04.1 运行一段时间后死机崩溃的问题求助
Hey Stella, sorry to hear you're stuck with this frustrating random freeze-and-restart issue—let's walk through some practical troubleshooting steps to get to the bottom of this:
Dig into system logs first
Since the system restarts after freezing, the logs from the previous boot will hold critical clues. Runjournalctl -b -1to pull up logs from your last session (before the restart). Scan the final few minutes of output for keywords likeERROR,CRITICAL, oramdgpu—these will likely point to whether the issue is tied to your AMD GPU drivers. You can also check the/var/log/syslogfile withgrep -i "freeze\|reboot\|amdgpu" /var/log/syslogto filter relevant entries quickly.Verify and update your AMD GPU drivers
Ubuntu 22.04 typically uses the open-sourceamdgpudriver by default. First, confirm which driver your system is using withlspci -k | grep -A 5 -i vga—look for the "Kernel driver in use" line.
Next, make sure all system packages (including driver components) are up to date: runsudo apt update && sudo apt full-upgradeand reboot. If the issue persists, you could try tweaking driver-specific GRUB parameters (since your initial edit didn't help) – addamdgpu.reset=1oramdgpu.noretry=0to theGRUB_CMDLINE_LINUX_DEFAULTline in/etc/default/grub, then runsudo update-gruband restart. For testing, you can also try addingnomodeset(this disables GPU acceleration temporarily) – if the freezes stop, that confirms the problem is driver-related.Check for overheating
Random crashes often tie back to overheating, especially with GPUs. Install thelm-sensorstool withsudo apt install lm-sensors, then runsensorsto monitor CPU and GPU temperatures. If you see temps spiking above 90°C before a freeze, you might need to clean dust from your GPU/fans or check if cooling fans are functioning properly.Test your hardware (memory and disk)
Faulty memory or disk errors can cause unpredictable crashes:- For memory: Install
memtesterwithsudo apt install memtester, then runsudo memtester 4096 2(replace 4096 with 1/4 of your total RAM, e.g., 16384 for 16GB) to stress-test your memory. Alternatively, usestress-ngwithsudo stress-ng --vm 4 --vm-bytes 8G --timeout 60sto push your RAM hard. - For disk: Use
sudo smartctl -a /dev/nvme0n1(replace with your disk device, like/dev/sdafor SATA) to check SMART health data—look for any "Failed" or "Warning" statuses. You can also run a file system check withsudo fsck /dev/sda1(do this from a live USB or single-user mode to avoid mounting issues).
- For memory: Install
Rule out user profile issues
Sometimes corrupted user configs can cause odd system behavior. Create a test user withsudo adduser testuser, log into this new account, and use the system as you normally would. If the freezes don't happen here, you'll know the problem is tied to your main user's configuration files.
备注:内容来源于stack exchange,提问作者Stella

