Removing HDMI cable will not always resize the desktop

Bug #1463926 reported by Hugh Greenberg
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
X.Org X server
Won't Fix
Wishlist
xserver-xorg-video-intel (Ubuntu)
Triaged
Low
Unassigned

Bug Description

Plugging in an HDMI cable in my laptop will automatically cause Unity to resize the desktop to span both screens. Removing the HDMI cable will sometimes not automically resize the desktop to return to a single screen. xrandr --auto will resize the screen. The graphics card is: Intel Corporation Haswell-ULT Integrated Graphics Controller.

Revision history for this message
In , Wayne-boyer (wayne-boyer) wrote :
Download full text (3.2 KiB)

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...

Read more...

Revision history for this message
In , Chris Wilson (ickle) wrote :

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.

Revision history for this message
In , Daniel-ffwll (daniel-ffwll) wrote :

Some guys at vpg are signed up to finally implement what I want here ... don't hold your breadth though :(

Revision history for this message
In , Daniel-ffwll (daniel-ffwll) wrote :

Downgrading to feature request since meh ... Hopefully someone gets around to actually write the code.

Revision history for this message
In , Jani-nikula (jani-nikula) wrote :

Sorry about the extra re-assignments, my scripts need to grow some more clues.

Revision history for this message
In , Damien Lespiau (damien-lespiau) wrote :

*** Bug 86817 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Jani-nikula (jani-nikula) wrote :
Revision history for this message
In , Humberto-i-perez-rodriguez (humberto-i-perez-rodriguez) wrote :

Hi Wayne Boyer could you please provide information to last comment

Revision history for this message
In , Dhinakaran-pandiyan (dhinakaran-pandiyan) wrote :

I tested the patch, the system still does not detect that the HDMI cable has been disconnected when slowly unplugged.

affects: unity (Ubuntu) → xserver-xorg-video-intel (Ubuntu)
affects: unity → ubuntu
affects: ubuntu → xorg-server
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

known kernel bug upstream

Changed in xorg-server:
importance: Undecided → Unknown
status: New → Unknown
Changed in xserver-xorg-video-intel (Ubuntu):
importance: Undecided → Low
status: New → Triaged
Changed in xorg-server:
importance: Unknown → Wishlist
status: Unknown → Incomplete
Revision history for this message
In , Jani-nikula (jani-nikula) wrote :

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.

Changed in xorg-server:
status: Incomplete → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.