Asus G752VS、GTX 1070 - PCI-e 音频设备(第二功能)缺失

Asus G752VS、GTX 1070 - PCI-e 音频设备(第二功能)缺失

系统信息

Kernel: Linux 4.12.6-1-ARCH
Distro: Arch Linux
Machine: Asus G752VS laptop
CPU: Intel Core i7 6700HQ
Graphics card: Nvidia GTX 1070 Mobile (GP104M)

问题总结

我最近在 ASUS G752VS 的库存硬件配置上安装了 Arch Linux。我试图让 HDMI 音频输出正常工作,但在 Linux 中,该卡的 PCI-e 设备仅显示单一功能(VGA 兼容控制器)。网上信息表明,要使 ALSA/PulseAudio 使用该卡,同一 PCI-e 设备上应该有第二个功能(音频设备)。我认为这是一个软件问题,因为在 Windows 10 上,第二个功能,HDMI 音频输出按预期工作。解决此问题的后续步骤是什么?

预期行为

为了获得我所使用的设备/功能的基线预计!pcitree看一下,这是同一台计算机上 Windows 内核调试器的输出:

lkd> !pcitree
Bus 0x0 (FDO Ext ffffd1884838a190)
  (d=0,  f=0) 80861910 devext 0xffffd188483e91b0 devstack 0xffffd188483e9060 0600 Bridge/HOST to PCI
  (d=1,  f=0) 80861901 devext 0xffffd188483d91b0 devstack 0xffffd188483d9060 0604 Bridge/PCI to PCI
  Bus 0x1 (FDO Ext ffffd18848657c60)
    (d=0,  f=0) 10de1be1 devext 0xffffd188486551b0 devstack 0xffffd18848655060 0300 Display Controller/VGA
    (d=0,  f=1) 10de10f0 devext 0xffffd1884a88d8b0 devstack 0xffffd1884a88d760 0403 Multimedia Device/Unknown Sub Class
  (d=4,  f=0) 80861903 devext 0xffffd188483931b0 devstack 0xffffd18848393060 1180 Unknown Base Class/Unknown Sub Class
  (d=14, f=0) 8086a12f devext 0xffffd1884838c1b0 devstack 0xffffd1884838c060 0c03 Serial Bus Controller/USB
  (d=14, f=2) 8086a131 devext 0xffffd1884838b1b0 devstack 0xffffd1884838b060 1180 Unknown Base Class/Unknown Sub Class
  (d=15, f=0) 8086a160 devext 0xffffd188483881b0 devstack 0xffffd18848388060 1180 Unknown Base Class/Unknown Sub Class
  (d=15, f=1) 8086a161 devext 0xffffd188483c01b0 devstack 0xffffd188483c0060 1180 Unknown Base Class/Unknown Sub Class
  (d=16, f=0) 8086a13a devext 0xffffd188483bf1b0 devstack 0xffffd188483bf060 0780 Simple Serial Communications Controller/'Other'
  (d=17, f=0) 8086a102 devext 0xffffd188483fd1b0 devstack 0xffffd188483fd060 0106 Mass Storage Controller/Unknown Sub Class
  (d=1c, f=0) 8086a112 devext 0xffffd188483f81b0 devstack 0xffffd188483f8060 0604 Bridge/PCI to PCI
  Bus 0x2 (FDO Ext ffffd188483ac190)
    (d=0,  f=0) 808624f3 devext 0xffffd188483aa1b0 devstack 0xffffd188483aa060 0280 Network Controller/'Other'
  (d=1c, f=3) 8086a113 devext 0xffffd188483f71b0 devstack 0xffffd188483f7060 0604 Bridge/PCI to PCI
  Bus 0x3 (FDO Ext ffffd188483ac7b0)
    (d=0,  f=0) 10ec8168 devext 0xffffd188483ab1b0 devstack 0xffffd188483ab060 0200 Network Controller/Ethernet
  (d=1c, f=4) 8086a114 devext 0xffffd188483f61b0 devstack 0xffffd188483f6060 0604 Bridge/PCI to PCI
  Bus 0x4 (FDO Ext ffffd188483a9990)
    No devices have been enumerated on this bus.
  (d=1f, f=0) 8086a150 devext 0xffffd188483f41b0 devstack 0xffffd188483f4060 0601 Bridge/PCI to ISA
  (d=1f, f=2) 8086a121 devext 0xffffd188484bf1b0 devstack 0xffffd188484bf060 0580 Memory Controller/'Other'
  (d=1f, f=3) 8086a170 devext 0xffffd188484a41b0 devstack 0xffffd188484a4060 0403 Multimedia Device/Unknown Sub Class
  (d=1f, f=4) 8086a123 devext 0xffffd188484a31b0 devstack 0xffffd188484a3060 0c05 Serial Bus Controller/Unknown Sub Class
Total PCI Root busses processed = 1
Total PCI Segments processed = 1

特别是参见总线0x1,设备0,它有两个功能。

观察到的行为

相比之下,这是 Linux 上的输出lspci -nn

00:00.0 Host bridge [0600]: Intel Corporation Skylake Host Bridge/DRAM Registers [8086:1910] (rev 07)
00:01.0 PCI bridge [0604]: Intel Corporation Skylake PCIe Controller (x16) [8086:1901] (rev 07)
00:04.0 Signal processing controller [1180]: Intel Corporation Skylake Processor Thermal Subsystem [8086:1903] (rev 07)
00:14.0 USB controller [0c03]: Intel Corporation Sunrise Point-H USB 3.0 xHCI Controller [8086:a12f] (rev 31)
00:14.2 Signal processing controller [1180]: Intel Corporation Sunrise Point-H Thermal subsystem [8086:a131] (rev 31)
00:15.0 Signal processing controller [1180]: Intel Corporation Sunrise Point-H Serial IO I2C Controller #0 [8086:a160] (rev 31)
00:15.1 Signal processing controller [1180]: Intel Corporation Sunrise Point-H Serial IO I2C Controller #1 [8086:a161] (rev 31)
00:16.0 Communication controller [0780]: Intel Corporation Sunrise Point-H CSME HECI #1 [8086:a13a] (rev 31)
00:17.0 SATA controller [0106]: Intel Corporation Sunrise Point-H SATA controller [AHCI mode] [8086:a102] (rev 31)
00:1c.0 PCI bridge [0604]: Intel Corporation Sunrise Point-H PCI Express Root Port #3 [8086:a112] (rev f1)
00:1c.3 PCI bridge [0604]: Intel Corporation Sunrise Point-H PCI Express Root Port #4 [8086:a113] (rev f1)
00:1c.4 PCI bridge [0604]: Intel Corporation Sunrise Point-H PCI Express Root Port #5 [8086:a114] (rev f1)
00:1f.0 ISA bridge [0601]: Intel Corporation Sunrise Point-H LPC Controller [8086:a150] (rev 31)
00:1f.2 Memory controller [0580]: Intel Corporation Sunrise Point-H PMC [8086:a121] (rev 31)
00:1f.3 Audio device [0403]: Intel Corporation Sunrise Point-H HD Audio [8086:a170] (rev 31)
00:1f.4 SMBus [0c05]: Intel Corporation Sunrise Point-H SMBus [8086:a123] (rev 31)
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP104M [GeForce GTX 1070 Mobile] [10de:1be1] (rev a1)
02:00.0 Network controller [0280]: Intel Corporation Wireless 8260 [8086:24f3] (rev 3a)
03:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 10)

请注意,此处仅报告了总线 1、设备 0 的一个函数。

编辑:部分修复

我已经能够使用以下命令序列让设备出现:

echo 1 > /sys/bus/pci/devices/0000\:01\:00.0/reset
echo 1 > /sys/bus/pci/devices/0000\:01\:00.0/remove
echo 1 > /sys/bus/pci/rescan

之后,我得到以下附加条目 - 这是所需的行为。

01:00.1 Audio device: NVIDIA Corporation GP104 High Definition Audio Controller (rev a1)

不幸的是,第一个命令导致笔记本电脑的屏幕关闭,并且我还没有找到任何方法将其重新打开(我尝试重新加载nvidianvidia_modesetnvidia_drm内核模块,我尝试让机器进入睡眠状态,并且我尝试systemctl kexec使用内核的新副本)。两个明显的探索途径是

  1. 执行此序列后重新打开屏幕,并在启动时编写整个过程的脚本。这感觉像是更黑客的解决方案。
  2. 确定设备重置时与首次初始化时的不同之处,并更正其初始化。

我还没有遵循这两种方法,但如果我找到解决方案,我会将其放入答案中。目前,这只是问题的背景。

作为旁注,事实上,kexec新内核保留了两个设备功能,但没有打开屏幕,这对我来说表明通常在启动时完成一些硬件初始化,并且这是在启动后打开屏幕所必需的。显卡已初始化。

尝试修复

这种特定型号的笔记本电脑存在多个已记录的涉及 ACPI 的 Linux 兼容性问题。我尝试用acpi_os_name几个不同的值传递内核参数- LinuxWindowsWindows 2015Windows 10。我也尝试过通过acpi=offnoapic。这些都对 的输出没有任何影响lspci。我不确定这样的提问还能做多少事情;看起来任何进一步的 ACPI 故障排除都将涉及反编译和编辑 DSDT 表中的代码(我除了摸索之外没有必要的经验)。我已将 ACPI 表的子集转储到http://csclub.uwaterloo.ca/~wlritchi/folding/acpi_tables.tar.gz不过以防万一。

对于另一种方法...检查 dmesg,我看到以下摘录:

[    1.004709] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
[    1.011237] ACPI: Power Resource [PG00] (on)
[    1.012967] ACPI: Power Resource [WRST] (on)
[    1.013613] ACPI: Power Resource [WRST] (on)
[    1.014269] ACPI: Power Resource [WRST] (on)
[    1.014926] ACPI: Power Resource [WRST] (on)
[    1.015589] ACPI: Power Resource [WRST] (on)
[    1.016243] ACPI: Power Resource [WRST] (on)
[    1.016888] ACPI: Power Resource [WRST] (on)
[    1.017649] ACPI: Power Resource [WRST] (on)
[    1.018345] ACPI: Power Resource [WRST] (on)
[    1.018998] ACPI: Power Resource [WRST] (on)
[    1.019639] ACPI: Power Resource [WRST] (on)
[    1.020233] ACPI: Power Resource [WRST] (on)
[    1.020827] ACPI: Power Resource [WRST] (on)
[    1.021431] ACPI: Power Resource [WRST] (on)
[    1.022026] ACPI: Power Resource [WRST] (on)
[    1.022641] ACPI: Power Resource [WRST] (on)
[    1.023246] ACPI: Power Resource [WRST] (on)
[    1.023842] ACPI: Power Resource [WRST] (on)
[    1.024444] ACPI: Power Resource [WRST] (on)
[    1.025038] ACPI: Power Resource [WRST] (on)
[    1.045887] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-fe])
[    1.045895] acpi PNP0A08:00: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI]
[    1.045957] acpi PNP0A08:00: _OSC failed (AE_ERROR); disabling ASPM
[    1.046853] PCI host bridge to bus 0000:00
[    1.046856] pci_bus 0000:00: root bus resource [io  0x0000-0x0cf7 window]
[    1.046858] pci_bus 0000:00: root bus resource [io  0x0d00-0xffff window]
[    1.046860] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff window]
[    1.046862] pci_bus 0000:00: root bus resource [mem 0x000c0000-0x000c3fff window]
[    1.046863] pci_bus 0000:00: root bus resource [mem 0x000c4000-0x000c7fff window]
[    1.046865] pci_bus 0000:00: root bus resource [mem 0x000c8000-0x000cbfff window]
[    1.046867] pci_bus 0000:00: root bus resource [mem 0x000cc000-0x000cffff window]
[    1.046868] pci_bus 0000:00: root bus resource [mem 0x000d0000-0x000d3fff window]
[    1.046870] pci_bus 0000:00: root bus resource [mem 0x000d4000-0x000d7fff window]
[    1.046871] pci_bus 0000:00: root bus resource [mem 0x000d8000-0x000dbfff window]
[    1.046873] pci_bus 0000:00: root bus resource [mem 0x000dc000-0x000dffff window]
[    1.046874] pci_bus 0000:00: root bus resource [mem 0x000e0000-0x000e3fff window]
[    1.046876] pci_bus 0000:00: root bus resource [mem 0x000e4000-0x000e7fff window]
[    1.046877] pci_bus 0000:00: root bus resource [mem 0x000e8000-0x000ebfff window]
[    1.046879] pci_bus 0000:00: root bus resource [mem 0x000ec000-0x000effff window]
[    1.046880] pci_bus 0000:00: root bus resource [mem 0x38800000-0xdfffffff window]
[    1.046882] pci_bus 0000:00: root bus resource [mem 0xfd000000-0xfe7fffff window]
[    1.046884] pci_bus 0000:00: root bus resource [bus 00-fe]
[    1.046895] pci 0000:00:00.0: [8086:1910] type 00 class 0x060000
[    1.047083] pci 0000:00:01.0: [8086:1901] type 01 class 0x060400
[    1.047145] pci 0000:00:01.0: PME# supported from D0 D3hot D3cold
[    1.047367] pci 0000:00:01.0: System wakeup disabled by ACPI
[    1.047444] pci 0000:00:04.0: [8086:1903] type 00 class 0x118000
[    1.047461] pci 0000:00:04.0: reg 0x10: [mem 0xda120000-0xda127fff 64bit]
[    1.047776] pci 0000:00:14.0: [8086:a12f] type 00 class 0x0c0330
[    1.047800] pci 0000:00:14.0: reg 0x10: [mem 0xda110000-0xda11ffff 64bit]
[    1.047884] pci 0000:00:14.0: PME# supported from D3hot D3cold
[    1.048066] pci 0000:00:14.0: System wakeup disabled by ACPI
[    1.048114] pci 0000:00:14.2: [8086:a131] type 00 class 0x118000
[    1.048136] pci 0000:00:14.2: reg 0x10: [mem 0xda138000-0xda138fff 64bit]
[    1.048452] pci 0000:00:15.0: [8086:a160] type 00 class 0x118000
[    1.048661] pci 0000:00:15.0: reg 0x10: [mem 0xda137000-0xda137fff 64bit]
[    1.049699] pci 0000:00:15.1: [8086:a161] type 00 class 0x118000
[    1.049907] pci 0000:00:15.1: reg 0x10: [mem 0xda136000-0xda136fff 64bit]
[    1.050885] pci 0000:00:16.0: [8086:a13a] type 00 class 0x078000
[    1.050910] pci 0000:00:16.0: reg 0x10: [mem 0xda135000-0xda135fff 64bit]
[    1.051004] pci 0000:00:16.0: PME# supported from D3hot
[    1.051232] pci 0000:00:17.0: [8086:a102] type 00 class 0x010601
[    1.051250] pci 0000:00:17.0: reg 0x10: [mem 0xda130000-0xda131fff]
[    1.051259] pci 0000:00:17.0: reg 0x14: [mem 0xda134000-0xda1340ff]
[    1.051268] pci 0000:00:17.0: reg 0x18: [io  0xf050-0xf057]
[    1.051277] pci 0000:00:17.0: reg 0x1c: [io  0xf040-0xf043]
[    1.051286] pci 0000:00:17.0: reg 0x20: [io  0xf020-0xf03f]
[    1.051296] pci 0000:00:17.0: reg 0x24: [mem 0xda133000-0xda1337ff]
[    1.051348] pci 0000:00:17.0: PME# supported from D3hot
[    1.051570] pci 0000:00:1c.0: [8086:a112] type 01 class 0x060400
[    1.051654] pci 0000:00:1c.0: PME# supported from D0 D3hot D3cold
[    1.051911] pci 0000:00:1c.3: [8086:a113] type 01 class 0x060400
[    1.051995] pci 0000:00:1c.3: PME# supported from D0 D3hot D3cold
[    1.052203] pci 0000:00:1c.3: System wakeup disabled by ACPI
[    1.052249] pci 0000:00:1c.4: [8086:a114] type 01 class 0x060400
[    1.052342] pci 0000:00:1c.4: PME# supported from D0 D3hot D3cold
[    1.052551] pci 0000:00:1c.4: System wakeup disabled by ACPI
[    1.052615] pci 0000:00:1f.0: [8086:a150] type 00 class 0x060100
[    1.052933] pci 0000:00:1f.2: [8086:a121] type 00 class 0x058000
[    1.052948] pci 0000:00:1f.2: reg 0x10: [mem 0xda12c000-0xda12ffff]
[    1.053212] pci 0000:00:1f.3: [8086:a170] type 00 class 0x040300
[    1.053240] pci 0000:00:1f.3: reg 0x10: [mem 0xda128000-0xda12bfff 64bit]
[    1.053278] pci 0000:00:1f.3: reg 0x20: [mem 0xda100000-0xda10ffff 64bit]
[    1.053340] pci 0000:00:1f.3: PME# supported from D3hot D3cold
[    1.053641] pci 0000:00:1f.3: System wakeup disabled by ACPI
[    1.053687] pci 0000:00:1f.4: [8086:a123] type 00 class 0x0c0500
[    1.053736] pci 0000:00:1f.4: reg 0x10: [mem 0xda132000-0xda1320ff 64bit]
[    1.053808] pci 0000:00:1f.4: reg 0x20: [io  0xf000-0xf01f]
[    1.054145] pci 0000:01:00.0: [10de:1be1] type 00 class 0x030000
[    1.054167] pci 0000:01:00.0: reg 0x10: [mem 0xdb000000-0xdbffffff]
[    1.054181] pci 0000:01:00.0: reg 0x14: [mem 0xb0000000-0xbfffffff 64bit pref]
[    1.054195] pci 0000:01:00.0: reg 0x1c: [mem 0xc0000000-0xc1ffffff 64bit pref]
[    1.054204] pci 0000:01:00.0: reg 0x24: [io  0xe000-0xe07f]
[    1.054213] pci 0000:01:00.0: reg 0x30: [mem 0xdc000000-0xdc07ffff pref]
[    1.054358] pci 0000:01:00.0: System wakeup disabled by ACPI
[    1.064286] pci 0000:00:01.0: PCI bridge to [bus 01]
[    1.064290] pci 0000:00:01.0:   bridge window [io  0xe000-0xefff]
[    1.064293] pci 0000:00:01.0:   bridge window [mem 0xdb000000-0xdc0fffff]
[    1.064298] pci 0000:00:01.0:   bridge window [mem 0xb0000000-0xc1ffffff 64bit pref]
[    1.064854] pci 0000:02:00.0: [8086:24f3] type 00 class 0x028000
[    1.064952] pci 0000:02:00.0: reg 0x10: [mem 0xdc300000-0xdc301fff 64bit]
[    1.065473] pci 0000:02:00.0: PME# supported from D0 D3hot D3cold
[    1.074535] pci 0000:00:1c.0: PCI bridge to [bus 02]
[    1.074541] pci 0000:00:1c.0:   bridge window [mem 0xdc300000-0xdc3fffff]
[    1.074715] pci 0000:03:00.0: [10ec:8168] type 00 class 0x020000
[    1.074742] pci 0000:03:00.0: reg 0x10: [io  0xd000-0xd0ff]
[    1.074772] pci 0000:03:00.0: reg 0x18: [mem 0xdc204000-0xdc204fff 64bit]
[    1.074791] pci 0000:03:00.0: reg 0x20: [mem 0xdc200000-0xdc203fff 64bit]
[    1.074900] pci 0000:03:00.0: supports D1 D2
[    1.074902] pci 0000:03:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[    1.075041] pci 0000:03:00.0: System wakeup disabled by ACPI
[    1.084310] pci 0000:00:1c.3: PCI bridge to [bus 03]
[    1.084314] pci 0000:00:1c.3:   bridge window [io  0xd000-0xdfff]
[    1.084318] pci 0000:00:1c.3:   bridge window [mem 0xdc200000-0xdc2fffff]
[    1.084503] pci 0000:00:1c.4: PCI bridge to [bus 04-3c]
[    1.084509] pci 0000:00:1c.4:   bridge window [mem 0xc4000000-0xda0fffff]
[    1.084515] pci 0000:00:1c.4:   bridge window [mem 0x80000000-0xa1ffffff 64bit pref]
[    1.088640] ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 10 *11 12 14 15)
[    1.088716] ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 *10 11 12 14 15)
[    1.088788] ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 6 10 *11 12 14 15)
[    1.088859] ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 6 10 *11 12 14 15)
[    1.088928] ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 6 10 *11 12 14 15)
[    1.088998] ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 6 10 *11 12 14 15)
[    1.089068] ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 5 6 10 *11 12 14 15)
[    1.089137] ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 5 6 10 *11 12 14 15)
[    1.090136] ACPI: Enabled 8 GPEs in block 00 to 7F
[    1.090390] ACPI : EC: interrupt unblocked
[    1.090403] ACPI : EC: event unblocked
[    1.090417] ACPI: \_SB_.PCI0.LPCB.EC0_: GPE=0x23, EC_CMD/EC_SC=0x66, EC_DATA=0x62
[    1.090419] ACPI: \_SB_.PCI0.LPCB.EC0_: Used as boot DSDT EC to handle transactions and events
[    1.090534] pci 0000:01:00.0: vgaarb: setting as boot VGA device
[    1.090536] pci 0000:01:00.0: vgaarb: VGA device added: decodes=io+mem,owns=io+mem,locks=none
[    1.090538] pci 0000:01:00.0: vgaarb: bridge control possible
[    1.090539] vgaarb: loaded
[    1.090586] EDAC MC: Ver: 3.0.0
[    1.090990] Registered efivars operations
[    1.094739] PCI: Using ACPI for IRQ routing
[    1.118941] PCI: pci_cache_line_size set to 64 bytes

关于内核参数的那句话pci=nocrs听起来很有趣;不幸的是,通过它对 的输出没有影响lspci。除此之外,没有什么对我来说很突出。完整的 dmesg 输出有点长,所以我将其上传到这里:http://csclub.uwaterloo.ca/~wlritchi/folding/dmesg.txt。如果任何其他部分与此问题相关,我将对其进行编辑以供后代使用。

lspci -nnbvvvMG -H1如果有帮助的话,我还上传了(诚然只是垃圾邮件标志)的输出http://csclub.uwaterloo.ca/~wlritchi/folding/lspci-nnbvvvMG-H1.txt

现在我有点不知道该去哪里继续寻找;网上关于此类故障的信息并不多,而且我真的不知道我在使用 dmesg 输出或 ACPI 做什么。关于确定为什么在 Linux 上没有发现第二个函数的后续步骤有什么建议吗?

相关内容