Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to enable: Not multifunction, no audio #7

Closed
skligys opened this issue Jan 2, 2019 · 6 comments
Closed

Fails to enable: Not multifunction, no audio #7

skligys opened this issue Jan 2, 2019 · 6 comments

Comments

@skligys
Copy link

skligys commented Jan 2, 2019

Dell Precision 5520 with Quadro M1200 4GB. In case it is relevant, I am using mvidia-xrun on Arch lInux (https://wiki.archlinux.org/index.php/nvidia-xrun).

Enabling nvhda fails here:

nvhda/nvhda.c

Line 150 in 9e9bba5

if (!(hdr_type & 0x80))

yet in my limited understanding the multifunction bit is set (see 0x80 at offset 0x0E at the very bottom).

$ dmesg
[Jan 2 10:53] bbswitch: enabling discrete graphics
[  +0.325967] nvidia-nvlink: Nvlink Core is being initialized, major device number 234
[  +0.100344] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  415.25  Wed Dec 12 10:22:08 CST 2018 (using threaded interrupts)
[  +0.013972] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  415.25  Wed Dec 12 10:02:42 CST 2018
[  +0.002218] [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
[  +0.000002] [drm] Initialized nvidia-drm 0.0.0 20160202 for 0000:01:00.0 on minor 1
[  +0.010524] nvhda: version 0.01
[  +0.000007] nvhda: Found nv VGA device 0000:01:00.0
[  +0.000006] nvhda: enabling audio
[  +0.000001] nvhda: Not multifunction, no audio
[  +0.000004] nvhda: No audio device found, unsetting config bit.
[  +0.000001] nvhda: Succesfully loaded. Audio 0000:01:00.0 is off
$ lspci
...
01:00.0 3D controller: NVIDIA Corporation GM107GLM [Quadro M1200 Mobile] (rev a2)
...
$ sudo lspci -H1
...
01:00.0 3D controller: NVIDIA Corporation GM107GLM [Quadro M1200 Mobile] (rev a2)
01:00.1 Audio device: NVIDIA Corporation Device 0fbc (rev a1)
...
$ sudo lspci -d 10de:* -xxx
01:00.0 3D controller: NVIDIA Corporation GM107GLM [Quadro M1200 Mobile] (rev a2)
00: de 10 b6 13 07 00 10 00 a2 00 02 03 00 00 80 00
10: 00 00 00 ec 0c 00 00 c0 00 00 00 00 0c 00 00 d0
20: 00 00 00 00 01 e0 00 00 00 00 00 00 28 10 bf 07
30: 00 00 00 00 60 00 00 00 00 00 00 00 0b 01 00 00
40: 28 10 bf 07 00 00 00 00 00 00 00 00 00 00 00 00
50: 00 00 00 00 01 00 00 00 ce d6 23 00 00 00 00 00
60: 01 68 03 00 08 00 00 00 05 78 81 00 78 05 e0 fe
70: 00 00 00 00 00 00 00 00 10 00 02 00 e1 8d 2c 01
80: 30 21 00 00 03 bd 47 00 40 01 01 11 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 13 08 04 00
a0: 00 04 00 00 0e 00 00 00 03 00 1f 00 00 00 00 00
b0: 00 00 00 00 09 00 14 01 00 00 10 80 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
@hhfeuer
Copy link
Owner

hhfeuer commented Jan 2, 2019

Unfortunately, that's a misbehaviour of the kernel, depending on kernel version and maybe also on chipset and when it's enabled. The module asks the kernel to re-read the header type and the kernel reports 0x00 while it's really 0x80. Nothing I can do about it, sorry. You can only try a different kernel version or see if you can enable it later, maybe after display-manager start.

@skligys
Copy link
Author

skligys commented Jan 2, 2019

Thanks for taking a look. Do you think some delay would help before querying PCI header type back? I could easily try adding that.

@hhfeuer
Copy link
Owner

hhfeuer commented Jan 2, 2019

I think I tried that before to no avail but you'll never know. Maybe also reading the config byte twice helps, idk.

@skligys
Copy link
Author

skligys commented Jan 3, 2019

Ok, tried with msleep(100) before reading, did not help. However as you suggested starting X11 and then loading nvhda did help, it loaded fine!

Now the next problem is snd_hda_intel immediately saying: no codecs found! Any ideas on that?

[ +32.821851] nvhda: version 0.01
[  +0.000007] nvhda: Found nv VGA device 0000:01:00.0
[  +0.000006] nvhda: enabling audio
[  +0.000014] pci 0000:01:00.1: [10de:0fbc] type 00 class 0x040300
[  +0.000014] pci 0000:01:00.1: reg 0x10: [mem 0x00000000-0x00003fff]
[  +0.000028] pci 0000:01:00.1: Max Payload Size set to 256 (was 128, max 256)
[  +0.000102] nvhda: Audio found, adding
[  +0.000004] pci 0000:01:00.1: BAR 0: assigned [mem 0xed080000-0xed083fff]
[  +0.000012] pci 0000:01:00.1: Linked as a consumer to 0000:01:00.0
[  +0.000037] snd_hda_intel 0000:01:00.1: enabling device (0000 -> 0002)
[  +0.000084] snd_hda_intel 0000:01:00.1: Disabling MSI
[  +0.000018] snd_hda_intel 0000:01:00.1: Handle vga_switcheroo audio client
[  +0.000021] nvhda: Found nv audio device 0000:01:00.1
[  +0.000001] nvhda: Succesfully loaded. Audio 0000:01:00.0 is on
[  +0.003473] snd_hda_intel 0000:01:00.1: no codecs found!

@hhfeuer
Copy link
Owner

hhfeuer commented Jan 3, 2019

"no codecs found!" doesn't look good, never seen that before. Either a hardware failure or something is wrong with the snd_hda_intel module or its codecs. The codec module should be snd_hda_codec_hdmi

@skligys
Copy link
Author

skligys commented Jan 4, 2019

Thanks for help! Looks like this is out of nvhda driver's control now, closing the issue.

@skligys skligys closed this as completed Jan 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants