该操作系统是 Ubuntu 22.04 的定制安装,具有 ZFS 文件系统、加密和 RAID。安装的详细信息可以在此处下载: https://www.mediafire.com/file/2w8mdb96tbzslub/Ubuntu_22.04_Root_on_ZFS_Encryption.odt/file
全新启动后,“音量”图标不显示任何设备或应用程序。执行以下命令后:
sudo pulseaudio --start
它确实显示了我的耳机和 Firefox 应用程序,并且确实播放了。但是我不想每次重启后都必须执行此命令。这是启动时的 syslog:
stephen@stephen:~$ grep 'pulseaudio' /var/log/syslog
Jul 29 13:23:42 stephen pulseaudio[4512]: Failed to find a working profile.
Jul 29 13:23:42 stephen pulseaudio[4512]: Failed to load module "module-alsa-card" (argument: "device_id="2" name="pci-0000_46_00.4" card_name="alsa_card.pci-0000_46_00.4" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes avoid_resampling=no card_properties="module-udev-detect.discovered=1""): initialization failed.
Jul 29 13:23:42 stephen pulseaudio[4512]: Could not find org.bluez.BatteryProviderManager1.RegisterBatteryProvider(), is bluetoothd started with experimental features enabled (-E flag)?
Jul 29 13:23:45 stephen pulseaudio[4925]: Failed to find a working profile.
Jul 29 13:23:45 stephen pulseaudio[4925]: Failed to load module "module-alsa-card" (argument: "device_id="2" name="pci-0000_46_00.4" card_name="alsa_card.pci-0000_46_00.4" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes avoid_resampling=no card_properties="module-udev-detect.discovered=1""): initialization failed.
Jul 29 13:23:45 stephen pulseaudio[4925]: Could not find org.bluez.BatteryProviderManager1.RegisterBatteryProvider(), is bluetoothd started with experimental features enabled (-E flag)?
Jul 29 13:26:59 stephen pulseaudio[14653]: Failed to find a working profile.
Jul 29 13:26:59 stephen pulseaudio[14653]: Failed to load module "module-alsa-card" (argument: "device_id="2" name="pci-0000_46_00.4" card_name="alsa_card.pci-0000_46_00.4" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes avoid_resampling=no card_properties="module-udev-detect.discovered=1""): initialization failed.
Jul 29 13:27:00 stephen pulseaudio[14653]: Could not find org.bluez.BatteryProviderManager1.RegisterBatteryProvider(), is bluetoothd started with experimental features enabled (-E flag)?
Jul 29 13:27:03 stephen pulseaudio[17178]: Failed to find a working profile.
Jul 29 13:27:03 stephen pulseaudio[17178]: Failed to load module "module-alsa-card" (argument: "device_id="2" name="pci-0000_46_00.4" card_name="alsa_card.pci-0000_46_00.4" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes avoid_resampling=no card_properties="module-udev-detect.discovered=1""): initialization failed.
Jul 29 13:27:03 stephen pulseaudio[17178]: Could not find org.bluez.BatteryProviderManager1.RegisterBatteryProvider(), is bluetoothd started with experimental features enabled (-E flag)?
Jul 29 13:27:06 stephen pulseaudio[17178]: Lost I/O connection in module "module-gsettings"
Jul 29 13:27:22 stephen pulseaudio[18109]: Failed to find a working profile.
Jul 29 13:27:22 stephen pulseaudio[18109]: Failed to load module "module-alsa-card" (argument: "device_id="2" name="pci-0000_46_00.4" card_name="alsa_card.pci-0000_46_00.4" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes avoid_resampling=no card_properties="module-udev-detect.discovered=1""): initialization failed.
Jul 29 13:27:22 stephen pulseaudio[18109]: Could not find org.bluez.BatteryProviderManager1.RegisterBatteryProvider(), is bluetoothd started with experimental features enabled (-E flag)?
这些错误令人不安。这些错误有多严重?我怎样才能在启动时启动 pulseaudio?
只有机箱上的后置音频插孔可以工作。前置插孔不工作。但我可以判断这些前置插孔与内部某个东西相连,因为当耳机插头插入前置音频插孔时,我会听到咔嗒声。
这是我尝试使用 systemctl 命令解决该问题的结果:
stephen@stephen:~$ sudo systemctl stop pulseaudio
Failed to stop pulseaudio.service: Unit pulseaudio.service not loaded.
stephen@stephen:~$ systemctl stop pulseaudio
Failed to stop pulseaudio.service: Interactive authentication required.
See system logs and 'systemctl status pulseaudio.service' for details.
stephen@stephen:~$ systemctl --user restart pulseaudio.service
Failed to connect to bus: $DBUS_SESSION_BUS_ADDRESS and $XDG_RUNTIME_DIR not defined (consider using --machine=<user>@.host --user to connect to bus of other user)
stephen@stephen:~$ systemctl status pulseaudio.service
Unit pulseaudio.service could not be found.
stephen@stephen:~$
dpkg -l | egrep ‘pulse|pipe’:
stephen@stephen:~$ dpkg -l | egrep 'pulse|pipe'
ii aeolus 0.9.9-1 amd64 Synthesised pipe organ emulator
ii gstreamer1.0-pulseaudio:amd64 1.20.3-0ubuntu1 amd64 GStreamer plugin for PulseAudio (transitional package)
ii libcanberra-pulse:amd64 0.30-10ubuntu1 amd64 PulseAudio backend for libcanberra
ii libkf5pulseaudioqt3:amd64 1.3-2 amd64 Pulseaudio bindings library for Qt
ii libpipeline1:amd64 1.5.5-1 amd64 Unix process pipeline manipulation library
ii libpipewire-0.3-0:amd64 0.3.48-1ubuntu1 amd64 libraries for the PipeWire multimedia server
ii libpipewire-0.3-common 0.3.48-1ubuntu1 all libraries for the PipeWire multimedia server - common files
ii libpipewire-0.3-modules:amd64 0.3.48-1ubuntu1 amd64 libraries for the PipeWire multimedia server - modules
ii libpulse-mainloop-glib0:amd64 1:15.99.1+dfsg1-1ubuntu1 amd64 PulseAudio client libraries (glib support)
ii libpulse0:amd64 1:15.99.1+dfsg1-1ubuntu1 amd64 PulseAudio client libraries
ii libpulsedsp:amd64 1:15.99.1+dfsg1-1ubuntu1 amd64 PulseAudio OSS pre-load library
ii osspd-pulseaudio 1.3.2-13 amd64 OSS Proxy Daemon: PulseAudio backend
ii pd-beatpipe 0.1-6 amd64 realtime scheduler/event-delay/quantizer object for Pd
ii pd-earplug 0.3.0-1 amd64 binaural filter based on KEMAR impulse measurement for Pd
ii pipewire:amd64 0.3.48-1ubuntu1 amd64 audio and video processing engine multimedia server
ii pipewire-bin 0.3.48-1ubuntu1 amd64 PipeWire multimedia server - programs
ii pipewire-media-session 0.4.1-2ubuntu1 amd64 example session manager for PipeWire
ii pulseaudio 1:15.99.1+dfsg1-1ubuntu1 amd64 PulseAudio sound server
ii pulseaudio-module-bluetooth 1:15.99.1+dfsg1-1ubuntu1 amd64 Bluetooth module for PulseAudio sound server
ii pulseaudio-module-gsettings 1:15.99.1+dfsg1-1ubuntu1 amd64 GSettings module for PulseAudio sound server
ii pulseaudio-module-jack 1:15.99.1+dfsg1-1ubuntu1 amd64 jackd modules for PulseAudio sound server
ii pulseaudio-module-zeroconf 1:15.99.1+dfsg1-1ubuntu1 amd64 Zeroconf module for PulseAudio sound server
ii pulseaudio-utils 1:15.99.1+dfsg1-1ubuntu1 amd64 Command line tools for the PulseAudio sound server
快照列表:
stephen@stephen:~$ snap list
Name Version Rev Tracking Publisher Notes
bare 1.0 5 latest/stable canonical✓ base
core20 20220719 1587 latest/stable canonical✓ base
gnome-3-38-2004 0+git.891e5bc 112 latest/stable canonical✓ -
gtk-common-themes 0.1-81-g442e511 1535 latest/stable canonical✓ -
snapd 2.56.2 16292 latest/stable canonical✓ snapd
环境
stephen@stephen:~$ env
SHELL=/bin/bash
PWD=/home/stephen
LOGNAME=stephen
MOTD_SHOWN=pam
HOME=/home/stephen
LANG=C.UTF-8
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:
SSH_CONNECTION=192.168.100.101 52732 192.168.100.104 22
LESSCLOSE=/usr/bin/lesspipe %s %s
TERM=xterm-256color
LESSOPEN=| /usr/bin/lesspipe %s
USER=stephen
SHLVL=1
SSH_CLIENT=192.168.100.101 52732 22
XDG_DATA_DIRS=/usr/local/share:/usr/share:/var/lib/snapd/desktop
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
SSH_TTY=/dev/pts/0
_=/usr/bin/env
答案1
如果上面没有明确说明,那么针对特定用户禁用脉冲自动生成的正确命令是这个命令,以该用户身份运行,而不是以 root 身份运行:
systemctl --user restart pulseaudio.service
运行该命令后,当该用户登录时脉冲不会自动启动。