Bug 103472 - VGA detection fails after the second try, i915 Intel HD400
Summary: VGA detection fails after the second try, i915 Intel HD400
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Intel GFX Bugs mailing list
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard: PatchSubmitted
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-26 18:02 UTC by Pablo
Modified: 2018-03-08 17:47 UTC (History)
1 user (show)

See Also:
i915 platform: BSW/CHT
i915 features: display/DP


Attachments
Before plugging in the VGA cable: full dmesg with drm.debug=0x1e log_buf_len=1M (321.29 KB, text/x-log)
2017-10-26 18:02 UTC, Pablo
no flags Details
Lines added to dmesg when the VGA cable is connected (67.93 KB, text/x-log)
2017-10-26 18:42 UTC, Pablo
no flags Details

Description Pablo 2017-10-26 18:02:36 UTC
Created attachment 135084 [details]
Before plugging in the VGA cable: full dmesg with drm.debug=0x1e log_buf_len=1M

System:    Host: nmr Kernel: 4.4.0-97-generic x86_64 (64 bit) Desktop: Gnome
           Distro: Ubuntu 16.04 xenial
Machine:   Mobo: N/A model: N/A v: 1.0 Bios: American Megatrends v: 5.11 date: 10/20/2016
CPU:       Dual core Intel Celeron N3060 (-MCP-) speed/max: 1762/2480 MHz
Graphics:  Card: Intel Device 22b1
           Display Server: X.Org 1.18.4 drivers: intel (unloaded: fbdev,vesa)
           Resolution: 1024x768@59.87hz
           GLX Renderer: Mesa DRI Intel HD Graphics 400 (Braswell)
           GLX Version: 3.0 Mesa 17.0.7
Network:   Card-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
           driver: r8169
           Card-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
           driver: r8169
           Card-3: Realtek RTL8821AE 802.11ac PCIe Wireless Network Adapter driver: rtl8821ae
Drives:    HDD Total Size: 64.0GB (12.0% used)
Info:      Processes: 174 Uptime: 42 min Memory: 592.3/7909.5MB
           Client: Shell (bash) inxi: 2.2.35

Display connector: VGA

The computer has a build-in LCD screen. The driver detects an external monitor connected through VGA but it fails to recognize it again if I unplug it and plug it back. The HDMI connection is never working (bug reported here: https://bugs.freedesktop.org/show_bug.cgi?id=103471).
Comment 1 Pablo 2017-10-26 18:42:38 UTC
Created attachment 135086 [details]
Lines added to dmesg when the VGA cable is connected
Comment 2 Pablo 2017-10-26 18:43:50 UTC
VGA cable is removed: dmesg lines added:

[  333.267261] [drm:intel_get_hpd_pins] hotplug event received, stat 0x00040000, dig 0x00040000, pins 0x00000020
[  333.267285] [drm:intel_hpd_irq_handler] digital hpd port B - long
[  333.267298] [drm:intel_hpd_irq_storm_detect] Received HPD interrupt on PIN 5 - cnt: 0
[  333.267389] [drm:intel_dp_hpd_pulse] got hpd irq on port B - long
[  333.268032] [drm:i915_hotplug_work_func] running encoder hotplug functions
[  333.268055] [drm:i915_hotplug_work_func] Connector DP-1 (pin 5) received hotplug event.
[  333.268068] [drm:intel_dp_detect] [CONNECTOR:40:DP-1]
[  333.268092] [drm:intel_hpd_irq_event] [CONNECTOR:40:DP-1] status updated from connected to disconnected
[  333.268104] [drm:i915_hotplug_work_func] Connector HDMI-A-1 (pin 5) received hotplug event.
[  333.268116] [drm:intel_hdmi_detect] [CONNECTOR:44:HDMI-A-1]
[  333.268389] [drm:gmbus_xfer] GMBUS [i915 gmbus dpb] NAK for addr: 0050 w(1)
[  333.268404] [drm:gmbus_xfer] GMBUS [i915 gmbus dpb] NAK on first message, retry
[  333.268678] [drm:gmbus_xfer] GMBUS [i915 gmbus dpb] NAK for addr: 0050 w(1)
[  333.268699] [drm:drm_do_probe_ddc_edid] drm: skipping non-existent adapter i915 gmbus dpb
[  333.398162] [drm:drm_mode_getresources] [CONNECTOR:47:eDP-1]
[  333.398168] [drm:drm_mode_getresources] [CONNECTOR:40:DP-1]
[  333.398171] [drm:drm_mode_getresources] [CONNECTOR:44:HDMI-A-1]
[  333.398173] [drm:drm_mode_getresources] [CONNECTOR:53:DP-2]
[  333.398175] [drm:drm_mode_getresources] [CONNECTOR:55:HDMI-A-2]
[  333.398178] [drm:drm_mode_getresources] CRTC[3] CONNECTORS[5] ENCODERS[5]
[  333.398183] [drm:drm_mode_getconnector] [CONNECTOR:47:?]
[  333.398189] [drm:drm_mode_getconnector] [CONNECTOR:40:?]
[  333.398195] [drm:drm_mode_getconnector] [CONNECTOR:53:?]
[  333.398198] [drm:drm_mode_getconnector] [CONNECTOR:44:?]
[  333.398202] [drm:drm_mode_getconnector] [CONNECTOR:55:?]
[  333.398217] [drm:drm_mode_getconnector] [CONNECTOR:47:?]
[  333.398442] [drm:drm_mode_getconnector] [CONNECTOR:40:?]
[  333.398447] [drm:drm_helper_probe_single_connector_modes_merge_bits] [CONNECTOR:40:DP-1]
[  333.398450] [drm:intel_dp_detect] [CONNECTOR:40:DP-1]
[  333.398459] [drm:drm_helper_probe_single_connector_modes_merge_bits] [CONNECTOR:40:DP-1] disconnected
[  333.401732] [drm:drm_mode_setcrtc] [CRTC:26]
[  333.401741] [drm:drm_atomic_state_init] Allocated atomic state ffff880270bb8000
[  333.401747] [drm:drm_atomic_get_crtc_state] Added [CRTC:26] ffff8802747c9800 state to ffff880270bb8000
[  333.401752] [drm:drm_atomic_get_plane_state] Added [PLANE:23] ffff8802739f4540 state to ffff880270bb8000
[  333.401755] [drm:drm_atomic_set_mode_for_crtc] Set [NOMODE] for CRTC state ffff8802747c9800
[  333.401758] [drm:drm_atomic_set_crtc_for_plane] Link plane state ffff8802739f4540 to [NOCRTC]
[  333.401760] [drm:drm_atomic_set_fb_for_plane] Set [NOFB] for plane state ffff8802739f4540
[  333.401763] [drm:drm_atomic_add_affected_connectors] Adding all current connectors for [CRTC:26] to ffff880270bb8000
[  333.401767] [drm:drm_atomic_get_connector_state] Added [CONNECTOR:40] ffff880270f47f80 state to ffff880270bb8000
[  333.401771] [drm:drm_atomic_set_crtc_for_connector] Link connector state ffff880270f47f80 to [NOCRTC]
[  333.401773] [drm:drm_atomic_check_only] checking ffff880270bb8000
[  333.401815] [drm:drm_atomic_helper_check_modeset] [CRTC:26] mode changed
[  333.401818] [drm:drm_atomic_helper_check_modeset] [CRTC:26] enable changed
[  333.401821] [drm:update_connector_routing] Updating routing for [CONNECTOR:40:DP-1]
[  333.401823] [drm:update_connector_routing] Disabling [CONNECTOR:40:DP-1]
[  333.401826] [drm:drm_atomic_helper_check_modeset] [CRTC:26] active changed
[  333.401828] [drm:drm_atomic_helper_check_modeset] [CRTC:26] needs all connectors, enable: n, active: n
[  333.401831] [drm:drm_atomic_add_affected_connectors] Adding all current connectors for [CRTC:26] to ffff880270bb8000
[  333.401839] [drm:drm_atomic_get_crtc_state] Added [CRTC:31] ffff8802747c9000 state to ffff880270bb8000
[  333.401843] [drm:drm_atomic_get_crtc_state] Added [CRTC:36] ffff8802747cbc00 state to ffff880270bb8000
[  333.401848] [drm:intel_plane_atomic_calc_changes] [CRTC:26] has [PLANE:23] with fb -1
[  333.401851] [drm:intel_plane_atomic_calc_changes] [PLANE:23] visible 1 -> 0, off 1, on 0, ms 1
[  333.401854] [drm:drm_atomic_commit] commiting ffff880270bb8000
[  333.401865] [drm:intel_set_memory_cxsr] memory self-refresh is disabled
[  333.412757] [drm:intel_set_memory_cxsr] memory self-refresh is disabled
[  333.429684] [drm:intel_dp_sink_dpms] failed to disable sink power state
[  333.429698] [drm:intel_disable_pipe] disabling pipe A
[  333.446479] [drm:intel_dp_link_down] 
[  333.466731] [drm:chv_phy_powergate_lanes] Power gating DPIO PHY0 CH0 lanes 0x0 (PHY_CONTROL=0x150607fd)
[  333.477139] [drm:vlv_pipe_set_fifo_size] Pipe A FIFO split 511 / 511 / 511
[  333.477152] [drm:vlv_update_wm] Setting FIFO watermarks - A: plane=0, cursor=0, sprite0=0, sprite1=0, SR: plane=1407, cursor=0 level=2 cxsr=1
[  333.477158] [drm:intel_set_memory_cxsr] memory self-refresh is enabled
[  333.487764] [drm:intel_connector_check_state] [CONNECTOR:40:DP-1]
[  333.487772] [drm:check_encoder_state] [ENCODER:39:TMDS-39]
[  333.487779] [drm:check_encoder_state] [ENCODER:43:TMDS-43]
[  333.487784] [drm:check_encoder_state] [ENCODER:46:TMDS-46]
[  333.487789] [drm:check_encoder_state] [ENCODER:52:TMDS-52]
[  333.487792] [drm:check_encoder_state] [ENCODER:54:TMDS-54]
[  333.487798] [drm:check_crtc_state] [CRTC:26]
[  333.487805] [drm:drm_atomic_state_default_clear] Clearing atomic state ffff880270bb8000
[  333.487812] [drm:drm_atomic_state_free] Freeing atomic state ffff880270bb8000
[  333.491570] [drm:drm_mode_addfb2] [FB:59]
[  333.501082] [drm:drm_mode_setcrtc] [CRTC:31]
[  333.501100] [drm:drm_mode_setcrtc] [CONNECTOR:47:eDP-1]
[  333.501109] [drm:drm_atomic_state_init] Allocated atomic state ffff88003564de00
[  333.501116] [drm:drm_atomic_get_crtc_state] Added [CRTC:31] ffff8802729e7800 state to ffff88003564de00
[  333.501121] [drm:drm_atomic_get_plane_state] Added [PLANE:29] ffff88027613e840 state to ffff88003564de00
[  333.501128] [drm:drm_atomic_set_mode_for_crtc] Set [MODE:] for CRTC state ffff8802729e7800
[  333.501131] [drm:drm_atomic_set_crtc_for_plane] Link plane state ffff88027613e840 to [CRTC:31]
[  333.501134] [drm:drm_atomic_set_fb_for_plane] Set [FB:59] for plane state ffff88027613e840
[  333.501139] [drm:drm_atomic_get_connector_state] Added [CONNECTOR:47] ffff880270f47ca0 state to ffff88003564de00
[  333.501142] [drm:drm_atomic_add_affected_connectors] Adding all current connectors for [CRTC:31] to ffff88003564de00
[  333.501147] [drm:drm_atomic_set_crtc_for_connector] Link connector state ffff880270f47ca0 to [NOCRTC]
[  333.501149] [drm:drm_atomic_set_crtc_for_connector] Link connector state ffff880270f47ca0 to [CRTC:31]
[  333.501152] [drm:drm_atomic_check_only] checking ffff88003564de00
[  333.501158] [drm:update_connector_routing] Updating routing for [CONNECTOR:47:eDP-1]
[  333.501162] [drm:update_connector_routing] [CONNECTOR:47:eDP-1] keeps [ENCODER:46:TMDS-46], now on [CRTC:31]
[  333.501173] [drm:intel_plane_atomic_calc_changes] [CRTC:31] has [PLANE:29] with fb 59
[  333.501175] [drm:intel_plane_atomic_calc_changes] [PLANE:29] visible 1 -> 1, off 0, on 0, ms 0
[  333.501180] [drm:drm_atomic_commit] commiting ffff88003564de00
[  333.511745] [drm:drm_atomic_state_default_clear] Clearing atomic state ffff88003564de00
[  333.511756] [drm:drm_atomic_state_free] Freeing atomic state ffff88003564de00
[  333.598776] [drm:drm_atomic_state_init] Allocated atomic state ffff88006f495600
[  333.598788] [drm:drm_atomic_get_plane_state] Added [PLANE:30] ffff8802756c0240 state to ffff88006f495600
[  333.598793] [drm:drm_atomic_get_crtc_state] Added [CRTC:31] ffff8802729e5800 state to ffff88006f495600
[  333.598796] [drm:drm_atomic_set_crtc_for_plane] Link plane state ffff8802756c0240 to [CRTC:31]
[  333.598798] [drm:drm_atomic_set_fb_for_plane] Set [FB:57] for plane state ffff8802756c0240
[  333.598801] [drm:drm_atomic_check_only] checking ffff88006f495600
[  333.598810] [drm:intel_plane_atomic_calc_changes] [CRTC:31] has [PLANE:30] with fb 57
[  333.598813] [drm:intel_plane_atomic_calc_changes] [PLANE:30] visible 0 -> 1, off 0, on 1, ms 0
[  333.598816] [drm:drm_atomic_commit] commiting ffff88006f495600
[  333.598839] [drm:vlv_pipe_set_fifo_size] Pipe B FIFO split 511 / 511 / 511
[  333.598849] [drm:vlv_update_wm] Setting FIFO watermarks - B: plane=383, cursor=0, sprite0=0, sprite1=0, SR: plane=1407, cursor=0 level=2 cxsr=1
[  333.598880] [drm:drm_atomic_state_default_clear] Clearing atomic state ffff88006f495600
[  333.598894] [drm:drm_atomic_state_free] Freeing atomic state ffff88006f495600
[  333.633405] [drm:drm_mode_getconnector] [CONNECTOR:47:?]
[  333.634791] [drm:drm_mode_getconnector] [CONNECTOR:47:?]
[  333.635090] [drm:drm_mode_getconnector] [CONNECTOR:47:?]
[  333.635346] [drm:drm_mode_getconnector] [CONNECTOR:47:?]
[  333.635668] [drm:drm_mode_getconnector] [CONNECTOR:47:?]
[  333.635963] [drm:drm_mode_getconnector] [CONNECTOR:47:?]
[  333.636657] [drm:drm_mode_getconnector] [CONNECTOR:47:?]
[  333.643761] [drm:drm_mode_getconnector] [CONNECTOR:47:?]
[  333.644106] [drm:drm_mode_getconnector] [CONNECTOR:47:?]
Comment 3 Pablo 2017-10-26 18:47:09 UTC
No lines are added to dmesg when the cable is reconnected back. No detection is done.

xrandr -q when the cable is connected the first time:
Screen 0: minimum 8 x 8, current 2944 x 1080, maximum 32767 x 32767
eDP1 connected primary 1024x768+0+0 (normal left inverted right x axis y axis) 518mm x 333mm
   1024x768      59.87*+
   800x600       60.32    56.25  
   640x480       59.94  
   512x384       60.00  
DP1 connected 1920x1080+1024+0 (normal left inverted right x axis y axis) 531mm x 298mm
   1920x1080     60.00*+
   1680x1050     59.95  
   1600x900      60.00  
   1280x1024     75.02    60.02  
   1280x800      59.81  
   1152x864      75.00  
   1280x720      60.00  
   1024x768      75.08    60.00  
   832x624       74.55  
   800x600       75.00    60.32  
   640x480       75.00    60.00  
   720x400       70.08  
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)


xrandr -q when the cable is connected the second time:


Screen 0: minimum 8 x 8, current 1024 x 768, maximum 32767 x 32767
eDP1 connected primary 1024x768+0+0 (normal left inverted right x axis y axis) 518mm x 333mm
   1024x768      59.87*+
   800x600       60.32    56.25
   640x480       59.94
   512x384       60.00
DP1 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 4 Ville Syrjala 2017-10-26 19:44:44 UTC
https://patchwork.freedesktop.org/patch/184991/ should fix this, me thinks.
Comment 5 Pablo 2017-10-31 15:12:02 UTC
I applied the patch, recompiled the kernel and tested it. The fix works. Confirmed. Thanks again.
Comment 6 Ville Syrjala 2018-02-02 15:36:37 UTC
(In reply to Pablo from comment #5)
> I applied the patch, recompiled the kernel and tested it. The fix works.
> Confirmed. Thanks again.

Marking as fixed.

commit 857c416e58dc306b15b7919117b6225544662bfa
Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
Date:   Fri Oct 27 12:45:23 2017 +0300

    drm/i915: Improve DP downstream HPD handling


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.