Bug 94479

Summary: [SKL] i915 external Displays flicker / turn black
Product: DRI Reporter: thoehlig
Component: DRM/IntelAssignee: Ricardo Madrigal <ricardox.madrigal.maldonado>
Status: CLOSED FIXED QA Contact: Intel GFX Bugs mailing list <intel-gfx-bugs>
Severity: normal    
Priority: medium CC: andres, freedesktop-bugs, intel-gfx-bugs, languitar, patrick.holthaus
Version: XOrg git   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: BDW i915 features: display/eDP, display/HDMI
Attachments:
Description Flags
xrandr.log and dmesg.log
none
dmesg
none
dmesg output
none
xrandr --verbose
none
dmesg.log none

Description thoehlig 2016-03-10 15:24:16 UTC
Hi,
I recently got a new notebook and I have the problem, that the external displays attached via HDMI / DP (via e-dock) flicker or turn black and loose signal.
Normaly after around 3 seconds both external Displays turn back to normal. (Only the external displays)
We have several notebooks sharing this problem, all with the same hardware and always the same setup:

3 Displays 2x external via DP / HDMI 1920x1080 + E7450 build in with 1920x1080.

With the default ubuntu kernel 4.2.0.30-generic I got the dmesg message:
[drm:gen8_irq_handler [i915]] *ERROR* The master control interrupt lied (SDE)!

I tested a newer Kernel (see below), the error messages dissapeared but the display problems are still present.

There is a corresponding bug report @ ubuntu launchpad https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1488719 and
here https://bugs.freedesktop.org/show_bug.cgi?id=92084.
There are 2 more launchpad user who encountered exactly the same behaviour.


uname -m x86_64
uname -r 4.5.0-040500rc7-generic
Distro: Ubuntu 14.04
Machine: E7450 Dell Latitude
Display connector: 2x HDMI / DP via eport + internal Display
lspci: 
00:02.0 VGA compatible controller: Intel Corporation Broadwell-U Integrated Graphics (rev 09) (prog-if 00 [VGA controller])
 Subsystem: Dell Device 062e
 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
 Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
 Latency: 0
 Interrupt: pin A routed to IRQ 51
 Region 0: Memory at f5000000 (64-bit, non-prefetchable) [size=16M]
 Region 2: Memory at d0000000 (64-bit, prefetchable) [size=256M]
 Region 4: I/O ports at f000 [size=64]
 Expansion ROM at <unassigned> [disabled]
 Capabilities: [90] MSI: Enable+ Count=1/1 Maskable- 64bit-
  Address: fee00018 Data: 0000
 Capabilities: [d0] Power Management version 2
  Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
  Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
 Capabilities: [a4] PCI Advanced Features
  AFCap: TP+ FLR+
  AFCtrl: FLR-
  AFStatus: TP-
 Kernel driver in use: i915

in addition we have a:
03:00.0 3D controller: NVIDIA Corporation GM108M [GeForce 840M]
but its not in use.

modinfo i915
filename: /lib/modules/4.5.0-040500rc7-generic/kernel/drivers/gpu/drm/i915/i915.ko
license: GPL and additional rights
description: Intel Graphics
author: Intel Corporation
author: Tungsten Graphics, Inc.
firmware: i915/bxt_dmc_ver1.bin
firmware: i915/skl_dmc_ver1.bin
firmware: i915/skl_guc_ver4.bin
srcversion: A8C37B25F49F03AE77E49D0

cat /sys/class/drm/card0/error 
no error state collected

dmesg with drm.debug=0x1e log_buf_len=1M as attachment.
The dmesg output ends after screens returned to normal. I didnt change the screen, tabbed to terminal and cat dmesg > file.

xrandr --verbose as attachment too.

If you need more informations, please let me know.
Thank you in advance
Comment 1 thoehlig 2016-03-10 15:25:00 UTC
Created attachment 122207 [details]
xrandr.log and dmesg.log
Comment 2 thoehlig 2016-03-11 12:41:16 UTC
Hi, 

a short video from today right after both external monitors turned black and the right external monitor recovered. (left one is flickering)

http://sendvid.com/3je13ek0
Comment 3 languitar 2016-10-27 10:55:26 UTC
I am also seeing this for displays connected via display port on the external dock of the laptop.
Comment 4 languitar 2016-10-27 10:55:59 UTC
This happens on:
Linux jaco 4.8.4-1-ARCH #1 SMP PREEMPT Sat Oct 22 18:26:57 CEST 2016 x86_64 GNU/Linux
Comment 5 Patrick Holthaus 2016-10-31 16:43:05 UTC
Created attachment 127643 [details]
dmesg

dmesg output
Comment 6 Patrick Holthaus 2016-10-31 16:46:30 UTC
Apparently, I have the same issue on this machine:

Linux raynor 4.8.4-gentoo #1 SMP Mon Oct 24 18:47:02 CEST 2016 x86_64 Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz GenuineIntel GNU/Linux

I have the following xf86 intel and firmware packages installed:

* x11-drivers/xf86-video-intel-2.99.917_p20161024
  (with USE="dri sna udev uxa -debug -dri3 -xvmc")
* sys-kernel/linux-firmware-20160628
Comment 7 zuul 2016-11-02 13:57:00 UTC
I also have this issue on my Dell Latitude E5470. I use a docking station with 2 external screens connected via DP (both at 1920x1200). The issue mainly happens on and when the mouse leaves a screen.

$ uname -a
Linux naysayer 4.8.4-1-ARCH #1 SMP PREEMPT Sat Oct 22 18:26:57 CEST 2016 x86_64 GNU/Linux

$ lspci
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 530 (rev 06)
Comment 8 zuul 2016-11-02 13:58:04 UTC
Created attachment 127688 [details]
dmesg output
Comment 9 zuul 2016-11-02 13:58:35 UTC
Created attachment 127689 [details]
xrandr --verbose
Comment 10 Elio 2017-03-06 17:17:02 UTC
(In reply to zuul from comment #9)
> Created attachment 127689 [details]
> xrandr --verbose

Hey, do you still facing the issue with latest configuration? I mean Kernel 4.10?
Comment 11 Elio 2017-03-06 21:23:04 UTC
I will try to reproduce this issue here, i'm thinking that this problem could be related to MST configuration. I will use an dongle in order to emulate your DS. Dongle + latest kernel (4.10.0). Hopefully the problem is gone since a lot of patches for DP MST were merged.
Comment 12 Elio 2017-03-07 21:23:02 UTC
I was trying with a NuC6i7KYK with following configuration:
Kernel: 4.10 latest
Ubuntu 16.10
2 external display through DP dongle, it seems that the problem is realated with the time-stamps from the scaninng output. I was able to reproduce your issue using a 4k monitor + a 1080p. I got the flickering everytime that i want to reach 38340 x2160 at 30 Hz. 

fault_clear [drm]] Clearing atomic state ffff95869db1f400
[ 1767.532589] [drm:__drm_atomic_state_free [drm]] Freeing atomic state ffff95869db1f400
[ 1767.536468] [drm:drm_calc_vbltimestamp_from_scanoutpos [drm]] crtc 1 : v 0x7 p(0,-52)@ 1767.500919 -> 1767.501309 [e 0 us, 0 rep]
[ 1767.536491] [drm:drm_update_vblank_count [drm]] updating vblank count on crtc 1: current=89151, diff=1, hw=41401 hw_last=41400
[ 1767.536587] [drm:drm_calc_vbltimestamp_from_scanoutpos [drm]] crtc 1 : v 0x7 p(0,-36)@ 1767.501035 -> 1767.501305 [e 0 us, 0 rep]
[ 1767.536617] [drm:drm_update_vblank_count [drm]] updating vblank count on crtc 1: current=89152, diff=0, hw=41401 hw_last=41401
[ 1767.536661] [drm:drm_atomic_state_default_clear [drm]] Clearing atomic state ffff95869db1bc00
[ 1767.536698] [drm:__drm_atomic_state_free [drm]] Freeing atomic state ffff95869db1bc00
[ 1768.513565] [drm:drm_calc_vbltimestamp_from_scanoutpos [drm]] crtc 1 : v 0x5 p(0,1334)@ 1768.478032 -> 1768.468025 [e 0 us, 0 rep]
[ 1768.513574] [drm:drm_update_vblank_count [drm]] updating vblank count on crtc 1: current=89152, diff=58, hw=41459 hw_last=41401
[ 1768.513583] [drm:drm_calc_vbltimestamp_from_scanoutpos [drm]] crtc 1 : v 0x5 p(0,1337)@ 1768.478059 -> 1768.468030 [e 0 us, 0 rep]
[ 1768.513591] [drm:drm_update_vblank_count [drm]] updating vblank count on crtc 1: current=89210, diff=0, hw=41459 hw_last=41459
[ 1768.513629] [drm:drm_atomic_state_init [drm]] Allocated atomic state ffff95869db19800
[ 1768.513640] [drm:drm_atomic_get_crtc_state [drm]] Added [CRTC:31:pipe A] ffff9586a5864000 state to ffff95869db19800
[ 1768.513649] [drm:drm_atomic_get_plane_state [drm]] Added [PLANE:25:plane 1A] ffff9586a5bce480 state to ffff95869db19800
[ 1768.513656] [drm:drm_atomic_set_crtc_for_plane [drm]] Link plane state ffff9586a5bce480 to [CRTC:31:pipe A]
[ 1768.513664] [drm:drm_atomic_set_fb_for_plane [drm]] Set [FB:74] for plane state ffff9586a5bce480
[ 1768.513672] [drm:drm_atomic_check_only [drm]] checking ffff95869db19800
[ 1768.513708] [drm:intel_plane_atomic_calc_changes [i915]] [CRTC:31:pipe A] has [PLANE:25:plane 1A] with fb 74
[ 1768.513727] [drm:intel_plane_atomic_calc_changes [i915]] [PLANE:25:plane 1A] visible 1 -> 1, off 0, on 0, ms 0
[ 1768.513741] [drm:drm_atomic_nonblocking_commit [drm]] commiting ffff95869db19800 nonblocking
[ 1768.513763] [drm:drm_atomic_state_init [drm]] Allocated atomic state ffff95869db19c00
[ 1768.513772] [drm:drm_atomic_get_crtc_state [drm]] Added [CRTC:38:pipe B] ffff9586a5864800 state to ffff95869db19c00
[ 1768.513783] [drm:drm_atomic_get_plane_state [drm]] Added [PLANE:32:plane 1B] ffff9586a5bcea80 state to ffff95869db19c00
[ 1768.513793] [drm:drm_atomic_set_crtc_for_plane [drm]] Link plane state ffff9586a5bcea80 to [CRTC:38:pipe B]
[ 1768.513809] [drm:drm_atomic_set_fb_for_plane [drm]] Set [FB:74] for plane state ffff9586a5bcea80
[ 1768.513817] [drm:drm_atomic_check_only [drm]] checking ffff95869db19c00
[ 1768.513848] [drm:intel_plane_atomic_calc_changes [i915]] [CRTC:38:pipe B] has [PLANE:32:plane 1B] with fb 74
[ 1768.513868] [drm:intel_plane_atomic_calc_changes [i915]] [PLANE:32:plane 1B] visible 1 -> 1, off 0, on 0, ms 0
[ 1768.513884] [drm:drm_atomic_nonblocking_commit [drm]] commiting ffff95869db19c00 nonblocking
[ 1768.514707] [drm:drm_calc_vbltimestamp_from_scanoutpos [drm]] crtc 0 : v 0x5 p(0,1065)@ 1768.479173 -> 1768.464788 [e 0 us, 0 rep]
[ 1768.514717] [drm:drm_update_vblank_count [drm]] updating vblank count on crtc 0: current=109188, diff=58, hw=41501 hw_last=41443
[ 1768.514734] [drm:drm_calc_vbltimestamp_from_scanoutpos [drm]] crtc 1 : v 0x5 p(0,1490)@ 1768.479203 -> 1768.468026 [e 0 us, 0 rep]
[ 1768.514744] [drm:drm_update_vblank_count [drm]] updating vblank count on crtc 1: current=89210, diff=0, hw=41459 hw_last=41459
[ 1768.514755] [drm:drm_calc_vbltimestamp_from_scanoutpos [drm]] crtc 0 : v 0x5 p(0,1069)@ 1768.479229 -> 1768.464790 [e 0 us, 0 rep]
[ 1768.514763] [drm:drm_update_vblank_count [drm]] updating vblank count on crtc 0: current=109246, diff=0, hw=41501 hw_last=41501
[ 1768.514775] [drm:drm_calc_vbltimestamp_from_scanoutpos [drm]] crtc 1 : v 0x5 p(0,1496)@ 1768.479249 -> 1768.468027 [e 0 us, 0 rep]
[ 1768.514783] [drm:drm_update_vblank_count [drm]] updating vblank count on crtc 1: current=89210, diff=0, hw=41459 hw_last=41459
[ 1768.514794] [drm:drm_calc_vbltimestamp_from_scanoutpos [drm]] crtc 0 : v 0x5 p(0,1072)@ 1768.479269 -> 1768.464790 [e 0 us, 0 rep]
[ 1768.514802] [drm:drm_update_vblank_count [drm]] updating vblank count on crtc 0: current=109246, diff=0, hw=41501 hw_last=41501
[ 1768.514812] [drm:drm_calc_vbltimestamp_from_scanoutpos [drm]] crtc 1 : v 0x5 p(0,1501)@ 1768.479287 -> 1768.468027 [e 0 us, 0 rep]
[ 1768.514820] [drm:drm_update_vblank_count [drm]] updating vblank count on crtc 1: current=89210, diff=0, hw=41459 hw_last=41459
[ 1768.516557] [drm:drm_calc_vbltimestamp_from_scanoutpos [drm]] crtc 0 : v 0x7 p(0,-33)@ 1768.481025 -> 1768.481470 [e 0 us, 0 rep]
[ 1768.516568] [drm:drm_update_vblank_count [drm]] updating vblank count on crtc 0: current=109246, diff=1, hw=41502 hw_last=41501
[ 1768.516598] [drm:drm_calc_vbltimestamp_from_scanoutpos [drm]] crtc 0 : v 0x7 p(0,-29)@ 1768.481069 -> 1768.481461 [e 0 us, 0 rep]
[ 1768.516611] [drm:drm_update_vblank_count [drm]] updating vblank count on crtc 0: current=109247, diff=0, hw=41502 hw_last=41502
[ 1768.516636] [drm:drm_atomic_state_default_clear [drm]] Clearing atomic state ffff95869db19800
[ 1768.516653] [drm:__drm_atomic_state_free [drm]] Freeing atomic state ffff95869db19800
Comment 13 Ricardo 2017-07-28 14:35:16 UTC
ricardo can you please re-test this with recent configuration and update results
Comment 14 Ricardo Madrigal 2017-07-28 19:26:28 UTC
I just try to reproduce this issue, but I was not able to reproduce it, i am using a 4k monitor + 2 monitors 1080p. 

I used an MST in order to emulate the DS. MST + latest kernel + 2 external display through DP MST + 1 4K Monitor

This is my general configuration:

======================================
             Software
======================================
kernel version              : 4.13.0-rc2-drm-tip-ww30-commit-520e660+
architecture                : x86_64
os version                  : Ubuntu 17.04
os codename                 : zesty
kernel driver               : i915
bios revision               : 5.6
bios release date           : 09/29/2016

======================================
        Graphic drivers
======================================
mesa                      : 17.0.3
modesetting               : modesetting_drv.so
xorg-xserver              : 1.19.3
libdrm                    : 2.4.76
libva                     : 1.7.3-2
vaapi (intel-driver)      : 1.7.3
cairo                     : 1.14.8-1
intel-gpu-tools           : 1.17-1

======================================
             Hardware
======================================
platform                   : SKL Canyon
motherboard id             : NUC6i7KYB
form factor                : Desktop
cpu family                 : Core i7
cpu family id              : 6
cpu information            : Intel(R) Core(TM) i7-6770HQ CPU @ 2.60GHz
gpu card                   : Intel Corporation Iris Pro Graphics 580 (rev 09) (prog-if 00 [VGA controller])
memory ram                 : 31.31 GB
max memory ram             : 32 GB
display resolution         : 3840x1129
cpu thread                 : 8
cpu core                   : 4
cpu model                  : 94
cpu stepping               : 3
socket                     : Other
signature                  : Type 0, Family 6, Model 94, Stepping 3
hard drive                 : 223GiB (240GB)
current cd clock frequency : 540000 kHz
maximum cd clock frequency : 675000 kHz

Adding dmes.log
Comment 15 Ricardo Madrigal 2017-07-28 19:26:47 UTC
Created attachment 133107 [details]
dmesg.log

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.