5

On my Ubuntu 22.04 LTS (installed on an ASUS ZenBook with Intel i5 11th gen), I get a weird thing happening.

Every time I try to do something a bit more heavy, like image opening more apps at the same time, Ubuntu freezes (the mouse stops working and UI is frozen).

The fan starts going but never too much, and the weird thing is that is just frozen: no access to ttys as well, I can only force shutdown with power button.

If I try and check with journalctl the last session logs, I always find random/normal stuff, but nothing that is always the same or indicates any specific reason.

Any suggestion on what could be and how I can investigate this after a forced reboot?

UPDATE: after trying many things, I investigated more into memory and swap, and because I use zfs with a zvol partition for swap, I arrived to this page https://github.com/openzfs/zfs/issues/7734 and I was able to re-create the issue using stress-ng sending big amounts of pages into RAM and so triggering big amounts of swap...system frozen!

So the problem is described in that 4 years old issue (absurd that Ubuntu still offers zfs!)...if you need performance with lots of potential use of swap, do not use zfs, as it's not maintained and is not working properly with swap.

I posted about this in another different topic: Ubuntu 22.04 LTS with zfs filesystem and swap: deadlock! How to solve?

opoloko
  • 221
  • It can be a hardware problem. – Pilot6 Jun 18 '22 at 13:32
  • For a test, try disabling turbo CPU frequencies. Assuming you are using the intel_pstate CPU frquency scaling driver then echo "1" | sudo tee /sys/devices/system/cpu/intel_pstate/no_turbo. See also here. – Doug Smythies Jun 18 '22 at 14:19
  • Just as a test, I used stress-ng with following command (quite punishing for my Zenbook UX425ea with an i5 11th Gen and 8GB of ram): stress-ng --cpu 4 --io 4 --vm 4 --vm-bytes 1G --timeout 30s --metrics-brief (it all worked perfectly and didn't freeze) – opoloko Jun 18 '22 at 15:33
  • @DougSmythies I tried, no change, it just freezes. – opoloko Jun 18 '22 at 15:58
  • Try this: stress-ng --cpu N --cpu-method matrixprod where "N" is the number of CPUs that you have in your processor. – Doug Smythies Jun 18 '22 at 15:58
  • @Pilot6 how to diagnose that? – opoloko Jun 18 '22 at 15:58
  • Try even lower max CPU frequency. Again assuming the intel_pstate CPU frequency scaling driver: echo "45" | sudo tee /sys/devices/system/cpu/intel_pstate/max_perf_pct for example. Is there a level where it works? Please provide your exact processor model number i5-11XXX? – Doug Smythies Jun 18 '22 at 16:01
  • CPU it is the i5 1135G7 @2.4GHz. I tried the --cpu 8 --cpu-method matrixprod even together with virtual memory stress, all good no freeze. – opoloko Jun 18 '22 at 16:08
  • @DougSmythies I tried max_perf_pct to 45, but I see indicators still going to 99% so possibly is not working? Anyway it froze anyway. I found a good way to make it freeze with a really heavy load: image processing with PixInsight (that I use on MacOS as well and I know it really squeezes CPUs). I even tried using it with Xorg instead of Wayland, disabling all gnome-extensions, using Sway, just to exclude obvious things. But it freezes. Although it doesn't when doing stress test. – opoloko Jun 18 '22 at 16:18
  • Posting the last screen-full of your journalctl from last boot just before it froze might help. – WinEunuuchs2Unix Jun 20 '22 at 00:10
  • @WinEunuuchs2Unix thanks for suggestion, I did it every time and no useful information. That also confirms the zfs swap deadlock final cause that I found. – opoloko Jun 20 '22 at 07:37
  • related? https://askubuntu.com/questions/1360767/ubuntu-20-04-3-lts-very-often-freezes-randomly-and-does-not-recover-without-forc/1439989#1439989 – ThdK Nov 10 '22 at 07:25

0 Answers0