View previous topic :: View next topic |
Author |
Message |
x64l n00b
Joined: 04 Nov 2024 Posts: 2
|
Posted: Mon Nov 04, 2024 10:01 am Post subject: Computer stutters and hangs for no apparent reason |
|
|
Greetings all. I have a problem I've been having a hard time diagnosing with my Gentoo installation.
My hardware is a Thinkpad T590 (the i5-8365U model), and the Gentoo LiveDVD GUI works flawlessly on it, so it's a problem either with my system or kernel config (I build my own kernel).
I have only the internal 16gb of ram, nothing more, and a 256gb nvme. Memtest hasn't found any problem with the ram, and smarutils doesn't report anything being wrong with the nvme drive either.
It might be worth mentioning that my disk is fully LUKS encrypted with a detached boot partition, hosted on a USB drive.
From time to time my computer acts up; freezing, becoming extremely slow and laggy, sometimes hanging completely with the only exit being a forceful restart.
Most times what happens is the computer slows down to an absolute crawl such that typing into a terminal feels sluggish and commands as basic as ls print their results very slowly line by line,
like running Linux on an Arduino or something. When that happens, the computer remains slow until I either restart it or suspend and resume.
When I suspend and resume the lagginess is usually resolved, but the WiFi chip completely dies.
Sometimes I can reenable it using ifconfig, but most times it disappears completely, appearing neither in ifconfig -a nor in rfkill.
Sometimes I would get the lagginess, proceed to suspend and resume, and the computer would resume but immediately hang completely still, requiring me to do a hard reset.
The weirdest part - I'm not entirely sure what exactly triggers this. Here are the occasions where it had happened to me so far:
- Browsing the internet (note: I'm using Brave on Flatpak; usually happens while watching videos in the browser, surfing the YT homepage, scrolling on Reddit or 4chan, etc)
- Downloading a torrent file using aria2c (no gui at all, no other running tasks)
- Emerging or compiling a kernel (surprisingly the compilation speed stays the same, but if I do absolutely anything else the computer might hang (usually doesn't), but it does become sluggish and stay that way even after the compilation ends).
I've tried monitoring memory usage, cpu usage, temperatures, network usage, and io usage. The only two that seem to be at fault are CPU and IO usages.
As soon as either one of the CPU cores or the IO reaches 100% (or close) usage, said sluggishness ensues (however neither should be a reason for the computer to go on the fritz).
I've tried testing each of the above individually (and all together as well) using stress, but couldn't get the computer to freeze at all.
As I said, it happens when the CPU or IO reach 100% usage, since it also happened to me while downloading a torrent, it might be correlated to network usage as well.
In the last couple of days, merely opening up the browser and browsing some lightweight websites, then suspending and resuming (without there being any lagginess) has resulted in a hang various times as well.
I've been using Linux for 15 years at this point, ran it on all kinds of devices, and I've never ever had anything like that occur to me.
By the way, I've read somewhere about some flags you could pass to the kernel to help with the WiFi dying problem. All articles and forum posts boil it down to these two:
iwlmvm.power_scheme=1
cfg80211.cfg80211_disable_40mhz_24ghz=Y
It was hard for me to tell if these two did anything. It seems that before putting them, sometimes when I booted up the computer after a WiFi chip death the WiFi would still be dead, and with these flags passed to the kernel the WiFi seemed to be fixed with a reboot.
Well, I was actually trying to play around with these settings to study their effect, and the WiFi chip died on me, regardless of these kernel args, and no reboot fixed it. Left the computer off overnight and it now works again.
If anyone thinks the issue might have to do with X11, then for your information my setup includes a very basic xorg-server installation.
DWM as the window manager, ST as the terminal emulator, MPV for playing videos and Brave browser under Flatpak for web browsing. That's everything Xorg in my setup.
I've also read some mentions online of some people blaming lack of RAM for this. I don't quite think that's the case, I've monitored RAM usage closely and it never seems to even reach a quarter of the built-in RAM I have (16GB).
I also have a quite large swap partition of 50GB, and it's never even been used once. If you think the swap partition might be the cause, I've had the same issue before the creation of the swap file.
Another point regarding the culprit being the nvme or the computer's io or something is the fact that Gentoo's liveDVD worked perfectly with no problems at all.
However, when I decrypted my nvme disk to emerge -uDN @world and compile the kernel there wasn't any problem either, so it might be some kernel config and not the io.
I've tried Linux 6.11.4 first, then switched to 6.6.57, roughly the same version as the one on the Gentoo LiveDVD. Used the same kernel config on both of them (and obviously, the Gentoo LiveDVD used its own kernel.)
Please do enlighten me, any sort of help is greatly appreciated, as for the moment I can't even pinpoint what the actual problem might be. Thank you so much.
Here's my portage make.conf:
Code: |
# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
COMMON_FLAGS="-march=skylake -O2 -pipe"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"
MAKEOPTS="-j4"
VIDEO_CARDS="intel"
# WARNING: Changing your CHOST is not something that should be done lightly.
# Please consult https://wiki.gentoo.org/wiki/Changing_the_CHOST_variable before changing.
CHOST="x86_64-pc-linux-musl"
# NOTE: This stage was built with the bindist USE flag enabled
# This sets the language of build output to English.
# Please keep this setting intact when reporting bugs.
LC_MESSAGES=C.utf8
USE="avif acl alsa apparmor brotli -dbus dri drm encode exif ffmpeg -gnome -gnutls gpm -gstreamer -gtk hardened harfbuzz jpeg lzip lzma -nls offensive opencl opengl openmp -policykit posix savedconfig session static static-libs svg svga threads vulkan zstd"
QEMU_SOFTMMU_TARGETS="x86_64 aarch64 alpha arm m68k mips mips64 ppc ppc64 riscv32 riscv64"
#QEMU_USER_TARGETS="x86_64 aarch64 alpha arm m68k mips mips64 ppc ppc64 riscv32 riscv64"
|
Here's my kernel .config:
https://pastebin.com/96JxStNd
Here's a successfuly boot dmesg:
https://pastebin.com/WysaZncg
Here's dmesg after aforementioned slowdown:
https://pastebin.com/7tbEDtBZ
Here's dmesg after aforementioned slowdown and suspend+resume:
https://pastebin.com/Y7bmq9ij |
|
Back to top |
|
|
Goverp Advocate
Joined: 07 Mar 2007 Posts: 2171
|
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5063 Location: Bavaria
|
Posted: Mon Nov 04, 2024 12:53 pm Post subject: |
|
|
x64l,
first of all: Welcome to Gentoo Forums!
Something is very strange in your kernel .config: You have this ->
Code: | # CONFIG_IOMMU_DEBUGFS is not set
# CONFIG_IOMMU_DEFAULT_DMA_STRICT is not set
CONFIG_IOMMU_DEFAULT_DMA_LAZY=y
# CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set
CONFIG_OF_IOMMU=y
CONFIG_IOMMU_DMA=y
# CONFIG_AMD_IOMMU is not set
# CONFIG_IOMMUFD is not set
# CONFIG_VIRTIO_IOMMU is not set |
and here is clearly missing CONFIG_INTEL_IOMMU ... even if it is not activated, there should be a "# CONFIG_INTEL_IOMMU is not set" here.
Have you edited your .config?
If yes, read: https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Manual_kernel_configuration#Never_edit_.config
You would need this:
Code: | CONFIG_IOMMU_DMA=y
CONFIG_IOMMU_SVA=y
CONFIG_IOMMU_IOPF=y
# CONFIG_AMD_IOMMU is not set
CONFIG_DMAR_TABLE=y
CONFIG_INTEL_IOMMU=y
CONFIG_INTEL_IOMMU_SVM=y
CONFIG_INTEL_IOMMU_DEFAULT_ON=y
CONFIG_INTEL_IOMMU_FLOPPY_WA=y
CONFIG_INTEL_IOMMU_SCALABLE_MODE_DEFAULT_ON=y
CONFIG_INTEL_IOMMU_PERF_EVENTS=y
# CONFIG_IOMMUFD is not set
CONFIG_IRQ_REMAP=y |
... AND ... you miss the most important option for this Intel machine:
Code: | # CONFIG_X86_INTEL_LPSS is not set |
together with:
Code: | # CONFIG_MFD_INTEL_LPSS_ACPI is not set
# CONFIG_MFD_INTEL_LPSS_PCI is not set |
Also you have not included the microcode for your CPU:
Code: | CONFIG_EXTRA_FIRMWARE="iwlwifi-9000-pu-b0-jf-b0-46.ucode i915/kbl_dmc_ver1_04.bin" |
(read this: https://forums.gentoo.org/viewtopic-t-1065464.html )
BTW: You should also check these options ... just read the whole article from above (and the link for 6.6 in it)
Code: | CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
# CONFIG_PINCTRL is not set
# CONFIG_INTEL_IDMA64 is not set |
... maybe you really should throw away this .config and start from the beginning with booting our GentooLiveCD and then doing this:
https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Manual_kernel_configuration#Before_you_start _________________ https://wiki.gentoo.org/wiki/User:Pietinger |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5063 Location: Bavaria
|
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5063 Location: Bavaria
|
Posted: Mon Nov 04, 2024 1:43 pm Post subject: |
|
|
P.P.S.
Yes you also miss:
Code: | # CONFIG_PCI_MSI is not set |
(Maybe because you have disabled AMD_IOMMU see in my article) _________________ https://wiki.gentoo.org/wiki/User:Pietinger |
|
Back to top |
|
|
x64l n00b
Joined: 04 Nov 2024 Posts: 2
|
Posted: Mon Nov 04, 2024 6:00 pm Post subject: |
|
|
Thank you very much Goverp and Pietinger, highly appreciated! I'll try everything and report back tomorrow. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|