我发现启动某些应用程序(尤其是 KDE 应用程序)会导致其脉冲音频音量设置为 100%。如果随后启动另一个应用程序(gnome 应用程序),其音量也会设置为 100%,而不是上次运行时的音量。
这可能不是此处报告的错误:https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/204536 我也尝试按照建议更改 flat-volumes 配置选项https://bbs.archlinux.org/viewtopic.php?id=196044,但没有效果。
这是启动 KDE 应用程序(例如 kolourpaint)时发生的日志。错误显示在最后一行,但可能是前面几行导致的。如有任何关于如何修复此问题的提示,我将不胜感激。
( 122.268| 0.007) D: [pulseaudio] sink-input.c: Negotiated format: pcm, format.sample_format = "\"float32le\"" format.rate = "48000" format.channels = "2" format.channel_map = "\"front-left,front-right\""
( 122.268| 0.000) I: [pulseaudio] sink-input.c: Trying to change sample rate
( 122.268| 0.000) I: [pulseaudio] sink.c: Cannot update rate, monitor source is RUNNING
( 122.268| 0.000) D: [pulseaudio] module-stream-restore.c: Not restoring volume for sink input sink-input-by-media-role:video, because already set.
( 122.268| 0.000) I: [pulseaudio] module-stream-restore.c: Restoring mute state for sink input sink-input-by-media-role:video.
( 122.268| 0.000) D: [pulseaudio] module-suspend-on-idle.c: Sink alsa_output.pci-0000_00_1b.0.analog-stereo becomes busy, resuming.
( 122.268| 0.000) D: [pulseaudio] resampler.c: Resampler:
( 122.268| 0.000) D: [pulseaudio] resampler.c: rate 48000 -> 44100 (method speex-float-1)
( 122.268| 0.000) D: [pulseaudio] resampler.c: format float32le -> s16le (intermediate float32le)
( 122.268| 0.000) D: [pulseaudio] resampler.c: channels 2 -> 2 (resampling 2)
( 122.268| 0.000) I: [pulseaudio] speex.c: Choosing speex quality setting 1.
( 122.268| 0.000) D: [pulseaudio] memblockq.c: memblockq requested: maxlength=33554432, tlength=0, base=4, prebuf=0, minreq=1 maxrewind=0
( 122.268| 0.000) D: [pulseaudio] memblockq.c: memblockq sanitized: maxlength=33554432, tlength=33554432, base=4, prebuf=0, minreq=4 maxrewind=0
( 122.268| 0.000) I: [pulseaudio] sink-input.c: Created input 9 "audio stream" on alsa_output.pci-0000_00_1b.0.analog-stereo with sample spec float32le 2ch 48000Hz and channel map front-left,front-right
( 122.268| 0.000) I: [pulseaudio] sink-input.c: media.role = "video"
( 122.268| 0.000) I: [pulseaudio] sink-input.c: media.name = "audio stream"
( 122.268| 0.000) I: [pulseaudio] sink-input.c: application.name = "kolourpaint"
( 122.268| 0.000) I: [pulseaudio] sink-input.c: native-protocol.peer = "UNIX socket client"
( 122.268| 0.000) I: [pulseaudio] sink-input.c: native-protocol.version = "31"
.......
( 122.268| 0.000) I: [pulseaudio] sink-input.c: application.process.binary = "kolourpaint"
( 122.268| 0.000) I: [pulseaudio] sink-input.c: window.x11.display = ":0"
( 122.268| 0.000) I: [pulseaudio] sink-input.c: module-stream-restore.id = "sink-input-by-media-role:video"
( 122.268| 0.000) I: [pulseaudio] protocol-native.c: Requested tlength=120.00 ms, minreq=40.00 ms
( 122.268| 0.000) D: [pulseaudio] protocol-native.c: Traditional mode enabled, modifying sink usec only for compat with minreq.
( 122.269| 0.000) D: [pulseaudio] protocol-native.c: Requested latency=40.00 ms, Received latency=40.00 ms
( 122.269| 0.000) D: [pulseaudio] memblockq.c: memblockq requested: maxlength=4194304, tlength=46080, base=8, prebuf=0, minreq=15360 maxrewind=0
( 122.269| 0.000) D: [pulseaudio] memblockq.c: memblockq sanitized: maxlength=4194304, tlength=46080, base=8, prebuf=0, minreq=15360 maxrewind=0
( 122.269| 0.000) I: [pulseaudio] protocol-native.c: Final latency 160.00 ms = 40.00 ms + 2*40.00 ms + 40.00 ms
( 122.269| 0.000) D: [pulseaudio] sink.c: The reference volume of sink alsa_output.pci-0000_00_1b.0.analog-stereo changed from front-left: 20996 / 32% / -29.66 dB, front-right: 20996 / 32% / -29.66 dB to front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB.
答案1
面临同样的问题,解决方案如下:
>echo 'flat-volumes = no' >> ~/.config/pulse/daemon.conf
>pulseaudio -k && pulseaudio --start