It started freezing maybe a month or two ago. It happens anytime between a few seconds after the OS loads, to hours or days later. I do not recall downloading anything around when this issue began that could be suspect.

I’ve put off fixing this because I have no idea how to even begin troubleshooting it. Internet searches for “Linux freezes” returns practically countless potential problems.

What are some recommendations? I have my root directory on a 30 GB partition separate from my home directory, which I think makes reinstalling my base image (Debian) easy without losing personal data, so that’s an option. Maybe there’s a system log file that would provide some insight?

I’m Linux dumb so please teach me how to fish!

I’ll add that my Windows install (on a separate drive) doesn’t freeze, and my Linux install is on a new Samsung drive that didn’t report issues, so the problems unlikely hardware related.

02:05 18OCT: Thanks for all the quick responses, a lot of helpful suggestions so far. I should clarify that “my computer freezes” means it is 100% unresponsive until it is rebooted. Ctrl+alt+del spam or changing terminal sessions when its frozen does not get a response. The last few entries in my most recent journalctl boot outputs are different from one another, and the I did not see any errors. For now, I’ll boot a live USB and let it sit for while, see if it crashes again.

  • Agility0971@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    17 hours ago

    Explain how “freezed” are the system

    • is the freeze sudden or does the system gets progressively slower?
    • does the mouse cursor respond?
    • does the audio keep playing in the background? does it repeat a short time interval over and over again?
    • does the system respond to ping requests?
    • does the system accept incoming ssh connections?
    • how random is it? what time interval?
    • is the location random (think consistent wifi / bluetooth devices nearby)
    • is the freeze happening after going to sleep / hibernation / screen blank?
    • does this happen if you aggressively open a lot of apps at the same time? Try it.

    What to do before next system freeze

    • update and upgrade the system
    • create a working directory somewhere where you write down your findings. Does not have to be pretty or anything. Just for your own convenience.
    • Configure REISUB. check files in /etc/sysctl.d/*.conf and look for kernel.sysrq=0. Change it to 1.
    • Enable ctrl+alt+del spam reboot. Update /etc/systemd/system.conf so that you have a line looking like this:
    CtrlAltDelBurstAction=reboot-force
    
    • Reboot
    • Try spamming ctrl+alt+del quickly. Does the system reboot?
    • On next boot try switching to a random tty ctrl+alt+fN where N in {1…12}. You should see a login prompt. Try the REISUB sequence. Press and hold alt+print screen (might require some fn key combination on a laptop) then press, hold and release following letters one at a time: R E I S U B. You should see kernel messages appear on the screen each time you press a button. Don’t try to press them all at once or type them before the output is finished. Your system should reboot after this. Does it work?
    • make sure you can ping your computer from another computer.
    • Configure TCPKeepAlive=no for my-faulty-pc in your ssh config before connecting to avoid having the connection dropped. then run ssh my-faulty-pc journalctl -b0 -k -f > waiting_for_crash.log on another system that will capture the log

    reproduce Here is the easiest part. Make the system hang. Preferably with reproducible steps.

    System is now freezed

    • Go quickly through the first list
    • from the remote host that monitors the logs through ssh. You can close the ssh connection and inspect some of the last lines in the file. Don’t upload it anywhere before sanitizing it to avoid doxing yourself.
    • from the remote system try ssh and pinging.
    • on the frozen host try ctrl+alt+del burst first
    • then try REISUB combo if the burst didn’t work.

    What to do now This part depends a bit on what the outcomes were. At least we’ll know how “deep” the hang is and where it’s worth modifying stuff.

    You say in your post that you’ve tried ctrl+alt+del spam. But did you check that it works when the system is working as intended?

    Edit: minor typo

    • GooseFinger@sh.itjust.worksOP
      link
      fedilink
      arrow-up
      1
      ·
      1 day ago

      Thanks for the comment.

      It froze again tonight, I tried ctr+alt+del spam and nadda, no response.

      I have not tried changing tty ctrl+alt+fn, but I will in the next session. Same with REISUB (not sure what this is yet).

      My first guess for root cause was a ram leak, but my system monitor shows little activity when these crashes/freezes occur. Not that this is a perfect method of ruling this out, but my resource usage doesn’t smell fishy at least.