由于我最近升级到 karmic,当我运行 VirtualBox 时,我开始在日志中看到以下内容:
Oct 30 18:14:34 apocalypse pulseaudio[2813]: alsa-source.c: Resume failed, couldn't restore original fragment settings. (Old: 65536/65536, New 1073676288/65532)io[2813]: alsa-source.c: Resume failed, couldn't restore original fragment settings. (Old: 65536/65536, New 1073676288/65532)io[2813]: alsa-source.c: Resume failed, couldn't restore original fragment settings. (Old: 65536/65536, New 1073676288/65532)io[2813]: alsa-source.c: Resume failed, couldn't restore original fragment settings. (Old: 65536/65536, New 1073676288/65532)io[2813]: alsa-source.c: Resume failed, couldn't restore original fragment settings. (Old: 65536/65536, New 1073676288/65532)io[2813]: alsa-source.c: Resume failed, couldn't restore original fragment settings. (Old: 65536/65536, New 1073676288/65532)io[2813]: alsa-source.c: Resume failed, couldn't restore original fragment settings. (Old: 65536/65536, New 1073676288/65532)io[2813]: alsa-source.c: Resume failed, couldn't restore original fragment settings. (Old: 65536/65536, New 1073676288/65532)io[2813]: alsa-source.c: Resume failed, couldn't restore original fragment settings. (Old: 65536/65536, New 1073676288/65532)io[2813]: alsa-source.c: Resume failed, couldn't restore original fragment settings. (Old: 65536/65536, New 1073676288/65532)io[2813]: alsa-source.c: Resume failed, couldn't restore original fragment settings. (Old: 65536/65536, New 1073676288/65532)io[2813]: alsa-source.c: Resume failed, couldn't restore original fragment settings. (Old: 65536/65536, New 1073676288/65532)
Oct 30 18:14:34 apocalypse pulseaudio[2813]: alsa-source.c: Resume failed, couldn't restore original fragment settings. (Old: 65536/65536, New 1073676288/65532)
过了一会儿,日志变得很大,填满了我的整个 /var 分区。在 VirtualBox 中,有一个选项可以在 pulseaudio 和 alsa 之间选择声音,但似乎没有效果。我使用的是 virtualbox-3.0 软件包,而不是 ose 版本。我的系统是最新的。
答案1
首先请看一下有谁在 Linux 上使用 VirtualBox 时遇到过音频问题并有解决方案吗?了解更多信息。
正如我在那里提到的,从 9.04->9.10 开始,Ubuntu 将主机声音支持从 ALSA 更改为 PulseAudio。
因此,您需要告诉 VirtualBox 您的主机音频现在是 PulseAudio - 出于某种原因,这似乎是每个虚拟机上的设置,因此您需要在运行的所有虚拟机上更改它。在一个虚拟机上更改它而不在另一个虚拟机上更改它可能是一个非常糟糕的主意。
您很可能需要在没有运行虚拟机的情况下进行更改。然后停止并重新启动 virtualbox。希望此时 /var/log/ 的消息会停止。
除此之外,如果虚拟机中的音频工作正常并且您仍然看到消息,您可能需要查看 logrotate 来管理日志文件: http://linuxcommand.org/man_pages/logrotate8.html
希望这能帮到你!如果有帮助的话,请点赞。谢谢!
-pbr