1

I am experiencing random freezes in Ubuntu. I went through several fixes proposed (checking nvidia drivers, etc..) but no solution. I bumped into Ubuntu 17.04 Freezing Issue and tried to change the crypttab. I followed the instruction but upon opening with Gedit or nano the file was empty. Could this be the issue?

EDIT: The computer was assembled by me. With:

MSI 1151 Z170A Krait Gaming 3X Motherboard
Intel I7-6700K 1151 Skylake 8MB Cache 4.00 GHz Processor
Crucial Ballistix Sport LT 64GB set 16GBx4 DDR4 2400 288pin whit RAM
Nvidia GeForce GT610

The driver from nvidia I installed is the 340.135 so I am not using the Xorg nouveau stuff.

Also I changed GRUB to include

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_idle.max_cstate=1"

blkid:

/dev/sda1: UUID="5AAD-028F" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="39bd6592-a9af-4cba-bc68-0bcc9a860d9c"
/dev/sda2: UUID="6832cbef-4ee4-422d-9424-fbb307ed1ec1" TYPE="ext4" PARTUUID="7a631023-db65-417f-ad30-039a619320ac"
/dev/sdb1: UUID="7c3e97ec-2fc4-42df-801f-6dff9dec4ee6" TYPE="ext4" PARTUUID="1113ee0c-6451-4762-a15d-bafe9a9c80ed"

/etc/fstab:

# /etc/fstab: static file system information.
# Use 'blkid' to print the universally unique identifier for a device; this may be used with UUID= as a more robust way to name devices that works even if disks are added and removed. See fstab(5).
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda2 during installation
UUID=6832cbef-4ee4-422d-9424-fbb307ed1ec1 /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/sda1 during installation
UUID=5AAD-028F  /boot/efi       vfat    umask=0077      0       1
# /home was on /dev/sdb1 during installation
UUID=7c3e97ec-2fc4-42df-801f-6dff9dec4ee6 /home           ext4    defaults        0       2
/swapfile 
                                none            swap    sw              0       0
UUID=5AAD-028F  /boot/efi   vfat    defaults    0   1

free -h:

              total        used        free      shared  buff/cache   available
Mem:            62G        1.1G         60G        135M        812M         61G
Swap:          2.0G          0B        2.0G

swapon -s:

Filename                Type        Size    Used    Priority
/swapfile                               file        2097148 0   -1

lshw:

  *-firmware                
       description: BIOS
       vendor: American Megatrends Inc.
       physical id: 0
       version: 2.70
       date: 10/17/2016
       size: 64KiB
       capacity: 15MiB
       capabilities: pci upgrade shadowing cdboot bootselect socketedrom edd int13floppy1200 int13floppy720 int13floppy2880 int5printscreen int9keyboard int14serial int17printer acpi usb biosbootspecification uefi
  *-memory
       description: System Memory
       physical id: 3c
       slot: System board or motherboard
       size: 64GiB
     *-bank:0
          description: DIMM DDR4 Synchronous 2133 MHz (0.5 ns)
          product: BLS16G4D240FSC.16FAD
          vendor: 859B
          physical id: 0
          serial: A01EE062
          slot: ChannelA-DIMM0
          size: 16GiB
          width: 64 bits
          clock: 2133MHz (0.5ns)
     *-bank:1
          description: DIMM DDR4 Synchronous 2133 MHz (0.5 ns)
          product: KHX2400C14D4/16G
          vendor: Kingston
          physical id: 1
          serial: A82A51FA
          slot: ChannelA-DIMM1
          size: 16GiB
          width: 64 bits
          clock: 2133MHz (0.5ns)
     *-bank:2
          description: DIMM DDR4 Synchronous 2133 MHz (0.5 ns)
          product: BLS16G4D240FSC.16FAD
          vendor: 859B
          physical id: 2
          serial: A01EE17E
          slot: ChannelB-DIMM0
          size: 16GiB
          width: 64 bits
          clock: 2133MHz (0.5ns)
     *-bank:3
          description: DIMM DDR4 Synchronous 2133 MHz (0.5 ns)
          product: KHX2400C14D4/16G
          vendor: Kingston
          physical id: 3
          serial: A12A5202
          slot: ChannelB-DIMM1
          size: 16GiB
          width: 64 bits
          clock: 2133MHz (0.5ns)
  *-cache:0
       description: L1 cache
       physical id: 42
       slot: L1 Cache
       size: 256KiB
       capacity: 256KiB
       capabilities: synchronous internal write-back unified
       configuration: level=1
  *-cache:1
       description: L2 cache
       physical id: 43
       slot: L2 Cache
       size: 1MiB
       capacity: 1MiB
       capabilities: synchronous internal write-back unified
       configuration: level=2
  *-cache:2
       description: L3 cache
       physical id: 44
       slot: L3 Cache
       size: 8MiB
       capacity: 8MiB
       capabilities: synchronous internal write-back unified
       configuration: level=3
  *-memory UNCLAIMED
       description: Memory controller
       product: Sunrise Point-H PMC
       vendor: Intel Corporation
       physical id: 1f.2
       bus info: pci@0000:00:1f.2
       version: 31
       width: 32 bits
       clock: 33MHz (30.3ns)
       capabilities: bus_master
       configuration: latency=0
       resources: memory:dd444000-dd447fff
David Foerster
  • 36,264
  • 56
  • 94
  • 147
Neco
  • 13
  • Hopefully @heynnema could give some help on this – Neco Sep 05 '17 at 17:45
  • Apparently PMs don't work unless the user has commented before in the question. I suggest that you actually describe the problem and include hardware specs and how and what nvidia drivers you tried to install. –  Sep 05 '17 at 18:27
  • Let me add, please don't use gedit on /etc/crypttab nano is better, and if you had set up encryption and didn't add to that file for permanent mount at boot then whatever your issue is might start from there! – George Udosen Sep 05 '17 at 18:48
  • How can I help? – heynnema Sep 05 '17 at 19:00
  • Show me sudo blkid and cat /etc/fstab and cat /etc/crypttab and free -h and swapon -s. Please edit that info into your original question with copy/paste, not into the comments, please. – heynnema Sep 05 '17 at 21:00
  • ps: What make/model computer? What exact processor? – heynnema Sep 06 '17 at 09:57
  • @Neco make sure to ping me at @heynnema when you update your question/comments or I may miss that info. Please see my answer. – heynnema Sep 07 '17 at 00:09
  • @George why is nano better than gedit when editing crypttab? Inquiring minds want to know :-) – heynnema Sep 07 '17 at 15:52
  • @heynnema it's simpler (with respect to sudo use) and how many new users remember to use gksu with gedit... – George Udosen Sep 07 '17 at 16:09
  • @George I don't follow. How is nano simpler than a full GUI editor? Most users don't know control-o, control-x to save an edit in nano... vs the standard save/quit in gedit? Trying to use either editor without sudo or gksu or gksudo won't get them very far anyway. See my answer for gksudo. – heynnema Sep 07 '17 at 16:14
  • @heynnema as you say boss, I guess it comes down to different tastes, :) – George Udosen Sep 07 '17 at 16:20

2 Answers2

1

I've taken a look at your information. Here are my findings. Your /etc/fstab has errors. Your /etc/default/grub has errors. Lets check if intel-microcode is installed. Run memtest.

To fix /etc/fstab...

In terminal...

gksudo gedit /etc/fstab

Change this:

/boot/efi was on /dev/sda1 during installation
UUID=5AAD-028F /boot/efi vfat umask=0077 0 1

/home was on /dev/sdb1 during installation
UUID=7c3e97ec-2fc4-42df-801f-6dff9dec4ee6 /home ext4 defaults 0 2

/swapfile none swap sw 0 0 UUID=5AAD-028F /boot/efi vfat defaults 0 1

To this:

/boot/efi was on /dev/sda1 during installation
UUID=5AAD-028F /boot/efi vfat umask=0077 0 1
# UUID=5AAD-028F /boot/efi vfat defaults 0 1 # we may use this later

/home was on /dev/sdb1 during installation
UUID=7c3e97ec-2fc4-42df-801f-6dff9dec4ee6 /home ext4 defaults 0 2

/swapfile none swap sw 0 0

To fix /etc/default/grub...

In terminal...

gksudo gedit /etc/default/grub

Change this:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_idle.max_cstate=1"

To this:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

In terminal...

sudo update-grub

sudo apt-get update
sudo apt-get install intel-microcode

Lastly, go to www.memtest86.org and download the free memory test. Run at least one complete pass... more if you have the time.

Update #1:

Memtest failed, as I suspected. Follow the following procedure, BUT FIRST make sure that you've updated the BIOS, as it resolves some memory issues.

To determine which of 4 memory sticks may be defective... (we already know that when all 4 memory sticks are present, memtest fails. BIOS not updated yet).

If the BIOS is updated, run memtest with all 4 memory sticks inserted, and see if it passes one or more times. If it runs fine, then you're done. Congratulations! If memtest errors/crashes/freezes then continue on...

First note the output of sudo lshw -C memory (which you've already done). See where it says "slot: ChannelA-DIMM0"? There is also "slot: ChannelA-DIMM1". And similar for ChannelB.

When memory is properly installed in only one pair, one stick should show in "slot: ChannelA-DIMM0" and the other should show in "slot: ChannelB-DIMM0".

Test #1: Insert only one pair of sticks such that the lshw display shows as in the previous paragraph. Run memtest. If it runs without errors or freezing/crashing, then those two sticks may be good. If memtest fails, then one/both sticks are bad.

Test #2: Now remove those two sticks, and insert the other two sticks into the same slots and run memtest again.

If you have trouble during test #1 or #2, then we'll have to test each memory stick by itself.

Update #2:

Turned out to be dust in the SIMM slots. Memtest is running good now.

heynnema
  • 70,711
  • Thanks @heynnema unfortunately I still experience freezing issues. Are completely random. My feeling is the nvidia driver which makes it go mad but really I have no clue. I also did a complete test of each component in a PC testing factory and each peace of hardware is fine. I love ubuntu and I am desperate to get it back! – Neco Sep 07 '17 at 14:16
  • @Neco have you made all of the changes in my answer? Did you run the memtest? If you suspect the Nvidia driver, temporarily use the noveau driver. – heynnema Sep 07 '17 at 14:18
  • @Neco ps: if the machine freezes during memtest, then you have a hardware problem for sure. Show me sudo lshw -C memory. – heynnema Sep 07 '17 at 14:32
  • @Neco ps: do you have BIOS version 7984vBD? If not, go to https://us.msi.com/Motherboard/support/Z170-KRAIT-GAMING.html#!type=download and get it. It fixes memory issues. That's important. – heynnema Sep 07 '17 at 14:39
  • @Neco ps: have you overclocked your machine? – heynnema Sep 07 '17 at 14:39
  • @Neco ps: do you have a SSD? If so, have you checked for a firmware update? That's important. – heynnema Sep 07 '17 at 14:41
  • I added the sudo lshw -C memory as EDITED in the original question. Hope it helps to understand. Thanks a lot! – Neco Sep 07 '17 at 19:29
  • @Neco you haven't answered my previous 5 questions (except for the lshw, and it looked fine). It's important to answer them accurately for me to best help you. – heynnema Sep 07 '17 at 20:20
  • @ heynnema I haven't overclocked the machine. I need to check the bios version but also need to learn how to upgrade it (never done it before). Memtest crashed so I'm scared of memory issues now although I did.test them all 1 month ago ( after the freezing issues started) and all was good. As soon as I do all you suggested I'll comment again to let you know about all of this. Thnks again – Neco Sep 08 '17 at 06:03
  • @Neco you have to test the memory IN THE MACHINE. Take out two SIMMS and rerun memtest, etc. Cycle the next two SIMMS into the same slots and rerun memtest, etc. Remember, the new BIOS fixes some memory issues, so that's important. – heynnema Sep 08 '17 at 12:44
  • @Neco status please. – heynnema Sep 10 '17 at 14:25
  • @ heynnema So I managed to update BIOS and I run Memtest86 off a bootable USB. The first run gave errors. I removed in pairs my 4 sticks of RAMS and I get that the error goes away. Could you better explain how should I run them? Also trying to update firmware at the moment. – Neco Sep 10 '17 at 16:52
  • @Neco see Update #1 in my answer. The sticks that you removed are possibly bad, depending on which sticks you removed. During testing in pairs, you want one stick on channel A-DIMM0 and the other on channel B-DIMM0. – heynnema Sep 10 '17 at 18:31
  • @Neco status please – heynnema Sep 12 '17 at 14:09
  • @ heynnema sorry it took me long to get to the bottom of it. So this is what happened: first memtest with all 4 RAMs gave errors. I then updated BIOS, again memtest gave errors. I started tested in pairs and one pair seemed faulty. I removed all and inserted one by one but no errors appeared ( this to me was strange). I though some dust could have gone inside the RAM slots so with compressed air I cleaned all, reinserted all 4 rerun memtest for several hours and the errors were gone. So far is not giving any issues. What's your though? – Neco Sep 14 '17 at 06:09
  • @Neco Good job! You may have fixed it! Remember to do all of my mods. – heynnema Sep 14 '17 at 07:23
-1

I know this answer might seems stupid, but it worked for me with some problem similar to yours. Try opening a terminal and type in:

sudo apt-get autoremove 
sudo apt-get install -f
Eliah Kagan
  • 117,780