Since the issue is intermittent, a systematic approach is best. Here’s a step-by-step plan to narrow it down:
1. Reboot into Linux 6.15.4
- The issue might already be fixed in the newer kernel.
- After rebooting, monitor for a while to see if the problem persists.
2. Check Disk Health (smartctl)
Run a full SMART test on all disks:
sudo smartctl -a /dev/sdX # Replace sdX with your disk (e.g., sda, nvme0n1)
sudo smartctl -t long /dev/sdX # Run extended test
- Look for reallocated sectors, pending sectors, or high
Load_Cycle_Count (common in SSDs).
- If any disk shows errors, consider replacing it.
3. Monitor kworker Activity When It Happens
When the issue occurs, run these commands to gather data:
A. Identify the Problematic kworker Thread
ps aux | grep -i kworker | sort -k3 -r | head -n 5
- Note the PID of the high-CPU
kworker.
B. Check Its Stack Trace (perf)
sudo perf top -p <PID> # Replace <PID> with the kworker's PID
- If
io_idle or blk_mq appears, it confirms a block I/O issue.
C. Check Disk I/O (iostat)
iostat -x 1 5
- Look for high
%util or await on any disk.
D. Check Interrupts (/proc/interrupts)
cat /proc/interrupts | grep -v "0:" | sort -k2 -nr | head -n 10
- If a specific IRQ is spiking, it might indicate a hardware issue.
4. Test Kernel Parameters (If Issue Persists)
If the problem reappears, try these temporary fixes (add them to GRUB later if they help):
A. Disable io_idle
echo 0 | sudo tee /sys/module/blk_mq/parameters/io_idle
- If this helps, make it permanent by adding
blk_mq.io_idle=0 to GRUB.
B. Change I/O Scheduler
echo none | sudo tee /sys/block/sdX/queue/scheduler
- If this helps, make it persistent with
elevator=none in GRUB.
C. Disable Power Management for Disks
sudo hdparm -B 255 /dev/sdX # Disable APM (for HDDs)
sudo nvme set-feature -f 0x02 -v 0 /dev/nvme0n1 # Disable APST (for NVMe)
5. If All Else Fails: Downgrade the Kernel
If the issue persists, try booting into an older kernel (e.g., 6.14.x or 6.8.x) to confirm if it’s a regression in 6.15.x.
Final Notes
- If the problem is disk-related,
smartctl or iostat should reveal it.
- If it’s kernel-related,
perf and dmesg will help identify the culprit.
- If it’s hardware-related, unplugging devices or checking
/proc/interrupts may help.
Would you like help modifying GRUB to test kernel parameters permanently? Or should we wait and see if 6.15.4 fixes it?