24

I am running Ubuntu 20.04.3 LTS x86_64 on Intel Core i7-9750H, GTX 1650 (mobile?), 16GB RAM, NVME m.2 SSD and I do not have any other operating systems installed. Since this Wednesday (25 Aug 2021), my computer randomly freezes completely and this happens very often. When it freezes, I cannot move the mouse, toggle keyboard backlight (which usually works in the bios menu even). Combinations with the SysRq key also do not seem to work. If audio is playing during the crash, then the last 1.5 seconds start repeating. I have left my computer to stay like that for over an hour once and nothing improves. It's not an issue with overheating as this sometimes occurs right after a cold boot. My only solution so far is to force shut down the machine by holding the reset power button.

Here is what I tried:

  • System logs from before the crash do not show any important/critical issues and they usually vary
  • Starting from version 18.04, others have experienced the same issue and convicted Chrome. Disabling hardware acceleration from the settings and with the command line flag did not work (it might have even made things worse). Using Wayland instead of Gnome also did not work for me.
  • When a crash occurs, I repeatedly tried using SysRq combinations to more safely shutdown my PC. Namely Alt+SysRq+S (sync), Alt+SysRq+U (unmount), Alt+SysRq+B (shutdown) but this never worked while frozen. I tested during normal operation and it did work.

Other than that, I have noticed no performance spikes or heavy resource utilisation. I have had a crash occur while nothing else but Chrome and in all cases of crashes I've had Chrome running (although this can be coincidental as I run Chrome almost all the time).

I've been using Ubuntu for quite some time and have never had any issues as big as this one. I noticed live-patch must have updated my system to version 20.04.3 from 20.04.2, although I cannot confirm when exactly this has happened, but this is certainly something less than 2 weeks old.

I would really appreciate any info on how I could debug this and even better—fix it altogether. I really do not want to re-install unless there's another option.

Further update:

I have noticed this only occurs when I move my laptop to a different location. What is different when I do that is:

  • not connected to external monitor via HDMI
  • not using ethernet
  • using wifi

I still believe that this bug is introduced after 20.04.2 LTS, although it might be different software causing it (e.g. faulty driver).

20
  • 2
    Boot from a live media and let it run for a bit does it crash?
    – David DE
    Commented Aug 29, 2021 at 15:31
  • @David I'll try that when able and update with the result.
    – undefined
    Commented Aug 29, 2021 at 15:33
  • How much swap space do you have, what is your swappiness set to, and have you checked htop to see if your swap space is filling up?
    – mchid
    Commented Aug 30, 2021 at 2:53
  • 1
    @mchid I had extended my swap from the default (2 or 4GB) to 9.6GB. It is constantly at 0%. My memory is 16GB and that is normally at 25% (4.5GB) only. I saw that my system updated to 20.04.**3** abought when I started facing this issue. I used Software & Updates to upgrade my PC to Ubuntu 21.04. So far I have not faced this issue, but I've only used the new version for a day. I will update if I encounter this issue again. So far, the problem is something that was changed no earlier than 20.04.3 LTS.
    – undefined
    Commented Aug 30, 2021 at 11:23
  • 1
    I have not encountered this issue any further (including with Chrome GPU acceleration enabled). This bug is caused due to changes no earlier than 20.04.3 and no later than 21.04.
    – undefined
    Commented Sep 1, 2021 at 23:37

5 Answers 5

3

I know this is quite an old problem. I've searched far and wide for a solution. I've been dealing with this for YEARS! I was once again searching for a solution because my PC was acting up more than usual. I came across a different forum and found what ended up being my solution. But first the problem:

When using my PC, it would freeze and crash randomly but ESPECIALLY when I logged off for the day.

Solution: At first I kept thinking that my Nvidia driver was the source of my troubles. That ended up not being the case. For me, it ended up being a bios configuration specific to AMD Ryzen CPUs that had to do with idle power. Specifically, I disabled: C6 mode, Deep Sleep, and Global C-State Control. Once I disabled the settings, my machine hasn't froze or crashed since.

Note: My hardware config is:
MB: ASRock X370 Taichi AM4
CPU:AMD Ryzen 5 1600X
RAM: 64GB
GPU: NVIDIA GeForce GTX 1060 3GB

1
  • What exactly was this bios config? If you can still recall please share.
    – Bendemann
    Commented Nov 19, 2023 at 8:42
1

Your exact hardware is essential to debug this. You've written that your GPU is potentially mobile - if this is a laptop - then the model would be helpful. Then assure in that sequence:

  • If computer doesn't respond to SysRq check if it responds to it when computer it's not in hang state - SysRq + H should display help in your text console. As it might be disabled or work differently on laptop with 'Fn' key modifier or when no Physical SysRq key present.
  • assure that the circumstances arround the issue are not when the computer runs out of memory - on modern faulty websites written by poor js programmers it can eat a lot of GB of RAM quite easilly when you'll left your browser with multiple tabs open.
  • do sudo apt-get install linux-crashdump
  • if you have builtin card and Nvidia one try to lock to one of those (e.g by unloading kernel module) work few days and then try the same with the other card.
0

Disable the IOMMU via the kernel cmdline. Add the option intel_iommu=off (or iommu)to the GRUB_CMDLINE_LINUX_DEFAULT variable in /etc/default/grub and then run update-grub to update your grub.cfg, then reboot.

More info and options are available via the kernel.org docs: https://www.kernel.org/doc/html/v5.4/admin-guide/kernel-parameters.html

Also try a different nvidia driver - you can get a list of available drivers with apt list nvidia-driver-*. It may not occur at all if you use the nouveau graphics driver.

0

I had similar issues when just running chrome.

Make sure to set the nvidia prime profile to 'nvidia'.

I had it on 'on-demand' which seems to frequently freeze my system.

sudo prime-select nvidia

After this change, chrome stills hangs sometimes but seems to restore in a few seconds. Firefox just works without issues.

-1

First method:

sudo ubuntu-drivers autoinstall
Restart

Second method:

sudo apt-get purge 'nvidia*'
sudo add-apt-repository ppa:graphics-drivers
sudo apt-get update

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .