Bug 103351

Summary: Nouveau fails when booting with a screen connected to displayport since 13a86519202c5d119d83640d6f781f3181205d2c
Product: Mesa Reporter: Chris Glass <chris.glass>
Component: Drivers/DRI/nouveauAssignee: Nouveau Project <nouveau>
Status: RESOLVED MOVED QA Contact: Nouveau Project <nouveau>
Severity: normal    
Priority: medium CC: allenwild93, chris.glass, jan.public, kai.heng.feng
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Chris Glass 2017-10-18 20:40:00 UTC
As discovered when testing the latest release of Ubuntu with (mainline) trees, commit 13a86519202c5d119d83640d6f781f3181205d2c seems to introduce a regression when booting with a screen attached to displayport (the system otherwise boots fine with the same kernel using an HDMI output).

An original bug was filed with the Ubuntu bug tracker and contains information about bissection: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1723619

A (set of) dmesg outputs can be found here: https://pastebin.ubuntu.com/25767385/ 

4.14-rc5 still exhibits this behavior on the tested system.

Please don't hesitate to reach out to me should you need more information - one affected system happens to be my main workstation.
Comment 1 Ilia Mirkin 2017-10-18 20:52:14 UTC
This appears to be a GM204.

Note that 13a8651920 fixed a regression for most people precisely of the type that it caused for you, i.e. DDC failing.

So it sounds like the address-only transactions were actually working well for you before (which basically is impossible since *size - 1 would have been 0xffffffff and have overwritten the whole ctrl), and these have now been broken.

This leads me to believe that a different bit is now the address-only transaction bit. In gm200_i2c_aux_xfer, we assume it's 0x100 (same as for GF119+). Ben, did you trace it on GM200+ separately?
Comment 2 Chris Glass 2017-10-23 12:49:02 UTC
This issues persists in 4.14-rc6

Let me know if there is anything I can do to help here.
Comment 3 Chris Glass 2017-10-30 10:07:07 UTC
I just tested 4.14-rc7 and the issue is still present.
Comment 4 Nikita 2017-12-24 23:53:04 UTC
I ran into the same issue on a Lenovo T420 with 01:00.0 VGA compatible controller: NVIDIA Corporation GF119M [Quadro NVS 4200M] (rev a1).

As soon as I plug an external monitor via DP, Nouveau oopses at nvkm_dp_train_drive(). If I try to boot with the monitor plugged in the system doesn't boot at all. I attached the relevant log at the end.

The external monitor works perfectly on 4.12.9-300.fc26.x86_64 and breaks on 4.13.1-301.fc27.x86_64, the commit mentioned in this issue was introduced between these two version.


Dec 25 01:41:47 localhost gnome-shell[1662]: Failed to apply DRM plane transform 0: Invalid argument
Dec 25 01:41:47 localhost gnome-shell[1662]: Failed to apply DRM plane transform 0: Invalid argument
Dec 25 01:41:48 localhost gnome-shell[1662]: JS WARNING: [resource:///org/gnome/shell/ui/workspaceThumbnail.js 892]: reference to undefined property "_switchWorkspaceNotifyId"
Dec 25 01:41:48 localhost gsd-color[1301]: no xrandr-Dell Inc.-DELL U2415-7MT0167S57AS device found: Failed to find output xrandr-Dell Inc.-DELL U2415-7MT0167S57AS
Dec 25 01:41:48 localhost kernel: BUG: unable to handle kernel NULL pointer dereference at           (null)
Dec 25 01:41:48 localhost kernel: IP:           (null)
Dec 25 01:41:48 localhost kernel: PGD 0 
Dec 25 01:41:48 localhost kernel: P4D 0 
Dec 25 01:41:48 localhost kernel: 
Dec 25 01:41:48 localhost kernel: Oops: 0010 [#1] SMP
Dec 25 01:41:48 localhost kernel: Modules linked in: rfcomm fuse ccm nf_conntrack_netbios_ns nf_conntrack_broadcast xt_CT ip6t_rpfilter ip6t_REJECT nf_reject_ipv6 xt_conntrack ip_set nfnetlink ebtable_nat ebtable_broute bridge stp llc ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_raw ip6table_security iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack libcrc32c iptable_mangle iptable_raw iptable_security ebtable_filter ebtables ip6table_filter ip6_tables bnep sunrpc vfat fat intel_rapl x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm iTCO_wdt iTCO_vendor_support mei_wdt irqbypass intel_cstate intel_uncore intel_rapl_perf arc4 joydev wmi_bmof uvcvideo iwldvm btusb btrtl mac80211 btbcm btintel bluetooth videobuf2_vmalloc videobuf2_memops videobuf2_v4l2
Dec 25 01:41:48 localhost kernel:  videobuf2_core videodev snd_hda_codec_hdmi i2c_i801 thinkpad_acpi media iwlwifi lpc_ich snd_hda_codec_conexant snd_hda_codec_generic mei_me snd_hda_intel ecdh_generic mei snd_hda_codec cfg80211 snd_hda_core snd_hwdep snd_seq snd_seq_device snd_pcm snd_timer snd shpchp tpm_tis soundcore tpm_tis_core tpm rfkill dm_crypt nouveau crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel serio_raw mxm_wmi i2c_algo_bit drm_kms_helper sdhci_pci ttm sdhci e1000e mmc_core drm ptp pps_core wmi video
Dec 25 01:41:48 localhost kernel: CPU: 0 PID: 68 Comm: kworker/u16:1 Not tainted 4.13.1-301.fc27.x86_64 #1
Dec 25 01:41:48 localhost kernel: Hardware name: LENOVO 4180PC4/4180PC4, BIOS 83ET76WW (1.46 ) 07/05/2013
Dec 25 01:41:48 localhost kernel: Workqueue: nvkm-disp gf119_disp_super [nouveau]
Dec 25 01:41:48 localhost kernel: task: ffff8f14901b8000 task.stack: ffffa0d8c1250000
Dec 25 01:41:48 localhost kernel: RIP: 0010:          (null)
Dec 25 01:41:48 localhost kernel: RSP: 0018:ffffa0d8c1253c10 EFLAGS: 00010206
Dec 25 01:41:48 localhost kernel: RAX: ffffffffc03b5ee0 RBX: 0000000000000000 RCX: 0000000000000016
Dec 25 01:41:48 localhost kernel: RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff8f148f0fe720
Dec 25 01:41:48 localhost kernel: RBP: ffffa0d8c1253c98 R08: 0000000000000000 R09: 0000000000000000
Dec 25 01:41:48 localhost kernel: R10: 0000000000000000 R11: 0000000000001000 R12: 0000000000000000
Dec 25 01:41:48 localhost kernel: R13: 0000000000000000 R14: ffff8f148fd90800 R15: ffffa0d8c1253d38
Dec 25 01:41:48 localhost kernel: FS:  0000000000000000(0000) GS:ffff8f149dc00000(0000) knlGS:0000000000000000
Dec 25 01:41:48 localhost kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Dec 25 01:41:48 localhost kernel: CR2: 0000000000000000 CR3: 0000000122e09000 CR4: 00000000000406f0
Dec 25 01:41:48 localhost kernel: Call Trace:
Dec 25 01:41:48 localhost kernel:  ? nvkm_dp_train_drive+0x183/0x2c0 [nouveau]
Dec 25 01:41:48 localhost kernel:  nvkm_dp_acquire+0x4f3/0xcd0 [nouveau]
Dec 25 01:41:48 localhost kernel:  nv50_disp_super_2_2+0x5d/0x470 [nouveau]
Dec 25 01:41:48 localhost kernel:  ? nvkm_devinit_pll_set+0xf/0x20 [nouveau]
Dec 25 01:41:48 localhost kernel:  gf119_disp_super+0x19c/0x2f0 [nouveau]
Dec 25 01:41:48 localhost kernel:  process_one_work+0x193/0x3c0
Dec 25 01:41:48 localhost kernel:  worker_thread+0x4a/0x3a0
Dec 25 01:41:48 localhost kernel:  kthread+0x125/0x140
Dec 25 01:41:48 localhost kernel:  ? process_one_work+0x3c0/0x3c0
Dec 25 01:41:48 localhost kernel:  ? kthread_park+0x60/0x60
Dec 25 01:41:48 localhost kernel:  ret_from_fork+0x25/0x30
Dec 25 01:41:48 localhost kernel: Code:  Bad RIP value.
Dec 25 01:41:48 localhost kernel: RIP:           (null) RSP: ffffa0d8c1253c10
Dec 25 01:41:48 localhost kernel: CR2: 0000000000000000
Dec 25 01:41:48 localhost kernel: ---[ end trace 9a99aaab375d014e ]---
Dec 25 01:41:50 localhost abrt-dump-journal-oops[942]: abrt-dump-journal-oops: Found oopses: 1
Dec 25 01:41:50 localhost abrt-dump-journal-oops[942]: abrt-dump-journal-oops: Creating problem directories
Dec 25 01:41:50 localhost kernel: nouveau 0000:01:00.0: DRM: EVO timeout
Dec 25 01:41:51 localhost abrt-notification[2289]: System encountered a non-fatal error in nvkm_dp_train_drive()
Dec 25 01:41:52 localhost kernel: nouveau 0000:01:00.0: DRM: base-1: timeout
Dec 25 01:41:54 localhost kernel: nouveau 0000:01:00.0: DRM: base-1: timeout
Dec 25 01:41:56 localhost kernel: nouveau 0000:01:00.0: DRM: base-1: timeout
Dec 25 01:41:58 localhost kernel: nouveau 0000:01:00.0: DRM: base-1: timeout
Dec 25 01:42:00 localhost kernel: nouveau 0000:01:00.0: DRM: base-1: timeout
Dec 25 01:42:02 localhost kernel: nouveau 0000:01:00.0: DRM: base-1: timeout
Dec 25 01:42:04 localhost kernel: nouveau 0000:01:00.0: DRM: base-1: timeout
Dec 25 01:42:06 localhost kernel: nouveau 0000:01:00.0: DRM: base-1: timeout
Dec 25 01:42:08 localhost kernel: nouveau 0000:01:00.0: DRM: base-1: timeout
Dec 25 01:42:10 localhost kernel: nouveau 0000:01:00.0: DRM: base-1: timeout
Dec 25 01:42:12 localhost kernel: nouveau 0000:01:00.0: DRM: base-1: timeout
Dec 25 01:42:14 localhost kernel: nouveau 0000:01:00.0: DRM: base-1: timeout
Dec 25 01:42:16 localhost kernel: nouveau 0000:01:00.0: DRM: base-1: timeout
Dec 25 01:42:18 localhost kernel: nouveau 0000:01:00.0: DRM: base-1: timeout
Dec 25 01:42:20 localhost kernel: nouveau 0000:01:00.0: DRM: base-1: timeout
Comment 5 Rob Clark 2018-01-09 13:49:48 UTC
(In reply to Nikita from comment #4)
> I ran into the same issue on a Lenovo T420 with 01:00.0 VGA compatible
> controller: NVIDIA Corporation GF119M [Quadro NVS 4200M] (rev a1).

This is a different issue, what you are seeing with GF119 is:

 https://bugs.freedesktop.org/show_bug.cgi?id=103421
Comment 6 Allen Wild 2018-05-04 02:51:11 UTC
This still exists on 4.17-rc3 with my GTX 980 (GM204).
Reverting 13a86519202c5d119d83640d6f781f3181205d2c gets my DP monitor working again. (My HDMI monitor works in both cases)

The DP monitor works (low-resolution console) until nouveau is loaded, then it goes blank.

dmesg output on stock 4.17-rc3 source:
[    6.790387] fb: switching to nouveaufb from VESA VGA
[    6.800232] input: HDA Intel PCH Front Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input11
[    6.828574] Console: switching to colour dummy device 80x25
[    6.828726] nouveau 0000:01:00.0: NVIDIA GM204 (124000a1)
[    6.829091] input: HDA Intel PCH Rear Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input12
[    6.829150] input: HDA Intel PCH Line as /devices/pci0000:00/0000:00:1b.0/sound/card0/input13
[    6.829192] input: HDA Intel PCH Line Out Front as /devices/pci0000:00/0000:00:1b.0/sound/card0/input14
[    6.829235] input: HDA Intel PCH Line Out Surround as /devices/pci0000:00/0000:00:1b.0/sound/card0/input15
[    6.829276] input: HDA Intel PCH Line Out CLFE as /devices/pci0000:00/0000:00:1b.0/sound/card0/input16
[    6.829322] input: HDA Intel PCH Line Out Side as /devices/pci0000:00/0000:00:1b.0/sound/card0/input17
[    6.829369] input: HDA Intel PCH Front Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card0/input18
[    6.841234] fuse init (API version 7.26)
[    6.888971] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: data=ordered
[    6.911531] nouveau 0000:01:00.0: bios: version 84.04.2f.00.4b
[    6.913746] nouveau 0000:01:00.0: fb: 4096 MiB GDDR5
[    6.913762] nouveau 0000:01:00.0: bus: MMIO write of 8000012c FAULT at 10eb14 [ IBUS ]
[    6.976881] [TTM] Zone  kernel: Available graphics memory: 8185092 kiB
[    6.976886] [TTM] Zone   dma32: Available graphics memory: 2097152 kiB
[    6.976889] [TTM] Initializing pool allocator
[    6.976892] [TTM] Initializing DMA pool allocator
[    6.976902] nouveau 0000:01:00.0: DRM: VRAM: 4096 MiB
[    6.976904] nouveau 0000:01:00.0: DRM: GART: 1048576 MiB
[    6.976907] nouveau 0000:01:00.0: DRM: TMDS table version 2.0
[    6.976909] nouveau 0000:01:00.0: DRM: DCB version 4.1
[    6.976911] nouveau 0000:01:00.0: DRM: DCB outp 00: 01000f02 00020030
[    6.976913] nouveau 0000:01:00.0: DRM: DCB outp 01: 02000f00 00000000
[    6.976915] nouveau 0000:01:00.0: DRM: DCB outp 02: 04811f96 04400020
[    6.976916] nouveau 0000:01:00.0: DRM: DCB outp 03: 04011f92 00020020
[    6.976918] nouveau 0000:01:00.0: DRM: DCB outp 04: 02822f76 04400020
[    6.976920] nouveau 0000:01:00.0: DRM: DCB outp 05: 02022f72 00020020
[    6.976922] nouveau 0000:01:00.0: DRM: DCB outp 06: 02033f62 00020010
[    6.976923] nouveau 0000:01:00.0: DRM: DCB outp 07: 04844f86 04400010
[    6.976925] nouveau 0000:01:00.0: DRM: DCB outp 08: 04044f82 00020010
[    6.976927] nouveau 0000:01:00.0: DRM: DCB outp 15: 01df6ff8 00000000
[    6.976929] nouveau 0000:01:00.0: DRM: DCB conn 00: 00001030
[    6.976930] nouveau 0000:01:00.0: DRM: DCB conn 01: 02000146
[    6.976932] nouveau 0000:01:00.0: DRM: DCB conn 02: 00020246
[    6.976933] nouveau 0000:01:00.0: DRM: DCB conn 03: 00010361
[    6.976935] nouveau 0000:01:00.0: DRM: DCB conn 04: 01000446
[    6.976937] nouveau 0000:01:00.0: DRM: DCB conn 06: 00000670
[    7.018129] nouveau 0000:01:00.0: DRM: failed to create encoder 1/8/0: -19
[    7.018134] nouveau 0000:01:00.0: DRM: Virtual-1 has no encoders, removing
[    7.018162] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    7.018165] [drm] Driver supports precise vblank timestamp query.
[    7.122492] nouveau 0000:01:00.0: DRM: MM: using COPY for buffer copies
[    7.138298] nouveau 0000:01:00.0: DRM: DDC responded, but no EDID for DP-1
[    7.230500] input: HDA NVidia HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input19
[    7.230532] input: HDA NVidia HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input20
[    7.230556] input: HDA NVidia HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input21
[    7.230579] input: HDA NVidia HDMI/DP,pcm=9 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input22
[    7.402595] nouveau 0000:01:00.0: DRM: allocated 1920x1080 fb: 0x80000, bo         (ptrval)
[    7.402642] fbcon: nouveaufb (fb0) is primary device
[    7.417391] nouveau 0000:01:00.0: DRM: DDC responded, but no EDID for DP-1
[    7.650543] nouveau 0000:01:00.0: DRM: DDC responded, but no EDID for DP-1
[    7.835686] Console: switching to colour frame buffer device 240x67
[    7.869512] nouveau 0000:01:00.0: fb0: nouveaufb frame buffer device
[    7.906730] [drm] Initialized nouveau 1.3.1 20120801 for 0000:01:00.0 on minor 0
[    9.137286] nouveau 0000:01:00.0: DRM: DDC responded, but no EDID for DP-1
[   16.237674] nouveau 0000:01:00.0: DRM: DDC responded, but no EDID for DP-1


dmesg with the regression-inducing commit reverted:
[    7.893930] fb: switching to nouveaufb from VESA VGA
[    8.082202] Console: switching to colour dummy device 80x25
[    8.082527] nouveau 0000:01:00.0: NVIDIA GM204 (124000a1)
[    8.104913] fuse init (API version 7.26)
[    8.105261] intel_rapl: Found RAPL domain package
[    8.105265] intel_rapl: Found RAPL domain core
[    8.105267] intel_rapl: Found RAPL domain dram
[    8.166362] nouveau 0000:01:00.0: bios: version 84.04.2f.00.4b
[    8.168851] nouveau 0000:01:00.0: fb: 4096 MiB GDDR5
[    8.168875] nouveau 0000:01:00.0: bus: MMIO read of 00000000 FAULT at 022554 [ IBUS ]
[    8.227132] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: data=ordered
[    8.231196] [TTM] Zone  kernel: Available graphics memory: 8185088 kiB
[    8.231199] [TTM] Zone   dma32: Available graphics memory: 2097152 kiB
[    8.231201] [TTM] Initializing pool allocator
[    8.231204] [TTM] Initializing DMA pool allocator
[    8.231213] nouveau 0000:01:00.0: DRM: VRAM: 4096 MiB
[    8.231215] nouveau 0000:01:00.0: DRM: GART: 1048576 MiB
[    8.231218] nouveau 0000:01:00.0: DRM: TMDS table version 2.0
[    8.231219] nouveau 0000:01:00.0: DRM: DCB version 4.1
[    8.231221] nouveau 0000:01:00.0: DRM: DCB outp 00: 01000f02 00020030
[    8.231223] nouveau 0000:01:00.0: DRM: DCB outp 01: 02000f00 00000000
[    8.231225] nouveau 0000:01:00.0: DRM: DCB outp 02: 04811f96 04400020
[    8.231227] nouveau 0000:01:00.0: DRM: DCB outp 03: 04011f92 00020020
[    8.231229] nouveau 0000:01:00.0: DRM: DCB outp 04: 02822f76 04400020
[    8.231231] nouveau 0000:01:00.0: DRM: DCB outp 05: 02022f72 00020020
[    8.231232] nouveau 0000:01:00.0: DRM: DCB outp 06: 02033f62 00020010
[    8.231234] nouveau 0000:01:00.0: DRM: DCB outp 07: 04844f86 04400010
[    8.231236] nouveau 0000:01:00.0: DRM: DCB outp 08: 04044f82 00020010
[    8.231238] nouveau 0000:01:00.0: DRM: DCB outp 15: 01df6ff8 00000000
[    8.231239] nouveau 0000:01:00.0: DRM: DCB conn 00: 00001030
[    8.231241] nouveau 0000:01:00.0: DRM: DCB conn 01: 02000146
[    8.231243] nouveau 0000:01:00.0: DRM: DCB conn 02: 00020246
[    8.231244] nouveau 0000:01:00.0: DRM: DCB conn 03: 00010361
[    8.231246] nouveau 0000:01:00.0: DRM: DCB conn 04: 01000446
[    8.231247] nouveau 0000:01:00.0: DRM: DCB conn 06: 00000670
[    8.272499] nouveau 0000:01:00.0: DRM: failed to create encoder 1/8/0: -19
[    8.272507] nouveau 0000:01:00.0: DRM: Virtual-1 has no encoders, removing
[    8.272552] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    8.272557] [drm] Driver supports precise vblank timestamp query.
[    8.371715] nouveau 0000:01:00.0: DRM: MM: using COPY for buffer copies
[    8.550449] input: HDA NVidia HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input19
[    8.550480] input: HDA NVidia HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input20
[    8.550506] input: HDA NVidia HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input21
[    8.550531] input: HDA NVidia HDMI/DP,pcm=9 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input22
[    8.655960] nouveau 0000:01:00.0: DRM: allocated 2560x1440 fb: 0x80000, bo         (ptrval)
[    8.656719] fbcon: nouveaufb (fb0) is primary device
[    8.912908] Console: switching to colour frame buffer device 240x67
[    9.130400] nouveau 0000:01:00.0: fb0: nouveaufb frame buffer device
[    9.160063] [drm] Initialized nouveau 1.3.1 20120801 for 0000:01:00.0 on minor 0

Full dmesg captures are available at https://gist.github.com/aswild/d8fe1b9700c60452b4c9ea79b419d4ee
Comment 7 Ilia Mirkin 2018-05-08 18:23:29 UTC
Just something I noticed... does this help? (Obviously without a revert applied.)

diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/gm200.c b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/gm200.c
index a23c5f315221..ff94c6cb9a29 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/gm200.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/gm200.c
@@ -26,7 +26,7 @@
 
 static const struct nvkm_i2c_func
 gm200_i2c = {
-       .pad_x_new = gf119_i2c_pad_x_new,
+       .pad_x_new = gm200_i2c_pad_x_new,
        .pad_s_new = gm200_i2c_pad_s_new,
        .aux = 8,
        .aux_stat = gk104_aux_stat,
Comment 8 Allen Wild 2018-05-12 17:32:45 UTC
(In reply to Ilia Mirkin from comment #7)

Hi Ilia,
I tried that change on a clean 4.17-rc4 kernel but it had no effect for me; identical nouveau prints in dmesg as before.

Thanks,
Allen
Comment 9 GitLab Migration User 2019-09-18 20:45:54 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/1141.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.