You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

求助:kworker进程占用100% CPU,Linux/Ubuntu新手无法解决

Fixing kworker 100% CPU Usage on Ubuntu (For Newbies)

Hey there! I totally get how frustrating it is when you’re new to Ubuntu/Linux, you’ve scoured dozens of forums, and still can’t shake that kworker process hogging all your CPU. Let’s break this down step by step—kworkers are kernel task handlers, so the key is to figure out exactly what task they’re stuck on, then target that issue.

First: Pinpoint the problematic kworker

kworkers have weird names like kworker/u8:1—the suffix tells us what they’re dealing with. Here’s how to dig deeper:

  • Open a terminal and run ps aux | grep kworker to find the PID (process ID) of the high-CPU kworker.
  • Next, run cat /proc/<PID>/stack (replace <PID> with the number you found) to see the kernel functions it’s stuck on. This will reveal the root cause—like a driver issue, filesystem error, or hardware problem.
  • Also, keep dmesg -w running in another terminal to watch real-time kernel logs. kworker spikes almost always leave error messages here (e.g., "USB device timeout" or "GPU driver crash").

Common Fixes (Based on Most Likely Causes)

1. Driver Glitches (The #1 Culprit)

If the stack trace points to a specific driver (graphics, Wi-Fi, sound, etc.), here’s what to do:

  • Update the driver: For example, if it’s an NVIDIA GPU, run ubuntu-drivers devices to see available drivers, then install the latest one with sudo apt install nvidia-driver-<version-number>.
  • Update your kernel: Outdated kernels often have driver bugs. Run:
    sudo apt update && sudo apt upgrade linux-generic
    sudo reboot
    
  • For Wi-Fi/Bluetooth issues, try disabling and re-enabling the device first (via Settings > Network), then update the kernel if that doesn’t help.

2. Filesystem Errors

Sometimes a misbehaving drive (internal or external) triggers constant kworker activity:

  • Unmount any external drives you have connected. If the CPU usage drops, run a filesystem check:
    lsblk  # Find your drive identifier (e.g., /dev/sdb1)
    sudo umount /dev/sdb1
    sudo fsck /dev/sdb1
    
  • To check your root filesystem, reboot into recovery mode and select the "Filesystem Check" option, or run sudo touch /forcefsck and reboot (the system will check errors on startup).

3. Kernel Bugs

Occasionally, a specific kernel version has a known kworker bug. Try upgrading to the latest hardware-enablement (HWE) kernel:

sudo apt install linux-generic-hwe-22.04  # Adjust the version to match your Ubuntu release (e.g., 20.04)
sudo reboot

If that doesn’t work, you can try a mainline kernel (note: these aren’t officially supported by Ubuntu, so proceed carefully).

4. Faulty Hardware

Failing disks, glitchy USB devices, or misbehaving sensors can cause kworker to go haywire:

  • Disconnect all non-essential USB devices (like external drives, printers, etc.) and see if the CPU usage drops.
  • Check for hardware errors in logs: journalctl -k -p err will show kernel-level error messages related to hardware.

Temporary Workaround (If You Need Immediate Relief)

If you can’t fix the root cause right away, you can limit the kworker to a single CPU core to reduce its impact:

taskset -cp <core-number> <PID>

For example: taskset -cp 1 1234 binds the kworker with PID 1234 to core 1. This is just a band-aid, though—you’ll still want to fix the underlying issue.


内容的提问来源于stack exchange,提问作者coolcat97

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 04:23:25