boot moves desktop icons

Bug #886667 reported by James Luscher on 2011-11-05
98
This bug affects 20 people
Affects Status Importance Assigned to Milestone
Unity
Fix Released
Medium
Bowmore
5.0
Triaged
Medium
Unassigned
unity (Ubuntu)
Medium
Bowmore
Precise
Medium
Unassigned

Bug Description

I arrange non-overlapping icons on my desktop for tasks that I am working on or files I want to read later.
When I boot the next time the bottom 'row' of icons are moved upwards, on top of icons above them, making it difficult to work with them.
This is a 'polish' bug - reducing the predictable usability of Unity. I can 'work around it' by moving files/folders off of the desktop but it isn't the way I find 'natural' (for me) to treat a "desktop" - I expect the things on my "desk" will remain where I left them the previous time I was working there ;-)

James
---
ApportVersion: 1.23-0ubuntu4
Architecture: i386
DistroRelease: Ubuntu 11.10
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release i386 (20110427.1)
Package: nautilus 1:3.2.1-0ubuntu2
PackageArchitecture: i386
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 3.0.0-12.20-generic 3.0.4
Tags: oneiric running-unity
Uname: Linux 3.0.0-12-generic i686
UpgradeStatus: Upgraded to oneiric on 2011-10-14 (23 days ago)
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

Related branches

James Luscher (jluscher) wrote :
James Luscher (jluscher) wrote :

This is with Ubuntu 11.10, fully updated.

Phil. V (philip.v) wrote :

I re-targeted this to nautilus, as it is responsible for managing desktop icons. Also, so we can get some more system information attached to this report, could you please run the following command in a terminal and then change the status of this report back to new:
apport-collect 886667

Thanks in advance!

affects: unity (Ubuntu) → nautilus (Ubuntu)
Changed in nautilus (Ubuntu):
status: New → Incomplete

Phil,

It looks like it didn't work. I saw a page to authorize access and clicked
on "one hour" (enough time to upload data?) but the terminal response
wasn't positive:

*james@white:~$ apport-collect 886667*
*The authorization page:*
* (
https://launchpad.net/+authorize-token?oauth_token=CTw9MM5KqzHKMWlXmhBn&allow_permission=DESKTOP_INTEGRATION
)*
*should be opening in your browser. Use your browser to authorize*
*this program to access Launchpad on your behalf. *
*
*
*Waiting to hear from Launchpad about your decision...*
*Created new window in existing browser session.*
*ERROR: connecting to Launchpad failed: Unable to find the server at
launchpad.net*
*You can reset the credentials by removing the file
"/home/james/.cache/apport/launchpad.credentials"*
*james@white:~$ apport-collect 886667*
*The authorization page:*
* (
https://launchpad.net/+authorize-token?oauth_token=RDlq1FZV5ZNRLgcVdxLV&allow_permission=DESKTOP_INTEGRATION
)*
*should be opening in your browser. Use your browser to authorize*
*this program to access Launchpad on your behalf. *
*
*
*Waiting to hear from Launchpad about your decision...*
*Created new window in existing browser session.*
*ERROR: connecting to Launchpad failed: Unable to find the server at
launchpad.net*
*You can reset the credentials by removing the file
"/home/james/.cache/apport/launchpad.credentials"*
*james@white:~$ ^C*
*james@white:~$ *

Just in case I'm missing something I'm going to reboot now. It is possible
that the code you asked me to authorize is intended to capture data from
booting, the next time it happens(?).

Anyway, I'm glad to help you figure out what is going on. (within my
abilities ;-)

James

*"Forty years ago few people had actually seen a computer;*
* today, no one can see one, to a first approximation,*
* as the devices have become so small."*
*-- Jack G. Ganssle, 2011-09*

On Sun, Nov 6, 2011 at 12:23 AM, Phil V <email address hidden> wrote:

> I re-targeted this to nautilus, as it is responsible for managing desktop
> icons. Also, so we can get some more system information attached to this
> report, could you please run the following command in a terminal and then
> change the status of this report back to new:
> apport-collect 886667
>
> Thanks in advance!
>
> ** Package changed: unity (Ubuntu) => nautilus (Ubuntu)
>
> ** Changed in: nautilus (Ubuntu)
> Status: New => Incomplete
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/886667
>
> Title:
> boot moves desktop icons
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/886667/+subscriptions
>

apport information

tags: added: apport-collected oneiric running-unity
description: updated

apport information

Changed in nautilus (Ubuntu):
status: Incomplete → New

Phil,

Second time (I mean third time, after reboot ;-) was the charm.

I changed bug report to 'new' and the apport summary seems to be attached
to it now.

Thanks,
James

*"Forty years ago few people had actually seen a computer;*
* today, no one can see one, to a first approximation,*
* as the devices have become so small."*
*-- Jack G. Ganssle, 2011-09*

On Sun, Nov 6, 2011 at 12:23 AM, Phil V <email address hidden> wrote:

> I re-targeted this to nautilus, as it is responsible for managing desktop
> icons. Also, so we can get some more system information attached to this
> report, could you please run the following command in a terminal and then
> change the status of this report back to new:
> apport-collect 886667
>
> Thanks in advance!
>
> ** Package changed: unity (Ubuntu) => nautilus (Ubuntu)
>
> ** Changed in: nautilus (Ubuntu)
> Status: New => Incomplete
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/886667
>
> Title:
> boot moves desktop icons
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/886667/+subscriptions
>

Phil. V (philip.v) wrote :

Thanks for attaching the information. Unfortunately I was unable to reproduce this on a virtualbox installation and on my laptop, but hopefully someone else with a similar hardware and/or software configuration to yourself can reproduce this. I wish I could help more, but I'm actually not that familiar with nautilus. Now that the correct package is targeted and the appropriate system information is attached, though, someone more familiar with nautilus should be able to help you further.

tags: added: nautilus-desktop-icons
James Luscher (jluscher) wrote :

On Sun, Nov 6, 2011 at 5:26 PM, Phil V <email address hidden> wrote:

> Thanks for attaching the information. Unfortunately I was unable to
> reproduce this on a virtualbox installation and on my laptop, but
> hopefully someone else with a similar hardware and/or software
> configuration to yourself can reproduce this. I wish I could help more,
> but I'm actually not that familiar with nautilus. Now that the correct
> package is targeted and the appropriate system information is attached,
> though, someone more familiar with nautilus should be able to help you
> further.
>

Thank you for getting the info. to the right people. There is a LOT that I
don't understand, Linux and the enormous collection of applications, as
well as the exponentially larger number of interactions between them are
well beyond any individual's expertise. I appreciate your effort to steer
this to the right group.

James

*"Forty years ago few people had actually seen a computer;*
* today, no one can see one, to a first approximation,*
* as the devices have become so small."*
*-- Jack G. Ganssle, 2011-09*

>
>
> *"Forty years ago few people had actually seen a computer;*
> * today, no one can see one, to a first approximation,*
> * as the devices have become so small."*
> *-- Jack G. Ganssle, 2011-09*
>
> Title:
> boot moves desktop icons
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/886667/+subscriptions
>

Changed in nautilus (Ubuntu):
importance: Undecided → Low
Launchpad Janitor (janitor) wrote :

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

Changed in nautilus (Ubuntu):
status: New → Confirmed
James Luscher (jluscher) wrote :

Update: it appears that the bug may be due to some kind of 'race condition' between processes during boot.

After a later boot the icons 'popped back' to their 'proper' positions (twice). They, apparently, hadn't lost any position information in the interim, but have since returned to being drawn shifted upwards.

James

Bowmore (bowmore) wrote :

I experience this issue too in Precise.

After an upgrade of Oneiric on 2011-12-21 (previous upgrade: 2011-12-05) I also see this behaviour in Oneiric. However, not sure that this upgrade introduced the issue in Oneiric as it's sporadic and I mainly run Precise.

It seems that a wrong screen resolution is handed over to Nautilus and as James indicates this might very well be a race condition issue as it's sporadic. A workaround (tested in Oneiric so far) is to log out and in again, so desktop icon positions all are intact.

Bowmore (bowmore) wrote :

The issue causing desktop icons at the bottom of the screen to be moved upwards and in some cases (sporadically) overlap other icons is caused by multiple setups of the desktop icon container in combination with a first too high top margin value setting the height of the desktop icon container. Futhermore, if a desktop icon container has been drawn it will not be redrawn with new margin values, see module libnautilus-private/nautilus-icon-container.c/redo_layout_internal.

In my case this issue occurs when a top margin value of 300 pixels appears (from Xlib XGetWindowProperty) and then is used to finally set the desktop icon container height. As the Unity panel is 24 pixels the the empty part in the lower part of the screen will be 300-24 = 276 pixels. So any icons in that lower empty area will then be moved upwards into the desktop icon container.

As the function redo_layout_internal today does not support redrawal of the desktop icon container one way is to filter "bad" margin values. As it only seems to be caused by a too high top margin value this can be done in the module src/nautilus-desktop-icon-view.c/icon_container_set_workarea.

The highest value to be passed is set to 49 in the following patch but can be reduced further down to max of panel height (top margin) for any sessions supported by ubuntu.

Furthermore, it might be included into the patch 02_additional_marge_for_unity.patch.

The attachment "top margin patch" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Bowmore (bowmore) wrote :

For clarity, the patch "top margin patch" is for the precise package nautilus_3.3.90-0ubuntu1.

Manjuvajra (thehut) wrote :

I also have this problem - I think it started when after I started using the workspace switcher.

Bowmore (bowmore) wrote :

Reassigning this bug to Compiz.

Some tracing points to Compiz and more specifically a Compiz struts issue.

Details:
windows.cpp
CompWindow::updateStruts ()
struts [0]=0, [1]=0, [2]=300, [3]=0,
struts [4]=0, [5]=0, [6]=0, [7]=0
struts [8]=100, [9]=419, [10]=0, [11]=0

The setting of struts [2] = 300 (top.height) is the one that causes this issue, i.e indicates a "panel" of height 300 pixels that in combination with the real unity panel of 24 pixels later leaves 276 pixels of unused height at the bottom of the screen causing icons in that area to be moved upwards. Futhermore, struts [8]=100 (top.x) and struts [9]=419 (top.width) are inaccurate values e.g for a screen 1366x768 running unity.

However, there's also a race conditions issue with nautilus causing this to appear sporadic.

Sam, hope this is enough info for solving this issue.

Bowmore (bowmore) on 2012-03-03
affects: nautilus (Ubuntu) → compiz (Ubuntu)
Bowmore (bowmore) wrote :

This is not a duplicate of bug #737758.
That bug describes how the whole desktop icon container moves horizontally due to an inconsistent handling of the unity launcher width.

This bug brings up another issue, i.e when the desktop icon container width and/or height sizes are defined smaller than the correct sizes. Greater sizes however will work correctly as icon locations are pixeloriented.

The specific issue here is that the desktop icon container height is defined smaller than the correct size which then causes vertical compression moving any icons located below the container (workarea) upwards.

The bug is that X window properties are not properly initialized for the Unity session but inherits old X settings from XGetWindowProperty, here top.height=300, which indicates a panel height of 300 pixels thus reducing the icon container height accordingly causing compression and overlapping of desktop icons.

So, undupping this one from #737758.

Bowmore (bowmore) wrote :

By initialized properly I mean:
The X window properties: top.height = bottom.height = left.width = right.width = 0

So here it's not a matter of when Unity/Compiz updates the top.height (panel) and the left.width (launcher).

Gaetano Gambilonghi (gaegae-o) wrote :

Thank you very much, it's very interesting, but how can i use easily that patch? Which packet should I install, what should i edit, (and should i need to compile again)? Thanks!

Bowmore (bowmore) wrote :

I've updated the patch as the upstream margin patch has been removed.

I've also tested Gnome Classic & Compiz and not detected any issues for the desktop icon workspace.

At current, Unity settings of those margins is done in the Unity plugin which is to late, i.e those margins must be set one of the first things at session startup using XChangeProperty. If not known (no gsettings?) then those four margins can all be set to 0 and nautilus will adjust the workspace automatically when correct margins are set later. This will avoid issues like compressed workspace with overlapping icons etc.

Bowmore (bowmore) wrote :

Updated patch "top_margin_workaround.patch" for nautilus 3.3.92-0ubuntu2.

Old patch removed.

Bowmore (bowmore) wrote :

@Gaetano
The source package is nautilus.
You can either use the patch or update the source manually as it's just one line of code to be added in the source for nautilus-desktop-icon-view.c.

Yes, you have to compile it using e.g
$ debuild -us -uc
to get .deb-packages

Check this example if you're in doubt how to compile it:
http://askubuntu.com/questions/21225/how-to-apply-a-patch-to-indicator-applet

As an alternative you can use my ppa to get the patched version:

$ sudo add-apt-repository -y ppa:bowmore/pubtest
$ sudo apt-get update
$ sudo apt-get install gir1.2-nautilus-3.0 libnautilus-extension1a nautilus nautilus-data

and then remove the ppa with
$ sudo add-apt-repository -r ppa:bowmore/pubtest

This version also includes logged messages in syslog of any unreasonable top margin values and looks like this:

Mar 26 11:18:42 dtop1 [DEBUG] nautilus-desktop-icon-view: icon_container_set_workarea: top margin ERROR, top = 300

meaning that the source module (file) nautilus-desktop-icon-view.c has a function icon_container_set_workarea () that detects any unreasonable top margin values, here equals 300 pixels. The patch then sets the top margin to 0. I've also moved the backward/forward arrows in the nautilus toolbar to the left of the location field making it easy to visualize that the patched version of nautilus is running. However, no guarantees that I will keep the ppa updated for newer versions.

Bowmore (bowmore) wrote :

This issue seems to be a nux issue.

I don't know what the Nux BaseWindow is for, but it's the one that interfers with EWMH struts and causes this issue.

There are two functions:
- BaseWindow::BaseWindow(...)
- FloatingWindow::FloatingWindow(...)

that both set the geometry using
- SetGeometry(Geometry(100, 100, 320, 200));

when struts is enabled causing corruption of the struts.

In this case the sum of the two y-coordinates 100+200=300 forms the top margin height for the strut and is sporadically detected by Nautilus using that value (300) to calculate the size of the workarea to be used to draw the desktop icons. That's why my earlier proposed workaround patch in Nautilus. Furthermore, the slower the computer is the more frequent this issue seems to be.

I tested the geometry for the launcher to fit my screen resolution 1366x768, a panel heigth 24px and a launcher width incl padding of 17px, ie 32+17=49 by patching Nux BaseWindow.cpp:
- SetGeometry(Geometry(0, 24, 49, 744));

and the issue (this bug) is gone.

Conclusion:
This functions (BaseWindow, FloatingWindow,..) should not be active at login or if so, in any case never address the root window for the screen but always be prefixed by a window pointer.

Other concerns I have
------------------------------
The handling of the EWMH struts is improper meaning it does not cover all four struts but only one of them at a given time, ie either the panel or the launcher strut. Thus being violated!
http://standards.freedesktop.org/wm-spec/wm-spec-latest.html#id2578550

The Gnome session startup design rule is violated!
http://live.gnome.org/SessionManagement/NewGnomeSession

Here is says that the "Desktop" (phase 4 incl startup of Nautilus) must not be started until EWMH struts is complete. As both the "WindowManager" and "Panel" components for Unity is Compiz, Unity/Compiz has to handle that internally so the "Desktop" phase is not started up too early as happens now. A timer is not good enough, especially not for slow computers.

Bowmore (bowmore) on 2012-04-11
Changed in nux (Ubuntu):
status: New → Confirmed
Bowmore (bowmore) wrote :

Ok, I've tracked this down to Unity and found the root cause.

Both the panel and the launcher window struts are wrongly initialized with the BaseWindow default geomentry (100,100,320,200) causing sporadic compression of desktop icons in the lower part of the screen. This is due to that the panel/launcher geometries for their BaseWindows have not been set when corresponding struts are enabled. Those geometries are availble in the code sequences so this patch just rearrange the order to see to that the geometry is set before struts is enabled.

Attaching the patch "icon_container_size.patch".

no longer affects: unity (Ubuntu)
Changed in unity (Ubuntu):
status: New → Confirmed
Changed in nux (Ubuntu):
status: Confirmed → Invalid
Changed in compiz (Ubuntu):
status: Confirmed → Invalid
Bowmore (bowmore) wrote :

Sorry, the patch is for unity 5.10.0-0ubuntu3

Sebastien Bacher (seb128) wrote :

Thank you for your work on that issue, do you think you could set up a merge request for your fix?

You can get infos on how to do that on
http://unity.ubuntu.com/getinvolved/#coding

Bowmore (bowmore) wrote :

It's probably easy but I'm not that familiar with bzr yet. Tried it a few months ago and remember the tricky thing was to create the patch, ie that part (not described) under "Now start coding"/"Create" before bzr commit. Then I was not authorized to commit to my branch, maybe forgot to login.

So hopefully someone else will grab this patch this time until I know better ;-)

Sebastien Bacher (seb128) wrote :

it should be trivial, can you try? run those:

bzr branch lp:unity
cd unity; apply your patch
bzr commit
bzr push lp~bowmore/unity/fix-icon-issue (or whatever name you want)
bzr lp-open and click on the "propose for merge" there

Bowmore (bowmore) wrote :

Well, the patching was magic, checking with bzr status/diff ;-)
Command bzr push ... said "Created new branch" but none appears on lp so I must have overseen something.
Maybe reading the manual ;(

Sebastien Bacher (seb128) wrote :

sorry I forget a ":", I meant "bzr push lp:~bowmore/unity/fix-icon-issue"

Bowmore (bowmore) on 2012-04-16
Changed in nux (Ubuntu):
assignee: nobody → Bowmore (bowmore)
assignee: Bowmore (bowmore) → nobody
Changed in unity (Ubuntu):
assignee: nobody → Bowmore (bowmore)
status: Confirmed → In Progress
Bowmore (bowmore) wrote :

Thanks, those small annoying dots ... but now it's done ;-)

Bowmore (bowmore) on 2012-04-18
Changed in unity:
status: New → In Progress
assignee: nobody → Bowmore (bowmore)
Gord Allott (gordallott) on 2012-04-23
Changed in unity:
importance: Undecided → Medium
Bowmore (bowmore) on 2012-06-19
Changed in unity:
assignee: Bowmore (bowmore) → nobody
Changed in unity (Ubuntu):
assignee: Bowmore (bowmore) → nobody
Bowmore (bowmore) on 2012-06-22
Changed in unity:
assignee: nobody → Bowmore (bowmore)
Changed in unity (Ubuntu):
assignee: nobody → Bowmore (bowmore)
Tim Penhey (thumper) on 2012-07-23
Changed in unity:
milestone: none → 6.2
Didier Roche (didrocks) on 2012-08-10
Changed in unity:
milestone: 6.2 → 6.4
Omer Akram (om26er) on 2012-08-13
no longer affects: compiz (Ubuntu)
no longer affects: nux (Ubuntu)
Changed in unity (Ubuntu):
importance: Undecided → Medium
Changed in unity (Ubuntu Precise):
importance: Undecided → Medium
status: New → Confirmed
Omer Akram (om26er) on 2012-08-14
Changed in unity:
status: In Progress → Fix Committed
Changed in unity (Ubuntu):
status: In Progress → Fix Committed
Changed in unity (Ubuntu Precise):
status: Confirmed → Triaged
Launchpad Janitor (janitor) wrote :
Download full text (5.5 KiB)

This bug was fixed in the package unity - 6.4.0-0ubuntu1

---------------
unity (6.4.0-0ubuntu1) quantal-proposed; urgency=low

  [ Łukasz 'sil2100' Zemczak ]
  * New upstream release.
    - Software Center add to launcher icon animation is delayed when the
      launcher is in auto-hide mode (LP: #1012896)
    - Home lens: Applications show up in Music category (LP: #1040101)
    - WARN unity.hud.hud Hud.cpp:185 Attempted to close the hud connection
      without starting it (LP: #1039451)
    - Text field textures do not update when maximum width changes.
      (LP: #1037187)
    - An application is closed if manually removed from favorites on gsettings
      (LP: #1032157)
    - The switcher (Alt+Tab) is showing incorrect windows after using Deskop
      Wall (Ctrl+alt+<direction>) (LP: #1031959)
    - Dragging icons to reorder -away from launcher causes the dragged icon
      image edges to fade away(cut off) (LP: #1026247)
    - Screen flickers when changing launcher icon size. (LP: #1024113)
    - Arrow for indicating lenses points empty space on alt+F2 (LP: #998752)
    - [previews] Music album tracks do not have a scroll-bar when needed.
      (LP: #1039462)
    - [USE_MODERN_COMPIZ_GL] With unity scrollbar support enabled, hotplugging
      monitors doesn't work (LP: #1039410)
    - [previews] Track titles aren't escaped (LP: #1039020)
    - Launcher - Edge of tiles (with backlight disabled) is too opaque
      (LP: #1038138)
    - [USE_MODERN_COMPIZ_GL] Benchmark window appears behind the Unity shell
      now (LP: #1036609)
    - [GLES] [USE_MODERN_COMPIZ_GL] Unity shell (Launcher and Panel) are
      missing if framebuffer_object is disabled (LP: #1036569)
    - [USE_MODERN_COMPIZ_GL] Benchmark window is mostly invisible, shrunken
      and displaced (LP: #1036528)
    - Unity quicklist menu items leak memory (LP: #1036338)
    - Icon resized between 32 - 48 - 64 look jaggy (LP: #1036231)
    - [Regression] Hideous low-res icon when using the HUD with autohide
      enabled. (LP: #1035951)
    - [regression] Selecting an item of the BFB quicklist when the dash is
      open, causes it to hide (LP: #1035641)
    - Launcher - Switch on "backlight toggles" mode by default (LP: #1033866)
    - Unity spends 15% of time in PlacesGroup::ComputeContentSize when opening
      dash (LP: #1033306)
    - Launcher dragged icon is not redrawn when the mouse pointer is not moved
      (LP: #1032700)
    - Bottom - Up key navigation is broken in dash filterbar (LP: #1028810)
    - Launcher - SD card can not be ejected by drag-n-dropping to trash
      (LP: #960910)
    - Alt-tab - The app name in the integrated menu should not change during
      Alt-tab switching (LP: #950782)
    - Dash - If only one Category Header is displayed, it should be
      automatically expanded (LP: #950710)
    - Launcher - Unity mouse wheel scroll too small (LP: #906072)
    - boot moves desktop icons (LP: #886667)
    - Alt-tab - Reduce the spread delay for all items other than the initial
      item the select lands on after alt-tab opens (LP: #838232)
    - Launcher - Launcher should never autohide when the cursor is positioned
      over the Launcher (e.g. When ...

Read more...

Changed in unity (Ubuntu):
status: Fix Committed → Fix Released
Changed in unity:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers