[yakkety] desktop is black and/or flickering after plugging in a second monitor

Bug #1626935 reported by Yung Shen on 2016-09-23
96
This bug affects 19 people
Affects Status Importance Assigned to Milestone
nautilus (Ubuntu)
High
Iain Lane
Yakkety
High
Iain Lane

Bug Description

[ Description ]

Nautilus's wallpaper drawing doesn't respond to changes in monitor configuration. Instead of your wallpaper you see black.

[ Fix ]

Inside nautilus, the wallpaper widget connects to GTK's "monitors-changed" signal when it is constructed. It does this only once the widget is realized - a "realized" signal handler connects to "monitors-changed". In Yakkety, the "realized" signal handler is connected after the widget is already realized, meaning that the signal handler isn't called and we don't connect to the "monitors-changed" signal.

The proposed fix remedies this by checking if we are realized and explicitly calling the signal handler if so.

[ QA ]

Have multiple monitors. Have only one of them connected. Log in. Plug in one monitor. If it's autoactivated, check you see your background on both monitors. If not, activate it ("Displays") and do the same.

[ Regression potential ]

I'm not sure why or where the order changed to make the widget be realized earlier, if it matters or if this was always buggy and we got lucky. I would guess a refactoring in Nautilus itself, and so the proposed fix is safe, but watch out for other weirdness.

[ Original description ]

Using 16.04 daily image: 20160919(downloading date)
With testing package for 4.8 kernel: ppa:canonical-kernel-team/unstable
Graphic chips:
00:02.0 VGA compatible controller [0300]: Intel Corporation HD Graphics 530 [8086:191b] (rev 06)
01:00.0 3D controller [0302]: NVIDIA Corporation GM107M [GeForce GTX 960M] [10de:139b] (rev ff)

Desktop wallpaper on extended display shows black background only, and the hdmi detection is very unstable.

ProblemType: Bug
DistroRelease: Ubuntu 16.10
Package: xorg 1:7.7+13ubuntu3
ProcVersionSignature: Ubuntu 4.8.0-14.15-generic 4.8.0-rc7
Uname: Linux 4.8.0-14-generic x86_64
.tmp.unity_support_test.0:

ApportVersion: 2.20.3-0ubuntu7
Architecture: amd64
CompizPlugins: No value set for `/apps/compiz-1/general/screen0/options/active_plugins'
CompositorRunning: compiz
CompositorUnredirectDriverBlacklist: '(nouveau|Intel).*Mesa 8.0'
CompositorUnredirectFSW: true
CurrentDesktop: Unity
Date: Fri Sep 23 05:30:30 2016
DistUpgraded: Fresh install
DistroCodename: yakkety
DistroVariant: ubuntu
ExtraDebuggingInterest: Yes, including running git bisection searches
GraphicsCard:
 Intel Corporation HD Graphics 530 [8086:191b] (rev 06) (prog-if 00 [VGA controller])
   Subsystem: Dell HD Graphics 530 [1028:06e4]
InstallationDate: Installed on 2016-09-20 (3 days ago)
InstallationMedia: Ubuntu 16.10 "Yakkety Yak" - Alpha amd64 (20160919)
Lsusb:
 Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
 Bus 001 Device 003: ID 04f3:21d5 Elan Microelectronics Corp.
 Bus 001 Device 002: ID 0a5c:6410 Broadcom Corp.
 Bus 001 Device 004: ID 0c45:6713 Microdia
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
MachineType: Dell Inc. XPS 15 9550
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.8.0-14-generic.efi.signed root=UUID=d16ac6eb-1b3e-4aa5-813b-57b5c7ef165a ro quiet splash vt.handoff=7
SourcePackage: xorg
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 04/07/2016
dmi.bios.vendor: Dell Inc.
dmi.bios.version: 01.02.00
dmi.board.name: 0N7TVV
dmi.board.vendor: Dell Inc.
dmi.board.version: A01
dmi.chassis.type: 9
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvr01.02.00:bd04/07/2016:svnDellInc.:pnXPS159550:pvr:rvnDellInc.:rn0N7TVV:rvrA01:cvnDellInc.:ct9:cvr:
dmi.product.name: XPS 15 9550
dmi.sys.vendor: Dell Inc.
version.compiz: compiz 1:0.9.13.0+16.10.20160818.2-0ubuntu2
version.ia32-libs: ia32-libs N/A
version.libdrm2: libdrm2 2.4.70-1
version.libgl1-mesa-dri: libgl1-mesa-dri 12.0.3-1ubuntu1
version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
version.libgl1-mesa-glx: libgl1-mesa-glx 12.0.3-1ubuntu1
version.xserver-xorg-core: xserver-xorg-core 2:1.18.4-1ubuntu6
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev 1:2.10.2-1ubuntu1
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:7.7.1-1
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.99.917+git20160706-1ubuntu1
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.12-2

Yung Shen (kaxing) wrote :
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in xorg (Ubuntu):
status: New → Confirmed
Daniel van Vugt (vanvugt) wrote :

Confirmed. In my case the HDMI display rendered correctly but while plugged in, the desktop on the laptop screen flickered badly (cycling through triple buffers without any glClear()).

Changed in xorg (Ubuntu):
importance: Undecided → High
Timo Aaltonen (tjaalton) wrote :

Someone who knows better how the background is drawn on unity/compiz should probably comment what changed. With -intel X driver it's still the same, so defaulting to modeset X driver didn't cause this.

affects: xorg (Ubuntu) → mesa (Ubuntu)
Daniel van Vugt (vanvugt) wrote :

Well I used to maintain compiz so have a rough idea.

The desktops is just a window from nautilus that is composited by compiz. The bug probably lays between those. Not Mesa.

Changed in mesa (Ubuntu):
status: Confirmed → Invalid
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in compiz (Ubuntu):
status: New → Confirmed
Changed in nautilus (Ubuntu):
status: New → Confirmed
Timo Aaltonen (tjaalton) wrote :

yeah I moved it to mesa until I've verified with the older version, and it's still happening even with -intel + mesa 11.2

Daniel van Vugt (vanvugt) wrote :

Also not a compiz bug. The problem still happens if I replace compiz with metacity.

Changed in compiz (Ubuntu):
status: Confirmed → Invalid
Daniel van Vugt (vanvugt) wrote :

Workarounds:
  (a) Plug your monitor in before logging in; or
  (b) Kill and restart nautilus.

Given that the desktop selection rectangle still works while the black/flickering is happening around it, it appears the only thing that's broken is nautilus' wallpaper logic.

summary: - [Yakkety] desktop in black background on extended HDMI display
+ [yakkety] desktop is black and/or flickering after plugging in a second
+ monitor
Changed in nautilus (Ubuntu):
importance: Undecided → High
assignee: nobody → Sebastien Bacher (seb128)
Rocko (rockorequin) wrote :

Is this a modesetting driver issue? I believe I've seen this happen when hotplugging an external monitor. It only happens for me with the modeset driver, though, not the intel driver. The modesetting driver is excellent for some things (eg it doesn't tear on the external monitor like the intel driver does), but it does struggle a bit when changing resolutions and screen layouts (eg every time I log in, it completely unnecessarily changes my laptop screen resolution from 1920x1080 to 640x480 and then back again to 1920x1080).

Daniel van Vugt (vanvugt) wrote :

I thought it was plausible the underlying cause was the modesetting driver but up in comment #4 Timo said that it happens without modesetting and in intel too. So which is true?

I've the impression this is due to nautilus not being properly resized when display size changes (in a VM) or a new one is added...

nautilus -q

and starting the filemanager again should fix this.

Daniel van Vugt (vanvugt) wrote :

Yep, that's one of two workarounds mentioned in comment #10.

Changed in nautilus (Ubuntu):
assignee: Sebastien Bacher (seb128) → nobody
Daniel van Vugt (vanvugt) wrote :

Whatever the logic in nautilus listening for xrandr display layout changes is, is what seems to be broken. It should be reconfiguring itself when xrandr reports the displays have changed.

Iain Lane (laney) wrote :

GTK or nautilus itself somehow changed the order that things are realized in, which broke an assumption in nautilus that this would happen after the widget was constructed.

Changed in nautilus (Ubuntu):
assignee: nobody → Iain Lane (laney)
Changed in nautilus (Ubuntu Yakkety):
assignee: nobody → Iain Lane (laney)
Iain Lane (laney) wrote :

I'm fixing this by explicitly calling the signal handler once if the widget is already realized when we connect the signal.

Iain Lane (laney) on 2016-10-27
description: updated
Iain Lane (laney) wrote :

Uploaded

Changed in nautilus (Ubuntu):
status: Confirmed → In Progress
status: In Progress → Fix Committed
Changed in nautilus (Ubuntu Yakkety):
status: New → In Progress

Hello Yung, or anyone else affected,

Accepted nautilus into yakkety-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/nautilus/1:3.20.3-1ubuntu3.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in nautilus (Ubuntu Yakkety):
status: In Progress → Fix Committed
tags: added: verification-needed
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in compiz (Ubuntu Yakkety):
status: New → Confirmed
Changed in mesa (Ubuntu Yakkety):
status: New → Confirmed
Changed in nautilus (Ubuntu Yakkety):
importance: Undecided → High
no longer affects: mesa (Ubuntu Yakkety)
no longer affects: mesa (Ubuntu)
no longer affects: compiz (Ubuntu Yakkety)
no longer affects: compiz (Ubuntu)
Rocko (rockorequin) wrote :

It looks like this bug is reproducible in VirtualBox by resizing the guest window. After the nautilus update in yakkety-proposed, the bug is fixed for that use case.

Daniel van Vugt (vanvugt) wrote :

Cool. That would also be the nautilus-in-Xmir wallpaper bug I encountered recently when you resize the desktop window. I thought it was Xmir's fault but it's probably this one.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nautilus - 1:3.20.3-1ubuntu4

---------------
nautilus (1:3.20.3-1ubuntu4) zesty; urgency=medium

  * debian/patches/ubuntu_revert_no_wallpaper.patch: Ensure that
    widget_realized_cb is always called, as this sets up the signals that set
    things up on monitor change, amongst other things. The constructor might
    be called after the widget is realized, meaning the signal handler doesn't
    fire (LP: #1626935)

 -- Iain Lane <email address hidden> Thu, 27 Oct 2016 11:15:35 +0100

Changed in nautilus (Ubuntu):
status: Fix Committed → Fix Released
Iain Lane (laney) wrote :

Perhaps someone would like to verify the SRU?

Daniel van Vugt (vanvugt) wrote :

Verified bug is fixed on yakkety using nautilus 3.20.3-1ubuntu3.1

tags: added: verification-done
removed: verification-needed
Daniel van Vugt (vanvugt) wrote :

Although I saw some concerning artifacts when running zesty in a VirtualBox VM the other day (and resizing the window). Those might have been caused by this fix(?). Needs investigating.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nautilus - 1:3.20.3-1ubuntu3.1

---------------
nautilus (1:3.20.3-1ubuntu3.1) yakkety; urgency=medium

  * debian/patches/ubuntu_revert_no_wallpaper.patch: Ensure that
    widget_realized_cb is always called, as this sets up the signals that set
    things up on monitor change, amongst other things. The constructor might
    be called after the widget is realized, meaning the signal handler doesn't
    fire (LP: #1626935)
  * debian/control{,.in}: Update Vcs-Bzr for yakkety

 -- Iain Lane <email address hidden> Thu, 27 Oct 2016 11:31:53 +0100

Changed in nautilus (Ubuntu Yakkety):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for nautilus has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Rocko (rockorequin) wrote :

I also saw artefacts this morning all along the bottom 10% of the desktop background on the laptop monitor (the launcher was rendered without issues). I'm not sure what triggered it, but I had resumed the laptop and plugged in a new monitor earlier in the morning. Killing nautilus and restarting it fixed the problem.

Rocko (rockorequin), you may be affected by another bug outside of the scope of this report. Hence:

1) Are you referring to a physical, or virtual machine?
2) Are you using Ubuntu 16.10 or some other version?
3) Do you have any PPA/3rd party software installed or is it the default configuration?

Sinclair Yeh (sinclair-yeh) wrote :

This also fixes a defect we are seeing in a VMWare guest with Ubuntu 16.10. The issue was wallpaper does not get resized when changing to a higher desktop resolution, leaving a black border around the wallpaper, and corruption occurs when when dragging a window over that black border.

Rocko (rockorequin) wrote :

@Christopher:

1) It's a physical machine (my laptop).

2) I'm using Ubuntu 16.10.

3) Graphics-wise, it's a standard installation except for the 4.9-rc3 kernel from mainline and a PPA for nvidia graphics drivers (but I wasn't using the nvidia card at the time this happened, it was all on the Intel GPU).

I only mentioned it because it looked exactly like what this bug would have looked like if the laptop screen had been resized to a larger vertical resolution, say from 1920x900 to 1920x1080, and because just like this bug, killing and restarting nautilus fixed it (and I *was* already running the updated nautilus 1:3.20.3-1ubuntu3.1).

I haven't seen it happen again, though, so it's not worth following up on at this stage since I can't readily reproduce it.

Was this tested with HiDPI? On fully updated VM (zesty) with scaling-factor set to 2 initially window size is correct, but after resizing VM, nautilus desktop window is 1/4 from size it should have.

I think that I have same problem also on my main pc (also zesty) - desktop window is only 1/4 after resolution changes. Restarting nautilus "fixes" problem until next resolution changes.

Daniel van Vugt (vanvugt) wrote :

Alright, sounds like there's still work to do.

Alberts, please log a new bug describing the remaining issue so it's more clearly still open :)
Just run: ubuntu-bug nautilus
Or if that fails then: https://bugs.launchpad.net/ubuntu/+source/nautilus/+filebug

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers