Toggling Compiz plugins turns Unity panel black/corrupt

Bug #769957 reported by Chow Loong Jin
132
This bug affects 30 people
Affects Status Importance Assigned to Milestone
Nux
Fix Released
Undecided
Daniel van Vugt
Unity
Invalid
Undecided
Unassigned
nux (Ubuntu)
Fix Released
Undecided
Unassigned
Nominated for Natty by Omer Akram
unity (Ubuntu)
Invalid
Undecided
Unassigned
Nominated for Natty by Omer Akram

Bug Description

=== Testing the fix ===

1. Install 0.9.48-0ubuntu1.2 from natty-proposed (when it becomes available)
2. Run `ccsm` from a terminal (you might need to apt-get install compizconfig-settings-manager)
3. Toggle any plugin (I used Screenshot)
4. Confirm that both the Panel and the Launcher are still visible and working.

===

Binary package hint: unity

When enabling of disabling any Compiz plugin using the CompizConfig Settings Manager, the unity panel turns completely black. However, it still appears to be clickable, as clicking at the appropriate spots causes the appropriate menu to spring up below the panel.

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: unity 3.8.10-0ubuntu2
Uname: Linux 2.6.38.1-ck1-hyper2 x86_64
Architecture: amd64
CompizPlugins: [core,bailer,detection,composite,opengl,decor,imgpng,move,compiztoolbox,text,widget,obs,place,vpswitch,commands,grid,resize,extrawm,regex,resizeinfo,animation,gnomecompat,workarounds,snap,screenshot,unitymtgrabhandles,mousepoll,session,wall,expo,ezoom,staticswitcher,fade,ring,scale,unityshell,scalefilter,scaleaddon]
CompositorRunning: compiz
DRM.card0.LVDS.1:
 status: connected
 enabled: enabled
 dpms: On
 modes: 1280x800
 edid-base64: AP///////wAOFIUXAAAAABYSAQOAHhN4Cq0PllNQiicgUFQAAAABAQEBAQEBAQEBAQEBAQEBxxsAoFAgFzAwIDYAML4QAAAYAAAADwAgICAgICAgICAgICAgAAAA/gBDUFQgICAgICAgICAgAAAA/gBDTEFBMTQxV0IwNUEgAMI=
DRM.card0.VGA.1:
 status: disconnected
 enabled: disabled
 dpms: Off
 modes:
 edid-base64:
Date: Mon Apr 25 01:22:13 2011
DistUpgraded: Log time: 2011-04-24 12:35:29.897587
DistroCodename: natty
DistroVariant: ubuntu
DkmsStatus: vboxhost, 4.0.6, 2.6.38.1-ck1-hyper2, x86_64: installed
GraphicsCard:
 Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (primary) [8086:2a02] (rev 03) (prog-if 00 [VGA controller])
   Subsystem: Lenovo Device [17aa:383e]
   Subsystem: Lenovo Device [17aa:383e]
MachineType: LENOVO LENOVO3000 Y410
ProcEnviron:
 LANGUAGE=en_SG:en
 PATH=(custom, user)
 LANG=en_SG.utf8
 SHELL=/bin/zsh
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-2.6.38.1-ck1-hyper2 root=/dev/mapper/cryptostuff-root ro splash quirks.ich_force_ahci=1 resume=/dev/mapper/cryptostuff-swap vt.handoff=7
Renderer: Unknown
SourcePackage: unity
UpgradeStatus: Upgraded to natty on 2011-04-24 (0 days ago)
dmi.bios.date: 06/17/2008
dmi.bios.vendor: LENOVO
dmi.bios.version: 05CN71WW(V3.09)
dmi.board.name: IGT30
dmi.board.vendor: LENOVO
dmi.board.version: REFERENCE
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: No Enclosure
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnLENOVO:bvr05CN71WW(V3.09):bd06/17/2008:svnLENOVO:pnLENOVO3000Y410:pvr:rvnLENOVO:rnIGT30:rvrREFERENCE:cvnNoEnclosure:ct10:cvrN/A:
dmi.product.name: LENOVO3000 Y410
dmi.sys.vendor: LENOVO
version.compiz: compiz 1:0.9.4+bzr20110415-0ubuntu2
version.ia32-libs: ia32-libs 20090808ubuntu13
version.libdrm2: libdrm2 2.4.23-1ubuntu6
version.libgl1-mesa-dri: libgl1-mesa-dri 7.10.2-0ubuntu2
version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
version.libgl1-mesa-glx: libgl1-mesa-glx 7.10.2-0ubuntu2
version.xserver-xorg: xserver-xorg 1:7.6+4ubuntu3
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:6.14.0-0ubuntu4
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.14.0-4ubuntu7
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:0.0.16+git20110107+b795ca6e-0ubuntu7

Related branches

Revision history for this message
Chow Loong Jin (hyperair) wrote :
Revision history for this message
aka (vangop) wrote :

Any workaround? The only thing that helps is logout/logon.

Revision history for this message
thorstenmz (th-guenther) wrote :

This bug affects me, too.

Unchecking a checkbox in CompizConfig Settings Manager makes the Unity panel disappear. It may turn black or various kinds of things. I've made some screenshots:

http://img691.imageshack.us/img691/984/panelgone1.jpg
http://img715.imageshack.us/img715/1350/panelgone2.jpg
http://img101.imageshack.us/img101/2972/panelgone3.jpg
http://img707.imageshack.us/img707/9295/panelgone4.jpg

Logging out and in again restores the panel.

Revision history for this message
Chow Loong Jin (hyperair) wrote : Re: [Bug 769957] Re: Unity panel turns black when enabling/disabling Compiz plugins

On 29/04/2011 21:35, aka wrote:
> Any workaround? The only thing that helps is logout/logon.
>

Workaround is to run "unity --replace", which restarts Unity.

I'm marking this bug as confirmed, since I'm not the only one experiencing it.

  affects unity
  status confirmed

  affects ubuntu/unity
  status confirmed

--
Kind regards,
Loong Jin

Changed in unity:
status: New → Confirmed
Changed in unity (Ubuntu):
status: New → Confirmed
Revision history for this message
dc (darkcharl) wrote : Re: Unity panel turns black when enabling/disabling Compiz plugins

Yet another confirmation. Experienced the same when playing around with ccsm. Issuing the workaround command restores unity panel to its former state.

Revision history for this message
André Barmasse (barmassus) wrote :

Same issue here with an Nvidia GeForce FX 5200 card and the nouveau driver enabled. I did not change anything within the compiz manager, just freshly installed Ubuntu 11.04. The side panel remains black, but the applications are clickable. Resetting Unity with "unity --reset" does nothing. When switching to Unity 2D the panel works fine. I have added a picture.

summary: - Unity panel turns black when enabling/disabling Compiz plugins
+ Unity panel turns black and/or corrupt when toggling Compiz plugins
Revision history for this message
Daniel van Vugt (vanvugt) wrote : Re: Unity panel turns black and/or corrupt when toggling Compiz plugins

It appears the problem might be that the Unity plugin is being tricked into creating additional panels when they're not needed. And possibly getting the stacking order wrong too.

There are two pieces of evidence for this:
  1. The panel shadow gets darker when it's corrupt, suggesting multiple panels are present.
  2. This command starts showing multiple results instead of just one when the corruption occurs:
         xwininfo -children -root | grep panel

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

Sorry, a more accurate way to count the number of Unity panels running is something like this:
for i in `xwininfo -root -children | awk '/^ *0x/ {print $1}'`; do xwininfo -id $i -all | grep '"panel"'; done

When the panel is corrupt, you can see many matches. But I think there should only be one. The same goes for when you replace "panel" with "launcher" in the above command. It appears both are being leaked by the Unity plugin.

As it happens, Loic put a comment in the relevant code acknowledging a leak was present:
unity/src/PanelController.cpp: // FIXME(loicm): Several objects created here are leaked.

Are we all just seeing side-effects of said leaks?

Changed in unity:
assignee: nobody → Daniel van Vugt (vanvugt)
Changed in unity:
status: Confirmed → In Progress
summary: - Unity panel turns black and/or corrupt when toggling Compiz plugins
+ Toggling Compiz plugins turns Unity panel black/corrupt and causes
+ compiz to leak several megabytes.
Revision history for this message
Daniel van Vugt (vanvugt) wrote : Re: Toggling Compiz plugins turns Unity panel black/corrupt and causes compiz to leak several megabytes.

Fixed, but yet to be merged. See Related branches above.

Also, the fix will be available for testing soon in ppa:vanvugt/unity (https://launchpad.net/~vanvugt/+archive/unity)

Changed in unity:
status: In Progress → Confirmed
Revision history for this message
Omer Akram (om26er) wrote :

Daniel, your version seems to crash unity when I enable/disable a plugin and it is not auto respawned neither.

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

Thanks Omer. I didn't notice the crash because mine was either respawning correctly or not crashing.

Predictably, valgrind is showing the crash is located in the UnityScreen destructor chain. That's code that has never been tested because until now it was leaking and never being destructed correctly. :)

I shall have a look and try to make it all part of the fix for this bug.

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

See also: bug 758248

summary: - Toggling Compiz plugins turns Unity panel black/corrupt and causes
- compiz to leak several megabytes.
+ Toggling Compiz plugins turns Unity panel black/corrupt
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

@Omer: I have fixed the crash but this showed me that the corruption is actually not fully fixed.

Still, the new version which doesn't crash, and has much less corruption, is now building in my PPA (unity 3.8.12-0ubuntu1vv4).

Also, I am no longer claiming to have fixed "megabytes" of leaks with this fix. I only thought that because my compiz was respawning and I was deceived by the size. Any memory leaks not directly causing the window/resource leaks that cause the corruption in this bug will be dealt with as separate bugs. That will keep the final fix for this bug to a minimum size and not interfere with other people working on unity/nux leaks right now.

Changed in unity:
status: Confirmed → In Progress
Changed in unity (Ubuntu):
assignee: nobody → Daniel van Vugt (vanvugt)
status: Confirmed → In Progress
Changed in nux:
assignee: nobody → Daniel van Vugt (vanvugt)
status: New → In Progress
Changed in unity:
assignee: Daniel van Vugt (vanvugt) → nobody
status: In Progress → Invalid
Changed in unity (Ubuntu):
assignee: Daniel van Vugt (vanvugt) → nobody
status: In Progress → Invalid
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

OK, the final fix is in nux only. Those previous leak fixes to unity are actually not required to fix this bug so I will separate them.

Sadly, because the fix in nux requires an API change to be synchronized with unity, it means I can't put the fix in my PPA for you right now. You can only test the fix in the next release of the libnux packages. Assuming the merge proposal is accepted and cherry-picked...

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

An alternate fix has now been proposed for natty. You can test it using: ppa:vanvugt/unity (https://launchpad.net/~vanvugt/+archive/unity)

Changed in nux (Ubuntu):
status: New → In Progress
Revision history for this message
Daniel van Vugt (vanvugt) wrote :
Changed in nux:
status: In Progress → Fix Committed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

A compatible, and trivial, fix for natty was committed in lp:nux/0.9 r351 (https://code.launchpad.net/~unity-team/nux/0.9)

Still waiting for it to me cherry-picked.

Changed in nux (Ubuntu):
status: In Progress → Confirmed
Changed in nux (Ubuntu):
assignee: nobody → Daniel van Vugt (vanvugt)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Someone, please cherry pick the one line fix from lp:nux/0.9 (r351)

Changed in nux (Ubuntu):
assignee: Daniel van Vugt (vanvugt) → nobody
Changed in nux (Ubuntu):
status: Confirmed → Fix Committed
Neil J. Patel (njpatel)
description: updated
Revision history for this message
André Barmasse (barmassus) wrote :

Still no improvemt with the "unity black panel bug" on my machine with a Nvidia GeForce FX 5200 card. The panel is still black, yet transparent with an application running under it, and the programs are still clickable and popups are showing (see image). It would be nice though to actually see, what you click :-) I have now unity 3.8.14 installed and the Nouveau graphic driver enabled (as the Nvidia driver still does not seem to be activateable through jockey in Natty). At least Daniel van Vugt's command shows that there really seem two panels to be running above each other:

0x3200003 "panel": () 1920x24+0+0 +0+0
0x1c00003 "panel": () 1920x24+0+0 +0+0

Hopefully the right patch will soon be in the Natty repositories. Keep up the good work!

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

@André: Your screenshot shows you are experiencing bug 762478 which seems to be a common problem for Geforce FX owners. Also, that is the Launcher on left hand side. The Panel is the bar at the top of the screen.

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

Fix was released in nux (1.0.2-0ubuntu1) oneiric, after being committed to lp:ubuntu/oneiric/nux r33.

Changed in nux (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Fix was released in nux 1.0.1, after being committed to lp:nux r356.

Changed in nux:
status: Fix Committed → Fix Released
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

A fix for natty is likely to appear in the next natty-update of libnux-0.9-0, but not certain. I don't see an update being planned yet, but it is already in the parent branch lp:nux/0.9.

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

Other bug subscribers

Remote bug watches

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