Ubuntu 运行非常慢(没有内存或 CPU 问题)

Ubuntu 运行非常慢(没有内存或 CPU 问题)

我有一台新笔记本电脑,上面安装了 Windows 10 和 Kubuntu 18.04。过去几天一切正常,但昨天和今天我的 Kubuntu 非常滞后且速度极慢。

没有内存或 CPU 问题
我检查过top,但没有任何异常,CPU 和内存都保持在 5% 以下。我重新启动了笔记本电脑,甚至登录屏幕都花了很长时间才出现。我也检查过,iotop但似乎没有进程在忙于写入或读取。

足够的空间

              total        used        free      shared  buff/cache   available
Mem:        8072692     2261004     1325488      137504     4486200     5381164
Swap:       7812092         768     7811324

系统必须能够轻松处理 ubuntu,就像过去几天一样

CPU 信息

    Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
CPU(s):              8
On-line CPU(s) list: 0-7
Thread(s) per core:  2
Core(s) per socket:  4
Socket(s):           1
NUMA node(s):        1
Vendor ID:           GenuineIntel
CPU family:          6
Model:               142
Model name:          Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
Stepping:            10
CPU MHz:             800.000
CPU max MHz:         1600,0000
CPU min MHz:         400,0000
BogoMIPS:            3600.00
Virtualization:      VT-x
L1d cache:           32K
L1i cache:           32K
L2 cache:            256K
L3 cache:            6144K
NUMA node0 CPU(s):   0-7
Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d

内存信息

MemTotal:        8072692 kB
MemFree:         1067644 kB
MemAvailable:    5165636 kB
Buffers:           94312 kB
Cached:          4350420 kB
SwapCached:           88 kB
Active:          2910268 kB
Inactive:        3677080 kB
Active(anon):    2040920 kB
Inactive(anon):   294884 kB
Active(file):     869348 kB
Inactive(file):  3382196 kB
Unevictable:          32 kB
Mlocked:              32 kB
SwapTotal:       7812092 kB
SwapFree:        7811324 kB
Dirty:            506280 kB
Writeback:          1052 kB
AnonPages:       2142736 kB
Mapped:          3351496 kB
Shmem:            193192 kB
Slab:             254680 kB
SReclaimable:     141592 kB
SUnreclaim:       113088 kB
KernelStack:        9088 kB
PageTables:        30456 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:    11848436 kB
Committed_AS:    4448964 kB
VmallocTotal:   34359738367 kB
VmallocUsed:           0 kB
VmallocChunk:          0 kB
HardwareCorrupted:     0 kB
AnonHugePages:         0 kB
ShmemHugePages:        0 kB
ShmemPmdMapped:        0 kB
CmaTotal:              0 kB
CmaFree:               0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
Hugetlb:               0 kB
DirectMap4k:      240244 kB
DirectMap2M:     5957632 kB
DirectMap1G:     2097152 kB

启动服务

UNIT                                                  LOAD   ACTIVE SUB     DESCRIPTION                                                       
accounts-daemon.service                               loaded active running Accounts Service                                                  
acpid.service                                         loaded active running ACPI event daemon                                                 
apparmor.service                                      loaded active exited  AppArmor initialization                                           
apport.service                                        loaded active exited  LSB: automatic crash report generation                            
avahi-daemon.service                                  loaded active running Avahi mDNS/DNS-SD Stack                                           
bluetooth.service                                     loaded active running Bluetooth service                                                 
clean-mount-point@media-rick-TOSHIBA\x20EXT.service   loaded active running Clean the /media/rick/TOSHIBA EXT mount point                     
console-setup.service                                 loaded active exited  Set console font and keymap                                       
cron.service                                          loaded active running Regular background program processing daemon                      
cups-browsed.service                                  loaded active running Make remote CUPS printers available locally                       
cups.service                                          loaded active running CUPS Scheduler                                                    
dbus.service                                          loaded active running D-Bus System Message Bus                                          
grub-common.service                                   loaded active exited  LSB: Record successful boot for GRUB                              
haveged.service                                       loaded active running Entropy daemon using the HAVEGE algorithm                         
irqbalance.service                                    loaded active running irqbalance daemon                                                 
kerneloops.service                                    loaded active running Tool to automatically collect and submit kernel crash signatures  
keyboard-setup.service                                loaded active exited  Set the console keyboard layout                                   
kmod-static-nodes.service                             loaded active exited  Create list of required static device nodes for the current kernel
ModemManager.service                                  loaded active running Modem Manager                                                     
mpd.service                                           loaded active running Music Player Daemon                                               
networkd-dispatcher.service                           loaded active running Dispatcher daemon for systemd-networkd                            
NetworkManager-wait-online.service                    loaded active exited  Network Manager Wait Online                                       
NetworkManager.service                                loaded active running Network Manager                                                   
packagekit.service                                    loaded active running PackageKit Daemon                                                 
polkit.service                                        loaded active running Authorization Manager                                             
rsyslog.service                                       loaded active running System Logging Service                                            
rtkit-daemon.service                                  loaded active running RealtimeKit Scheduling Policy Service                             
sddm.service                                          loaded active running Simple Desktop Display Manager                                    
setvtrgb.service                                      loaded active exited  Set console scheme                                                
snapd.seeded.service                                  loaded active exited  Wait until snapd is fully seeded                                  
systemd-backlight@backlight:intel_backlight.service   loaded active exited  Load/Save Screen Backlight Brightness of backlight:intel_backlight
systemd-fsck@dev-disk-by\x2duuid-FE67\x2d3101.service loaded active exited  File System Check on /dev/disk/by-uuid/FE67-3101                  
systemd-journal-flush.service                         loaded active exited  Flush Journal to Persistent Storage                               
systemd-journald.service                              loaded active running Journal Service                                                   
systemd-logind.service                                loaded active running Login Service                                                     
systemd-modules-load.service                          loaded active exited  Load Kernel Modules                                               
systemd-random-seed.service                           loaded active exited  Load/Save Random Seed                                             
systemd-remount-fs.service                            loaded active exited  Remount Root and Kernel File Systems                              
systemd-resolved.service                              loaded active running Network Name Resolution                                           
systemd-sysctl.service                                loaded active exited  Apply Kernel Variables                                            
systemd-sysusers.service                              loaded active exited  Create System Users                                               
systemd-timesyncd.service                             loaded active running Network Time Synchronization                                      
systemd-tmpfiles-setup-dev.service                    loaded active exited  Create Static Device Nodes in /dev                                
systemd-tmpfiles-setup.service                        loaded active exited  Create Volatile Files and Directories                             
systemd-udev-trigger.service                          loaded active exited  udev Coldplug all Devices                                         
systemd-udevd.service                                 loaded active running udev Kernel Device Manager                                        
systemd-update-utmp.service                           loaded active exited  Update UTMP about System Boot/Shutdown                            
systemd-user-sessions.service                         loaded active exited  Permit User Sessions                                              
thermald.service                                      loaded active running Thermal Daemon Service                                            
udisks2.service                                       loaded active running Disk Manager                                                      
ufw.service                                           loaded active exited  Uncomplicated firewall                                            
upower.service                                        loaded active running Daemon for power management                                       
[email protected]                         loaded active exited  /run/user/1000 mount wrapper                                      
[email protected]                                     loaded active running User Manager for UID 1000                                         
whoopsie.service                                      loaded active running crash report submission daemon                                    
wpa_supplicant.service                                loaded active running WPA supplicant          


总而言之,我的 Kubuntu 在启动后就很慢(登录背景出现,但密码字段显示已经花了很长时间)。我还没有发现任何过度消耗 CPU 或内存的进程。现在我真的不知道该怎么办了。


对评论的反应

1TB HDD 磁盘的 SMART 结果 在此处输入图片描述


固件和 BIOS
我的笔记本电脑:联想ideapad 330

个人简介: 8TCN25WW

固件 SSD

NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda           8:0    0 931,5G  0 disk 
├─sda1        8:1    0   128M  0 part 
├─sda2        8:2    0 443,1G  0 part 
└─sda3        8:3    0 488,3G  0 part /
sr0          11:0    1  1024M  0 rom  
nvme0n1     259:0    0 119,2G  0 disk 
├─nvme0n1p1 259:1    0   260M  0 part /boot/efi
├─nvme0n1p2 259:2    0    16M  0 part 
├─nvme0n1p3 259:3    0  88,7G  0 part 
├─nvme0n1p4 259:4    0  1000M  0 part 
├─nvme0n1p5 259:5    0   7,5G  0 part [SWAP]
└─nvme0n1p6 259:6    0  21,9G  0 part 

我查看了 nvme0n1p6,sudo smartctl -i /dev/nvme0n1p6得到了:

Model Number:                       KBG30ZMT128G TOSHIBA
Serial Number:                      18JPA1SDP1TP
Firmware Version:                   0105ADLA
PCI Vendor/Subsystem ID:            0x1179
IEEE OUI Identifier:                0x00080d
Controller ID:                      0
Number of Namespaces:               1
Namespace 1 Size/Capacity:          128,035,676,160 [128 GB]
Namespace 1 Formatted LBA Size:     512

答案1

你的硬盘可能有问题。

检查您的 HDD SMART 数据...

启动Disks应用程序并查看 SMART 数据。不要仅仅因为它说OK没有问题就认为没有问题。让我看一张截图。

让我们检查您的文件系统...

  • 启动至 Ubuntu Live DVD/USB
  • 打开terminal窗户
  • 类型sudo fdisk -l
  • 识别“Linux 文件系统”的 /dev/XXXX 设备名称
  • 输入sudo fsck -f /dev/XXXX# 用你之前找到的数字替换 XXXX
  • 如果有错误,请重复 fsck 命令
  • 类型reboot

然后让我们检查坏块...

Note: do NOT perform this on a SSD

Note: do NOT abort a bad block scan!

Note: backup your important files FIRST!

sudo e2fsck -fcky /dev/sdXX# 只读测试

或者

sudo e2fsck -fccky /dev/sdXX# 非破坏性读写测试(受到推崇的)

-k 很重要,因为它会保存之前的坏块表,并将任何新的坏块添加到该表中。如果没有 -k,您将丢失所有之前的坏块信息。

-fccky 参数...

   -f     Force checking even if the file system seems clean.

   -c     This option causes e2fsck to use badblocks(8) program  to  do  a
          read-only  scan  of  the device in order to find any bad blocks.
          If any bad blocks are found, they are added  to  the  bad  block
          inode  to  prevent them from being allocated to a file or direc‐
          tory.  If this option is specified twice,  then  the  bad  block
          scan will be done using a non-destructive read-write test.

   -k     When combined with the -c option, any existing bad blocks in the
          bad blocks list are preserved, and any new bad blocks  found  by
          running  badblocks(8)  will  be added to the existing bad blocks
          list.

   -y     Assume  an answer of `yes' to all questions; allows e2fsck to be
          used non-interactively.  This option may not be specified at the
          same time as the -n or -p options.

相关内容