
主要是,聲音只能在電腦上聽到,而在電視上聽不到,我的影片沒有問題,它工作正常。
Ubuntu 從來沒有偵測到我的音效卡hdmi
。
命令:
aplay -l
結果:
**** Lista de PLAYBACK dispositivos hardware ****
tarjeta 0: PCH [HDA Intel PCH], dispositivo 0: ALC269VB Analog [ALC269VB Analog]
Subdispositivos: 1/1
Subdispositivo #0: subdevice #0
我嘗試使用以下命令安裝聲音驅動程序,但仍然沒有成功。
sudo add-apt-repository ppa:ubuntu-audio-dev/alsa-daily
sudo apt-get update
sudo apt-get install oem-audio-hda-daily-dkms
我嘗試使用以下命令檢測我的聲卡 hdmi,但仍然沒有成功。 (來源)。
命令:
echo "Sound cards recognized by the system:"; lspci -nn | grep --color=none '\[04[80][13]\]'; echo "Sound cards recognized by ALSA:"; lspci -nn | grep '\[04[80][13]\]' | while read line; do lspci -nnk | grep -A 3 '\[04[80][13]\]' | grep -e 'Kernel modules: ..*' -e '\[04[80][13]\]' | grep --color=none -F "$line"; done; echo "Sound cards recognized by ALSA, and activated:"; lspci -nn | grep '\[04[80][13]\]' | while read line; do lspci -nnk | grep -A 3 '\[04[80][13]\]' | grep -e 'Kernel drivers in use: ..*' -e '\[04[80][13]\]' | grep --color=none -F "$line"; done
結果:
Sound cards recognized by the system:
00:1b.0 Audio device [0403]: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller [8086:1c20] (rev 05)
Sound cards recognized by ALSA:
00:1b.0 Audio device [0403]: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller [8086:1c20] (rev 05)
Sound cards recognized by ALSA, and activated:
00:1b.0 Audio device [0403]: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller [8086:1c20] (rev 05)
所以我決定在「附加驅動程式」中安裝另一個Nvidia的視訊驅動程式。
安裝「NVIDIA 二進位驅動程式 - 來自 nvidia-346 的版本 346.59(專有,已測試)」後,啟動 Ubuntu 時出現以下訊息:
ACPI PPC Probe failed.
Starting version 219
而且我仍然沒有檢測到我的聲卡HDMI
。
有人可以幫我嗎?
感謝您的關注。
更新 13/07/2015
命令:
lspci
結果:
00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port (rev 09)
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 05)
00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 05)
00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b5)
00:1c.2 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 3 (rev b5)
00:1c.4 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 5 (rev b5)
00:1c.5 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 6 (rev b5)
00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 05)
00:1f.0 ISA bridge: Intel Corporation HM67 Express Chipset Family LPC Controller (rev 05)
00:1f.2 SATA controller: Intel Corporation 6 Series/C200 Series Chipset Family 6 port SATA AHCI Controller (rev 05)
00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 05)
01:00.0 VGA compatible controller: NVIDIA Corporation GF108M [GeForce GT 525M] (rev a1)
02:00.0 Network controller: Intel Corporation Centrino Wireless-N 1030 [Rainbow Peak] (rev 34)
03:00.0 USB controller: NEC Corporation uPD720200 USB 3.0 Host Controller (rev 04)
04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 06)
命令:
sudo lspci -H1
結果:
00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port (rev 09)
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 05)
00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 05)
00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b5)
00:1c.2 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 3 (rev b5)
00:1c.4 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 5 (rev b5)
00:1c.5 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 6 (rev b5)
00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 05)
00:1f.0 ISA bridge: Intel Corporation HM67 Express Chipset Family LPC Controller (rev 05)
00:1f.2 SATA controller: Intel Corporation 6 Series/C200 Series Chipset Family 6 port SATA AHCI Controller (rev 05)
00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 05)
01:00.0 VGA compatible controller: NVIDIA Corporation GF108M [GeForce GT 525M] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GF108 High Definition Audio Controller (rev a1)
02:00.0 Network controller: Intel Corporation Centrino Wireless-N 1030 [Rainbow Peak] (rev 34)
03:00.0 USB controller: NEC Corporation uPD720200 USB 3.0 Host Controller (rev 04)
04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 06)
答案1
您是否注意到 的輸出如何lspci -H1
包含 中不存在的行lspci
:
01:00.1 Audio device: NVIDIA Corporation GF108 High Definition Audio Controller (rev a1)
那是你的 hdmi 音訊晶片。問題是 Linux 沒有正確檢測到該卡,因此沒有載入驅動程式。好消息是晶片已通電,因此我們可以欺騙 Linux 再次嘗試檢測它。您需要執行的步驟取決於您使用的驅動程式:nvidia 或 nouveau。
警告: 如果出現問題,這將導致核心恐慌,並可能導致重新啟動問題,儘管這些問題可以透過多次重新啟動來解決;等待 2 分鐘再重新開啟筆記型電腦;並暫時移除電源和電池。
新風格
第一步是確保 GPU 未被驅動程式使用。跑步
lsmod | grep nouveau
。如果它輸出以nouveau
大於 0 的數字開頭和結尾的行,則表示正在使用。一種可能的方法是停止 X(因此要么列印出來,要么使用另一台可以閱讀的機器):- 按 ctrl+alt+f1
- 運行
runlevel
並記下數字(在我的電腦中為 5)。 - 以 root 身分登入:
sudo su
- 運行
init 3
其中 3 是一個比您剛剛寫下的數字小但與 1 一樣大的數字。 - 再次運行
lsmod | grep nouveau
以確保 nouveau 驅動程式不再使用(應該沒有輸出;沒有以 nouveau 開頭的行;或以 nouveau 開頭的行以 0 結尾)。
作為健全性檢查,請確保 GPU 及其音訊晶片已通電:
- 跑步
lspci -H1 | grep 01:00
。它應該輸出兩行。 - 再次運行
lsmod | grep nouveau
以確保 nouveau 驅動程式仍未在使用中。
- 跑步
現在 GPU 無需驅動程式即可供電,我們將「刪除」它:
- 運行
echo 1 > /sys/bus/pci/devices/0000\:01\:00.0/remove
(如果 GPU 仍有加載/正在使用的驅動程序,這會導致內核恐慌)。 - 透過運行重新檢測 GPU 及其音訊晶片
echo 1 > /sys/bus/pci/rescan
。 - 跑步
lspci | grep 01:00.1
。如果輸出任何內容,恭喜!您的 Linux 現在可以識別您的 GPU 音訊晶片。
- 運行
讓 X 使用 nouveau GPU 運作。
- 運行
init 5
時,5 是你運行後記下的數字runlevel
。現在您應該會看到 X 再次啟動(否則請嘗試按 ctrl+alt+f7)。 - 如果你運行
aplay -l
,現在它應該輸出 HDMI 輸出(在我的電腦上有 4 個輸出,但只有 1 個有效)。
- 運行
英偉達
第一步是確保 GPU 未被驅動程式使用。當您使用 nvidia 驅動程式時,您也必須使用 prime。
- 跑步
prime-select query
。 - 如果輸出
nvidia
,您可以透過執行並重新啟動來停用驅動程式sudo prime-select intel
。 - 如果它輸出,
unknown
那麼上一步也可能有效,但也會破壞你的大黃蜂設定。
- 跑步
作為健全性檢查,請確保 GPU 及其音訊晶片已通電:
- 以 root 身分登入:
sudo su
- 跑步
lspci -H1 | grep 01:00
。它應該輸出兩行。 - 如果第一行以 結尾
(rev ff)
,則您需要透過運行來為 GPU 供電echo ON > /proc/acpi/bbswitch
。 - 如果第二行缺失,則表示 GPU 音訊晶片不再供電。您可以嘗試暫停您的筆記型電腦;再次恢復;並再次檢查 GPU 音訊晶片是否已通電(我希望這對您有用,否則您會像我一樣倒霉)。
- 再次運行
lsmod | grep nvidia
以確保 nvidia 驅動程式仍未在使用中。
- 以 root 身分登入:
現在 GPU 無需驅動程式即可供電,我們將「刪除」它:
- 運行
echo 1 > /sys/bus/pci/devices/0000\:01\:00.0/remove
(如果 GPU 仍有加載/正在使用的驅動程序,這會導致內核恐慌)。 - 透過運行重新檢測 GPU 及其音訊晶片
echo 1 > /sys/bus/pci/rescan
。 - 跑步
lspci | grep 01:00.1
。如果輸出任何內容,恭喜!您的 Linux 現在可以識別您的 GPU 音訊晶片。
- 運行
讓 X 使用 nvidia GPU 運作。
- 跑步
prime-select
。如果輸出intel
,則運行prime-select nvidia
。 - 登出並重新登入。
- 如果你
aplay -l
現在運行它應該輸出 HDMI 輸出(在我的電腦上有 4 個輸出,但只有 1 個有效)。
- 跑步
順便提一句。此錯誤已在啟動板上報告:https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/1377653?comments=all
答案2
連接到電視後是否更改了聲音設定中的音訊來源?
請參閱下圖以供參考。您需要將其變更為 HDMI/數位立體聲。
答案3
我用 HDMI 也遇到同樣的問題
安裝pulse-audio後就解決了。現在我可以看電影和聽電視聲音