MacBook Pro 上的 Ubuntu 16.04:使用 jackd 没有声音,尽管 ALSA 可以正常工作

MacBook Pro 上的 Ubuntu 16.04:使用 jackd 没有声音,尽管 ALSA 可以正常工作

这可能是 MacBook 特有的问题,因为我在其他笔记本电脑(戴尔)上没有遇到此问题。情况如下:

  • ALSA 声音工作正常。mplayer 通过扬声器播放有声音的 mp3 测试文件。
  • jackd启动无错误
  • 播放相同的文件mplayer -ao jack test.mp3不会产生任何错误。jackd 愉快地将 mplayer 输出连接到系统播放。mplayer 也运行没有错误。
  • 没有声音。

还有另一种问题针对同一主题,不幸的是没有答案。标题写着“Mac Power Book”,但实际上MacBookPro11,2我也使用过这款产品。那里的技术细节也适用于我的情况。

编辑:这是我从 获得的日志qjackctl,显示了从启动到停止 jackd 的顺序,同时与 mplayer 建立连接。播放音频时它不会报错,但在德语消息之后的最开始,有 5 行内容很奇怪。它们读起来像错误,但随后它似乎重新开始并且没有报错。

23:24:58.948 D-BUS: JACK-Server startet...
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock
23:24:58.959 D-BUS: JACK-Server wurde gestartet (org.jackaudio.service aka jackdbus).
Mon Aug 14 23:24:58 2017: Starting jack server...
Mon Aug 14 23:24:58 2017: JACK server starting in realtime mode with priority 10
Mon Aug 14 23:24:58 2017: self-connect-mode is "Don't restrict self connect requests"
Mon Aug 14 23:24:58 2017: Acquired audio card Audio1
Mon Aug 14 23:24:58 2017: creating alsa driver ... hw:PCH|hw:PCH|1024|2|44100|0|0|nomon|hwmeter|-|32bit
Mon Aug 14 23:24:58 2017: configuring for 44100Hz, period = 1024 frames (23.2 ms), buffer = 2 periods
Mon Aug 14 23:24:58 2017: ALSA: final selected sample format for capture: 32bit integer little-endian
Mon Aug 14 23:24:58 2017: ALSA: use 2 periods for capture
Mon Aug 14 23:24:58 2017: ALSA: final selected sample format for playback: 32bit integer little-endian
Mon Aug 14 23:24:58 2017: ALSA: use 2 periods for playback
Mon Aug 14 23:24:58 2017: graph reorder: new port 'system:capture_1'
Mon Aug 14 23:24:58 2017: New client 'system' with PID 0
Mon Aug 14 23:24:58 2017: graph reorder: new port 'system:capture_2'
Mon Aug 14 23:24:58 2017: graph reorder: new port 'system:playback_1'
Mon Aug 14 23:24:58 2017: graph reorder: new port 'system:monitor_1'
Mon Aug 14 23:24:58 2017: graph reorder: new port 'system:playback_2'
Mon Aug 14 23:24:58 2017: graph reorder: new port 'system:monitor_2'
Mon Aug 14 23:24:58 2017: graph reorder: new port 'system:playback_3'
Mon Aug 14 23:24:58 2017: graph reorder: new port 'system:monitor_3'
Mon Aug 14 23:24:58 2017: graph reorder: new port 'system:playback_4'
Mon Aug 14 23:24:58 2017: graph reorder: new port 'system:monitor_4'
23:25:01.091 JACK-Verbindung geändert.
23:25:01.092 Serverkonfiguration nach "/home/test1/.jackdrc" gespeichert.
23:25:01.092 Statistik zurückgesetzt.
23:25:01.108 Client aktiviert
23:25:01.109 Steckfeld deaktiviert.
23:25:01.142 Schaubild der JACK-Verbindungen geändert.
Mon Aug 14 23:25:00 2017: Saving settings to "/home/test1/.config/jack/conf.xml" ...
Mon Aug 14 23:25:01 2017: New client 'qjackctl' with PID 20955
23:25:05.891 Schaubild der JACK-Verbindungen geändert.
23:25:05.946 JACK-Verbindung geändert.
Mon Aug 14 23:25:05 2017: New client 'MPlayer [21081]' with PID 21081
Mon Aug 14 23:25:05 2017: Connecting 'MPlayer [21081]:out_0' to 'system:playback_1'
Mon Aug 14 23:25:05 2017: Connecting 'MPlayer [21081]:out_1' to 'system:playback_2'
23:25:09.557 Schaubild der JACK-Verbindungen geändert.
23:25:09.756 JACK-Verbindung geändert.
Mon Aug 14 23:25:09 2017: Disconnecting 'MPlayer [21081]:out_0' from 'system:playback_1'
Mon Aug 14 23:25:09 2017: Disconnecting 'MPlayer [21081]:out_1' from 'system:playback_2'
Mon Aug 14 23:25:09 2017: Client 'MPlayer [21081]' with PID 21081 is out
23:25:13.422 Client deaktiviert.
23:25:13.497 D-BUS: JACK-Server fährt herunter...
Mon Aug 14 23:25:13 2017: Client 'qjackctl' with PID 20955 is out
23:25:13.502 D-BUS: JACK-Server wurde angehalten (org.jackaudio.service aka jackdbus).
Mon Aug 14 23:25:13 2017: Stopping jack server...
Mon Aug 14 23:25:13 2017: Client 'system' with PID 0 is out
Mon Aug 14 23:25:13 2017: Released audio card Audio1

答案1

你可以运行alsamixer在终端中检查 jackd 运行时是否没有静音通道。按 F6 检查每个声卡,以防有多个声卡。

也试图杀死脉冲音频在运行 jackd 之前,不太容易,因为 pulseaudio 会自动重新启动,所以运行以下命令:
mkdir .pulse
echo autospawn=no > ~/.pulse/client.conf
pulseaudio -k
现在 pulseaudio 已停止,启动 jackd。
(稍后,要恢复到正常模式,请echo autospawn=yes > ~/.pulse/client.conf运行pulseaudio

相关内容