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.

  • ozymandias117@lemmy.world
    link
    fedilink
    English
    arrow-up
    12
    ·
    1 day ago

    Maybe easier to another suggestion, you’re probably using a systemd based distros -

    journalctl -b -1 will show you the logs from the previous boot, so you could check that after resetting to see if anything was logged

    For some other ideas to narrow down where the issue is…

    If you’re stuck in the frozen state, you can Ctrl+alt+delete 7+ times quickly to tell systemd to try to restart the system. If this works, it means init was still able to process messages

    If that doesn’t work, you could enable Magic Sysrq Key (if disabled in your distro), and then use the key sequence REISUB to try to see if the kernel is still responding and can reset the system

    • Korkki@lemmy.ml
      link
      fedilink
      arrow-up
      4
      ·
      1 day ago

      If you’re stuck in the frozen state, you can Ctrl+alt+delete 7+ times quickly to tell systemd to try to restart the system.

      Less destructive way would be to try to open a terminal session with ctr+alt+f3 (or any f key) If it’s only the gui that’s frozen. Makes it also possible to troubleshoot things from there. I had this issue recently. AMD core boost caused random freezes to kwin.

      • GooseFinger@sh.itjust.worksOP
        link
        fedilink
        arrow-up
        4
        ·
        24 hours ago

        It froze again tonight. Neither ctrl+alt+del spam nor trying to change terminal session worked unfortunately. Seems to be 100% locked up.

  • y0din@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    19 hours ago

    There are many good answers here already, just wanted to add to it.

    It sounds very much like what you’re seeing could be either a driver fault or a memory-related issue. Both can manifest as hard system freezes where nothing responds, not even Ctrl+Alt+Fx or SysRq. You mentioned this briefly before, and that still fits the pattern.

    If it’s a driver issue, it’s often GPU or storage related. A kernel module crashing without proper recovery can hang the whole system—especially graphics drivers like NVIDIA or AMD, or low-level I/O drivers handling your SSD or SATA controller. Checking dmesg -T and journalctl -b -1 after reboot for GPU resets, I/O errors, or kernel oops messages might reveal clues.

    If it’s memory pressure or the OOM killer, that can also lock a machine solid, depending on what’s being killed. When the kernel runs out of allocatable memory, it starts terminating processes to free RAM. If the wrong process goes first—say, something core to the display stack or a driver thread—you’ll see a full freeze. You can verify this by searching the logs for “Out of memory” or “Killed process” messages.

    A failing DIMM or a bad memory map region could also behave like this, even if Windows seems fine. Linux tends to exercise RAM differently, especially with heavy caching and different scheduling. Running a memtest86+ overnight is worth doing just to eliminate that angle.

    If your live USB sits idle for hours without freezing, that strongly hints it’s a driver or kernel module loaded in your main install, not a hardware fault. If it does freeze even from live media, you’re probably looking at a low-level memory or hardware instability.

    The key next steps:

    Check system logs after reboot for OOM or GPU-related kernel messages.

    Run memtest86+ for several passes.

    Try a newer (or older) kernel to rule out regression.

    If it’s indeed a driver or OOM event, both would explain the “total lockup” behavior and why Windows remains unaffected. Linux’s memory management and driver model are simply less forgiving when something goes sideways.

  • DigitalDilemma@lemmy.ml
    link
    fedilink
    English
    arrow-up
    2
    ·
    21 hours ago

    Others have already given some good advice, but rather than let it sit and wait to error, use the program “stress”

    It’ll work specific components hard which can help locate whether it’s a CPU/Heat problem, or Memory, or disk.

    And if it still fails on random things, take a long hard look at your PSU and measure voltages if you can. But if everything else checks out, motherboard could be it. Tiny cracks/dry joints, even inside the pcb layers, can lead to occasional problems that come and go with heat or vibration and are impossible to accurately diagnose beyond swapping it out.

  • polle@feddit.org
    link
    fedilink
    arrow-up
    2
    ·
    21 hours ago

    Sounds to me like your swap is to small. I had similar behaviour on two systems. One with 8gb of ram and one with 16 gb.

  • MonkderVierte@lemmy.zip
    link
    fedilink
    arrow-up
    2
    ·
    21 hours ago

    dmesg/journalctl, then udev (udevadm monitor) and lsusb/lspci might be helpful too. Places to look at (only if you fiddled with them): /etc/fstab for mount options and do you maybe have a weird rule in /etc/udev, /etc/modprobe.d or /etc/sysctl?

  • AllForTwo@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    24 hours ago

    Which distro are you on?

    Was there a kernel update recently by chance? Have you tried falling back to an earlier version? Got any timeshift backups?

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

      Debian 12. When the freezing first started, I lied to myself saying it’ll self-correct with time. I’ve since lost track of which timeshift backup to use. I am a silly fool.

      And there was no kernel update afaik.

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

        I suppose the logging from the Os there is the same as journalctl. I’m new to Linux, but I’ve done Hackintosh quite a bit, so a lot of similar commandlines and debugging. I digress.

        Have you tried making a new user, booting from a live usb or booting into a different desktop environment? I feel those are the lowest hanging fruits where you can check if it hangs universally or just on your main user account. Would help narrow it down a little if you haven’t been able to spot anything in logs.

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

    Unrelated, but I had something relatively similar once with my Inspiron 7520 laptop. In theory, that machine only supports 8GB of RAM, but technically I could put 16 into it and worked fine. Later I upgraded to a different machine and put this laptop aside, but sometimes I set it up if I go to friends place and need a PC to do some light multiplayer lan parties or such.

    For a while, the laptop has a strange locking up issue when I booted 64 bit OSs. Or I don’t know, after my testings, it seemed that booting a 64 bit OS would crash my machine sooner or later. Maybe even right after boot, maybe after when I logged in or used it for some time. Booting into Memtest also locked up eventually the laptop (but running the 32 version of Memtest didn’t). Pulling out either memory stick (2x8GB) solved the issue, it worked with both sticks on both slots, if I used only one. The two sticks together on the other hand made my machine crash after boot, no matter which stick went to which slot.

    Difference is that every OS did this, not just Debian, though Windows seemed to keep up longer in this case, but it also crashed on me.

    Now I don’t have this problem. It just… disappeared after not using the laptop for a while again.

    So… if it’s not software issue, maybe try to reseat your RAM sticks. Or use some compressed air to clean up the slots, maybe check the contacts of the sticks and clean them with some isopropyl and a soft brush.

    It also can be storage issue, if your Windows install works fine on a different drive. Once I had an Ubuntu installed to the same laptop I mentioned and its HDD was failing hard, but the system kept up for a while, just had some really weird issues popping up here and there. But then eventually failed completely. Amongst the weird happenings, random freezes were also a thing with my bad HDD.

  • PriorityMotif@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    1 day ago

    Had the same issue and it was my mouse causing the USB ports to stop working I realized that the clock was still working and it would go into hibernate. Just wouldn’t respond to mouse or kb.

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

      Whole system freezes unfortunately. The only silver lining is that I know exactly what time the crash occurred, since my clock freezes too!

  • Lemmchen@feddit.org
    link
    fedilink
    English
    arrow-up
    1
    ·
    23 hours ago

    When your system freezes, can you still switch TTYs with e.g. Ctrl+Alt+F3 to debug?

    On one of my systems Plasma occasionally hangs, but I can still switch to a different tty and kill it.

  • Agility0971@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    7 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
      ·
      24 hours 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.

  • just_another_person@lemmy.world
    link
    fedilink
    arrow-up
    2
    arrow-down
    1
    ·
    1 day ago
    1. Would be good to know the hardware you’re working, especially if it’s a laptop and the model.
    2. What kind of freeze is this? Black screen, frozen graphics, mouse frozen…etc. Also whether is time-bssed, and how long it takes to freeze.
    3. As a test, boot, and play music continuously until it freezes. Does the sound stop as well?

    In all practical reality, Linux takes A LOT to topple over like this. It certainly would fair better than Windows with wonky hardware, but if it’s a laptop for example, maybe your fans aren’t working and therefore it’s a heat. Just try and define what kind of freeze it is first.

    • GooseFinger@sh.itjust.worksOP
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      23 hours ago

      I’m running a desktop with relatively new hardware. Amd 5900x CPU, AMD 7900 GRE GPU, 32 GB ram, plenty of space and good airflow for stable thermals.

      The freeze is definitely at least frozen desktop and mouse/keyboard. I also tried changing terminal sessions after a freeze tonight and this had no effect, so it’s probably the whole system?

      Good idea with playing sound, I will try this on my next boot.

  • db2@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    1 day ago

    One thing that I did when distro hopping was to have /home be separate like you have, but I would back it up elsewhere and let it be a clean start which I could bring over what I wanted from the backup.

    It was easier than hunting down which dotfile the new distro didn’t like.