我买了一台新的笔记本电脑,它运行了大约一两个星期。我无法完全回忆起某个触发器,但我现在遇到的问题是,一个 CPU 内核几乎总是接近 100% 运行,而计算机却滞后。
我从一开始就使用双启动,但 Windows 10 运行良好。
眼镜:
Ubuntu 18.04.4 LTS
英特尔(R) 酷睿(TM) i7-8565U
GeForce GTX 1050 Ti 移动版
16GB 内存
我查看了其他一些帖子,但到目前为止建议的修复对我不起作用。我确保计算机使用 NVidia 显卡,并且据我所知安装了最新的驱动程序。我也尝试切换到 Kubuntu 桌面,但问题仍然存在。
我的主要问题是,我找不到导致 CPU 永久使用的进程。我重新启动计算机并让它闲置几分钟,偶尔 CPU 使用率下降,但通常保持高位。(见附图2)
当我运行任何其他程序时,滞后会变得更糟,播放 YouTube 视频会使鼠标本身严重滞后,并且 CPU 几乎始终以 100% 的速度运行(见图)
我很感谢任何帮助,并且很乐意提供来自所需命令的任何数据/输出,因为我想解决这个问题。
非常感谢
编辑:输出
ps aux --sort=-pcpu | head
Run Code Online (Sandbox Code Playgroud)
是
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1602 15.0 0.7 576228 129056 tty2 Sl+ 10:24 6:20 /usr/lib/xorg/Xorg vt2 -displayfd 3 -auth /run/user/1000/gdm/Xauthority -background none -noreset -keeptty -verbose 3
lars 5880 13.5 2.2 3817104 365864 tty2 Sl+ 10:46 2:47 /usr/lib/firefox/firefox -new-window
lars 1780 12.4 2.9 4400160 486128 tty2 Rl+ 10:24 5:13 /usr/bin/gnome-shell
lars 6139 10.0 1.2 2760008 209576 tty2 Sl+ 10:47 2:00 /usr/lib/firefox/firefox -contentproc -childID 4 -isForBrowser -prefsLen 7500 -prefMapSize 217531 -parentBuildID 20200403170909 -appdir /usr/lib/firefox/browser 5880 true tab
lars 2159 5.4 0.2 656356 47904 tty2 Sl+ 10:24 2:16 gnome-system-monitor
lars 6776 4.7 1.0 2663220 170720 tty2 Sl+ 11:02 0:13 /usr/lib/firefox/firefox -contentproc -childID 13 -isForBrowser -prefsLen 7823 -prefMapSize 217531 -parentBuildID 20200403170909 -appdir /usr/lib/firefox/browser 5880 true tab
root 1386 2.2 0.0 0 0 ? S 10:24 0:56 [irq/152-nvidia]
lars 6730 1.2 1.2 2710580 202384 tty2 Sl+ 11:01 0:04 /usr/lib/firefox/firefox -contentproc -childID 12 -isForBrowser -prefsLen 7752 -prefMapSize 217531 -parentBuildID 20200403170909 -appdir /usr/lib/firefox/browser 5880 true tab
lars 6003 1.0 1.1 34232032 191064 tty2 Sl+ 10:46 0:13 /usr/lib/firefox/firefox -contentproc -childID 2 -isForBrowser -prefsLen 6684 -prefMapSize 217531 -parentBuildID 20200403170909 -appdir /usr/lib/firefox/browser 5880 true tab
Run Code Online (Sandbox Code Playgroud)
我尝试拔下所有 USB 设备,但没有任何改变
编辑2:
EDIT3:输出 pstree -l
systemd???ModemManager???2*[{ModemManager}]
??NetworkManager???dhclient
? ??2*[{NetworkManager}]
??accounts-daemon???2*[{accounts-daemon}]
??acpid
??anacron
??avahi-daemon???avahi-daemon
??bluetoothd
??boltd???2*[{boltd}]
??colord???2*[{colord}]
??cron
??cups-browsed???2*[{cups-browsed}]
??cupsd
??dbus-daemon
??deja-dup-monito???3*[{deja-dup-monito}]
??gdm3???gdm-session-wor???gdm-wayland-ses???gnome-session-b???gnome-shell???Xwayland???9*[{Xwayland}]
? ? ? ? ? ??ibus-daemon???ibus-dconf???3*[{ibus-dconf}]
? ? ? ? ? ? ??ibus-engine-sim???2*[{ibus-engine-sim}]
? ? ? ? ? ? ??2*[{ibus-daemon}]
? ? ? ? ? ??26*[{gnome-shell}]
? ? ? ? ??gsd-a11y-settin???3*[{gsd-a11y-settin}]
? ? ? ? ??gsd-clipboard???3*[{gsd-clipboard}]
? ? ? ? ??gsd-color???4*[{gsd-color}]
? ? ? ? ??gsd-datetime???2*[{gsd-datetime}]
? ? ? ? ??gsd-housekeepin???2*[{gsd-housekeepin}]
? ? ? ? ??gsd-keyboard???4*[{gsd-keyboard}]
? ? ? ? ??gsd-media-keys???4*[{gsd-media-keys}]
? ? ? ? ??gsd-mouse???2*[{gsd-mouse}]
? ? ? ? ??gsd-power???4*[{gsd-power}]
? ? ? ? ??gsd-print-notif???2*[{gsd-print-notif}]
? ? ? ? ??gsd-rfkill???2*[{gsd-rfkill}]
? ? ? ? ??gsd-screensaver???2*[{gsd-screensaver}]
? ? ? ? ??gsd-sharing???3*[{gsd-sharing}]
? ? ? ? ??gsd-smartcard???4*[{gsd-smartcard}]
? ? ? ? ??gsd-sound???3*[{gsd-sound}]
? ? ? ? ??gsd-wacom???3*[{gsd-wacom}]
? ? ? ? ??gsd-xsettings???4*[{gsd-xsettings}]
? ? ? ? ??3*[{gnome-session-b}]
? ? ? ??2*[{gdm-wayland-ses}]
? ? ??2*[{gdm-session-wor}]
? ??gdm-session-wor???gdm-x-session???Xorg???2*[{Xorg}]
? ? ? ??lxsession???lxpanel???firefox???RDD Process???3*[{RDD Process}]
? ? ? ? ? ? ??2*[Web Content???33*[{Web Content}]]
? ? ? ? ? ? ??Web Content???35*[{Web Content}]
? ? ? ? ? ? ??4*[Web Content???34*[{Web Content}]]
? ? ? ? ? ? ??Web Content???47*[{Web Content}]
? ? ? ? ? ? ??WebExtensions???29*[{WebExtensions}]
? ? ? ? ? ? ??85*[{firefox}]
? ? ? ? ? ??4*[{lxpanel}]
? ? ? ? ??lxpolkit???2*[{lxpolkit}]
? ? ? ? ??openbox???2*[{openbox}]
? ? ? ? ??pcmanfm???2*[{pcmanfm}]
? ? ? ? ??ssh-agent
? ? ? ? ??2*[{lxsession}]
? ? ? ??2*[{gdm-x-session}]
? ? ??2*[{gdm-session-wor}]
? ??2*[{gdm3}]
??ibus-x11???3*[{ibus-x11}]
??irqbalance???{irqbalance}
??2*[kerneloops]
??menu-cached???2*[{menu-cached}]
??networkd-dispat???{networkd-dispat}
??nm-applet???3*[{nm-applet}]
??nvidia-persiste
??packagekitd???2*[{packagekitd}]
??polkitd???2*[{polkitd}]
??pulseaudio???2*[{pulseaudio}]
??rsyslogd???3*[{rsyslogd}]
??rtkit-daemon???2*[{rtkit-daemon}]
??snapd???17*[{snapd}]
??ssh-agent
??systemd???(sd-pam)
? ??at-spi-bus-laun???dbus-daemon
? ? ??3*[{at-spi-bus-laun}]
? ??at-spi2-registr???2*[{at-spi2-registr}]
? ??dbus-daemon
? ??ibus-portal???2*[{ibus-portal}]
? ??pulseaudio???2*[{pulseaudio}]
? ??xdg-permission-???2*[{xdg-permission-}]
??systemd???(sd-pam)
? ??at-spi-bus-laun???dbus-daemon
? ? ??3*[{at-spi-bus-laun}]
? ??at-spi2-registr???2*[{at-spi2-registr}]
? ??dbus-daemon
? ??dconf-service???2*[{dconf-service}]
? ??gnome-screensav???3*[{gnome-screensav}]
? ??gnome-terminal-???bash???htop
? ? ??bash???pstree
? ? ??4*[{gnome-terminal-}]
? ??goa-daemon???3*[{goa-daemon}]
? ??goa-identity-se???3*[{goa-identity-se}]
? ??gvfs-afc-volume???3*[{gvfs-afc-volume}]
? ??gvfs-goa-volume???2*[{gvfs-goa-volume}]
? ??gvfs-gphoto2-vo???2*[{gvfs-gphoto2-vo}]
? ??gvfs-mtp-volume???2*[{gvfs-mtp-volume}]
? ??gvfs-udisks2-vo???2*[{gvfs-udisks2-vo}]
? ??gvfsd???gvfsd-trash???2*[{gvfsd-trash}]
? ? ??2*[{gvfsd}]
? ??gvfsd-fuse???5*[{gvfsd-fuse}]
? ??indicator-appli???2*[{indicator-appli}]
? ??indicator-sound???3*[{indicator-sound}]
? ??xdg-desktop-por???4*[{xdg-desktop-por}]
? ??xdg-desktop-por???2*[{xdg-desktop-por}]
? ??xdg-document-po???5*[{xdg-document-po}]
? ??xdg-permission-???2*[{xdg-permission-}]
? ??xfce4-notifyd???2*[{xfce4-notifyd}]
? ??xfconfd
??systemd-journal
??systemd-logind
??systemd-resolve
??systemd-timesyn???{systemd-timesyn}
??systemd-udevd
??thermald???{thermald}
??udisksd???4*[{udisksd}]
??unattended-upgr???{unattended-upgr}
??update-notifier???3*[{update-notifier}]
??upowerd???2*[{upowerd}]
??whoopsie???2*[{whoopsie}]
??wpa_supplicant
??xfce4-power-man???2*[{xfce4-power-man}]
Run Code Online (Sandbox Code Playgroud)
输出 journalctl -f
-- Logs begin at Thu 2020-04-16 14:32:57 CEST. --
Apr 16 18:03:57 yoshua systemd[1]: Starting Hostname Service...
Apr 16 18:03:57 yoshua dbus-daemon[885]: [system] Successfully activated service 'org.freedesktop.hostname1'
Apr 16 18:03:57 yoshua systemd[1]: Started Hostname Service.
Apr 16 18:03:57 yoshua nautilus[2465]: Called "net usershare info" but it failed: Failed to execute child process “net” (No such file or directory)
Apr 16 18:04:06 yoshua eog[2493]: Failed to open file '/home/lars/.cache/thumbnails/normal/bd89ad6e4e39e613a580a0a13dc30c75.png': No such file or directory
Apr 16 18:04:16 yoshua org.gnome.Shell.desktop[1512]: libinput error: client bug: timer event11 debounce: offset negative (-234ms)
Apr 16 18:04:16 yoshua org.gnome.Shell.desktop[1512]: libinput error: client bug: timer event11 debounce: offset negative (-170ms)
Apr 16 18:04:16 yoshua org.gnome.Shell.desktop[1512]: libinput error: client bug: timer event11 debounce short: offset negative (-183ms)
Apr 16 18:04:20 yoshua org.gnome.Shell.desktop[1512]: libinput error: client bug: timer event11 debounce: offset negative (-1ms)
Apr 16 18:04:20 yoshua org.gnome.Shell.desktop[1512]: libinput error: client bug: timer event11 debounce short: offset negative (-15ms)
Apr 16 18:05:55 yoshua dbus-daemon[885]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service' requested by ':1.121' (uid=1000 pid=2149 comm="/usr/lib/firefox/firefox -new-window " label="unconfined")
Apr 16 18:05:55 yoshua systemd[1]: Starting Hostname Service...
Apr 16 18:05:55 yoshua dbus-daemon[885]: [system] Successfully activated service 'org.freedesktop.hostname1'
Apr 16 18:05:55 yoshua systemd[1]: Started Hostname Service.
Apr 16 18:05:55 yoshua gvfsd[1528]: mkdir failed on directory /var/cache/samba: Permission denied
Apr 16 18:05:56 yoshua gvfsd[1528]: mkdir failed on directory /var/cache/samba: Permission denied
Apr 16 18:05:57 yoshua gvfsd[1528]: mkdir failed on directory /var/cache/samba: Permission denied
Apr 16 18:05:58 yoshua gvfsd[1528]: mkdir failed on directory /var/cache/samba: Permission denied
Apr 16 18:05:59 yoshua gvfsd[1528]: mkdir failed on directory /var/cache/samba: Permission denied
Apr 16 18:05:59 yoshua gvfsd[1528]: mkdir failed on directory /var/cache/samba: Permission denied
Apr 16 18:06:00 yoshua gvfsd[1528]: mkdir failed on directory /var/cache/samba: Permission denied
Apr 16 18:06:00 yoshua gvfsd[1528]: mkdir failed on directory /var/cache/samba: Permission denied
Apr 16 18:06:10 yoshua kernel: [drm:intel_pipe_update_end [i915]] *ERROR* Atomic update failure on pipe A (start=22662 end=22663) time 111 us, min 1073, max 1079, scanline start 1072, end 1080
Apr 16 18:06:13 yoshua kernel: [drm:intel_pipe_update_end [i915]] *ERROR* Atomic update failure on pipe A (start=22830 end=22831) time 357 us, min 1073, max 1079, scanline start 1072, end 1096
Apr 16 18:06:45 yoshua kernel: [drm:intel_pipe_update_end [i915]] *ERROR* Atomic update failure on pipe A (start=24753 end=24754) time 239 us, min 1073, max 1079, scanline start 1066, end 1079
Apr 16 18:06:51 yoshua gnome-shell[1512]: Some code accessed the property 'WindowPreviewMenu' on the module 'windowPreview'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.
Run Code Online (Sandbox Code Playgroud)
编辑:它现在工作正常。不再有来自一个核心的峰值,所有这些都在一个小水平上持续工作。我做的最后一件事是@Gryu 推荐的:我切换到 tty。切换到 lightdmsudo dpkg-reconfigure lightdm
并没有改变任何东西。我通过相同的命令重新启动并切换回 gdm3。
我不明白这有什么帮助,但我很高兴。非常感谢你!
编辑:在我看来,如果我使用物理关机按钮关机,我可以避免这个问题。我不知道该怎么想,我只是把信息留在这里。
您可以尝试以下一项或多项:
\nhtop
查看哪些进程加载您的系统并杀死它们以查看会发生什么:killall processname
或killall -9 processname
强制杀死它。sudo apt purge package_name && sudo apt autoremove && sudo apt install package_name
sudo apt update && sudo apt install intel-microcode microcode.ctl
gdm3
相反lightdm
或反之亦然,清除以前的:sudo apt install gdm3 && sudo apt purge lightdm
sudo apt install lubuntu-desktop
并尝试一下。xubuntu-desktop
或xfce4
正如我注意到的那样,系统在安装时滞后,但未使用:sudo apt purge xubuntu-desktop && sudo apt purge xfce*
我pstree -l
在 19.10 上使用 gdm3:
\xe2\x94\x9c\xe2\x94\x80gdm3\xe2\x94\x80\xe2\x94\xac\xe2\x94\x80gdm-session-wor\xe2\x94\x80\xe2\x94\xac\xe2\x94\x80gdm-x-session\xe2\x94\x80\xe2\x94\xac\xe2\x94\x80Xorg\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80{Xorg}\n\xe2\x94\x82 \xe2\x94\x82 \xe2\x94\x82 \xe2\x94\x9c\xe2\x94\x80gnome-session-b\xe2\x94\x80\xe2\x94\x80\xe2\x94\x803*[{gnome-session-b}]\n\xe2\x94\x82 \xe2\x94\x82 \xe2\x94\x82 \xe2\x94\x94\xe2\x94\x802*[{gdm-x-session}]\n\xe2\x94\x82 \xe2\x94\x82 \xe2\x94\x94\xe2\x94\x802*[{gdm-session-wor}]\n\xe2\x94\x82 \xe2\x94\x9c\xe2\x94\x80gdm-session-wor\xe2\x94\x80\xe2\x94\xac\xe2\x94\x80gdm-x-session\xe2\x94\x80\xe2\x94\xac\xe2\x94\x80Xorg\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80{Xorg}\n\xe2\x94\x82 \xe2\x94\x82 \xe2\x94\x82 \xe2\x94\x9c\xe2\x94\x80gnome-session-b\xe2\x94\x80\xe2\x94\xac\xe2\x94\x80ssh-agent\n\xe2\x94\x82 \xe2\x94\x82 \xe2\x94\x82 \xe2\x94\x82 \xe2\x94\x94\xe2\x94\x802*[{gnome-session-b}]\n\xe2\x94\x82 \xe2\x94\x82 \xe2\x94\x82 \xe2\x94\x94\xe2\x94\x802*[{gdm-x-session}]\n\xe2\x94\x82 \xe2\x94\x82 \xe2\x94\x94\xe2\x94\x802*[{gdm-session-wor}]\n\xe2\x94\x82 \xe2\x94\x94\xe2\x94\x802*[{gdm3}]\n
Run Code Online (Sandbox Code Playgroud)\n我pstree -l
在 18.04 虚拟机上:
\xe2\x94\x9c\xe2\x94\x80lightdm\xe2\x94\x80\xe2\x94\xac\xe2\x94\x80Xorg\xe2\x94\x80\xe2\x94\x80\xe2\x94\x805*[{Xorg}]\n\xe2\x94\x82 \xe2\x94\x9c\xe2\x94\x80lightdm\xe2\x94\x80\xe2\x94\xac\xe2\x94\x80lxsession\xe2\x94\x80\xe2\x94\xac\xe2\x94\x80lxpanel\xe2\x94\x80\xe2\x94\xac\xe2\x94\x80lxterminal\xe2\x94\x80\xe2\x94\xac\xe2\x94\x80bash\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80pstree\n\xe2\x94\x82 \xe2\x94\x82 \xe2\x94\x82 \xe2\x94\x82 \xe2\x94\x82 \xe2\x94\x9c\xe2\x94\x80bash\n\xe2\x94\x82 \xe2\x94\x82 \xe2\x94\x82 \xe2\x94\x82 \xe2\x94\x82 \xe2\x94\x94\xe2\x94\x802*[{lxterminal}]\n\xe2\x94\x82 \xe2\x94\x82 \xe2\x94\x82 \xe2\x94\x82 \xe2\x94\x94\xe2\x94\x804*[{lxpanel}]\n\xe2\x94\x82 \xe2\x94\x82 \xe2\x94\x82 \xe2\x94\x9c\xe2\x94\x80lxpolkit\xe2\x94\x80\xe2\x94\x80\xe2\x94\x802*[{lxpolkit}]\n\xe2\x94\x82 \xe2\x94\x82 \xe2\x94\x82 \xe2\x94\x9c\xe2\x94\x80openbox\xe2\x94\x80\xe2\x94\x80\xe2\x94\x802*[{openbox}]\n\xe2\x94\x82 \xe2\x94\x82 \xe2\x94\x82 \xe2\x94\x9c\xe2\x94\x80pcmanfm\xe2\x94\x80\xe2\x94\x80\xe2\x94\x802*[{pcmanfm}]\n\xe2\x94\x82 \xe2\x94\x82 \xe2\x94\x82 \xe2\x94\x9c\xe2\x94\x80ssh-agent\n\xe2\x94\x82 \xe2\x94\x82 \xe2\x94\x82 \xe2\x94\x94\xe2\x94\x802*[{lxsession}]\n\xe2\x94\x82 \xe2\x94\x82 \xe2\x94\x94\xe2\x94\x802*[{lightdm}]\n\xe2\x94\x82 \xe2\x94\x94\xe2\x94\x802*[{lightdm}]\n
Run Code Online (Sandbox Code Playgroud)\n也在journalctl -f
终端中运行看看会发生什么。也许某些 gnome-settings-daemon (gsd) 不断地尝试做某事但失败并抛出错误,并且它占用了整个核心。
切换到 lightdm 以查看是否会发生某些更改,但在某些 tty 上执行此操作:Alt+ Ctrl+ F3: sudo apt purge gdm3 && sudo apt install lightdm
。sudo dpkg-reconfigure lightdm
如果您安装了gdm3,您也可以在不删除 gdm3 的情况下完成此操作。
sudo dpkg-reconfigure lightdm\nreboot\nsudo dpkg-reconfigure gdm3\n
Run Code Online (Sandbox Code Playgroud)\n也许切换到 lightdm 第四并返回到 gdm3 会以某种方式改变之前由不同图形配置工具修改的 gdm3 配置。
\n 归档时间: |
|
查看次数: |
5621 次 |
最近记录: |