Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Linux distros freezing randomly  (Read 24953 times)

0 Members and 1 Guest are viewing this topic.

trevorpe

    Topic Starter


    Beginner

    Thanked: 3
    • Yes
  • Computer: Specs
  • Experience: Experienced
  • OS: Linux variant
Linux distros freezing randomly
« on: April 30, 2014, 07:49:55 PM »
Hi,

I'm having a problem with Linux distros (as in the problem has never happened when running Windows).

Long story made short: If I boot into Xubuntu, it will boot normally, work for awhile and then freeze
(seemingly) randomly. If any sound was playing, it loops and then stops. At this point, nothing works
and the computer must be shut down forcefully using the power button. The mouse goes dead (light goes
out) and the keyboard is completely unresponsive. I've tried REISUB - no result.

Long story: I built a new PC (see specs below) a couple of months ago and installed Kubuntu 13.10 at
first. I can't quite remember, but I'm pretty sure it ran fine for a couple of weeks. Then, it would
randomly start to freeze up and become completely unresponsive. The mouse dies and the keyboard
doesn't do anything. If any sound was playing at the time (though it still happens without), it loops
for a few seconds and it stops as well. When Kubuntu 14.04 came out, I installed it. Same problem
(and it was really sluggish). I installed Xubuntu 14.04, and the problem seemed to go away for a bit.
But then it came back again.

I though maybe it was something to do with the Ubuntu base, so I tried Fedora 20 (XFCE spin). Still
freezing.

I've tried the REISUB commands with no result. I've checked the logs and can't find anything at the
times of the freezes (it's locking up so badly that I presume the kernel can't even write anything to
them). I can copy the output of the logs here if needed.

I thought it was maybe the video card drivers, so I've tried multiple drivers (nVidia driver, nVidia
driver from "updates" package, and Nouveau). None of them seemed to stop the problem.
I reset my BIOS (UEFI, UEFI BIOS, whatever you care to call it) and re-seated my RAM. I ran
Memtest86+ and it passed with no errors.

I very highly doubt it has anything to do with temperatures (huge cooler on the CPU and the GPU seems
to be fine as well). Haven't done any overclocking on anything. The problem happens under no stress
(or minimal stress), so I don't figure there would be much to get temperatures up anyway.

I've done some Googling, but there's only so much you can get with "linux freezes randomly". The
complete freezing leads me to think towards hardware issue, but the fact that it never happens at all
on Windows 8 leads me to think software issue (or maybe Windows handles a hardware issue
differently?).

Any ideas of how to diagnose the problem, or even better, what the problem is?

Thank you!
Trevor

System specs:
Motherboard: ASUS M5A97 (http://www.newegg.ca/Product/Product.aspx?Item=N82E16813131873)
Video Card: ASUS GTX650 TI 2GB (http://www.newegg.ca/Product/Product.aspx?Item=N82E16814121725)
PSU: Cooler Master i600 (http://www.newegg.ca/Product/Product.aspx?Item=N82E16817171083)
CPU: AMD FX-6350 Vishera 3.9 GHz (http://www.newegg.ca/Product/Product.aspx?Item=N82E16819113327)
RAM: G.Skill Sniper Series 8GB (http://www.newegg.ca/Product/Product.aspx?Item=N82E16820231460)
SSD: Kingston SSDNow V300 (http://www.newegg.ca/Product/Product.aspx?Item=N82E16820721106)
ODD: (http://www.newegg.ca/Product/Product.aspx?Item=N82E16827135204)
OS: Dual booting Windows 8.1 (64-bit) and Xubuntu 14.04 (64-bit)
Trevor P.

DaveLembke



    Sage
  • Thanked: 662
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: Linux distros freezing randomly
« Reply #1 on: May 01, 2014, 04:22:39 PM »
sounds like a memory leak or problem. Have you run memtest86 on this system to see if it passes 3 full tests?

Also I have heard of some people having issues with SSD's and Linux. Do you have a HDD to test with to load linux to and see if it behaves? If the SSD is causing issues with Linux swap file etc you can also have this issue.

Geek-9pm


    Mastermind
  • Geek After Dark
  • Thanked: 1026
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: Linux distros freezing randomly
« Reply #2 on: May 01, 2014, 07:12:31 PM »
This reference may shed some light.
Unified Extensible Firmware Interface -Wikipedia
Earlier versions of Linux may not be compatible unless the BIOS is wet to a legacy mode for older OS.
Criticism of the new BIOS. (From above link.)
Quote
Numerous digital rights activitists have protested against UEFI. Ronald G. Minnich, a co-author of coreboot, and Cory Doctorow, a digital rights activist, have criticized EFI as an attempt to remove the ability of the user to truly control the computer.[81][82] It does not solve any of the BIOS's long-standing problems of requiring two different drivers—one for the firmware and one for the operating system—for most hardware.[83]
Open source project TianoCore also provides the UEFI interfaces.[84] TianoCore lacks the specialized drivers that initialize chipset functions, which are instead provided by Coreboot, of which TianoCore is one of many payload options. The development of Coreboot requires cooperation from chipset manufacturers to provide the specifications needed to develop initialization drivers.
If that would make a difference, you could try doing a Linux install with the BIOS set for compatibility with older OS.

Of course, Windows 8 was designed with or  for the new BIOS.

Read the link above for more issues with the new firmware.

trevorpe

    Topic Starter


    Beginner

    Thanked: 3
    • Yes
  • Computer: Specs
  • Experience: Experienced
  • OS: Linux variant
Re: Linux distros freezing randomly
« Reply #3 on: May 02, 2014, 02:01:51 PM »
@DaveLembke: I ran Memtest86+, but not for three full passes (but there were no errors for the time it was running). I'll try again to make sure.

When I first installed, I installed to a partition on my HDD, set it up, then copied to my SSD. It has still happened on the HDD though. My SSD was still connected to the machine though, just not mounted. Think this would affect anything?

@Geek-9pm: Sorry, I should have mentioned that I'm booting everything in BIOS mode, not UEFI. I didn't want to get into EFI complications and my drives aren't big enough to require GPT, so I figured I'll stick with the old for now.
Trevor P.

DaveLembke



    Sage
  • Thanked: 662
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: Linux distros freezing randomly
« Reply #4 on: May 02, 2014, 06:05:12 PM »
Right now your stuck having to swap out hardware until you find the cause, and if swapping with exact hardware you may not resolve issue if there is some sort of driver issue with hardware etc.

Do you have any spare hardware on hand to swap say Video Card, RAM, and other components one at a time to try to find what piece of hardware when swapped out causes this build to behave?

For the fact that Windows is happy with it, and you have run memtest with no issues, I feel you have run into a driver issue with a chipset etc which is causing the problems, however I would have expected the problem to disappear when trying other distros, however many distros for drivers share from the same driver pool for the kernel that is running etc.

trevorpe

    Topic Starter


    Beginner

    Thanked: 3
    • Yes
  • Computer: Specs
  • Experience: Experienced
  • OS: Linux variant
Re: Linux distros freezing randomly
« Reply #5 on: May 02, 2014, 06:37:24 PM »
I was hoping it wouldn't come down to that, but I think you're right. It's probably my best bet. I don't have any spare hardware on hand. I'll have to see if I can scrounge up some extra parts from somewhere.

On a side note, my video card is not UEFI-compatible (my board has a compatibility mode, using BIOS mode for hardware that requires it I presume). Do you think this may have something to do with it? There is a UEFI-compatible update available, but I'd like to avoid flashing firmware if possible.
Trevor P.

DaveLembke



    Sage
  • Thanked: 662
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: Linux distros freezing randomly
« Reply #6 on: May 02, 2014, 06:53:43 PM »
If UEFI is disabled and LegacyOS support enabled if an option, you should be all set.

I had to rid a laptop of Windows 8 to downgrade to Windows 7 64-bit, and Windows 8 held the BIOS hostage with UEFI to the point that the hot key to get into the BIOS was disabled by Windows 8. On top of this I upgraded it to Windows 8.1 prior to wanting to go to Windows 7 after frustrations with 8 and 8.1, and the procedure to get rid of Windows 8.1 is ever so slightly different for 8.1 than it is for 8 ( * intentional on Microsofts part to try to protect the Windows 8.1 UEFI anchor to the hardware ), and so the procedures out there for removing Windows 8 are wrong for removal of 8.1, so it was hours of frustration and research and I finally rid the brand new laptop of UEFI and Windows 8 / 8.1. However to install Windows 7 64-bit on this system I had to enable a feature in my ASUS BIOS for LegacyOS support. Not sure if you have to track down that Legacy OS ( enabled ) option or not. Mine was set to ( disabled ) by default with UEFI disabled and it wasnt until I enabled this that I was able to install Windows 7 successfully. Since my laptop and your motherboard are both ASUS I'd look over your BIOS carefully to verify that something like that legacy OS support wasn't overlooked.

BC_Programmer


    Mastermind
  • Typing is no substitute for thinking.
  • Thanked: 1140
    • Yes
    • Yes
    • BC-Programming.com
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 11
Re: Linux distros freezing randomly
« Reply #7 on: May 02, 2014, 09:34:16 PM »
Windows 8 held the BIOS hostage with UEFI to the point that the hot key to get into the BIOS was disabled by Windows 8.
Windows 8 (nor any UEFI OS Loader) can make changes of that sort.

UEFI has OS support on Windows going back to Vista x64. the new capability that most people mean when they say "UEFI" for new machines, and particularly with regards to Windows 8 refers to the Secure Boot feature added in the latest UEFI revision, which WIndows 8 was the first OS to support. Secure Boot basically just makes sure the OS Loader is digitally signed. The only systems running Windows 8 where it cannot be disabled are RT machines. (Basically in order to allow WInRT on a system the manufacturer has to prevent Secure boot from being disabled).

The purpose of Secure Boot is to prevent unauthorized OS Loaders from being installed, since they must be digitally signed.

Quote
On top of this I upgraded it to Windows 8.1 prior to wanting to go to Windows 7 after frustrations with 8 and 8.1, and the procedure to get rid of Windows 8.1 is ever so slightly different for 8.1 than it is for 8 ( * intentional on Microsofts part to try to protect the Windows 8.1 UEFI anchor to the hardware )

With UEFI, Boot loaders stored in an EFI System Partition, and the paths to those Boot Loaders are stored in NVRAM. In both cases the procedure is to simply disable Secure Boot and format and install the operating System you want. If anything was non-standard it was the manufacturer's doing within the BIOS. (For example, it seems possible that the BIOS in Manufactured machines may disable the ability to access the CMOS Setup if Secure Boot is enabled and functioning). In such a case you can disable Secure Boot from within Windows, though (Hold shift while clicking Restart, and when it reboots you get a menu that allows you to select Troubleshoot-> and then change UEFI Firmware settings, which includes disabling Secure Boot.

Quote
brand new laptop
The BIOS restrictions you encountered were almost certainly added by the manufacturer.

What I find interesting about UEFI is the confusion about what it actually means; for example it is often thought that it allows (for example) Windows 8/Microsoft to install Boot-time code that runs in parallel with or as part of the BIOS. In reality, however, the UEFI BIOS simply stores information that might otherwise be handled by a Boot Loader such as NTLDR, LILO, or GRUB; NVRAM Stores the locations of currently registered Operating System Loaders and the BIOS transfers control to one of those OS Loaders in UEFI where in a standard EFI boot it would transfer control over to a 512 Byte Boot Loader in a Boot Sector. No Microsoft Code runs before that OS Loader starts running, so Windows 8 cannot disable the Setup key. So if there is no shortcut key available that is the doing of the BIOS (I wouldn't be surprised if some Manufacturer's BIOSs disable the ability to enter the Setup Program if Secure Boot is active.

Quote
However to install Windows 7 64-bit on this system I had to enable a feature in my ASUS BIOS for LegacyOS support. Not sure if you have to track down that Legacy OS ( enabled ) option or not. Mine was set to ( disabled ) by default with UEFI disabled and it wasnt until I enabled this that I was able to install Windows 7 successfully. Since my laptop and your motherboard are both ASUS I'd look over your BIOS carefully to verify that something like that legacy OS support wasn't overlooked.

In my case my GA-Z87X-UD3H has three options- UEFI and Legacy, Legacy Only, and UEFI Only. of note: Windows 7 x64 does support UEFI. In order to Install Vista x64 (which also supports it) or Win 7 x64 on a UEFI-enabled System F12 (or an appropriate "select boot device" startup option) should be selected and the Optical Drive chosen to boot with UEFI. As an example when I use F12 on this system it shows my DVD-RW Drive twice: one under a 'Legacy Boot' Section, and another within a "UEFI Boot". The former uses the standard EFI and Boot Sector to boot; the latter of course boots it as UEFI. For the Vista and Windows 7 Discs the Disc has to be booted through UEFI for the installation to install on a UEFI system. (Specific BIOS implementations of course differ with regard to what the defaults are and whatnot).

Fundamentally UEFI itself changes the boot options from being a list of Disks to being a list of OS Loaders. It is the Secure Boot and the FUD that seems to be being spread about it that has left a lot of people confused about exactly what UEFI is, and how it has actually been around since 2003.

On Topic- I'm fairly sure the Problem being experienced within Linux Distributions has nothing to do with UEFI support or lack thereof.

My suspect would be HDD Failure. Even if they are installed to the same drive. I had a single HDD configured for Windows 7 as well as Linux Mint 10, and for some time I had the opposite effect such that Windows 7 would lock-up hard and require a reboot. Eventually Windows 7 failed to boot at all., and eventually I had to repartition the drive and cordon off a large section at the start to avoid the problem section of the disk, or I would encounter the same problem.
I was trying to dereference Null Pointers before it was cool.

Geek-9pm


    Mastermind
  • Geek After Dark
  • Thanked: 1026
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: Linux distros freezing randomly
« Reply #8 on: May 02, 2014, 10:16:09 PM »
Quote
On Topic- I'm fairly sure the Problem being experienced within Linux Distributions has nothing to do with UEFI support or lack thereof.
BC, you need to ask  the Linux users.
Search:
Linux user hate UEFI  BIOS

Quote
I hate UEFI : linux - Reddit
 
www.reddit.com/r/linux/comments/1qlcft/i_hate_uefi/‎
Reddit
Nov 13, 2013 - Create a new user: this will automatically copy over the files from /etc/skel (i.e. all the #! .... I built a custom PC with a UEFI motherboard on i

Quote
https://www.mail-archive.com/[email protected]/msg01908.html
Mar 18, 2012 - Re: [Linux-users] A new acronym to hate: UEFI · John Carter Sun ... Check your bios set up munu or > motherboard documentation.

Quote
Linus Torvalds on Windows 8, UEFI, and Fedora | ZDNet
 http://www.zdnet.com/blog/open-source/linus-torvalds-on-windows-8-uefi-and-fedora/11187
ZDNet
by Steven Vaughan-Nichols
Jun 10, 2012 - A lot of Linux people hate this compromise. Linus Torvalds .... This UEFI bios Lockout /Lockdown is nothing but another Micro$haft crime. ... So Linux users can still boot with Lilo or Grub -- but only in non Secure Boot mode.



BC_Programmer


    Mastermind
  • Typing is no substitute for thinking.
  • Thanked: 1140
    • Yes
    • Yes
    • BC-Programming.com
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 11
Re: Linux distros freezing randomly
« Reply #9 on: May 03, 2014, 12:43:44 AM »
BC, you need to ask  the Linux users.
Search:
Linux user hate UEFI  BIOS

Explain to us how UEFI could cause intermittent freezes when the system has already successfully booted.

It can't.

Second, Linux works fine with UEFI. In fact GRUB 2 is a bootloader designed specifically do provide UEFI Boot-loader support. ELILO is a Version of the LILO MBR Boot-Loader for UEFI systems.

The one thing that isn't supported is Secure Boot which is a Option found in CMOS setup of Motherboards that support it. It is Disabled by default on the majority of Motherboards. (prebuilt machines with Win8 usually have it enabled).

Secure boot does one thing and one thing only: it validates at boot time that the OS Loader being executed is digitally signed with a key that is stored in NVRAM. Most motherboards allow the list of keys to be configured as well. Windows RT systems that come with Windows 8RT are "hard-coded" and only Allow code signed by Microsoft to run.

UEFI doesn't have any 'restrictions' that are being tagged to it; the only thing UEFI actually does is define that there be a system partition that has the OS boot loaders. the Path to those OS Boot Loaders is stored in NVRAM and the System knows which Operating Systems are selectable. When one is selected it loads that file and runs it.

This differs from the BIOS method where there could only ever be a single boot loader installed and it had to be exactly 512 bytes in a specific location on the disk. That's the fundamental difference.

So far your sources are a reddit post, a mailing list message, and a generic Linux rant.

The Reddit poster was successful at installing Debian on their UEFI system.


Any article you find about UEFI is RIFE with inaccuracies. Take This one for example.  The second paragraph starts:

Quote
Microsoft is mandating the use of the UEFI (Unified Extensible Firmware Interface) secure boot-loading capability with Windows 8
And it's already false. This is a fallacy repeated all over the place from articles of that time period- where they claim that Windows 8 requires UEFI.

Windows 8 does not require UEFI and can be installed using a traditional MBR. Windows RT is the version that requires active Secure Boot capabilities and the fact is that Windows RT is just a tablet OS on the likes of Android or iOS; both of those systems have similar protections, which is why people root their android phones and tablets and jailbreak their iPhones and iPads. Windows 8 RT's Secure Boot requirement is pretty much the same idea.

But it is not present on the desktop version. The Microsoft Haters took up that torch and ran with it, and have been repeated the same downright incorrect claims ever since.
I was trying to dereference Null Pointers before it was cool.

trevorpe

    Topic Starter


    Beginner

    Thanked: 3
    • Yes
  • Computer: Specs
  • Experience: Experienced
  • OS: Linux variant
Re: Linux distros freezing randomly
« Reply #10 on: May 03, 2014, 01:42:56 PM »
@BC_Programmer: My HDD is partitioned similarly to what you described. I have Windows 8 and had Xubuntu on it while preparing it (before moving to SSD). Now that you mention it, there is one area that all the OSes would have been accessing: a /var partition and a /tmp partition on the HDD. It's not such a big deal when on the HDD, but I told the installer to mount those anyway since I would be moving it to the SSD, where I like having those directories off the SSD to minimize reads/writes. I will probably temporarily move the contents to the SSD and boot Xubuntu without mounting those partitions and see if there's a difference.
Trevor P.

BC_Programmer


    Mastermind
  • Typing is no substitute for thinking.
  • Thanked: 1140
    • Yes
    • Yes
    • BC-Programming.com
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 11
Re: Linux distros freezing randomly
« Reply #11 on: May 03, 2014, 04:37:38 PM »
@BC_Programmer: My HDD is partitioned similarly to what you described. I have Windows 8 and had Xubuntu on it while preparing it (before moving to SSD). Now that you mention it, there is one area that all the OSes would have been accessing: a /var partition and a /tmp partition on the HDD. It's not such a big deal when on the HDD, but I told the installer to mount those anyway since I would be moving it to the SSD, where I like having those directories off the SSD to minimize reads/writes. I will probably temporarily move the contents to the SSD and boot Xubuntu without mounting those partitions and see if there's a difference.

If you want to eliminate the HDD as a problem you can run a surface scan. If hte filesystem you are using is ext4 you can do that with fsck.ext4 -c
I was trying to dereference Null Pointers before it was cool.

trevorpe

    Topic Starter


    Beginner

    Thanked: 3
    • Yes
  • Computer: Specs
  • Experience: Experienced
  • OS: Linux variant
Re: Linux distros freezing randomly
« Reply #12 on: May 05, 2014, 12:25:09 PM »
I ran fsck on my ext4 partitions. Nothing abnormal.

I did a fresh install of Xubuntu on my HDD and it froze not too long after booting.
Then I did a fresh install on my SSD, but with the HDD disconnected. Still froze after a while.

I'm typing this from another fresh install, this time on my HDD with the SSD disconnected. Too early to say for sure, but it hasn't frozen yet.

Still think it's a hard drive issue?
Trevor P.

trevorpe

    Topic Starter


    Beginner

    Thanked: 3
    • Yes
  • Computer: Specs
  • Experience: Experienced
  • OS: Linux variant
Re: Linux distros freezing randomly
« Reply #13 on: May 21, 2014, 04:25:52 PM »
After leaving it for a bit since I was busy, I'm back to having some time to diagnose my Linux issues.

So as it stands, Xubuntu seems to freeze very shortly after boot, whether running it from my HDD or SSD. It does seem to freeze sooner when booting from the SSD, as compared to the HDD.

I've tried:
- Root on HDD, with other partitions mounted (home, tmp, var)
- Root on SSD, with other partitions mounted (home, tmp, var)
- Root on HDD with SSD completely disconnected, no other partitions mounted besides root
- Root on SSD with HDD completely disconnected, no other partitions mounted besides root

I also thought, "The live distros have never frozen." So, I also tried the live CD used to install. It too froze after awhile. I have not tried it with both drives disconnected however.

I'm also thinking while writing this, I don't believe Puppy Linux has ever frozen if that provides any clues. I use it when I need a quick little live distro to copy files over or edit configuration files if needed. I may try to see if that will freeze. Could there be something that Puppy doesn't have that the heavier, desktop distros would have? (That could probably be a very long list...)

I ran a surface scan of my ext4 partitions using fsck as suggested. I didn't see any errors.
I ran Memcheck86+ for nearly 5 hours today, it got through 3 full passes with no error, nearly a fourth before I shut it down.

I appreciate all of the help. I miss my Linux distro!
Trevor P.

DaveLembke



    Sage
  • Thanked: 662
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: Linux distros freezing randomly
« Reply #14 on: May 21, 2014, 04:39:36 PM »
So with a live distro like Knoppix it runs with no problems at all, and its only after an install that you have problems?