Long delays and repeated flashing when docking laptop with multiple monitors

Bug #1859955 reported by Alan Pope 🍺🐧🐱 πŸ¦„
24
This bug affects 3 people
Affects Status Importance Assigned to Milestone
gnome-shell (Ubuntu)
Triaged
Medium
Unassigned
mutter (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

Running Focal on my ThinkPad T450, but not unique to this release as it happened on 19.10 (and probably older releases too).

Steps to reproduce.

While running GNOME Shell, attach the laptop to additional external monitors.
(I'm using a docking station, but equally you can attach them via the video ports on the laptop itself)

Expected outcome

Desktop on 1 monitor goes away.
Desktop comes back on N monitors.

Actual outcome

Laptop display goes black
Laptop display comes back, moved 50% horizontally
One external monitor comes on
Laptop display goes back to normal
Second external monitor comes on
All three displays go off again
Laptop display comes on again alone
Laptop display goes off again
laptop display comes on again
External monitors come back on again
System is usable.

The entire process takes twenty seconds.

https://www.youtube.com/watch?v=QuSudpxVOao

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: gnome-shell 3.34.3-1ubuntu1
ProcVersionSignature: Ubuntu 5.4.0-9.12-generic 5.4.3
Uname: Linux 5.4.0-9-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.20.11-0ubuntu15
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Thu Jan 16 10:21:05 2020
DisplayManager: gdm3
InstallationDate: Installed on 2018-02-04 (710 days ago)
InstallationMedia: neon userlts "Xenial" - Build amd64 LIVE Binary 20180202-11:07
RelatedPackageVersions: mutter-common 3.34.3-1ubuntu1
SourcePackage: gnome-shell
UpgradeStatus: Upgraded to focal on 2020-01-08 (7 days ago)

Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) wrote :
Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) wrote :

Comparison: Windows 10 on the same hardware: https://www.youtube.com/watch?v=VEvidzgedGk
Process takes 5 seconds, no flicker.

Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) wrote :

Comparison: Ubuntu on Wayland on same hardware: https://www.youtube.com/watch?v=rw0cq5FwpHU
Less flicker than Ubuntu, and faster it seems. Around 13 seconds.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug report. could you attach the full 'journalctl -b 0' log from the system after triggering the bug? Also could you give some details on the videocard/driver you are using (Daniel, Marco, should we update the apport hook to include those informations?)

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Yeah the data we would like to see attached automatically are:

  lspci -k
  xrandr

Alan, can you please run 'xrandr' before and after docking, and attach them? I suspect the trigger for this confusion is the introduction of new monitor connectors (not just new monitors).

Also please run:

  ls /sys/class/drm

before and after docking to see if the results are changing.

tags: added: multimonitor
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Wow. Already reported, by the same person, 10000 bugs ago. Bug 1849955.

tags: added: eoan
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I would like to understand if the long delay is just the time it takes for the kernel to advertise the new connectors, or if it's some delay in mutter.

Separately, yes the desktop should never appear cut in the middle of the screen like that so that part sounds like a mutter bug. We potentially have two separate bugs here.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I can imagine some delays could be mutter's fault...

(just a theory)

If we get a burst of a number of new connector/hotplug/udev events and mutter tries to action each one immediately then it will take a long time and lots of flashing to get through all of them. To avoid that, mutter should be ignoring such events for some short period so that it can group them into a single config change that will complete faster.

summary: - Display freaks out when external monitors are attached
+ Long delays and repeated flashing when docking laptop with multiple
+ monitors
tags: added: performance
Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) wrote :

Apologies for the noise of filing the same thing twice. I'm old.

Here's the requested logs.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thanks. It appears the process of docking introduces three new DisplayPorts, of which two are plugged in.

To debug this further I do not know the commands. It might require a development setup, unless someone knows how to log udev events. I think that's what it will be...

We'd like to know how many there are during docking, what type, and how far apart in time they are.

Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) wrote :

Would it help for me to bring the docking station to Frankfurt in March?
We could get a couple of displays and do some debugging?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I think I have one somewhere, and an old laptop that can use it. Just a matter of time and priorities to set it all up.

You could argue this isn't a major priority if you wait for the flashing to finish. But on the other hand it takes so long that some users might think it's broken, give up and unplug before it's finished...

Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) wrote :

I'm happy for this to be a low priority / wishlist bug.
Ultimately it works, it's just a pretty ugly / nasty experience for the user.

Changed in gnome-shell (Ubuntu):
importance: Undecided → Medium
Changed in mutter (Ubuntu):
importance: Undecided → Medium
Changed in gnome-shell (Ubuntu):
status: New → Triaged
Changed in mutter (Ubuntu):
status: New → Triaged
Revision history for this message
Vadym Abramchuck (abramzzz) wrote :

I'm facing the same issue on Dell XPS 13 9380 and Type-C dock with 2 displays. Sometimes I'm seeing all 3 screens flashing, sometimes they go black but mouse pointer is visible (and it's moving). Like in the original report, it may take up to 20 seconds for screens to settle.

Could be somehow related to #1883292.

tags: removed: eoan
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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