Unity kills running compiz, even if it belongs to a different Unity session

Bug #1324114 reported by Margarita Manterola
28
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Unity
Fix Released
Medium
Stephen M. Webb
7.2
Fix Released
Medium
Stephen M. Webb
unity (Ubuntu)
Fix Released
Medium
Stephen M. Webb
Trusty
Fix Released
Medium
Stephen M. Webb

Bug Description

I'm trying to get a setup with two different Unity desktop sessions running at the same time. One for the local desktop, one for a remote desktop. This almost works, except that when starting the second Unity session, the compiz process that belongs to the first one is killed because of this code in /usr/bin/unity:

    # kill a previous compiz if was there (this is a hack as compiz can
    # sometimes get stuck and not exit on --replace)
    subprocess.call (["pkill", "-9", "compiz"])

Commenting this line makes both desktop sessions work fine.

This kill is far too harsh. If you want to kill compiz, you should make sure that you are killing it in the same DISPLAY as the session that you are about to start, and not just every possible compiz process that is running.

Please consider either removing the kill or making it apply only to processes in the same DISPLAY.

[Impact]
Running unity script will kill the unity processes in different displays

[Test case]
- Run unity in DISPLAY=:0 and in DISPLAY=:1
- Launch the unity script in DISPLAY=:1, it should kill and restart only the unity
  instance running in DISPLAY=:1

Related branches

Revision history for this message
Pawel Szubert (pawel-pbm-deactivatedaccount) wrote :
Stephen M. Webb (bregma)
Changed in unity:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Pawel Szubert (pawel-pbm-deactivatedaccount) wrote :

Attached proof-of-concept patch that kills compiz running only on display where we starting Unity.

Revision history for this message
Philipp Kern (pkern) wrote :

Didier, could you have a look at this, please? Isn't the screen locker rendered by compiz now? This has some security implications if your physical screen locker is suddenly killed when you start up a new remote session.

Stephen M. Webb (bregma)
Changed in unity (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Changed in unity:
milestone: none → 7.3.0
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "unity.kill.patch.txt" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

I'm not working on Compiz/Unity anymore, but I agree with the bug description and the comments to where compiz/unity headed to today.

We had a lot of stability problem at the time, hence this helper to reset unity (which is never used in the session itself to start unity). Stephen's team will handle it. I'm accepting the SRU nomination for trusty as well.

Stephen M. Webb (bregma)
Changed in unity:
assignee: nobody → Stephen M. Webb (bregma)
Stephen M. Webb (bregma)
Changed in unity:
status: Triaged → In Progress
Changed in unity (Ubuntu Trusty):
status: New → Triaged
Changed in unity (Ubuntu):
status: Triaged → In Progress
assignee: nobody → Stephen M. Webb (bregma)
Stephen M. Webb (bregma)
Changed in unity:
milestone: 7.3.0 → 7.3.1
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity - 7.3.0+14.10.20140708-0ubuntu1

---------------
unity (7.3.0+14.10.20140708-0ubuntu1) utopic; urgency=low

  [ Ubuntu daily release ]
  * New rebuild forced

  [ Stephen M. Webb ]
  * reduce the scope of the kill command when restarting compiz (LP:
    #1324114)

  [ Eleni Maria Stea ]
  * Changed the PreviewStyle.h/cpp to use em sizes (RawPixel).
  * Added scale factor to Preview (base class), preview container and to
    the components they contain.
  * Scaled the ApplicationPreview and the containing widgets and
    components.
  * Scaled GenericPreview and its widgets.
  * scaled ErrorPreview
  * Scaled MoviePreview and widgets

  [ Pawel Szubert ]
  * reduce the scope of the kill command when restarting compiz (LP:
    #1324114)
 -- Ubuntu daily release <email address hidden> Tue, 08 Jul 2014 14:35:37 +0000

Changed in unity (Ubuntu):
status: In Progress → Fix Released
Stephen M. Webb (bregma)
Changed in unity:
status: In Progress → Fix Committed
Revision history for this message
Pawel Szubert (pawel-pbm-deactivatedaccount) wrote :

When can we expect this fix to be released for Trusty?

Changed in unity (Ubuntu Trusty):
status: Triaged → In Progress
assignee: nobody → Stephen M. Webb (bregma)
importance: Undecided → Medium
description: updated
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

unity_7.2.3+14.04.20140826-0ubuntu1.debdiff

Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello Margarita, or anyone else affected,

Accepted unity into trusty-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/unity/7.2.3+14.04.20140826-0ubuntu1 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 unity (Ubuntu Trusty):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Sebastien Bacher (seb128) wrote :

Could somebody help verifying the fix so that version can move to utopic-updates?

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (5.5 KiB)

This bug was fixed in the package unity - 7.2.3+14.04.20140826-0ubuntu1

---------------
unity (7.2.3+14.04.20140826-0ubuntu1) trusty; urgency=medium

  [ Andrea Azzarone ]
  * Remove cross fade effect during lock/unlocking. A simple fading
    works just fine. (LP: #1312107)
  * Manually emit nux::Area::geometry_changed beucase nux can fail to
    emit it. (LP: #1292391)

  [ Pawel Szubert ]
  * Reduce the scope of the kill command when restarting Compiz.
    (LP: #1324114)

  [ Marco Trevisan (Treviño) ]
  * LockScreenAcceleratorController: do ther configured action on power
    special keys press. We finally can suspend, shutdown, hibernate or
    start the screensaver when the screen is locked, using the Suspend,
    Sleep, Hibernate and PowerOff hardware keys. Also the Shutdown
    dialog doesn't allow now to lock the session if it is not allowed by
    settings. (LP: #1306211) (LP: #1320051) (LP: #1320071)
  * Previews: scale the dash preview contents to match current monitor
    scaling. Improved also the scaling of search-bar, spinner, categories
    and many other components. (LP: #1339629)
  * FilterWidgets: add support for scaling (LP: #1340171)
  * OverlayRendering: correctly scale the overlays borders and edges to
    match settings. DashStyle has been modified to return smart pointers
    of textures that are loaded depending on the scale level. The cache
    will make sure that we don't duplicate the textures and that they
    get removed when not needed anymore. Also thanks to this the
    SearchBarSpinner textures (and the other spinners as well) uses the
    SVGs scaled at the proper size (I desgined a new SVG for the
    magnifier, as we only had a PNG). (LP: #1283415) (LP: #1340394)
  * Hud: scale to match current DPI settings for monitor. (LP: #1340477)

  [ Eleni Maria Stea ]
  * Previews: scale the dash preview contents to match current monitor
    scaling. Improved also the scaling of search-bar, spinner, categories
    and many other components. (LP: #1339629)

  [ Stephen M. Webb ]
  * Reduce the scope of the kill command when restarting Compiz.
    (LP: #1324114)

  [ Chris Townsend ]
  * Bump version to 7.2.3.

unity (7.2.2+14.04.20140714-0ubuntu2) trusty; urgency=medium

  [ Andrea Azzarone ]
  * Remove cross fade effect during lock/unlocking. A simple fading
    works just fine. (LP: #1312107)
  * Manually emit nux::Area::geometry_changed beucase nux can fail to
    emit it. (LP: #1292391)
  * TextInput: use GdkKeymap to check the caps-lock status (LP: #1347735)

  [ Pawel Szubert ]
  * Reduce the scope of the kill command when restarting Compiz.
    (LP: #1324114)

  [ Marco Trevisan (Treviño) ]
  * LockScreenAcceleratorController: do ther configured action on power
    special keys press. We finally can suspend, shutdown, hibernate or
    start the screensaver when the screen is locked, using the Suspend,
    Sleep, Hibernate and PowerOff hardware keys. Also the Shutdown
    dialog doesn't allow now to lock the session if it is not allowed by
    settings. (LP: #1306211) (LP: #1320051) (LP: #1320071)
  * Previews: scale the dash preview contents to match current monitor
    scaling. Improved also the scaling of...

Read more...

Changed in unity (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Chris J Arges (arges) wrote : Update Released

The verification of the Stable Release Update for unity 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.

Stephen M. Webb (bregma)
Changed in unity:
status: Fix Committed → Fix Released
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.