After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 672150 - Desktop broken when switching from dual- to single-head
Desktop broken when switching from dual- to single-head
Status: RESOLVED OBSOLETE
Product: nautilus
Classification: Core
Component: Desktop
3.3.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2012-03-15 14:59 UTC by k
Modified: 2018-01-02 18:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Video demonstrating the problem (642.66 KB, video/webm)
2012-03-16 10:09 UTC, k
Details

Description k 2012-03-15 14:59:43 UTC
I'm using the current Ubuntu Precise beta with Gnome Shell 3.3.90 on a laptop with Intel graphics and I'm using a secondary display via VGA connector. Primary display is 1600x900, secondary display is 1920x1080. The problem I describe here could also be reproduced with Ubuntu Oneiric (Some Gnome Shell 3.2.x in it I think) and a NVidia GPU when using the Nouveau graphics driver.

When i disconnect the VGA cable of the secondary display then xorg automatically switches from dual-head to single-head but after this Gnome Shell seems to be confused about the desktop dimensions. The background image isn't centered anymore and for some reason I can't open the context menu on the desktop when right-clicking in the right part of the screen. It still works in the left part of the screen. 

Even reconnecting the secondary display doesn't fix the problem. I can then again right-click anywhere on the primary display but now I have the problem on the secondary screen: I can right click the left part of it but not the right part of it. And also the background images on both screens are not positioned correctly anymore.

Interesting fact: When I open the dash (By clicking Activities) then the background images snap back into the correct positions. When I close the dash then the background images snap back into the wrong positions.

Only way to fix this seems to be logging out and in again. Restarting gnome-shell by typing "r" in the Alt-F2 menu also doesn't help.
Comment 1 Florian Müllner 2012-03-15 15:21:49 UTC
(In reply to comment #0)
> Interesting fact: When I open the dash (By clicking Activities) then the
> background images snap back into the correct positions. When I close the dash
> then the background images snap back into the wrong positions.

This sounds like bug 661863 (which is probably caused by Ubuntu patches to nautilus, but that was never confirmed).
By the way - the "dash" is the dock-like sidebar on the left. You probably mean the overview (== the screen you enter when clicking "Activities").
Comment 2 k 2012-03-15 15:50:04 UTC
Not sure if it is the same bug but it looks like it really has something to do with the "Have file manager handle the desktop" setting in Advanced Settings. When I disable it, then the background images are always correct. I can even enable it again right after disabling it and it still works then. So toggling this setting after switching single/dual head mode is a workaround.

As a JavaScript developer I tried to find some hints in the Looking Glass console (Unfortunately I haven't found a API documentation yet). Maybe this is interesting:

global.get_window_actors()[0].get_allocation_box() returns this rectangle when the problem is present:

  X1: -1333
  y1: 0
  X2: 2187
  Y2: 1080

When the problem is not present then this rectangle is positioned at 0,0 and has the correct width and height (3520x1080). I guess this "window actor number 0" is the desktop? When it is positioned at -1333 then this explains the broken display of background images and it also explains why I can't right click the right part of the secondary screen (Because the desktop ends at x=587 on this screen).

So you think this can't be a bug in Gnome and instead Ubuntu broke it?
Comment 3 Florian Müllner 2012-03-15 16:15:58 UTC
(In reply to comment #2)
> So you think this can't be a bug in Gnome and instead Ubuntu broke it?

"can't" sounds a bit too strong - I was unable to reproduce the issue in the other bug with upstream nautilus, so it's not completely unreasonable to suspect a Ubuntu issue :-)

Note that gnome-shell does not handle the desktop background at all when desktop icons are enabled, thta would be nautilus then ...
Comment 4 k 2012-03-16 08:06:04 UTC
I'm note sure if this helps to identify the responsibility of this bug (Gnome or Ubuntu) but I recompiled the nautilus package without all the Ubuntu (or Debian) patches and I still can reproduce the problem. This is what I did in detail:

Fetch sources of Ubuntu's Nautilus package:

$ apt-get source nautilus
$ cd nautilus-* 

Unapply all patches and disable them so they are not applied again by debian build system:

$ quilt pop -a
$ echo "" > debian/patches/series

Build the packages:

$ dpkg-buildpackage -us -uc

Install the packages:

$ sudo dpkg-install ../gir1.2-nautilus-3.0_*.deb ../libnautilus-extension1a_*.deb ../nautilus_*deb ../nautilus-data_*.deb

Restart Gnome:

$ sudo restart gdm


So in my opinion I now have an Ubuntu-free Nautilus and I still have the problem with wrong desktop position when switching between single and dual head.
Comment 5 k 2012-03-16 09:49:42 UTC
I can also reproduce the problem with a fresh install of Debian testing (Which uses Gnome 3.2.2.1). So it looks like Ubuntu is innocent. I can reproduce it like this:

1. Use a Linux installation with an open source graphics driver (Tested with Intel and Nouveau driver (Commercial nvidia driver does not have this problem because it handles dual-head mode completely different)) on a system which supports multiple monitors (Laptop).

2. Connect a secondary display and enable it in the Display settings. Disable "Mirror displays". Not sure if screen resolution matters. My external display has 1920x1080. The primary display of the laptop has 1600x900. A different laptop I tried has 1440x900.

3. Install gnome-tweak-tool and enable this "Have file manager handle the desktop" feature so Nautilus manages the desktop.

4. Disconnect the secondary display (By disabling it in the display settings or by unplugging it and waiting for xorg to recognize it).

Desktop now has the wrong position (Wallpaper is not centered any more and the context menu only works in the left part of the desktop, no longer on the right part.

5. Turning the "Have file manager handle the desktop" setting off and on again corrects the desktop position.
Comment 6 k 2012-03-16 10:09:43 UTC
Created attachment 209907 [details]
Video demonstrating the problem

I have attached a small video which demonstrates the problem. You can see the incorrectly placed wallpaper which nicely indicates where the desktop area seems to end. You can see me trying to open the context menu on the left part and on the right part of the screen and how I try to drag an icon around the screen which only works on the left part of the screen. Then I toggle Nautilus-Desktop-Handling off and on again which corrects the desktop positioning.

BTW: I really love this screencast recording feature ;-)
Comment 7 Owen Taylor 2012-04-05 18:31:31 UTC
Conceivably the same as bug 673566, which is a Mutter bug related to auto-maximization, but that bug is trivially easy to reproduce - it always happens for me without regard to having multiple monitors - so maybe different. Would be worth retesting once we get that fixed.
Comment 8 Luc 2013-11-20 15:14:30 UTC
I have the same problem with nautilus 3.4.2 / Ubu 12.04 when deconnecting or reconnecting a second monitor with thinkpad x200 or x220: the wallpaper of the first monitor overflow on the second monitor.

First i suspected a gnome-shell bug but finally i could solve the problem easily, killing nautilus:

<alt-F2> killall nautilus
 (the wallpaper is now displayed properly)
<alt-F2> nautilus
 (you can also relaunch it only through the "files" icon on the dock only when you need it :-)
Comment 9 António Fernandes 2018-01-02 18:48:51 UTC
Starting with version 3.28, nautilus will not handle the "files on desktop background" feature. For better alternatives, read this blog post https://csorianognome.wordpress.com/2017/12/21/nautilus-desktop-plans/