Pulseaudio 无法工作,内核驱动程序损坏

Pulseaudio 无法工作,内核驱动程序损坏

由于我插入了一个损坏的 HDD 驱动器,我的 pulseaudio 无法工作。启动时,ubuntu 一直在检查它是否工作,并且启动需要很长时间(启动了几个启动作业)。

如果我尝试从控制台启动它,我会得到以下输出。

W: [pulseaudio] alsa-mixer.c: Your kernel driver is broken: it reports a volume range from 0 to 0 which makes no sense.
W: [pulseaudio] alsa-mixer.c: Your kernel driver is broken: it reports a 
volume range from 0 to 0 which makes no sense.
W: [pulseaudio] authkey.c: Failed to open cookie file '/root/.config/pulse/cookie': No such file or directory
W: [pulseaudio] authkey.c: Failed to load authentication key '/root/.config/pulse/cookie': No such file or directory
W: [pulseaudio] authkey.c: Failed to open cookie file '/root/.pulse-cookie': No such file or directory
W: [pulseaudio] authkey.c: Failed to load authentication key '/root/.pulse-cookie': No such file or directory

如果我尝试 vlc,我会得到以下输出:

[000055b30db07200] alsa audio output error: cannot open ALSA device "default": No such file or directory

我看到许多人遇到了同样的问题,但他们的解决方案对我来说却不起作用。pulseaudio -D 他们中有很多人遇到过同样的问题,但对我来说,这个输出守护进程启动失败。

由于这些教程,我确实删除了.pulse,因为它不是在重新启动或启动 pulseaudio 时创建的,所以我不知道这是否有问题。

我对 ubuntu 还很陌生,所以请毫不犹豫地解释一下它的守护进程做了什么以及我的硬盘如何影响我的内核。

我并不害怕使用终端,因为这就是我转换到 ubuntu 的原因。

系统是 Ubuntu 19.10 (Eoan Ermine)

内核是 5.3.0-29-generic x86_64

我还将我的主目录更改为另一个硬盘驱动器,但这应该不是问题,因为路径保持不变。

不管怎么说,还是要谢谢你。

我确实以 root 权限运行了 pulseaudio,因为如果我只是写了 pulseaudio,它会说

Home directory not accessible: permission denied.

如果我运行 systemctl --user restart pulseaudio 我会得到:

Job for pulseaudio.service failed because the control process exited with error code.
See "systemctl --user status pulseaudio.service" and "journalctl --user -xe" for details.

如果我运行 systemctl --user status pulseaudio.service 我会得到:运行 systemctl 获取更多信息

Mär 02 16:40:41 tom-X570-AORUS-ELITE systemd[1320]: Failed to start Sound Service.
Mär 02 16:40:41 tom-X570-AORUS-ELITE systemd[1320]: pulseaudio.service: Service RestartSec=100ms expired, scheduling restart.
Mär 02 16:40:41 tom-X570-AORUS-ELITE systemd[1320]: pulseaudio.service: Scheduled restart job, restart counter is at 5.
Mär 02 16:40:41 tom-X570-AORUS-ELITE systemd[1320]: Stopped Sound Service.
Mär 02 16:40:41 tom-X570-AORUS-ELITE systemd[1320]: pulseaudio.service: Start request repeated too quickly.
Mär 02 16:40:41 tom-X570-AORUS-ELITE systemd[1320]: pulseaudio.service: Failed with result 'exit-code'.
Mär 02 16:40:41 tom-X570-AORUS-ELITE systemd[1320]: Failed to start Sound Service.

如果您需要 journalctl 的输出,请告诉我。

答案1

对于某些人来说,删除并重新安装 pulseaudio 似乎可以解决这个问题。但是,我见过的唯一方法非常具有破坏性,因为许多软件包都依赖于 pulseaudio。为了规避依赖性问题,我们可以使用dpkg而不是 来清除 pulseaudio apt

首先,运行以下命令

sudo apt update
sudo apt upgrade
sudo dpkg -P --force-all pulseaudio
sudo rm -r ~/.pulse ~/.asound* ~/.pulse-cookie ~/.config/pulse

如果在最后一步出现错误,请忽略该错误。

接下来,重新安装并重新启动 ALSA 和 pulseaudio

sudo apt install --reinstall -o Dpkg::Options::="--force-confmiss" pulseaudio
sudo alsa force-reload
systemctl --user restart pulseaudio

最后,你可以使用以下命令检查 pulseaudio 的状态

systemctl --user status pulseaudio

它应该返回“已加载”和“活动”状态。如果没有,请重新启动并再次检查状态。

相关内容