Semi-random 5-10sec system freeze with kernel 5.4

Hello all :slight_smile:

So, I’ve installed Manjaro (GNOME) about one year ago. Since then, I was waiting for the 5.x kernel to be LTS. Previously I was running on kernel 4.14 due to this problem. I’ve upgraded (again) to kernel 5.4.64 and still, I am experiencing semi-random freezes. Why I say semi-random ? Because when I open a tab in Firefox, it freezes for 5 seconds, when I code in VSCODE (electron) it randomly freezes during 5 seconds (could not identify a pattern). During normal usage, my RAM usage is usually under 5Gb with the swap often under 800Mb.

The problem is that I am not able to identify what is creating this issue. I have no clue where to start. My first guess would be RAM because whenever I make an action that requires RAM, the whole system freezes (mouse and keyboard unresponsive). Also, sometimes, when I’m reading code it occasionally freezes. The laptop is from 2017 so it is not that old.
I’ve previously checked Random freezes in fresh install and System random freeze but both are about AMD.

I would gladly appreciate some help regarding this issue.

uname: Linux 5.4.64-1-MANJARO x86_64 unknown unknown GNU/Linux

sudo inxi -Fxxxa --no-host:
    system:    Kernel: 5.4.64-1-MANJARO x86_64 bits: 64 compiler: gcc v: 10.2.0 
           parameters: BOOT_IMAGE=/boot/vmlinuz-5.4-x86_64 root=UUID=d890be66-c5e6-4537-926b-469fac60754b rw quiet 
           cryptdevice=UUID=37c5483c-7840-4724-b211-0378eac55be8:luks-37c5483c-7840-4724-b211-0378eac55be8 
           root=/dev/mapper/luks-37c5483c-7840-4724-b211-0378eac55be8 
           resume=/dev/mapper/luks-37c5483c-7840-4724-b211-0378eac55be8 
           Desktop: GNOME 3.36.6 tk: GTK 3.24.23 wm: gnome-shell dm: GDM 3.36.3 Distro: Manjaro Linux 
Machine:   Type: Laptop System: HP product: HP ENVY Laptop 13-ad0xx v: Type1ProductConfigId serial: 5CG73820XP Chassis: 
           type: 10 serial: N/A 
           Mobo: HP model: 8349 v: KBC Version 39.35 serial: PGQUL00WB9518P UEFI: Insyde v: F.27 date: 11/19/2018 
Battery:   ID-1: BAT0 charge: 11.0 Wh condition: 48.0/48.0 Wh (100%) volts: 7.9/7.7 model: HP Primary type: Li-ion 
           serial: 09195 09/02/2017 status: Charging 
           Device-1: hidpp_battery_0 model: Logitech Wireless Keyboard serial: 4023-00-00-00-00 
           charge: 55% (should be ignored) rechargeable: yes status: Discharging 
           Device-2: hidpp_battery_1 model: Logitech Wireless Mouse serial: 4058-00-00-00-00 charge: 55% (should be ignored) 
           rechargeable: yes status: Discharging 
CPU:       Topology: Dual Core model: Intel Core i5-7200U socket: BGA1356 (U3E1) note: check bits: 64 type: MT MCP 
           arch: Amber Lake family: 6 model-id: 8E (142) stepping: 9 microcode: D6 L1 cache: 128 KiB L2 cache: 3072 KiB 
           L3 cache: 3072 KiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 21607 
           Speed: 2230 MHz min/max: 400/3100 MHz base/boost: 2400/8300 volts: 0.8 V ext-clock: 100 MHz Core speeds (MHz): 
           1: 1083 2: 1126 3: 1105 4: 1029 
           Vulnerabilities: Type: itlb_multihit status: KVM: Split huge pages 
           Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable 
           Type: mds mitigation: Clear CPU buffers; SMT vulnerable 
           Type: meltdown mitigation: PTI 
           Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl and seccomp 
           Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization 
           Type: spectre_v2 mitigation: Full generic retpoline, IBPB: conditional, IBRS_FW, STIBP: conditional, RSB filling 
           Type: srbds mitigation: Microcode 
           Type: tsx_async_abort status: Not affected 
Graphics:  Device-1: Intel HD Graphics 620 vendor: Hewlett-Packard driver: i915 v: kernel bus ID: 00:02.0 chip ID: 8086:5916 
           Device-2: Chicony HP Wide Vision HD Camera type: USB driver: uvcvideo bus ID: 1-6:4 chip ID: 04f2:b5ed 
           Display: server: X.org 1.20.8 compositor: gnome-shell driver: intel unloaded: modesetting alternate: fbdev,vesa 
           resolution: <xdpyinfo missing> 
           OpenGL: renderer: Mesa Intel HD Graphics 620 (KBL GT2) v: 4.6 Mesa 20.1.7 direct render: Yes 
Audio:     Device-1: Intel Sunrise Point-LP HD Audio vendor: Hewlett-Packard driver: snd_hda_intel v: kernel 
           alternate: snd_soc_skl bus ID: 00:1f.3 chip ID: 8086:9d71 
           Sound Server: ALSA v: k5.4.64-1-MANJARO 
Network:   Device-1: Intel Wireless 7265 driver: iwlwifi v: kernel port: 3040 bus ID: 02:00.0 chip ID: 8086:095a 
           IF: wlp2s0 state: up mac: 1c:4d:70:d7:f4:c4 
           IF-ID-1: docker0 state: down mac: 02:42:03:49:ec:3a 
           IF-ID-2: lxdbr0 state: down mac: 00:16:3e:60:b1:6f 
           IF-ID-3: tun0 state: unknown speed: 10 Mbps duplex: full mac: N/A 
Drives:    Local Storage: total: 238.47 GiB used: 151.73 GiB (63.6%) 
           SMART Message: Required tool smartctl not installed. Check --recommends 
           ID-1: /dev/nvme0n1 vendor: Toshiba model: N/A size: 238.47 GiB block size: physical: 512 B logical: 512 B 
           speed: 31.6 Gb/s lanes: 4 serial: 87PS10WSTAZT rev: 5KHA4102 scheme: GPT 
Partition: ID-1: / raw size: 229.37 GiB size: 224.77 GiB (97.99%) used: 151.33 GiB (67.3%) fs: ext4 block size: 4096 B 
           dev: /dev/dm-0 
Swap:      Kernel: swappiness: 10 (default 60) cache pressure: 100 (default) 
           ID-1: swap-1 type: partition size: 8.80 GiB used: 405.0 MiB (4.5%) priority: -2 dev: /dev/dm-1 
Sensors:   System Temperatures: cpu: 56.0 C mobo: 0.0 C 
           Fan Speeds (RPM): N/A 
Info:      Processes: 330 Uptime: 1h 34m Memory: 7.54 GiB used: 4.87 GiB (64.6%) Init: systemd v: 246 Compilers: gcc: 10.2.0 
           clang: 10.0.1 Packages: apt: 0 pacman: 1708 lib: 475 flatpak: 0 Shell: Bash (sudo) v: 5.0.18 
           running in: gnome-terminal inxi: 3.1.05

Edit: I’ve installed kernel 5.7.19-2 and it seems to worked without any complications. I wonder, what is with kernel 5.4.64 that is freezing my laptop ?

You could check your journal and dmesg output for error messages with

journalctl -b 

dmesg

The output of these is probably too long for the forum, so please use a pastebin.

So you probably have some hardware that is better supported in kernel 5.7

That is going to take weeks to find out if I would sit next to you, months over an Internet forum.

Now a question of my own: If 5.7 is working fine, you do have a solution or am I missing something?

:thinking:

So you probably have some hardware that is better supported in kernel 5.7

Could be true, indeed.

Now a question of my own: If 5.7 is working fine, you do have a solution or am I missing something?

It’s not really working fine, as multiple apps just hand and are not responsive, although not critical, it still bothering that I need to end all related processes to restart it. Also, since this is my work laptop, I would like to be on a LTS kernel then on a rolling one.

If you don’t want to be on a rolling kernel, remove the kernel-latest package and choose a kernel that works and then stick with it hold upgrades. As 5.7 is EOL, 5.8 would be my choice for now.

The other way is to install a rock stable distro like Debian…

:innocent: