我有一台装有 Ubuntu 20.04 的 DELL 笔记本电脑。一段时间后,经过一些使用(例如 Firefox、一些视频通话等)后,它变得很慢。有些进程开始占用更高百分比的 CPU(即使它们没有占用整个 CPU)。此图像中有 htop 的输出。
我不明白为什么这些进程会让我的 CPU 使用率居高不下。
任何帮助都将受到赞赏。
编辑:如图所示,我有 32 GB 的内存。电脑的速度会根据我所做的事情而变慢。此外,youtube 视频也会减慢我的笔记本电脑的速度。刚开始的时候(一个月前)它要快得多。我也尝试过重新安装 Ubuntu,但情况并没有好转。
编辑3:
francesco@dell-latitude-inria:~/Desktop$ sudo lshw -C video
*-display
description: VGA compatible controller
product: UHD Graphics 620 (Whiskey Lake)
vendor: Intel Corporation
physical id: 2
bus info: pci@0000:00:02.0
version: 02
width: 64 bits
clock: 33MHz
capabilities: pciexpress msi pm vga_controller bus_master cap_list rom
configuration: driver=i915 latency=0
resources: irq:165 memory:cb000000-cbffffff memory:80000000-8fffffff ioport:3000(size=64) memory:c0000-dffff
然后
francesco@dell-latitude-inria:~/Desktop$ sudo lshw -C memory
*-firmware
description: BIOS
vendor: Dell Inc.
physical id: 0
version: 1.12.0
date: 02/24/2021
size: 64KiB
capacity: 32MiB
capabilities: pci pnp upgrade shadowing cdboot bootselect edd int13floppynec int13floppy1200 int13floppy720 int13floppy2880 int5printscreen int9keyboard int14serial int17printer acpi usb smartbattery biosbootspecification netboot uefi
*-memory
description: System Memory
physical id: 20
slot: System board or motherboard
size: 32GiB
*-bank:0
description: SODIMM DDR4 Synchronous 2667 MHz (0,4 ns)
product: HMA82GS6JJR8N-VK
vendor: Hynix Semiconductor (Hyundai Electronics)
physical id: 0
serial: 2FA26C44
slot: DIMM A
size: 16GiB
width: 64 bits
clock: 2667MHz (0.4ns)
*-bank:1
description: SODIMM DDR4 Synchronous 2667 MHz (0,4 ns)
product: HMA82GS6JJR8N-VK
vendor: Hynix Semiconductor (Hyundai Electronics)
physical id: 1
serial: 2FA26909
slot: DIMM B
size: 16GiB
width: 64 bits
clock: 2667MHz (0.4ns)
*-cache:0
description: L1 cache
physical id: 29
slot: L1 Cache
size: 256KiB
capacity: 256KiB
capabilities: synchronous internal write-back unified
configuration: level=1
*-cache:1
description: L2 cache
physical id: 2a
slot: L2 Cache
size: 1MiB
capacity: 1MiB
capabilities: synchronous internal write-back unified
configuration: level=2
*-cache:2
description: L3 cache
physical id: 2b
slot: L3 Cache
size: 8MiB
capacity: 8MiB
capabilities: synchronous internal write-back unified
configuration: level=3
*-memory UNCLAIMED
description: RAM memory
product: Cannon Point-LP Shared SRAM
vendor: Intel Corporation
physical id: 14.2
bus info: pci@0000:00:14.2
version: 30
width: 64 bits
clock: 33MHz (30.3ns)
capabilities: pm cap_list
configuration: latency=0
resources: memory:cc320000-cc321fff memory:cc32b000-cc32bfff
然后
francesco@dell-latitude-inria:~/Desktop$ ls -al ~/.local/share/gnome-shell/extensions
total 12
drwxrwxr-x 3 francesco francesco 4096 mai 19 11:47 .
drwx------ 3 francesco francesco 4096 mai 28 13:39 ..
drwxrwxr-x 4 francesco francesco 4096 mai 19 11:47 [email protected]
然后
francesco@dell-latitude-inria:~/Desktop$ ls -al /usr/share/gnome-shell/extensions
total 20
drwxr-xr-x 5 root root 4096 avril 23 2020 .
drwxr-xr-x 7 root root 4096 mai 19 09:16 ..
drwxr-xr-x 2 root root 4096 mai 19 09:17 desktop-icons@csoriano
drwxr-xr-x 3 root root 4096 mai 19 09:17 [email protected]
drwxr-xr-x 3 root root 4096 mai 19 09:17 [email protected]
然后
francesco@dell-latitude-inria:~/Desktop$ snap list
Name Version Rev Tracking Publisher Notes
canonical-livepatch 9.6.2 99 latest/stable canonical✓ -
core 16-2.50 11081 latest/stable canonical✓ core
core18 20210507 2066 latest/stable canonical✓ base
core20 20210429 1026 latest/stable canonical✓ base
gimp 2.10.24 372 latest/stable snapcrafters -
gnome-3-28-1804 3.28.0-19-g98f9e67.98f9e67 145 latest/stable canonical✓ -
gnome-3-34-1804 0+git.3556cb3 66 latest/stable/… canonical✓ -
gtk-common-themes 0.1-52-gb92ac40 1515 latest/stable/… canonical✓ -
snap-store 3.38.0-59-g494f078 518 latest/stable/… canonical✓ -
snapd 2.50 11841 latest/stable canonical✓ snapd
telegram-desktop 2.7.4 2637 latest/stable telegram.desktop -
编辑4:
当尝试打开一个应用程序(firefox 或 visual studio code)时,它们一开始会占用大量 CPU,然后就不再占用了,但系统仍然很慢
top - 17:30:58 up 27 min, 1 user, load average: 1,82, 3,20, 3,41
Tasks: 296 total, 6 running, 290 sleeping, 0 stopped, 0 zombie
%Cpu(s): 54,5 us, 8,0 sy, 0,0 ni, 37,3 id, 0,2 wa, 0,0 hi, 0,1 si, 0,0 st
MiB Mem : 31930,6 total, 26496,8 free, 2301,1 used, 3132,8 buff/cache
MiB Swap: 2048,0 total, 2048,0 free, 0,0 used. 28361,5 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
10409 frances+ 20 0 4475420 120928 61060 R 167,8 0,4 0:09.46 code
10341 frances+ 20 0 50,5g 255440 111076 R 159,3 0,8 0:15.14 code
10382 frances+ 20 0 4508992 139532 66160 R 57,0 0,4 0:03.10 code
10394 frances+ 20 0 36,4g 169484 93784 S 30,3 0,5 0:07.08 code
1842 frances+ 20 0 5270364 291192 105076 S 16,9 0,9 4:10.51 gnome-shell
10309 frances+ 20 0 543340 125196 89264 R 14,3 0,4 0:01.81 code
10279 frances+ 20 0 4775044 144700 106712 S 14,0 0,4 0:01.71 code
1683 frances+ 20 0 869272 78712 43672 R 10,7 0,2 2:25.79 Xorg
9860 frances+ 20 0 968660 54596 41608 S 5,9 0,2 0:02.94 gnome-terminal-
10450 frances+ 20 0 10896 5096 3460 S 5,9 0,0 0:00.18 bash
10430 frances+ 20 0 4475432 76348 60928 S 4,6 0,2 0:00.83 code
768 root 20 0 273900 9404 8544 S 3,3 0,0 0:38.77 thermald
10328 frances+ 20 0 256532 77572 68320 S 3,3 0,2 0:00.16 code
9300 frances+ 20 0 3994300 430172 221396 S 1,6 1,3 2:10.01 firefox
9877 frances+ 20 0 12132 4200 3260 R 1,6 0,0 0:01.59 top
9192 root 20 0 0 0 0 I 1,3 0,0 0:01.29 kworker/5:3-events
9598 frances+ 20 0 2882896 254248 156000 S 1,3 0,8 1:19.61 Web Content
9510 frances+ 20 0 2496384 140660 96472 S 0,7 0,4 0:13.56 WebExtensions
答案1
部分答案...
在检查疑似速度变慢时 /var/log/syslog 时,我发现了这些需要调查的过程......
- 非凡——很多网络错误
- livepatch-执行更新
- 电报 - 实时优先
- gnome-shell - 窗口管理器错误(您是否安装了任何主题?)
更新#1:
审查了第二个系统日志...
- 很多无线断开/重新连接次数
- gnome-shell 崩溃
更新 #2:
- 该
code
应用程序占用了大量的 CPU%
答案2
我有一台搭载 Ubuntu 22.10 的 Thinkpad X1 Extreme Gen 3,它有上述所有症状。为了解决我的问题,我尝试了所有不同的答案。
最终原因是灰尘过滤器堵塞了。我清理了它们后,一切就恢复正常了。
令我感到困惑的一件事是,它cat /proc/cpuinfo
没有显示节流的 CPU,而且 CPU 温度高达 70 多度,虽然很热,但并不严重。
最终促使我清洁过滤器的原因是整个笔记本电脑非常热(它放在我的桌子上,我通常不会碰它)。因此,如果其他答案都对您没有帮助,请检查您的笔记本电脑温度。