My system is hanging intermittently

Please I need help and my system keeps frustrating me and hanging intermittently

$ inxi --admin --verbosity=7 --filter --no-host --width
System:
  Kernel: 5.15.49-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 12.1.0
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-5.15-x86_64
    root=UUID=ea367113-5862-4a13-bcdf-cf4cf93de586 rw rootflags=subvol=@ quiet
    cryptdevice=UUID=ba966926-1fe2-4ff7-b267-fa7b78b89723:luks-ba966926-1fe2-4ff7-b267-fa7b78b89723
    root=/dev/mapper/luks-ba966926-1fe2-4ff7-b267-fa7b78b89723 splash
    apparmor=1 security=apparmor udev.log_priority=3
  Desktop: GNOME v: 42.2 tk: GTK v: 3.24.34 wm: gnome-shell dm: GDM v: 42.0
    Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Laptop System: Dell product: Latitude E5450 v: 01
    serial: <superuser required> Chassis: type: 9 serial: <superuser required>
  Mobo: Dell model: 0DCPV1 v: A00 serial: <superuser required>
    UEFI-[Legacy]: Dell v: A06 date: 04/10/2015
Battery:
  ID-1: BAT0 charge: 40.4 Wh (100.0%) condition: 40.4/52.4 Wh (77.1%)
    volts: 8.6 min: 7.4 model: LGC-LGC3.4 DELL K9GVN63 type: Li-poly
    serial: <filter> status: full
Memory:
  RAM: total: 15.52 GiB used: 5.28 GiB (34.0%)
  RAM Report:
    permissions: Unable to run dmidecode. Root privileges required.
CPU:
  Info: model: Intel Core i5-5300U bits: 64 type: MT MCP arch: Broadwell
    gen: core 5 built: 2015-18 process: Intel 14nm family: 6 model-id: 0x3D (61)
    stepping: 4 microcode: 0x2F
  Topology: cpus: 1x cores: 2 tpc: 2 threads: 4 smt: enabled cache:
    L1: 128 KiB desc: d-2x32 KiB; i-2x32 KiB L2: 512 KiB desc: 2x256 KiB
    L3: 3 MiB desc: 1x3 MiB
  Speed (MHz): avg: 2357 high: 2458 min/max: 500/2900 scaling:
    driver: intel_cpufreq governor: schedutil cores: 1: 2428 2: 2304 3: 2238
    4: 2458 bogomips: 18366
  Flags: 3dnowprefetch abm acpi adx aes aperfmperf apic arat arch_perfmon
    avx avx2 bmi1 bmi2 bts clflush cmov constant_tsc cpuid cpuid_fault cx16 cx8
    de ds_cpl dtes64 dtherm dts epb ept ept_ad erms est f16c flexpriority
    flush_l1d fma fpu fsgsbase fxsr hle ht ibpb ibrs ida intel_pt invpcid
    invpcid_single lahf_lm lm mca mce md_clear mmx monitor movbe msr mtrr
    nonstop_tsc nopl nx pae pat pbe pcid pclmulqdq pdcm pdpe1gb pebs pge pln
    pni popcnt pse pse36 pti pts rdrand rdseed rdtscp rep_good rtm sdbg sep
    smap smep smx ss ssbd sse sse2 sse4_1 sse4_2 ssse3 stibp syscall tm tm2
    tpr_shadow tsc tsc_adjust tsc_deadline_timer vme vmx vnmi vpid x2apic
    xsave xsaveopt xtopology xtpr
  Vulnerabilities:
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf
    mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable
  Type: mds mitigation: Clear CPU buffers; SMT vulnerable
  Type: meltdown mitigation: PTI
  Type: mmio_stale_data status: Not affected
  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: Retpolines, IBPB: conditional, IBRS_FW,
    STIBP: conditional, RSB filling
  Type: srbds mitigation: Microcode
  Type: tsx_async_abort mitigation: Clear CPU buffers; SMT vulnerable
Graphics:
  Device-1: Intel HD Graphics 5500 vendor: Dell driver: i915 v: kernel
    arch: Gen8 process: Intel 14nm built: 2014-15 ports: active: eDP-1
    empty: DP-1,HDMI-A-1,HDMI-A-2 bus-ID: 00:02.0 chip-ID: 8086:1616
    class-ID: 0300
  Device-2: Sunplus Innovation Integrated_Webcam_HD type: USB
    driver: uvcvideo bus-ID: 1-1.6:4 chip-ID: 1bcf:2b8d class-ID: 0e02
  Display: x11 server: X.org v: 1.21.1.3 with: Xwayland v: 22.1.2
    compositor: gnome-shell driver: X: loaded: modesetting alternate: fbdev,vesa
    gpu: i915 display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1366x768 s-size: <missing: xdpyinfo>
  Monitor-1: eDP-1 model: AU Optronics 0x2a3c built: 2013 res: 1366x768
    hz: 60 dpi: 112 gamma: 1.2 size: 309x173mm (12.17x6.81") diag: 354mm (13.9")
    ratio: 16:9 modes: 1366x768
  Message: Unable to show GL data. Required tool glxinfo missing.
Audio:
  Device-1: Intel Broadwell-U Audio vendor: Dell driver: snd_hda_intel
    v: kernel bus-ID: 00:03.0 chip-ID: 8086:160c class-ID: 0403
  Device-2: Intel Wildcat Point-LP High Definition Audio vendor: Dell
    driver: snd_hda_intel v: kernel bus-ID: 00:1b.0 chip-ID: 8086:9ca0
    class-ID: 0403
  Sound Server-1: ALSA v: k5.15.49-1-MANJARO running: yes
  Sound Server-2: JACK v: 1.9.21 running: no
  Sound Server-3: PulseAudio v: 16.1 running: yes
  Sound Server-4: PipeWire v: 0.3.52 running: yes
Network:
  Device-1: Intel Ethernet I218-LM vendor: Dell driver: e1000e v: kernel
    port: f080 bus-ID: 00:19.0 chip-ID: 8086:15a2 class-ID: 0200
  IF: eno1 state: down mac: <filter>
  Device-2: Intel Wireless 7265 driver: iwlwifi v: kernel pcie: gen: 1
    speed: 2.5 GT/s lanes: 1 bus-ID: 02:00.0 chip-ID: 8086:095a class-ID: 0280
  IF: wlp2s0 state: up mac: <filter>
  IP v4: <filter> type: dynamic noprefixroute scope: global
    broadcast: <filter>
  IP v6: <filter> type: noprefixroute scope: link
  WAN IP: <filter>
Bluetooth:
  Device-1: Intel Bluetooth wireless interface type: USB driver: btusb v: 0.8
    bus-ID: 1-1.3:3 chip-ID: 8087:0a2a class-ID: e001
  Report: rfkill ID: hci0 rfk-id: 3 state: up address: see --recommends
Logical:
  Message: No logical block device data found.
  Device-1: luks-ba966926-1fe2-4ff7-b267-fa7b78b89723 maj-min: 254:0
    type: LUKS dm: dm-0 size: 223.57 GiB
  Components:
  p-1: sda1 maj-min: 8:1 size: 223.57 GiB
RAID:
  Message: No RAID data found.
Drives:
  Local Storage: total: 223.57 GiB used: 150.59 GiB (67.4%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/sda maj-min: 8:0 vendor: Kingston model: SV300S37A240G
    size: 223.57 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
    type: SSD serial: <filter> rev: BBF0 scheme: MBR
  Message: No optical or floppy data found.
Partition:
  ID-1: / raw-size: 223.57 GiB size: 223.57 GiB (100.00%)
    used: 150.59 GiB (67.4%) fs: btrfs dev: /dev/dm-0 maj-min: 254:0
    mapped: luks-ba966926-1fe2-4ff7-b267-fa7b78b89723 label: N/A
    uuid: ea367113-5862-4a13-bcdf-cf4cf93de586
  ID-2: /home raw-size: 223.57 GiB size: 223.57 GiB (100.00%)
    used: 150.59 GiB (67.4%) fs: btrfs dev: /dev/dm-0 maj-min: 254:0
    mapped: luks-ba966926-1fe2-4ff7-b267-fa7b78b89723 label: N/A
    uuid: ea367113-5862-4a13-bcdf-cf4cf93de586
  ID-3: /swap raw-size: 223.57 GiB size: 223.57 GiB (100.00%)
    used: 150.59 GiB (67.4%) fs: btrfs dev: /dev/dm-0 maj-min: 254:0
    mapped: luks-ba966926-1fe2-4ff7-b267-fa7b78b89723 label: N/A
    uuid: ea367113-5862-4a13-bcdf-cf4cf93de586
  ID-4: /var/cache raw-size: 223.57 GiB size: 223.57 GiB (100.00%)
    used: 150.59 GiB (67.4%) fs: btrfs dev: /dev/dm-0 maj-min: 254:0
    mapped: luks-ba966926-1fe2-4ff7-b267-fa7b78b89723 label: N/A
    uuid: ea367113-5862-4a13-bcdf-cf4cf93de586
  ID-5: /var/log raw-size: 223.57 GiB size: 223.57 GiB (100.00%)
    used: 150.59 GiB (67.4%) fs: btrfs dev: /dev/dm-0 maj-min: 254:0
    mapped: luks-ba966926-1fe2-4ff7-b267-fa7b78b89723 label: N/A
    uuid: ea367113-5862-4a13-bcdf-cf4cf93de586
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default)
  ID-1: swap-1 type: file size: 512 MiB used: 512 MiB (100.0%) priority: -2
    file: /swap/swapfile
Unmounted:
  Message: No unmounted partitions found.
USB:
  Hub-1: 1-0:1 info: Full speed or root hub ports: 3 rev: 2.0 speed: 480 Mb/s
    chip-ID: 1d6b:0002 class-ID: 0900
  Hub-2: 1-1:2 info: Intel Integrated Hub ports: 8 rev: 2.0 speed: 480 Mb/s
    chip-ID: 8087:8001 class-ID: 0900
  Device-1: 1-1.3:3 info: Intel Bluetooth wireless interface type: Bluetooth
    driver: btusb interfaces: 2 rev: 2.0 speed: 12 Mb/s power: 100mA
    chip-ID: 8087:0a2a class-ID: e001
  Device-2: 1-1.6:4 info: Sunplus Innovation Integrated_Webcam_HD
    type: Video driver: uvcvideo interfaces: 2 rev: 2.0 speed: 480 Mb/s
    power: 500mA chip-ID: 1bcf:2b8d class-ID: 0e02
  Hub-3: 2-0:1 info: Hi-speed hub with single TT ports: 11 rev: 2.0
    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Device-1: 2-1:2
    info: SHARKOON GmbH 2.4GHz Wireless rechargeable vertical mouse [More&Better]
    type: Mouse driver: hid-generic,usbhid interfaces: 1 rev: 1.1
    speed: 12 Mb/s power: 100mA chip-ID: 1ea7:0064 class-ID: 0301
  Device-2: 2-7:3 info: Broadcom BCM5880 Secure Applications Processor
    type: Smart Card driver: N/A interfaces: 2 rev: 1.1 speed: 12 Mb/s
    power: 100mA chip-ID: 0a5c:5800 class-ID: 0b00 serial: <filter>
  Hub-4: 3-0:1 info: Super-speed hub ports: 4 rev: 3.0 speed: 5 Gb/s
    chip-ID: 1d6b:0003 class-ID: 0900
Sensors:
  System Temperatures: cpu: 49.0 C mobo: 45.0 C sodimm: SODIMM C
  Fan Speeds (RPM): cpu: 2495
Info:
  Processes: 306 Uptime: 3h 30m wakeups: 2 Init: systemd v: 251
  default: graphical tool: systemctl Compilers: gcc: 12.1.0 clang: 13.0.1
  Packages: pacman: 1316 lib: 335 flatpak: 0 Shell: Zsh v: 5.9
  running-in: gnome-terminal inxi: 3.3.19

You cache may be insufficient

Check if your system’s fstrim.timer is enabled

systemctl status fstrim.timer

Possibly run fstrim manually - you can use the –dry-run argument to see if it is needed

sudo fstrim --all --verbose --dry-run

If it is rerun above without –dry-run

1 Like

Have you monitored your system for heavy CPU / RAM + Swap / Disk usage?

 $ systemctl status fstrim.timer                               
â—‹ fstrim.timer - Discard unused blocks once a week
     Loaded: loaded (/usr/lib/systemd/system/fstrim.timer; disabled; vendor pre>
     Active: inactive (dead)
    Trigger: n/a
   Triggers: â—Ź fstrim.service
       Docs: man:fstrim
lines 1-6/6 (END)
$ sudo fstrim --all --verbose --dry-run

How can I start fstrim.timer as I can see it’s not enabled
sudo fstrim --all --verbose --dry-run printed out no output when i ran it.

Yes I do and always checking the system monitor interface

I do notice that when I clear-up the snapshot inside timeshift the lagging will be minimal.

Were you on KDE, i would have suspected baloo to be responsible, taking resources for scanning those snapshots. But since you’re on Gnome, that’s more surprising; though i am not a Gnome user nor know everything about it…

From your system information, i see you use partition encryption on a SSD – i don’t think Kingston make hard drives…? Since using drive encryption requires the system to encrypt/decrypt whenever it writes/reads from the disk, i wonder if your CPU (hyperthreaded dual core) is strong enough to handle that on an active workload…

I am a GNOME user and my SSD is encrypted upon booting up.

However, this issue on lagging started like 2-3 weeks ago and it getting worse, Opening Firefox and even file-manager I will get an error to Force Quit or Wait*

I can’t say why - an expected output would be something like this example

$ sudo fstrim --all --verbose --dry-run
boot/efi: 0 B (dry run) trimmed on /dev/nvme0n1p1
/a/projects: 0 B (dry run) trimmed on /dev/sdc1
/: 0 B (dry run) trimmed on /dev/nvme0n1p2

I con’t use btrfs - perhaps it is due to how btrfs handles the discard in mount options - in which case you don’t need the fstrim timer

But the usage of btrfs begs another question

Have you done any maintenance of btrfs? If you haven’t you should - as the reason may be a disk which has been filled with old file versions.

sudo systemctl enable fstrim.timer

No wonder the system is slow - especially when you have next to no swap.

With a two core cpu you should configure a lot more swap at least 2-4G

How come? I thought big Swaps were for compensating “low” RAM amount… :face_with_raised_eyebrow:

And you are correct - perhaps I am wrong.

The system uses swap to offload memory but with the default swap configuration the system immediately offload memory to disk even if not needed.

cache_pressure = 100
swappiness = 60

With that a lot more swap space is needed to avoid the system throttling due disk io in this case both btrfs and encrypted - which is putting a lot of pressure on a 7y old 2-core cpu.

Thanks @linux-aarhus

I think I found where the problem is, I would need to increase my swap size, I noticed few hours ago that my swam got to full and the system start lagging.

Can you point to me any good article on how to increase the swap size?

Manjaro Swap

1 Like