1

System info

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)

Problem summary

I've recently installed Arch Linux on an ASUS G752VS in stock hardware configuration. I'm trying to get HDMI audio output working, but from Linux, the card's PCI-e device only shows a single function (VGA compatible controller). Information online suggests that for ALSA/PulseAudio to use the card, there should be a second function (Audio device) on the same PCI-e device. I believe this to be a software issue because on Windows 10, there is a second function, and HDMI audio output works as expected. What are my next steps for troubleshooting this issue?

Expected behaviour

To get a baseline for what devices/functions I expect to see, here's the output of !pcitree from the Windows Kernel Debugger, on the same machine:

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

In particular, see Bus 0x1, device 0, which has two functions.

Observed behaviour

By contrast, here's the output of lspci -nn on Linux:

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)

Notice here that there's only a single function reported for bus 1, device 0.

Edit: Partial fix

I have been able to get the device to appear with the following sequence of commands:

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

After this, I get the following additional entry - which is the desired behaviour.

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

Unfortunately, the first command causes the laptop's screen to turn off, and I haven't found any way to get it back on (I tried reloading the nvidia, nvidia_modeset, and nvidia_drm kernel modules, I tried putting the machine to sleep, and I tried systemctl kexecing a new copy of the kernel). The two obvious avenues to explore are

  1. Get the screen back on after carrying out this sequence, and script the whole thing on boot. This feels like the more hackish solution.
  2. Identify what's different when the device is reset vs. when it's first initialized, and correct its initialization.

I haven't followed either approach yet, but if I reach a solution I'll put it into an answer. For now, it's just context on the question.

As a sidenote, the fact that kexecing a new kernel left both device functions around, but did not turn the screen, suggests to me that there's some hardware initialization that's normally done on boot, and that's required in order to turn on the screen after the video card is initialized.

Attempted fixes

This particular model of laptop has several documented Linux compatibility issues involving ACPI. I tried passing the kernel parameter acpi_os_name with several different values - Linux, Windows, Windows 2015, and Windows 10. I also tried passing acpi=off and noapic. None of these had any effect on the output of lspci. I'm not sure how much more can be done with this line of questioning; it looks like any further ACPI troubleshooting would involve decompiling and editing the code in the DSDT table (and I don't have the requisite experience to do more than fumble about with that). I've dumped a subset of the ACPI tables at http://csclub.uwaterloo.ca/~wlritchi/folding/acpi_tables.tar.gz just in case, though.

For another approach... checking dmesg, I see the following excerpt:

[    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

The line about kernel parameter pci=nocrs sounded interesting; unfortunately, passing it had no effect on the output of lspci. Other than that, nothing stands out to me. The full dmesg output is a bit long, so I've uploaded it here: http://csclub.uwaterloo.ca/~wlritchi/folding/dmesg.txt. If any other sections become relevant to this question, I'll edit to include them for posterity.

In case it helps, I've also uploaded the output of lspci -nnbvvvMG -H1 (admittedly just spamming flags) at http://csclub.uwaterloo.ca/~wlritchi/folding/lspci-nnbvvvMG-H1.txt

Right now I'm a bit stuck on where to keep looking; there's not a lot of information online for this kind of fault and I don't really know what I'm doing with the dmesg output or with ACPI. Any suggestions on next steps to identify why the second function isn't being discovered on Linux?

  • Interesting. This lspci output shows both functions (on Suse, after removing the proprietary nvidia drivers, which may or may not be related; possibly worth a try). So it can work under Linux. You can use iasl to disassemble the ACPI tables. There are OS related variants, but you should have caught that with acpi_os_name. If you want to wade through the tables, grep for GFX and HDMI for starters. – dirkt Aug 24 '17 at 11:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.