我注意到,当我执行某些操作时,声音开始发出噼啪声并且鼠标开始短时间(例如 1 秒)冻结。
例如,当我在浏览器(不仅仅是 Chrome)上滚动页面或启动某个程序时,有时当我在键盘上打字时,就会发生这种情况。
每次发生这种情况时,CPU 使用率
/usr/bin/pulseaudio --start --log-target=syslog
瞬间(比如 1 秒)跳升至 30% - 60%。
你知道怎样修复这个问题吗?
编辑
milano@milano-PC:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC892 Analog [ALC892 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], dev/ice 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 9: HDMI 3 [HDMI 3]
Subdevices: 1/1
Subdevice #0: subdevice #0
系统日志结束
我注意到在 19:36:50 出现了冻结和噼啪声,但系统日志中没有记录任何内容。
Jan 19 19:09:18 milano-PC /usr/lib/gdm3/gdm-x-session[2622]: (--) NVIDIA(GPU-0): DFP-0: disconnected
Jan 19 19:09:18 milano-PC /usr/lib/gdm3/gdm-x-session[2622]: (--) NVIDIA(GPU-0): DFP-0: Internal TMDS
Jan 19 19:09:18 milano-PC /usr/lib/gdm3/gdm-x-session[2622]: (--) NVIDIA(GPU-0): DFP-0: 330.0 MHz maximum pixel clock
Jan 19 19:09:18 milano-PC /usr/lib/gdm3/gdm-x-session[2622]: (--) NVIDIA(GPU-0):
Jan 19 19:09:18 milano-PC /usr/lib/gdm3/gdm-x-session[2622]: (--) NVIDIA(GPU-0): BenQ GW2470 (DFP-1): connected
Jan 19 19:09:18 milano-PC /usr/lib/gdm3/gdm-x-session[2622]: (--) NVIDIA(GPU-0): BenQ GW2470 (DFP-1): Internal TMDS
Jan 19 19:09:18 milano-PC /usr/lib/gdm3/gdm-x-session[2622]: (--) NVIDIA(GPU-0): BenQ GW2470 (DFP-1): 600.0 MHz maximum pixel clock
Jan 19 19:09:18 milano-PC /usr/lib/gdm3/gdm-x-session[2622]: (--) NVIDIA(GPU-0):
Jan 19 19:09:18 milano-PC /usr/lib/gdm3/gdm-x-session[2622]: (--) NVIDIA(GPU-0): BenQ GW2470 (DFP-2): connected
Jan 19 19:09:18 milano-PC /usr/lib/gdm3/gdm-x-session[2622]: (--) NVIDIA(GPU-0): BenQ GW2470 (DFP-2): Internal TMDS
Jan 19 19:09:18 milano-PC /usr/lib/gdm3/gdm-x-session[2622]: (--) NVIDIA(GPU-0): BenQ GW2470 (DFP-2): 600.0 MHz maximum pixel clock
Jan 19 19:09:18 milano-PC /usr/lib/gdm3/gdm-x-session[2622]: (--) NVIDIA(GPU-0):
Jan 19 19:09:18 milano-PC /usr/lib/gdm3/gdm-x-session[2622]: (--) NVIDIA(GPU-0): DFP-3: disconnected
Jan 19 19:09:18 milano-PC /usr/lib/gdm3/gdm-x-session[2622]: (--) NVIDIA(GPU-0): DFP-3: Internal DisplayPort
Jan 19 19:09:18 milano-PC /usr/lib/gdm3/gdm-x-session[2622]: (--) NVIDIA(GPU-0): DFP-3: 1440.0 MHz maximum pixel clock
Jan 19 19:09:18 milano-PC /usr/lib/gdm3/gdm-x-session[2622]: (--) NVIDIA(GPU-0):
Jan 19 19:09:18 milano-PC /usr/lib/gdm3/gdm-x-session[2622]: (--) NVIDIA(GPU-0): DFP-4: disconnected
Jan 19 19:09:18 milano-PC /usr/lib/gdm3/gdm-x-session[2622]: (--) NVIDIA(GPU-0): DFP-4: Internal TMDS
Jan 19 19:09:18 milano-PC /usr/lib/gdm3/gdm-x-session[2622]: (--) NVIDIA(GPU-0): DFP-4: 165.0 MHz maximum pixel clock
Jan 19 19:09:18 milano-PC /usr/lib/gdm3/gdm-x-session[2622]: (--) NVIDIA(GPU-0):
Jan 19 19:09:18 milano-PC /usr/lib/gdm3/gdm-x-session[2622]: (--) NVIDIA(GPU-0): DFP-5: disconnected
Jan 19 19:09:18 milano-PC /usr/lib/gdm3/gdm-x-session[2622]: (--) NVIDIA(GPU-0): DFP-5: Internal DisplayPort
Jan 19 19:09:18 milano-PC /usr/lib/gdm3/gdm-x-session[2622]: (--) NVIDIA(GPU-0): DFP-5: 1440.0 MHz maximum pixel clock
Jan 19 19:09:18 milano-PC /usr/lib/gdm3/gdm-x-session[2622]: (--) NVIDIA(GPU-0):
Jan 19 19:09:19 milano-PC /usr/lib/gdm3/gdm-x-session[2622]: (--) NVIDIA(GPU-0): MST TV MONITOR (DFP-6): connected
Jan 19 19:09:19 milano-PC /usr/lib/gdm3/gdm-x-session[2622]: (--) NVIDIA(GPU-0): MST TV MONITOR (DFP-6): Internal TMDS
Jan 19 19:09:19 milano-PC /usr/lib/gdm3/gdm-x-session[2622]: (--) NVIDIA(GPU-0): MST TV MONITOR (DFP-6): 600.0 MHz maximum pixel clock
Jan 19 19:09:19 milano-PC /usr/lib/gdm3/gdm-x-session[2622]: (--) NVIDIA(GPU-0):
Jan 19 19:09:19 milano-PC gnome-shell[2758]: Object St.Icon (0x559e65230cf0), has been already finalized. Impossible to set any property to it.
Jan 19 19:09:19 milano-PC gnome-shell[2758]: Object St.BoxLayout (0x559e6522fe30), has been already finalized. Impossible to set any property to it.
Jan 19 19:09:19 milano-PC org.gnome.Shell.desktop[2758]: == Stack trace for context 0x559e64485340 ==
Jan 19 19:09:19 milano-PC org.gnome.Shell.desktop[2758]: #0 0x7fffc77043c0 b resource:///org/gnome/shell/ui/osdWindow.js:206 (0x7f0fb26c7780 @ 231)
Jan 19 19:09:19 milano-PC org.gnome.Shell.desktop[2758]: #1 0x7fffc7704ae0 I resource:///org/gnome/gjs/modules/_legacy.js:82 (0x7f0fb29b5de0 @ 71)
Jan 19 19:09:19 milano-PC org.gnome.Shell.desktop[2758]: #2 0x7fffc7704ba0 b self-hosted:916 (0x7f0fb29f12b8 @ 367)
Jan 19 19:09:19 milano-PC org.gnome.Shell.desktop[2758]: #3 0x7fffc7704c90 b resource:///org/gnome/gjs/modules/signals.js:128 (0x7f0fb29d2230 @ 386)
Jan 19 19:09:19 milano-PC org.gnome.Shell.desktop[2758]: #4 0x559e6491d620 i resource:///org/gnome/shell/ui/layout.js:531 (0x7f0fb26042b8 @ 127)
Jan 19 19:09:19 milano-PC org.gnome.Shell.desktop[2758]: #5 0x7fffc77058e0 I resource:///org/gnome/gjs/modules/_legacy.js:82 (0x7f0fb29b5de0 @ 71)
Jan 19 19:09:19 milano-PC org.gnome.Shell.desktop[2758]: #6 0x7fffc77059a0 b self-hosted:916 (0x7f0fb29f12b8 @ 367)
Jan 19 19:09:19 milano-PC org.gnome.Shell.desktop[2758]: == Stack trace for context 0x559e64485340 ==
Jan 19 19:09:19 milano-PC org.gnome.Shell.desktop[2758]: #0 0x7fffc77043c0 b resource:///org/gnome/shell/ui/osdWindow.js:207 (0x7f0fb26c7780 @ 273)
Jan 19 19:09:19 milano-PC org.gnome.Shell.desktop[2758]: #1 0x7fffc7704ae0 I resource:///org/gnome/gjs/modules/_legacy.js:82 (0x7f0fb29b5de0 @ 71)
Jan 19 19:09:19 milano-PC org.gnome.Shell.desktop[2758]: #2 0x7fffc7704ba0 b self-hosted:916 (0x7f0fb29f12b8 @ 367)
Jan 19 19:09:19 milano-PC org.gnome.Shell.desktop[2758]: #3 0x7fffc7704c90 b resource:///org/gnome/gjs/modules/signals.js:128 (0x7f0fb29d2230 @ 386)
Jan 19 19:09:19 milano-PC org.gnome.Shell.desktop[2758]: #4 0x559e6491d620 i resource:///org/gnome/shell/ui/layout.js:531 (0x7f0fb26042b8 @ 127)
Jan 19 19:09:19 milano-PC org.gnome.Shell.desktop[2758]: #5 0x7fffc77058e0 I resource:///org/gnome/gjs/modules/_legacy.js:82 (0x7f0fb29b5de0 @ 71)
Jan 19 19:09:19 milano-PC org.gnome.Shell.desktop[2758]: #6 0x7fffc77059a0 b self-hosted:916 (0x7f0fb29f12b8 @ 367)
Jan 19 19:09:19 milano-PC gnome-shell[2758]: Object St.Icon (0x559e65230cf0), has been already finalized. Impossible to set any property to it.
Jan 19 19:09:19 milano-PC gnome-shell[2758]: Object St.BoxLayout (0x559e6522fe30), has been already finalized. Impossible to set any property to it.
Jan 19 19:09:19 milano-PC org.gnome.Shell.desktop[2758]: == Stack trace for context 0x559e64485340 ==
Jan 19 19:09:19 milano-PC org.gnome.Shell.desktop[2758]: #0 0x7fffc7704a80 b resource:///org/gnome/shell/ui/osdWindow.js:206 (0x7f0fb26c7780 @ 231)
Jan 19 19:09:19 milano-PC org.gnome.Shell.desktop[2758]: #1 0x7fffc7704ae0 I resource:///org/gnome/gjs/modules/_legacy.js:82 (0x7f0fb29b5de0 @ 71)
Jan 19 19:09:19 milano-PC org.gnome.Shell.desktop[2758]: #2 0x7fffc7704ba0 b self-hosted:916 (0x7f0fb29f12b8 @ 367)
Jan 19 19:09:19 milano-PC org.gnome.Shell.desktop[2758]: #3 0x7fffc7704c90 b resource:///org/gnome/gjs/modules/signals.js:128 (0x7f0fb29d2230 @ 386)
Jan 19 19:09:19 milano-PC org.gnome.Shell.desktop[2758]: #4 0x559e6491d620 i resource:///org/gnome/shell/ui/layout.js:531 (0x7f0fb26042b8 @ 127)
Jan 19 19:09:19 milano-PC org.gnome.Shell.desktop[2758]: #5 0x7fffc77058e0 I resource:///org/gnome/gjs/modules/_legacy.js:82 (0x7f0fb29b5de0 @ 71)
Jan 19 19:09:19 milano-PC org.gnome.Shell.desktop[2758]: #6 0x7fffc77059a0 b self-hosted:916 (0x7f0fb29f12b8 @ 367)
Jan 19 19:09:19 milano-PC org.gnome.Shell.desktop[2758]: == Stack trace for context 0x559e64485340 ==
Jan 19 19:09:19 milano-PC org.gnome.Shell.desktop[2758]: #0 0x7fffc7704a80 b resource:///org/gnome/shell/ui/osdWindow.js:207 (0x7f0fb26c7780 @ 273)
Jan 19 19:09:19 milano-PC org.gnome.Shell.desktop[2758]: #1 0x7fffc7704ae0 I resource:///org/gnome/gjs/modules/_legacy.js:82 (0x7f0fb29b5de0 @ 71)
Jan 19 19:09:19 milano-PC org.gnome.Shell.desktop[2758]: #2 0x7fffc7704ba0 b self-hosted:916 (0x7f0fb29f12b8 @ 367)
Jan 19 19:09:19 milano-PC org.gnome.Shell.desktop[2758]: #3 0x7fffc7704c90 b resource:///org/gnome/gjs/modules/signals.js:128 (0x7f0fb29d2230 @ 386)
Jan 19 19:09:19 milano-PC org.gnome.Shell.desktop[2758]: #4 0x559e6491d620 i resource:///org/gnome/shell/ui/layout.js:531 (0x7f0fb26042b8 @ 127)
Jan 19 19:09:19 milano-PC org.gnome.Shell.desktop[2758]: #5 0x7fffc77058e0 I resource:///org/gnome/gjs/modules/_legacy.js:82 (0x7f0fb29b5de0 @ 71)
Jan 19 19:09:19 milano-PC org.gnome.Shell.desktop[2758]: #6 0x7fffc77059a0 b self-hosted:916 (0x7f0fb29f12b8 @ 367)
Jan 19 19:11:43 milano-PC brave_brave.desktop[24449]: [24449:24449:0119/191143.540386:ERROR:media_internals.cc(114)] Cannot get RenderProcessHost
Jan 19 19:15:01 milano-PC CRON[26668]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Jan 19 19:16:48 milano-PC systemd[1]: Starting Daily apt download activities...
Jan 19 19:16:48 milano-PC systemd[1]: Started Daily apt download activities.
Jan 19 19:17:01 milano-PC CRON[26944]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Jan 19 19:21:39 milano-PC dhclient[2141]: DHCPREQUEST of 192.168.0.241 on eno1 to 192.168.0.1 port 67 (xid=0x44ec198c)
Jan 19 19:21:40 milano-PC dhclient[2141]: DHCPACK of 192.168.0.241 from 192.168.0.1
Jan 19 19:21:40 milano-PC NetworkManager[1024]: <info> [1547922100.1711] dhcp4 (eno1): address 192.168.0.241
Jan 19 19:21:40 milano-PC NetworkManager[1024]: <info> [1547922100.1711] dhcp4 (eno1): plen 24 (255.255.255.0)
Jan 19 19:21:40 milano-PC NetworkManager[1024]: <info> [1547922100.1711] dhcp4 (eno1): gateway 192.168.0.1
Jan 19 19:21:40 milano-PC NetworkManager[1024]: <info> [1547922100.1712] dhcp4 (eno1): lease time 3600
Jan 19 19:21:40 milano-PC NetworkManager[1024]: <info> [1547922100.1712] dhcp4 (eno1): hostname 'milano-PC'
Jan 19 19:21:40 milano-PC NetworkManager[1024]: <info> [1547922100.1712] dhcp4 (eno1): nameserver '213.46.172.37'
Jan 19 19:21:40 milano-PC NetworkManager[1024]: <info> [1547922100.1712] dhcp4 (eno1): nameserver '213.46.172.36'
Jan 19 19:21:40 milano-PC NetworkManager[1024]: <info> [1547922100.1712] dhcp4 (eno1): domain name 'home'
Jan 19 19:21:40 milano-PC NetworkManager[1024]: <info> [1547922100.1712] dhcp4 (eno1): state changed bound -> bound
Jan 19 19:21:40 milano-PC dbus-daemon[996]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service' requested by ':1.12' (uid=0 pid=1024 comm="/usr/sbin/NetworkManager --no-daemon " label="unconfined")
Jan 19 19:21:40 milano-PC systemd[1]: Starting Network Manager Script Dispatcher Service...
Jan 19 19:21:40 milano-PC dhclient[2141]: bound to 192.168.0.241 -- renewal in 1593 seconds.
Jan 19 19:21:40 milano-PC dbus-daemon[996]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Jan 19 19:21:40 milano-PC systemd[1]: Started Network Manager Script Dispatcher Service.
Jan 19 19:21:40 milano-PC nm-dispatcher: req:1 'dhcp4-change' [eno1]: new request (1 scripts)
Jan 19 19:21:40 milano-PC nm-dispatcher: req:1 'dhcp4-change' [eno1]: start running ordered scripts...
Jan 19 19:23:19 milano-PC google-chrome.desktop[3804]: [1:84:0119/192319.584997:ERROR:rtpreceiver.cc(116)] AudioRtpReceiver::OnSetVolume: No audio channel exists.
Jan 19 19:25:01 milano-PC CRON[27798]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Jan 19 19:26:02 milano-PC kernel: [14904.225903] perf: interrupt took too long (2532 > 2500), lowering kernel.perf_event_max_sample_rate to 78750
Jan 19 19:27:25 milano-PC dbus-daemon[996]: [system] Activating via systemd: service name='org.bluez' unit='dbus-org.bluez.service' requested by ':1.317' (uid=1000 pid=27949 comm="/snap/slack/11/usr/lib/slack/slack --executed-from" label="snap.slack.slack (complain)")
Jan 19 19:27:27 milano-PC gnome-shell[2758]: [AppIndicatorSupport-DEBUG] Registering StatusNotifierItem :1.3403/org/ayatana/NotificationItem/Slack1
Jan 19 19:27:38 milano-PC gnome-shell[2758]: Object .Gjs_AppIndicatorIconActor__1 (0x559e67ded840), has been already finalized. Impossible to set any property to it.
Jan 19 19:27:38 milano-PC org.gnome.Shell.desktop[2758]: == Stack trace for context 0x559e64485340 ==
Jan 19 19:27:38 milano-PC org.gnome.Shell.desktop[2758]: #0 0x7fffc7703370 I resource:///org/gnome/gjs/modules/_legacy.js:83 (0x7f0fb29b5de0 @ 87)
Jan 19 19:27:38 milano-PC org.gnome.Shell.desktop[2758]: #1 0x559e6491d7f0 i /usr/share/gnome-shell/extensions/[email protected]/indicatorStatusIcon.js:93 (0x7f0fb00c6780 @ 58)
Jan 19 19:27:38 milano-PC org.gnome.Shell.desktop[2758]: #2 0x7fffc7703f50 I resource:///org/gnome/gjs/modules/_legacy.js:82 (0x7f0fb29b5de0 @ 71)
Jan 19 19:27:38 milano-PC org.gnome.Shell.desktop[2758]: #3 0x7fffc7704010 b self-hosted:916 (0x7f0fb29f12b8 @ 367)
Jan 19 19:27:38 milano-PC org.gnome.Shell.desktop[2758]: #4 0x7fffc77040b0 I resource:///org/gnome/gjs/modules/signals.js:128 (0x7f0fb29d2230 @ 386)
Jan 19 19:27:38 milano-PC org.gnome.Shell.desktop[2758]: #5 0x559e6491d768 i /usr/share/gnome-shell/extensions/[email protected]/appIndicator.js:190 (0x7f0fb00b4450 @ 22)
Jan 19 19:27:38 milano-PC org.gnome.Shell.desktop[2758]: #6 0x7fffc7704c90 I resource:///org/gnome/gjs/modules/_legacy.js:82 (0x7f0fb29b5de0 @ 71)
Jan 19 19:27:38 milano-PC org.gnome.Shell.desktop[2758]: #7 0x559e6491d6c0 i /usr/share/gnome-shell/extensions/[email protected]/statusNotifierWatcher.js:176 (0x7f0fb00b36f8 @ 26)
Jan 19 19:27:38 milano-PC org.gnome.Shell.desktop[2758]: #8 0x7fffc7705870 I resource:///org/gnome/gjs/modules/_legacy.js:82 (0x7f0fb29b5de0 @ 71)
Jan 19 19:27:38 milano-PC org.gnome.Shell.desktop[2758]: #9 0x559e6491d620 i /usr/share/gnome-shell/extensions/[email protected]/statusNotifierWatcher.js:170 (0x7f0fb00b3670 @ 68)
Jan 19 19:27:38 milano-PC org.gnome.Shell.desktop[2758]: #10 0x7fffc7706460 I resource:///org/gnome/gjs/modules/_legacy.js:82 (0x7f0fb29b5de0 @ 71)
Jan 19 19:27:38 milano-PC org.gnome.Shell.desktop[2758]: #11 0x7fffc7706530 b self-hosted:918 (0x7f0fb29f12b8 @ 394)
Jan 19 19:33:31 milano-PC org.gnome.Shell.desktop[2758]: Window manager warning: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0x5000084 (*syslog (/)
Jan 19 19:34:14 milano-PC kernel: [15396.473952] [UFW BLOCK] IN=eno1 OUT= MAC=70:85:c2:7c:b8:ff:6c:fd:b9:bc:0e:1b:08:00 SRC=192.168.0.186 DST=192.168.0.241 LEN=324 TOS=0x00 PREC=0x00 TTL=64 ID=0 DF PROTO=UDP SPT=1900 DPT=40386 LEN=304
Jan 19 19:34:14 milano-PC kernel: [15396.632839] [UFW BLOCK] IN=eno1 OUT= MAC=70:85:c2:7c:b8:ff:6c:fd:b9:bc:0e:1b:08:00 SRC=192.168.0.186 DST=192.168.0.241 LEN=324 TOS=0x00 PREC=0x00 TTL=64 ID=0 DF PROTO=UDP SPT=1900 DPT=40386 LEN=304
Jan 19 19:34:15 milano-PC kernel: [15397.799923] [UFW BLOCK] IN=eno1 OUT= MAC=70:85:c2:7c:b8:ff:6c:fd:b9:bc:0e:1b:08:00 SRC=192.168.0.186 DST=192.168.0.241 LEN=324 TOS=0x00 PREC=0x00 TTL=64 ID=0 DF PROTO=UDP SPT=1900 DPT=40386 LEN=304
Jan 19 19:34:16 milano-PC kernel: [15398.959841] [UFW BLOCK] IN=eno1 OUT= MAC=70:85:c2:7c:b8:ff:6c:fd:b9:bc:0e:1b:08:00 SRC=192.168.0.186 DST=192.168.0.241 LEN=324 TOS=0x00 PREC=0x00 TTL=64 ID=0 DF PROTO=UDP SPT=1900 DPT=40386 LEN=304
Jan 19 19:35:01 milano-PC CRON[28933]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Jan 19 19:37:46 milano-PC org.gnome.Shell.desktop[2758]: Window manager warning: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0x5000084 (tail (~/) )
答案1
Debian 9 上也有同样的问题。播放音乐和某些操作时,CPU 使用率会上升,音频会出现 1-2 秒的跳变。
最后我认为得到了“解决方案”:
默认情况下,pulseaudio 的‘nice’进程为 -11;所以:“为什么不让所有与脉冲相关的进程处于 nice 0 和 prio 20 中?
所以,这就是我所做的:
$ sudo editor /etc/pulse/daemon.conf
high-priority = no
nice-level = 0
realtime-scheduling = no
realtime-priority = 20
保存(在vi
:x/:wq)文件并执行“pulseaudio -k”或重新启动。
这不是完美的解决方案,但改善了 85% 的音频播放;打开 chrome 时不再出现音频跳跃/破裂。
我也正在使用脉冲效果。