Removing HDMI cable will not always resize the desktop

Bug #1463926 reported by Hugh Greenberg on 2015-06-10
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)
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.

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

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.

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

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

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

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

Hi Wayne Boyer could you please provide information to last comment

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
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
Changed in xorg-server:
status: Incomplete → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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