How do I troubleshoot random freezes, where the system does not accept any input?
I have a computer that used to run Ubuntu a few years back without any problems (I don't know wether any hardware has changed). Recently, no matter which Linux distribution I install, it will randomly freeze to a point where the cursor is frozen and it doesn't respond to any keyboard input, including alt+sysrq (when the system isn't frozen I can alt+sysrq REISUB and it will reboot). There are no answers in What should I do when Ubuntu freezes? that appear to 'work' in this situation.
I've triggered the freeze with the following systems: Ubuntu 12.04, Ubuntu 14.04, Ubuntu 14.10, Ubuntu 15.04, Ubuntu 15.10, as well as Fedora 22 and 23 (all 64 bit versions). It happens with XFCE, Unity and even Gnome, it happens with nouveau and different versions of the proprietary nvidia driver. It can freeze even as early as during the installation, or during a live session. Sometimes the system will run for 5 minutes before freezing and sometimes two hours. The same hardware can run a Windows operating system for days without issues.
I have tried setting up Kernel Crash Dump, but it doesn't seem to trigger when the system freezes. There are no entries in syslog or kern.log that appear to have been written just before the freeze. On some freezes, the last entry in syslog or kern.log was 30 minutes earlier.
Update: I have disconnected a wireless network card as well as a USB webcam, will let the machine run over night to see if one of those is causing it. Will update with results.
Update 2: It froze again. I'm literally out of ideas. Any suggestions are welcome.
Update3: Some hardware specs that might be relevant:
Motherboard: Sabertooth 990FX R2.0
CPU: AMD FX-8350 Black Edition
GPU: GeForce GTX 660
Update3:
I have recently upgraded the bios of the Sabertooth 990FX R2.0 to Version 2501 (the latest version currently available), without any luck.
Update 4:
I've ran a memtest for 9 hours, several passes and not a single error. There are two DIMMS seated in slot 2 and 4 on the motherboard. I have now tried removing the one from slot 4, and will see if I can reproduce the freeze. Will swap them around afterwards.
Update 5:
It has run for many hours without freezing so far, I'm finding it hard to believe myself. It might be solved, but I don't understand why. I guess I'll try and give it a few days to be sure.
Update 6:
There have been no freezes, and I must conclude that they were caused by faulty memory. Since the memtest didn't show any errors, chances are I would've never figured out what was wrong had I not started disconnecting 'random' parts. Is this the best approach really? If someone can write up a more systematic way to go at something like this, perhaps with troubleshooting from within Ubuntu, I will award them the bounty.