Bug 76464 - System is still detecting HDMI-in after unplugging HDMI cable slowly from secondary monitor
Summary: System is still detecting HDMI-in after unplugging HDMI cable slowly from sec...
Status: CLOSED WONTFIX
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: medium enhancement
Assignee: Intel GFX Bugs mailing list
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
: 86817 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-03-21 18:09 UTC by Wayne Boyer
Modified: 2019-02-14 05:14 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features: display/HDMI


Attachments

Description Wayne Boyer 2014-03-21 18:09:25 UTC
1. Connect a secondary monitor via HDMI
2. *Slowly* unplug the HDMI cable
3. Observe that there is no output retraining.  The mouse can still be moved to the now unplugged external monitor.


Looking at the output of "cat /sys/class/drm/*/status" shows that the kernel has the correct view of the current connection states.  In the output below the states represent the three connections on the video card.

card0-DVI-I-1
card0-DVI-I-2
card0-HDMI-A-1

## Before plugging in monitor

$ cat /sys/class/drm/*/status
disconnected
connected
disconnected

## After plugging in monitor

$ cat /sys/class/drm/*/status
disconnected
connected
connected

## After slowly unplugging in monitor

$ cat /sys/class/drm/*/status
disconnected
connected
disconnected


The output from xrandr shows the correct states when the secondary monitor is connected.


$ xrandr
Screen 0: minimum 320 x 200, current 4480 x 1600, maximum 8192 x 8192
DVI-I-1 disconnected (normal left inverted right x axis y axis)
DVI-I-2 connected primary 2560x1600+0+0 (normal left inverted right x axis y axis) 646mm x 406mm
   2560x1600      59.9* 
   1280x800       59.9  
HDMI-1 connected 1920x1080+2560+0 (normal left inverted right x axis y axis) 531mm x 299mm
   1920x1080      60.0*+   50.0     59.9     60.0  
   1920x1080i     60.1     50.0     60.0  
   1600x1200      60.0  
   1680x1050      59.9  
   1280x1024      75.0     60.0  
   1440x900       59.9  
   1280x960       60.0  
   1366x768       59.8  
   1152x864       75.0  
   1280x720       60.0     50.0     59.9  
   1024x768       75.1     70.1     60.0  
   832x624        74.6  
   800x600        72.2     75.0     60.3     56.2  
   720x576        50.0  
   720x480        60.0     59.9  
   640x480        75.0     72.8     66.7     60.0     59.9  
   720x400        70.1  


After the cable is slowly unplugged, xrandr shows the monitor as disconnected, but still shows and idea of the last resolution.

** Also, running xrandr at this point kicks the system to retrain the output **



$ xrandr
Screen 0: minimum 320 x 200, current 4480 x 1600, maximum 8192 x 8192
DVI-I-1 disconnected (normal left inverted right x axis y axis)
DVI-I-2 connected primary 2560x1600+0+0 (normal left inverted right x axis y axis) 646mm x 406mm
   2560x1600      59.9* 
   1280x800       59.9  
HDMI-1 disconnected (normal left inverted right x axis y axis)
  1920x1080 (0x481)  148.5MHz
        h: width  1920 start 2008 end 2052 total 2200 skew    0 clock   67.5KHz
        v: height 1080 start 1084 end 1089 total 1125           clock   60.0Hz


Running xrandr once more shows the expected state of the system.


$ xrandr
Screen 0: minimum 320 x 200, current 2560 x 1600, maximum 8192 x 8192
DVI-I-1 disconnected (normal left inverted right x axis y axis)
DVI-I-2 connected primary 2560x1600+0+0 (normal left inverted right x axis y axis) 646mm x 406mm
   2560x1600      59.9* 
   1280x800       59.9  
HDMI-1 disconnected (normal left inverted right x axis y axis)



This problem reproduces on several platforms using various kernels and video cards.  Here are two examples:

- Arch linux, intel graphics (i915), 3.13 kernel
- Linux Mint 13.10, nVidia (nouveau) graphics, 3.11 kernel

This problem does not happen when the cable is disconnected quickly.
Comment 1 Chris Wilson 2014-03-21 18:14:16 UTC
Hotplug interrupt is raised by hardware whilst the monitor is still connected. Only the manual probe sees the monitor as disconnected, triggering a round of userspace notifications and retraining.

Use xrandr --current to avoid the manual probe.
Comment 2 Daniel Vetter 2014-03-22 11:41:03 UTC
Some guys at vpg are signed up to finally implement what I want here ... don't hold your breadth though :(
Comment 3 Daniel Vetter 2014-03-26 21:26:52 UTC
Downgrading to feature request since meh ... Hopefully someone gets around to actually write the code.
Comment 4 Jani Nikula 2014-03-27 07:34:22 UTC
Sorry about the extra re-assignments, my scripts need to grow some more clues.
Comment 5 Damien Lespiau 2015-03-14 04:38:02 UTC
*** Bug 86817 has been marked as a duplicate of this bug. ***
Comment 6 Jani Nikula 2015-06-11 08:53:34 UTC
Does this patch help? http://patchwork.freedesktop.org/patch/51634
Comment 7 Humberto Israel Perez Rodriguez 2015-08-10 21:29:10 UTC
Hi Wayne Boyer could you please provide information to last comment
Comment 8 Dhinakaran Pandiyan 2015-08-24 21:37:53 UTC
I tested the patch, the system still does not detect that the HDMI cable has been disconnected when slowly unplugged.
Comment 9 Jani Nikula 2016-06-16 14:12:17 UTC
If the hardware issues a hotplug irq when the cable is still connected, there's not much the driver can do, really. We check the link on hotplug, it's still there, do nothing. The HDMI live status checks that have been merged *might* help a bit, but otherwise, I'm closing as WONTFIX.


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.