Bug 94766 - [DP] Segfault and other crashes on Intel(R) HD Graphics 5500 (Dell E7450) while switching between external displays and integreated
Summary: [DP] Segfault and other crashes on Intel(R) HD Graphics 5500 (Dell E7450) whi...
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium major
Assignee: Intel GFX Bugs mailing list
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-31 07:37 UTC by Slawomir Gonet
Modified: 2017-06-29 18:22 UTC (History)
1 user (show)

See Also:
i915 platform: BDW
i915 features: display/DP, display/DP MST, display/eDP


Attachments
Previous boot dmesg: journalctl -k -b -1 (273.78 KB, text/plain)
2016-03-31 07:37 UTC, Slawomir Gonet
no flags Details
X.0.log.old with segfault (45.21 KB, text/plain)
2016-03-31 07:38 UTC, Slawomir Gonet
no flags Details
System log from last boot: sudo journalctl -xb -1 (604.26 KB, text/plain)
2016-03-31 08:03 UTC, Slawomir Gonet
no flags Details
for case 1: All screens black after connecting into docking station (7.02 KB, text/plain)
2016-04-30 07:10 UTC, Slawomir Gonet
no flags Details
Kernel config (Linux odyssey 4.5.2 #6 SMP Tue Apr 26 12:45:00 CEST 2016 x86_64 Intel(R) Core(TM) i5-5300U CPU @ 2.30GHz GenuineIntel GNU/Linux) (105.55 KB, text/plain)
2016-04-30 07:11 UTC, Slawomir Gonet
no flags Details

Description Slawomir Gonet 2016-03-31 07:37:27 UTC
Created attachment 122642 [details]
Previous boot dmesg: journalctl -k -b -1

This happens randomly - I have no 100% reproducible way of doing this. I am suffering random problems when docking/undocking with (and simple script reacting on udev changes to execute specific xrandr commands, just --output --left-of and like that).

There've been actually three issues:
1) All displays black after docked or undock (this was last reproduced on kernel 4.4.5, not testing 4.4.6 and following issues 2 and 3 were already reproduced)
   Original bug report: https://bugzilla.kernel.org/show_bug.cgi?id=115511
   Copy'n'paste:
   * Facts
   ** Video freezes from time to time (randomly) after Dell E7450 being plugged into docking station with two external FHD displays attached (DP1-1 and DP1-2 in xrandr).
   ** I've got background shell script running which detects udev change and calls xrandr to enable two external displays - so this issue might happend after xrandr command or after plug-event itself (not really able to verify, it will be difficult to work without it running)
   ** I was hitting shutdown button after crash, so there might be shutdown-related events in log (at the end, I've hold it until system halted)
   * Guesses
   ** According to LEDs (not tested with SSH yet)  system is responding normally after video freeze - disk LED blinks from time to time.
   ** One of external monitors might be already reading „empty signal” (if I understand correctly, it is no longer reporting that there is no signal, but instead it acts like there is perfectly black image displayed)
   * Attachments
   ** dmesg log from the crashed boot.

2) Laptop plugged out of docking station become unresponsive
   * Black screen
   * Unable to shutdown with short-powerbutton-press (what normally works).
   * Had to hold power button for hard shutdown.
   * Unfortunately, no logfile here.

3) Segfault when plugging into docking station
   * Plugged into docking station, saw login manager screen on external displays (X crashed and restarted into SLIM)
   * Xorg.0.log attached


Some specs:

[otwieracz@odyssey:~]$ uname -a
Linux odyssey 4.4.6 #1-NixOS SMP Wed Mar 16 15:43:17 UTC 2016 x86_64 GNU/Linux

[otwieracz@odyssey:~]$ X -version

X.Org X Server 1.17.4
Release Date: 2015-10-28
X Protocol Version 11, Revision 0
Build Operating System: Linux 3.14.54 x86_64 
Current Operating System: Linux odyssey 4.4.6 #1-NixOS SMP Wed Mar 16 15:43:17 UTC 2016 x86_64
Kernel command line: initrd=\efi\nixos\zzdi7fgmpik03vpl9l6699q1ggdgj7hr-initrd-initrd.efi systemConfig=/nix/store/f6abzlbdj2i5j2lv631wpd109n8bn996-nixos-system-odyssey-16.09.git.32b7b00 init=/nix/store/f6abzlbdj2i5j2lv631wpd109n8bn996-nixos-system-odyssey-16.09.git.32b7b00/init loglevel=4
Build Date: 24 March 2016  05:38:17PM
 
Current version of pixman: 0.34.0
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Comment 1 Slawomir Gonet 2016-03-31 07:38:07 UTC
Created attachment 122643 [details]
X.0.log.old with segfault
Comment 2 Slawomir Gonet 2016-03-31 07:57:20 UTC
Case 1 reproduced on kernel 4.4.6.

* Happened while I had SSH connection active
* System was responsible (by SSH)
* After dockin, state exactly as described in 1
* Tryied to run DISPLAY=:0 xrandr - command hangs up with no output (but ^C works)
Comment 3 Slawomir Gonet 2016-03-31 08:03:58 UTC
Created attachment 122644 [details]
System log from last boot: sudo journalctl -xb -1

Mar 31 09:41:37 odyssey myxrandr2-start[2040]: dock detected
Mar 31 09:41:37 odyssey myxrandr2[8472]: called. using ports: DP1-1 DP1-2

means that it will call:
xrandr --output DP1-1 --auto
xrandr --output DP1-2 --auto --left-of DP1-1 --primary
xrandr --output eDP1 --off
xrandr --output DP-1 --off
xrandr --output DP1-3 --off
xrandr --output DP2 --off
xrandr --output HDMI1 --off
xrandr --output HDMI2 --off
xrandr --output VIRTUAL1 --off
Comment 4 Slawomir Gonet 2016-03-31 08:04:51 UTC
xrandr output while in dock:

Screen 0: minimum 8 x 8, current 3840 x 1080, maximum 32767 x 32767
eDP1 connected (normal left inverted right x axis y axis)
   1920x1080     60.00 +  48.00  
   1400x1050     59.98  
   1600x900      60.00  
   1280x1024     60.02  
   1280x960      60.00  
   1368x768      60.00  
   1280x720      60.00  
   1024x768      60.00  
   1024x576      60.00  
   960x540       60.00  
   800x600       60.32    56.25  
   864x486       60.00  
   640x480       59.94  
   720x405       60.00  
   640x360       60.00  
DP1 disconnected (normal left inverted right x axis y axis)
DP1-1 connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 531mm x 299mm
   1920x1080     60.00*+
   1680x1050     59.88  
   1600x900      60.00  
   1280x1024     75.02    60.02  
   1280x960      60.00  
   1152x864      75.00  
   1280x720      60.00  
   1152x720      59.97  
   1024x768      75.08    60.00  
   832x624       74.55  
   800x600       75.00    60.32  
   640x480       75.00    60.00  
   720x400       70.08  
DP1-2 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 531mm x 299mm
   1920x1080     60.00*+  60.00    50.00    59.94  
   1680x1050     59.88  
   1600x900      60.00  
   1280x1024     75.02    60.02  
   1280x960      60.00  
   1152x864      75.00  
   1280x720      60.00    50.00    59.94  
   1152x720      59.97  
   1024x768      75.08    60.00  
   832x624       74.55  
   800x600       75.00    60.32  
   720x576       50.00  
   720x480       60.00    59.94  
   640x480       75.00    60.00    59.94  
   720x400       70.08  
DP1-3 disconnected (normal left inverted right x axis y axis)
DP2 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
HDMI2 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)
Comment 5 Slawomir Gonet 2016-04-03 15:32:38 UTC
bump?
Comment 6 Slawomir Gonet 2016-04-30 07:10:16 UTC
Created attachment 123361 [details]
for case 1: All screens black after connecting into docking station

Linux odyssey 4.5.2 #6 SMP Tue Apr 26 12:45:00 CEST 2016 x86_64 Intel(R) Core(TM) i5-5300U CPU @ 2.30GHz GenuineIntel GNU/Linux

Brand new Gentoo installation, problem still persists.
Comment 7 Slawomir Gonet 2016-04-30 07:11:04 UTC
Created attachment 123362 [details]
Kernel config (Linux odyssey 4.5.2 #6 SMP Tue Apr 26 12:45:00 CEST 2016 x86_64 Intel(R) Core(TM) i5-5300U CPU @ 2.30GHz GenuineIntel GNU/Linux)
Comment 8 Jani Nikula 2016-05-02 08:18:05 UTC
DP MST has been getting better all the time, but it's not perfect yet. Please try v4.6-rc6, drm-intel-nightly branch of http://cgit.freedesktop.org/drm-intel, and/or https://patchwork.freedesktop.org/patch/84111/ on top.

Please run with drm.debug=14 module parameter set when attaching dmesgs.
Comment 9 Slawomir Gonet 2016-05-02 08:29:56 UTC
Will try, thank you!
Comment 10 Slawomir Gonet 2016-05-06 05:41:18 UTC
I am testing git-sources 4.6-rc6 now (without patches):
$ eix git-sources -c
[I] sys-kernel/git-sources (4.6_rc6(4.6_rc6)@05/05/2016): The very latest -git version of the Linux kernel

And after plugging back into dock station few minutes ago I've got image on only one display. In dmesg:
[30395.435686] [drm:intel_mst_disable_dp] *ERROR* failed to update payload -22
[30397.855938] [drm:intel_mst_disable_dp] *ERROR* failed to update payload -22
[30602.873944] [drm:intel_mst_disable_dp] *ERROR* failed to update payload -22
[30605.136058] [drm:intel_mst_disable_dp] *ERROR* failed to update payload -22
[30647.465280] [drm:intel_mst_disable_dp] *ERROR* failed to update payload -22

xrandr:
$ xrandr
Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767
eDP1 connected (normal left inverted right x axis y axis)
   1920x1080     60.00 +  48.00  
   1400x1050     59.98  
   1280x1024     60.02  
   1280x960      60.00  
   1024x768      60.00  
   800x600       60.32    56.25  
   640x480       59.94  
DP1 disconnected (normal left inverted right x axis y axis)
DP1-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 531mm x 299mm
   1920x1080     60.00*+
   1680x1050     59.88  
   1600x900      60.00  
   1280x1024     75.02    60.02  
   1280x960      60.00  
   1152x864      75.00  
   1280x720      60.00  
   1152x720      59.97  
   1024x768      75.03    60.00  
   832x624       74.55  
   800x600       75.00    60.32  
   640x480       75.00    59.94  
   720x400       70.08  
DP1-2 connected (normal left inverted right x axis y axis)
   1920x1080     60.00 +  60.00    50.00    59.94  
   1680x1050     59.88  
   1600x900      60.00  
   1280x1024     75.02    60.02  
   1280x960      60.00  
   1152x864      75.00  
   1280x720      60.00    50.00    59.94  
   1152x720      59.97  
   1024x768      75.03    60.00  
   832x624       74.55  
   800x600       75.00    60.32  
   720x576       50.00  
   720x480       60.00    59.94  
   640x480       75.00    60.00    59.94  
   720x400       70.08  
DP1-3 disconnected (normal left inverted right x axis y axis)
DP2 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
HDMI2 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)

And when try to use xrandr:
otwieracz@odyssey ~ $ xrandr --output DP1-1 --auto --primary
# Here is OK
otwieracz@odyssey ~ $ xrandr --output DP1-2 --auto --left-of DP1-1
xrandr: Configure crtc 0 failed
# And now *right* screen goes off for few seconds, then comes back again and I see this error message with crtc.
Comment 11 Slawomir Gonet 2016-05-18 06:21:05 UTC
After upgrade to Linux odyssey 4.6.0 #1 SMP Mon May 16 09:22:36 CEST 2016 x86_64 Intel(R) Core(TM) i5-5300U CPU @ 2.30GHz GenuineIntel GNU/Linux at least currently every docking attempt ended like that - I am not able to put video onto left screen (DP1-2).
Comment 12 Slawomir Gonet 2016-05-18 07:00:18 UTC
Seems that after restarting X.org I am able to continue using DP1-2.
Comment 13 Slawomir Gonet 2016-05-18 22:03:50 UTC
After few more tests it looks like every single docking attempt on 4.6.0 ends up with inability to use DP1-2. When on DP1-1, $ xrandr --output DP1-2 --auto returns "xrandr: Configure crtc 0 failed"

However, with command:
xrandr --output DP1-1 --off; sleep 2; xrandr --output DP1-2 --auto

I am able to switch to DP1-2. But then I am no longer able to use DP1-1:

$ xrandr --output DP1-1 --off; sleep 2; xrandr --output DP1-2 --auto; xrandr --output DP1-1 --auto
xrandr: Configure crtc 0 failed
Comment 14 Slawomir Gonet 2016-05-18 22:07:20 UTC
One more update:

I've just discovered that I am able to get screen on both monitors with:
    xrandr --output DP1-1 --auto --primary --crtc 1
    xrandr --output DP1-2 --auto --left-of DP1-1 --crtc 2

So manually specifying CRTCs workarounds the issue.
Comment 15 Elizabeth 2017-06-28 20:34:37 UTC
Hello Slawomir,
Is this bug still valid? Still reproducible? Have you changed any configuration on HW and SW? Thank you.
Comment 16 Ricardo Madrigal 2017-06-29 17:23:20 UTC
Hello,

I just tried to reproduce the problem with following configuration:

BDW NUC, using two MST dongle emulating docking station and 2 external monitors,connected via DP with external Display (Asus) 1920 x 1080.

Attaching a Dell display vi DP (1920x 1080). 

Adding the configuration used to test


======================================
             Software
======================================
kernel version              : 4.12.0-rc3-drm-tip-ww22-commit-187376e+
architecture                : x86_64
os version                  : Ubuntu 17.04
os codename                 : zesty
kernel driver               : i915
bios revision               : 5.6
bios release date           : 05/11/2017

======================================
        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                   : BDW
motherboard id             : NUC5i7RYB
form factor                : Desktop
cpu family                 : Core i7
cpu family id              : 6
cpu information            : Intel(R) Core(TM) i7-5557U CPU @ 3.10GHz
gpu card                   : Intel Corporation Iris Graphics 6100 (rev 09) (prog-if 00 [VGA controller])
memory ram                 : 15.58 GB
max memory ram             : 16 GB
cpu thread                 : 4
cpu core                   : 2
cpu model                  : 61
cpu stepping               : 4
socket                     : Socket BGA1168
signature                  : Type 0, Family 6, Model 61, Stepping 4
hard drive                 : 111GiB (120GB)
current cd clock frequency : 540000 kHz
maximum cd clock frequency : 540000 kHz


Works for me.


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.