Score:0

Regular complete lockups

cn flag

I'm a new user of Ubuntu and Linux. I installed it for the first time about 3 months ago.

Starting about 2 months ago i've been having more and more frequent freezes that completely lockup my machine. Mouse doesn't move and audio loops. I then have to forcefully shutdown the machine. A month ago the crash bricked my SSD and so I am on a fresh install of Ubuntu 20.04.2 LTS.

I'm new to this sort of troubleshooting so the issue could be very simple.

Any help is very appreciated

free -h:

              total        used        free      shared  buff/cache   available
Mem:           31Gi       1.8Gi        28Gi        44Mi       1.4Gi        29Gi
Swap:         2.0Gi          0B       2.0Gi

sysctl vm.swappiness:

vm.swappiness = 60

sudo lshw -C memory:

  *-firmware                
       description: BIOS
       vendor: American Megatrends Inc.
       physical id: 0
       version: P1.80
       date: 02/22/2021
       size: 64KiB
       capacity: 16MiB
       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: f
       slot: System board or motherboard
       size: 32GiB
     *-bank:0
          description: [empty]
          product: Unknown
          vendor: Unknown
          physical id: 0
          serial: Unknown
          slot: DIMM 0
     *-bank:1
          description: DIMM DDR4 Synchronous Unbuffered (Unregistered) 3200 MHz (0.3 ns)
          product: F4-3200C16-16GVK
          vendor: Unknown
          physical id: 1
          serial: 00000000
          slot: DIMM 1
          size: 16GiB
          width: 64 bits
          clock: 3200MHz (0.3ns)
     *-bank:2
          description: [empty]
          product: Unknown
          vendor: Unknown
          physical id: 2
          serial: Unknown
          slot: DIMM 0
     *-bank:3
          description: DIMM DDR4 Synchronous Unbuffered (Unregistered) 3200 MHz (0.3 ns)
          product: F4-3200C16-16GVK
          vendor: Unknown
          physical id: 3
          serial: 00000000
          slot: DIMM 1
          size: 16GiB
          width: 64 bits
          clock: 3200MHz (0.3ns)
  *-cache:0
       description: L1 cache
       physical id: 12
       slot: L1 - Cache
       size: 384KiB
       capacity: 384KiB
       clock: 1GHz (1.0ns)
       capabilities: pipeline-burst internal write-back unified
       configuration: level=1
  *-cache:1
       description: L2 cache
       physical id: 13
       slot: L2 - Cache
       size: 3MiB
       capacity: 3MiB
       clock: 1GHz (1.0ns)
       capabilities: pipeline-burst internal write-back unified
       configuration: level=2
  *-cache:2
       description: L3 cache
       physical id: 14
       slot: L3 - Cache
       size: 32MiB
       capacity: 32MiB
       clock: 1GHz (1.0ns)
       capabilities: pipeline-burst internal write-back unified
       configuration: level=3

ls -al /var/crash:

total 10996
drwxrwsrwt  2 root     whoopsie     4096 Jun 26 16:48 .
drwxr-xr-x 14 root     root         4096 Feb  9 20:56 ..
-rw-r-----  1 nicholas whoopsie 11244497 Jun 26 16:48 _usr_bin_gnome-control-center.1000.crash
-rw-r--r--  1 nicholas whoopsie        0 Jun 26 16:48 _usr_bin_gnome-control-center.1000.upload
-rw-------  1 whoopsie whoopsie       37 Jun 26 16:48 _usr_bin_gnome-control-center.1000.uploaded

swapon -s:

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

sudo journalctl -b -1 -e:

Jun 26 21:12:08 nicholas-desktop kernel: RDX: ffff99eadebad210 RSI: ffff99ea57085e00 RDI: ffff99eadebac740
Jun 26 21:12:08 nicholas-desktop kernel: RBP: ffffad0f87797f08 R08: 0000000000000000 R09: 0000000000000000
Jun 26 21:12:08 nicholas-desktop kernel: R10: 0000000000000000 R11: 0000000000000000 R12: ffff99ea57085e00
Jun 26 21:12:08 nicholas-desktop kernel: R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
Jun 26 21:12:08 nicholas-desktop kernel: FS:  00007f6490b43700(0000) GS:ffff99eadeb80000(0000) knlGS:0000000000000000
Jun 26 21:12:08 nicholas-desktop kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Jun 26 21:12:08 nicholas-desktop kernel: CR2: 000002e62f38035b CR3: 0000000702168000 CR4: 0000000000340ee0
Jun 26 21:12:08 nicholas-desktop kernel: Call Trace:
Jun 26 21:12:08 nicholas-desktop kernel:  do_sched_yield+0x66/0x80
Jun 26 21:12:08 nicholas-desktop kernel:  __do_sys_sched_yield+0xe/0x20
Jun 26 21:12:08 nicholas-desktop kernel:  do_syscall_64+0x49/0xc0
Jun 26 21:12:08 nicholas-desktop kernel:  entry_SYSCALL_64_after_hwframe+0x44/0xa9
Jun 26 21:12:08 nicholas-desktop kernel: RIP: 0033:0x7f64972fb89b
Jun 26 21:12:08 nicholas-desktop kernel: Code: 73 01 c3 48 8b 0d f5 55 0e 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa b8 18 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d c5 55 0e 00 f7 d8 64>
Jun 26 21:12:08 nicholas-desktop kernel: RSP: 002b:00007f6490b42398 EFLAGS: 00000206 ORIG_RAX: 0000000000000018
Jun 26 21:12:08 nicholas-desktop kernel: RAX: ffffffffffffffda RBX: 000055fc25801f20 RCX: 00007f64972fb89b
Jun 26 21:12:08 nicholas-desktop kernel: RDX: 000055fc25807fc0 RSI: 0000000097b2b004 RDI: 000055fc258076fc
Jun 26 21:12:08 nicholas-desktop kernel: RBP: 0000000000000032 R08: 0000000000000000 R09: 0000000060d77c08
Jun 26 21:12:08 nicholas-desktop kernel: R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000003
Jun 26 21:12:08 nicholas-desktop kernel: R13: 000000000000000a R14: 000000000000004b R15: 000055fc258076fc
Jun 26 21:12:08 nicholas-desktop kernel: Modules linked in: rfcomm ip6table_filter ip6_tables iptable_filter bpfilter ccm cmac algif_hash algif_skcipher af_alg bnep nls_iso8859_1 nvidia_uvm(OE) nvidia_drm(POE) nvidia_modeset(POE) s>
Jun 26 21:12:08 nicholas-desktop kernel:  xhci_pci_renesas wmi gpio_amdpt gpio_generic
Jun 26 21:12:08 nicholas-desktop kernel: CR2: 000002e62f38035b
Jun 26 21:12:08 nicholas-desktop kernel: ---[ end trace b06917b61d045423 ]---
Jun 26 21:12:08 nicholas-desktop kernel: RIP: 0010:schedule+0x55/0xc0
Jun 26 21:12:08 nicholas-desktop kernel: Code: 89 e7 41 f6 44 24 24 20 74 6f e8 56 d3 53 ff 49 83 bc 24 b0 0b 00 00 00 74 34 65 48 8b 1c 25 c0 7b 01 00 31 ff e8 4b f5 ff ff <48> 8b 03 a8 08 75 f2 41 8b 44 24 24 a9 20 00 00 20 74 0c>
Jun 26 21:12:08 nicholas-desktop kernel: RSP: 0018:ffffad0f87797ef8 EFLAGS: 00010296
Jun 26 21:12:08 nicholas-desktop kernel: RAX: 0000000000000000 RBX: 000002e62f38035b RCX: ffff99eadebad210
Jun 26 21:12:08 nicholas-desktop kernel: RDX: ffff99eadebad210 RSI: ffff99ea57085e00 RDI: ffff99eadebac740
Jun 26 21:12:08 nicholas-desktop kernel: RBP: ffffad0f87797f08 R08: 0000000000000000 R09: 0000000000000000
Jun 26 21:12:08 nicholas-desktop kernel: R10: 0000000000000000 R11: 0000000000000000 R12: ffff99ea57085e00
Jun 26 21:12:08 nicholas-desktop kernel: R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
Jun 26 21:12:08 nicholas-desktop kernel: FS:  00007f6490b43700(0000) GS:ffff99eadeb80000(0000) knlGS:0000000000000000
Jun 26 21:12:08 nicholas-desktop kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Jun 26 21:12:08 nicholas-desktop kernel: CR2: 000002e62f38035b CR3: 0000000702168000 CR4: 0000000000340ee0
Jun 26 21:12:08 nicholas-desktop gnome-shell[4922]: Local Device Found
Jun 26 21:12:08 nicholas-desktop gnome-shell[4922]:   type: 26ce 01a2
Jun 26 21:12:08 nicholas-desktop gnome-shell[4922]:   path: sdl://0
Jun 26 21:12:08 nicholas-desktop gnome-shell[4922]:   serial_number:  - 0
Jun 26 21:12:08 nicholas-desktop gnome-shell[4922]:   Manufacturer:
Jun 26 21:12:08 nicholas-desktop gnome-shell[4922]:   Product:      ASRock LED Controller
Jun 26 21:12:08 nicholas-desktop gnome-shell[4922]:   Release:      110
Jun 26 21:12:08 nicholas-desktop gnome-shell[4922]:   Interface:    -1

ls -al ~/.local/share/gnome-shell/extensions: responded with:

ls: cannot access '/home/nicholas/.local/share/gnome-shell/extensions': No such file or directory

I did manually navigate there and couldn't find that folder.

ls -al /usr/share/gnome-shell/extensions:

total 20
drwxr-xr-x 5 root root 4096 Feb  9 20:49 .
drwxr-xr-x 7 root root 4096 Jun 14 23:16 ..
drwxr-xr-x 2 root root 4096 Feb  9 20:49 desktop-icons@csoriano
drwxr-xr-x 3 root root 4096 May 31 17:36 [email protected]
drwxr-xr-x 3 root root 4096 Feb  9 20:49 [email protected]
heynnema avatar
ru flag
Edit your question and show me `free -h` and `sysctl vm.swappiness` and `sudo lshw -C memory` and `ls -al /var/crash` and `swapon -s`. Start comments to me with @heynnema or I'll miss them.
Nicholas Mazower avatar
cn flag
@heynnema I have run the commands and added their output to my question
waltinator avatar
it flag
After a "sudden shutdown", aka "system crash", and reboot, the terminal command `sudo journalctl -b -1 -e` will show you the end of the previous boot's log's. If there is no hint there, suspect power/ overheating. Read `man journalctl` to see how to extract information from the logs. You can find how I make use of `journalctl` easier at `https://askubuntu.com/users/25618/waltinator`.
Nicholas Mazower avatar
cn flag
@waltinator I ran that and and added its output to my question. However i'm not sure if the LED controller is an issue. This is from the crash I just had. To clarify, the machine doesn't turn itself off. It locks up and then I have to force shut it down.
heynnema avatar
ru flag
Thanks for the data that I requested. Helpful. Is this a laptop or a desktop computer? What processor? Do you know how many DIMM/SODIMM memory slots that you have? Tell me the EXACT make/model of your motherboard. Does the machine operate ok for a while, and then sometime later, have this problem? Edit your question once more and show me `ls -al ~/.local/share/gnome-shell/extensions` and `ls -al /usr/share/gnome-shell/extensions`.
heynnema avatar
ru flag
Please do the `memtest` outlined in my partial answer. Report back.
Nicholas Mazower avatar
cn flag
@heynnema This is a desktop. It has a Ryzen 5 3600 as CPU. The motherboard has 4 slots. It is a ASRock B550 Taichi. The machine runs fine for a while and then has the issue. It appears to loosely correspond to load, lately playing a new computer game it has been doing it every 30 minutes to hour. I shall do the commands from your answer now
heynnema avatar
ru flag
Is CPU or RAM overclocked?
heynnema avatar
ru flag
I can't get to the User Manual at the ASRock web site. I want to check that you have the RAM installed into the correct slots. Maybe you can check later for the UM.
Nicholas Mazower avatar
cn flag
@heynnema I have adjusted the swapfile and run the memtest and it passed. My RAM is running an XMP profile but only to bring it to the specifications of the RAM, G Skill Intl / F4-3200C. I may be misinterpreting the journalctl results but the last thing I see there is the LED controller so I have disabled the motherboard LEDs. A different source also mentioned AMD's SVM causing an issue so I have disabled that. I will see if I get a crash within the next couple of days.
heynnema avatar
ru flag
@NicholasMazower **Disable XMP asap**. Reboot. Retest.
heynnema avatar
ru flag
@NicholasMazower Status please...
Nicholas Mazower avatar
cn flag
@heynnema been away from my machine due to some Covid lock downs unfortunately. Will update as soon as I'm back at it.
heynnema avatar
ru flag
@NicholasMazower Thanks for the update. Stay safe.
Nicholas Mazower avatar
cn flag
@heynnema I disabled XMP and retested and got 4/4 passes
heynnema avatar
ru flag
@NicholasMazower Good! When I said retest, I didn't mean to re-run memtest. Sorry. So now run without XMP and see if things improve with the lockups/freezes.
Nicholas Mazower avatar
cn flag
@heynnema unfortunately I just had another freeze. I tried REISUB which helped once before but didn't work.
heynnema avatar
ru flag
@NicholasMazower Was XMP off or on?
Nicholas Mazower avatar
cn flag
@heynnema it was off. This may be a bit hasty but after some more googling showed other people on 20.04 experiencing the same issues I've jumped to 21.04. Will see if the issue persists tomorrow
heynnema avatar
ru flag
@NicholasMazower Good find! Please keep me posted.
Nicholas Mazower avatar
cn flag
@heynnema so far so good. Ran games for 8 hours today without a crash whereas last time it was crashing every 30mins to an hour
heynnema avatar
ru flag
@NicholasMazower That's good news! I updated my answer.
Nicholas Mazower avatar
cn flag
@heynnema I've unfortunately had two more crashes. First one even the mouse didn't move. Second one the mouse did move. I'm rather befuddled at what it could be. Maybe a hardware issue but not the RAM?
Nicholas Mazower avatar
cn flag
In looking through the logs I found some references to 'nvidia_frontend_unlocked' right before the crash. So i'm changing the display drivers again although I had done it before and that didn't stop the crash. But perhaps i have more than one kind of crash happening.
heynnema avatar
ru flag
@NicholasMazower You can boot to the GRUB menu, edit in `nomodeset`, that would eliminate a video driver problem. Do you know how to do this, or do you need more instructions? Did you update the Nvidia driver after updating to 21.04?
Nicholas Mazower avatar
cn flag
@heynnema Instructions would be very greatly appreciated.
heynnema avatar
ru flag
@NicholasMazower Boot to GRUB menu. Highlight the desired boot selection. Hit the "e" key to enter edit mode. Use arrow keys to find "quiet splash" and change it to "quiet splash nomodeset". Hit control-x or F10 to continue booting. This is a temporary change, and will go away next reboot. Screen resolution may be off, or difficult to set. But the idea is to see if there are any crashes/freezes. Did you update your Nvidia driver?
Nicholas Mazower avatar
cn flag
@heynnema Thank you very much! I was on the 465 nvidia driver and i've gone down to 460 in hopes of stability. I didn't realise Nvidia had such terrible Linux support when I built the machine. I'll wait until the next crash in case the driver change worked.
heynnema avatar
ru flag
@NicholasMazower Status please...
Nicholas Mazower avatar
cn flag
@heynnema No crashes since last communication. I'm tentatively marking this as solved. A combination of driver updates, ubuntu updates and swap file increases.
heynnema avatar
ru flag
@NicholasMazower Good news! Thanks for the update.
Score:0
in flag

Disabling "Automatic C-State Management" or "Global C-State Control" or similarly named option in BIOS is what helped me with a similar problem.

Nicholas Mazower avatar
cn flag
Thanks for the advice! Unfortunately it is already disabled
Score:0
ru flag

/swapfile

Your 2G /swapfile is too small. Let's increase it to 4G...

Note: Incorrect use of the rm and dd commands can cause data loss. Suggest copy/paste.

In the terminal...

sudo swapoff -a           # turn off swap
sudo rm -i /swapfile      # remove old /swapfile

sudo dd if=/dev/zero of=/swapfile bs=1M count=4096

sudo chmod 600 /swapfile  # set proper file protections
sudo mkswap /swapfile     # init /swapfile
sudo swapon /swapfile     # turn on swap
free -h                   # confirm 32G RAM and 4G swap

Edit /etc/fstab, using sudo -H gedit /etc/fstab or sudo pico /etc/fstab.

Confirm this /swapfile line in /etc/fstab... and confirm no other “swap” lines... use SPACES in this line... confirm NO TABS...

/swapfile  none  swap  sw  0  0

reboot                    # reboot and verify operation

Memory

Go to https://www.memtest86.com/ and download/run their free memtest to test your memory. Get at least one complete pass of all the 4/4 tests to confirm good memory. This may take many hours to complete.

Update #1:

Disable XMP, reboot, and retest for lockups/freezes.

Update #2:

Updated from Ubuntu 20.04.2 to 21.04 and so far no crashes!

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.