Maximized windows opened during login not actually maximized (when using 5.20 from -proposed)

Bug #1195730 reported by Jani Uusitalo on 2013-06-28
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Unity
Invalid
Undecided
Unassigned
5.0
Fix Committed
Critical
Christopher Townsend
unity (Ubuntu)
Undecided
Unassigned
Precise
Critical
Unassigned

Bug Description

[Test Case]

1. Open the Dash and enter Startup Applications to open the Startup Applications Preferences.
2. Click Add and enter Firefox for Name and /usr/bin/firefox for Command. Click Add mad then Close to close the Startup Applications Preferences.
3. Start Firefox and once opened, click the maximize button. Close Firefox. (Firefox remembers the state of the window when it opens again)
4. Log out and then log in again.
5. Firefox should open maximized with no extra window decorations.

[Regression Potential]

This regression is caused by a race condition and the fix should mitigate it, but there could be potential for other race conditions to occur.

Original description:

With Unity 5.20.0-0ubuntu1 from -proposed, maximized windows opened during login by autostarting apps have their top bar visible underneath the desktop top bar (indicator-appmenu) as if unmaximized, but with the window 'maximize' button indicating a maximized window - i.e. first click on it results in the window getting smaller. The second click on it then actually maximizes the window so that the top bar merges into the desktop top bar (indicator-appmenu).

This problem appears consistently on every login, after I've enabled -proposed and installed Unity 5.20 from there. It never appears when I have 5.18 from -updates. Annoyingly, I am unable to reproduce it in a VM (for a nice demonstration video), but I am able to reproduce it with a newly created user account on the host (i.e. without the configuration from my main user account).

I could've taken a screenshot of how it looks right after login. I'll do that in a minute.

Edit: autostarting apps.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: unity 5.20.0-0ubuntu1
ProcVersionSignature: Ubuntu 3.8.0-26.38~precise2-generic 3.8.13.2
Uname: Linux 3.8.0-26-generic x86_64
.tmp.unity.support.test.0:

ApportVersion: 2.0.1-0ubuntu17.4
Architecture: amd64
CheckboxSubmission: 09ae689090491ca53449589269e4bfd8
CheckboxSystem: edda5d4f616ca792bf437989cb597002
CompizPlugins: [core,composite,opengl,decor,resize,compiztoolbox,place,gnomecompat,regex,grid,mousepoll,snap,move,wall,imgpng,vpswitch,session,unitymtgrabhandles,animation,fade,workarounds,expo,scale,ezoom,unityshell]
CompositorRunning: compiz
Date: Fri Jun 28 15:47:03 2013
DistUpgraded: 2011-11-21 06:15:11,575 DEBUG enabling apt cron job
DistroCodename: precise
DistroVariant: ubuntu
DkmsStatus:
 vboxhost, 4.2.14, 3.8.0-25-generic, x86_64: installed
 vboxhost, 4.2.14, 3.8.0-26-generic, x86_64: installed
GraphicsCard:
 Intel Corporation Ivy Bridge Graphics Controller [8086:0152] (rev 09) (prog-if 00 [VGA controller])
   Subsystem: ASUSTeK Computer Inc. Device [1043:84ca]
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
MachineType: System manufacturer System Product Name
MarkForUpload: True
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.8.0-26-generic root=UUID=28b993a2-7b5f-45fb-9062-173b0759a0ee ro crashkernel=384M-2G:64M,2G-:128M quiet splash vt.handoff=7
SourcePackage: unity
UpgradeStatus: Upgraded to precise on 2011-11-21 (585 days ago)
dmi.bios.date: 12/10/2012
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 1005
dmi.board.asset.tag: To be filled by O.E.M.
dmi.board.name: P8H77-M PRO
dmi.board.vendor: ASUSTeK COMPUTER INC.
dmi.board.version: Rev X.0x
dmi.chassis.asset.tag: Asset-1234567890
dmi.chassis.type: 3
dmi.chassis.vendor: Chassis Manufacture
dmi.chassis.version: Chassis Version
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr1005:bd12/10/2012:svnSystemmanufacturer:pnSystemProductName:pvrSystemVersion:rvnASUSTeKCOMPUTERINC.:rnP8H77-MPRO:rvrRevX.0x:cvnChassisManufacture:ct3:cvrChassisVersion:
dmi.product.name: System Product Name
dmi.product.version: System Version
dmi.sys.vendor: System manufacturer
version.compiz: compiz 1:0.9.7.12-0ubuntu2
version.ia32-libs: ia32-libs 20090808ubuntu36
version.libdrm2: libdrm2 2.4.43-0ubuntu0.0.2
version.libgl1-mesa-dri: libgl1-mesa-dri 8.0.4-0ubuntu0.6
version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
version.libgl1-mesa-glx: libgl1-mesa-glx 8.0.4-0ubuntu0.6
version.xserver-xorg-core: xserver-xorg-core 2:1.11.4-0ubuntu10.13
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev 1:2.7.0-0ubuntu1.2
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:6.14.99~git20111219.aacbd629-0ubuntu2
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.17.0-1ubuntu4.4
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:0.0.16+git20111201+b5534a1-1build3

Related branches

Jani Uusitalo (uusijani) wrote :
Changed in unity (Ubuntu):
importance: Undecided → High
Launchpad Janitor (janitor) wrote :

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

Changed in unity (Ubuntu):
status: New → Confirmed
Shuduo Sang (sangshuduo) wrote :

I use an OEM build based on precise plus unity 5.20.0 I build in my ppa [1] but I can't reproduce this issue. So I don't agree the root cause is unity 5.20.0.

[1]: https://launchpad.net/~sangshuduo/+archive/ppa

tags: added: bot-stop-nagging
Jani Uusitalo (uusijani) wrote :

I tested 5.20 from Shuduo's PPA and for me it reproduces the issue just the same as -proposed. To be sure, I then went back down to release versions in all the other packages (so that the only change wrt. released is again just Unity being 5.20, just now from the PPA), and the issue remained. Downgrade Unity to 5.18 and it again goes away.

But this looks like a speed issue, so Unity may not be directly at fault: any apps started once the desktop is fully loaded open as truly maximized, so a workaround is setting autostarted apps to start after a delay. Perhaps Unity going from 5.18 to 5.20 here causes just enough delay for those apps to start before whatever the component is that should fuse the menus with appindicator. The autostarting facility should wait for that component, or the component should be also able to fuse menus for existing windows once it gets up and running.

Incidentally, any appindicator-related packages' versions also don't seem to matter for this once Unity is 5.20. I think I'll try upgrading just those to their -proposed versions next (so that Unity remains at 5.18) just to cover all angles.

Christopher Townsend (townsend) wrote :

Hi Jani,

Could you also provide the steps in how you are setting up Firefox to start maximized upon log in?

Thanks!

Jani Uusitalo (uusijani) wrote :

Hi Christopher, sure. For the test user, I just go to the top right cog menu, select "Startup Applications..." and "Add" Firefox (/usr/bin/firefox). Firefox remembers the window size, so I start it once (manually), maximize the window and then close it. On the next login, it should start maximized.

Christopher Townsend (townsend) wrote :

Hi Jani,

Thanks for the additional info.

Yeah, this is strange. It appears that the window is both maximized (as indicated by the Firefox title, menus, etc. in the panel) and has extra decorations at the same time. Definitely a race condition is occurring as on my test machine, I sometimes do not get the extra window decorations when logging in. Also, when this does occur, if I minimize the window and then restore it, the extra decorations are gone.

I have a feeling this is caused by the fix I did in commit 2415 in lp:unity/5.0. I'll do some more debugging and see if I can narrow down why the extra decorations are being added in this case.

Changed in unity (Ubuntu):
assignee: nobody → Christopher Townsend (townsend)
Jani Uusitalo (uusijani) wrote :

Yep, that's exactly the issue as it occurs here too. Thanks for looking into this Christopher! If you do get this narrowed down and need testing for potentially fixed builds, I'll be happy to try them out.

Changed in unity:
status: New → Invalid
tags: added: regression-proposed

I've narrowed down the code in the aforementioned commit that is causing this regression. Unfortunately, when removing that code, the bug that commit is supposed to fix comes back.

What's strange is that this regression is not seen in Raring, Saucy, and Unity trunk, yet that code is present. Based on that, there must be some other factor at play here that causes this to show up, but it seems unrelated to my commit since that commit is basically the same as what's currently in Unity.

Jani, do you consider this bug a show stopper? I'd really like to persuade the Powers That Be that it's ok to release this SRU with the idea that I will work on fixing this regression. Getting a fix out for bug #1083186 is a pretty high priority.

Jani Uusitalo (uusijani) wrote :

Definitely not a showstopper for me Christopher, just a minor annoyance, so it's a go-ahead from me. Thanks for asking!

Lowering the importance of this to Low since this is more of an annoyance and edge case with a workaround being that the user can minimize and restore the window to get rid of the extra decorations.

I recommend moving forward the SRU since the fix that has caused this regression is still needed. I will continue to debug this and hopefully have a fix for the next SRU.

Changed in unity (Ubuntu):
importance: High → Low

@ Jani,

I think I have a fix for this. I have uploaded a test Unity package to my PPA (https://launchpad.net/~townsend/+archive/unity-test). It will probably be a while before it gets built and published, so keep checking and when it does, please give it try and let me know.

Thanks!

Jani Uusitalo (uusijani) wrote :

Christopher, your test packages do indeed fix this, excellent! As I mentioned in the report, this was 100% reproducible with the packages from -proposed, and now with the packages from your PPA I could no longer reproduce it at all, during the multiple test logins I did.

Hi Jani,

Thanks for testing this out. I've also confirmed that this doesn't break the original bug this intended to fix.

I'm doubtful that this new fix will land in this SRU, but it should make it into the next.

Again, thanks for your help in testing this.

Infinity with the SRU team is re-uploading Unity with the fix for this.

Adam Conrad (adconrad) on 2013-07-08
tags: added: verification-needed
Changed in unity (Ubuntu Precise):
status: New → Fix Committed
Changed in unity (Ubuntu):
status: Confirmed → Invalid
assignee: Christopher Townsend (townsend) → nobody
importance: Low → Undecided
Changed in unity (Ubuntu Precise):
importance: Undecided → Critical
Jani Uusitalo (uusijani) wrote :

As the original reporter, I'm confirming that 5.20.0-0ubuntu2 from -proposed does contain the fix for this bug, i.e. the issue I reported above is no longer reproducible. I'm only hesitant about tagging this 'verification-done' because PerformingSRUVerification is pretty adamant about having a solid test case and I'm not sure my sloppy initial report qualifies.

jani@saegusa:~$ LC_ALL=C apt-cache policy unity
unity:
  Installed: 5.20.0-0ubuntu2
  Candidate: 5.20.0-0ubuntu2
  Version table:
 *** 5.20.0-0ubuntu2 0
        500 http://archive.ubuntu.com/ubuntu/ precise-proposed/main amd64 Packages
        100 /var/lib/dpkg/status
     5.18.0-0ubuntu2 0
        500 http://archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
     5.10.0-0ubuntu6 0
        500 http://archive.ubuntu.com/ubuntu/ precise/main amd64 Packages

Hi Jani,

Thanks for testing the new package in -proposed and confirming it works as intended. I've changed the description to include the SRU testing and Regression Potential, so I think we're all good. Marking this verification-done now.

Thanks again for reporting this and helping me test it.

description: updated
tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity - 5.20.0-0ubuntu2

---------------
unity (5.20.0-0ubuntu2) precise; urgency=low

  * Check to see if the window is supposed to have decorations instead
    of the window actually being decorated when Undecorate() is called.
    This fixes a regression from the previous SRU where windows opened
    maximized upon login could have extra decorations (LP: #1195730)

unity (5.20.0-0ubuntu1) precise; urgency=low

  * New upstream release.
    - ResultRendererTile: fix a crash if row.renderer<TextureContainer*>()
      is null (LP: #926658)
    - Fix unity launcher vanishes when switching to mirrored displays
      (LP: #991637)
    - Fix window decorations being drawn when they should not be.
      This fixes icaclient window "dancing" (LP: #1083186) and
      hides decoration in a test case with Steam (LP: #1122478)
    - [multimonitor] Dash - Opening dash or HUD on one screen removes panel
      shadow on the other (LP: #892718)
    - Press Alt+F1, panel’s shadow dissapear (LP: #942965)
  * Cherry-pick a manual test for decorations fix
 -- Christopher Townsend <email address hidden> Mon, 08 Jul 2013 09:37:30 -0600

Changed in unity (Ubuntu Precise):
status: Fix Committed → Fix Released

The verification of this Stable Release Update 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 regresssions.

Shuduo Sang (sangshuduo) wrote :

Interesting is how I reproduce this bug with 5.20.0-0ubuntu1. If I login after reboot, it's very hard to produce. If I login after logout, it can be reproduced 100%. I will try 5.20.0-0ubunt2. Thanks Christopher and Jani.

Shuduo Sang (sangshuduo) wrote :

I verified that 5.20.0-0ubuntu2 does fix this issue.

To post a comment you must log in.