Bug 5190

Summary: Decoration not applied when compiz start
Product: Mageia Reporter: Herbert Poetzl <herbert>
Component: RPM PackagesAssignee: Julien Moragny <julien.moragny>
Status: RESOLVED FIXED QA Contact:
Severity: critical    
Priority: Normal CC: gruescubogdan, herbert, morrigan
Version: Cauldron   
Target Milestone: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Source RPM: compiz-0.9.7.2-1.mga2.src.rpm CVE:
Status comment:
Attachments: before fusion-icon
after fusion-icon
before fusion-icon (classic)
after fusion-icon (classic)

Description Herbert Poetzl 2012-04-02 02:18:47 CEST
Description of problem:
when issuing 'compiz --replace' (e.g. from gnome3) the old window manager is removed, but compiz doesn't finish starting so one is left without window manager.

Version-Release number of selected component (if applicable):
compiz-0.9.7.2-1.mga2.x86_64

How reproducible:
always here on ThinkPad T420

Steps to Reproduce:
1. login
2. compiz --replace
3.
Comment 1 Herbert Poetzl 2012-04-02 02:20:58 CEST
(gdb) where
#0  0x00007f11120d8743 in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f111094fd16 in g_main_context_poll (n_fds=3, fds=0x10dc980, timeout=5499, context=0x10a8ac0, priority=<optimized out>) at gmain.c:3417
#2  g_main_context_iterate (dispatch=1, block=<optimized out>, context=0x10a8ac0, self=<optimized out>) at gmain.c:3118
#3  g_main_context_iterate (context=0x10a8ac0, block=<optimized out>, dispatch=1, self=<optimized out>) at gmain.c:3060
#4  0x00007f111095017a in g_main_loop_run (loop=0x10a9be0) at gmain.c:3317
#5  0x00000000004024de in main (argc=<optimized out>, argv=0x7fff2742eef8) at /usr/src/debug/compiz-0.9.7.2/src/main.cpp:237

CC: (none) => herbert

Comment 2 Manuel Hiebel 2012-04-02 17:44:14 CEST
Julien any ideas ?

Assignee: bugsquad => julien.moragny

Comment 3 Manuel Hiebel 2012-04-02 17:46:32 CEST
ah yes you have a freeze push waiting, sorry
Comment 4 Julien Moragny 2012-04-02 20:52:37 CEST
Yeah, that and an update to libcompizconfig which fix a bug with the glib main loop (could be related regarding the trace).
Comment 5 Herbert Poetzl 2012-04-02 21:58:18 CEST
just tried with the versions (compiz and libcompizconfig) from the svn.
compiz-0.9.7.4-1.mga2.x86_64
lib64compizconfig0-0.9.5.94-0.bzr430.2.mga2.x86_64

0x00007f9cfb6e1743 in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
87	  int result = INLINE_SYSCALL (poll, 3, CHECK_N (fds, nfds), nfds, timeout);
(gdb) where
#0  0x00007f9cfb6e1743 in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f9cf9f58d16 in g_main_context_poll (n_fds=3, fds=0x2540990, timeout=3999, context=0x24ffb60, priority=<optimized out>) at gmain.c:3417
#2  g_main_context_iterate (dispatch=1, block=<optimized out>, context=0x24ffb60, self=<optimized out>) at gmain.c:3118
#3  g_main_context_iterate (context=0x24ffb60, block=<optimized out>, dispatch=1, self=<optimized out>) at gmain.c:3060
#4  0x00007f9cf9f5917a in g_main_loop_run (loop=0x2501100) at gmain.c:3317
#5  0x00000000004024de in main (argc=<optimized out>, argv=0x7fffaf8a4928) at /usr/src/debug/compiz-0.9.7.4/src/main.cpp:237
Comment 6 Julien Moragny 2012-04-02 22:32:15 CEST
could be related to this bug :
https://bugs.launchpad.net/compiz-core/+bug/966814

can you try with options : 
gtk-windows-decorator &
compiz --replace ccp

?
Comment 7 Herbert Poetzl 2012-04-02 22:45:54 CEST
no luck, JFYI, system session is gnome classic for now
Comment 8 Julien Moragny 2012-04-04 13:44:30 CEST
I don't manage to reproduce :/ and i have no clue on what is the problem.

can you please open a bugreport upstream ?
https://bugs.launchpad.net/compiz-core/
Comment 9 Herbert Poetzl 2012-04-04 13:47:29 CEST
sure, could you describe how you tested so that I can compare it with my tests?

i.e. what session do you select to start from?
how do you activate compiz?
what general setup for mageia cauldron do you use?
 - gnome or kde?
 - systemd or sysv?
Comment 10 Herbert Poetzl 2012-04-04 14:38:35 CEST
just for the record, it is a vanilla Mageia 2b2 install (gnome desktop) upgraded to latest Cauldron, tested on two rather different systems (desktop vs laptop, ati vs intel vga), and I tried to start compiz in several ways from the default gnome3 session and from the gnome classic session.
no luck in either case, compiz just hangs ...
Comment 11 Bogdan Gruescu 2012-04-04 20:31:40 CEST
If it's useful, here is my experience ... (from an up-to-date Gnome desktop)

First, I've chosen 'compiz fusion' as 3d effects from drak3d which determined the installation of 55 packages - all went fine.
Then, I opened the compiz settings (ccsm) which started and apparently worked. I've ticked some animations there, then log out, log in ... and everything was as before (the expected animations didn't work).
I've logged out from Gnome shell and logged into Gnome Classic (fallback) and there, whichever application I opened every window was lacking the window title.

Finally, I undid all the changes (also removed the previously 55 installed packages) and windows appearance in Gnome Classic returned to normal.
Sorry I've forgotten to fire the compiz --replace command to see the results ... at request I can install compiz and all the dependencies again.

CC: (none) => gruescubogdan

Comment 12 Julien Moragny 2012-04-04 21:16:08 CEST
@herbert : I've just tried from lxde, kde & gnome (shell & classic) without problem, albeit compiz --replace alone doesn't load decoration nor any plugin which is "normal". So you just get a window without anything else.

Just FTR, for the config to be loaded, you need ccp plugin (libcompizconfig) and load compiz with ccp option (compiz --replace ccp). To have decoration you need a decorator (gtk or kde-window-decorator) loaded before compiz.

Can you try with compiz-fusion-icon, it's a graphical launcher which take care of launching decorator, config plugin and allow to switch between window manager ?

I'm on x86_64 in virtualbox.
I wonder if I shouldn't just kill drak3d as it doesn't serve a real goal nowadays.
Comment 13 Herbert Poetzl 2012-04-04 23:01:07 CEST
Created attachment 1923 [details]
before fusion-icon
Comment 14 Herbert Poetzl 2012-04-04 23:01:43 CEST
Created attachment 1924 [details]
after fusion-icon
Comment 15 Julien Moragny 2012-04-05 23:08:30 CEST
After some research, I may have found part of the problem. In gnome 3, Gnome shell is both the WM and the "desktop (panel and so on)". So with compiz replacing gnome shell, you only got a WM and no "desktop". You need to have another soft to play the role of panel, such as cairo dock.

https://live.gnome.org/GNOME3Myths#I_can.27t_use_Compiz_with_GNOME_Shell.21
https://wiki.archlinux.org/index.php/Compiz#GNOME

With gnome fallback, it should work (and it remind me that I thought I had tested with shell but in fact not yesterday, I got the same result as you with gnome shell).

Now, I don't have (yet ?) an idea on why the decorator doesn't launch in your case.
Comment 16 Herbert Poetzl 2012-04-06 00:46:16 CEST
(In reply to comment #15)
> So with compiz replacing gnome shell, you only got a WM and no "desktop". 
> You need to have another soft to play the role of panel, such as cairo dock.

yes, I know that and cairo-dock is already running quite fine on both gnome3 and gnome classic (when started)
Comment 17 Herbert Poetzl 2012-04-06 00:47:13 CEST
Created attachment 1931 [details]
before fusion-icon (classic)
Comment 18 Herbert Poetzl 2012-04-06 00:49:29 CEST
Created attachment 1932 [details]
after fusion-icon (classic)

note that this screenshot also shows the traceback (right after ^C) when interrupting fusion-icon after it hangs around for some while.
Comment 19 morrigan w 2012-04-10 11:45:10 CEST
I'm seeing the same behaviour still with compiz-0.9.7.6-1.mga2.x86_64. 

It doesn't matter whether it's gnome3, gnome classic or LXDE, compiz behaves just as described above.

CC: (none) => morrigan

Comment 20 Julien Moragny 2012-04-10 20:38:23 CEST
I managed to reproduce the problem with a clean profile. Compiz start but for whatever reason decoration are not applied.
Now I need to understand why.

Status: NEW => ASSIGNED

Julien Moragny 2012-04-10 20:38:56 CEST

Summary: Compiz doesn't start => Decoration not applied when compiz start

Comment 21 Julien Moragny 2012-04-10 20:59:38 CEST
So, the problem lie in the fact than compiz now load decoration if the plugin decor is activated in compiz config setting manager and not by default.

If you launch ccsm and toggle decoration plugin then save, when you launch compiz, you should have the decoration.

Now, I need to find a way to do a sane default at installation.
Comment 22 morrigan w 2012-04-11 13:01:44 CEST
It's not as easy as that, at least not for me.

Apparently, all plugins are disabled by default, so I enabled composite, decorations, move window, (these three are IMHO mandatory, otherwise nothing will work), expose and wobbly, just to see the difference.

You didn't say which session you tested under, so let me describe my experiences:


Under the gnome classic session, it seems to work fine at first.
Then open ccsm, enable wallpapers, and get bad graphic errors. (Those vary between windows not being properly redrawn or the whole screen flashing in psychodelic colours)

Under LXDE, the wallpaper plugin simply does nothing. 

In both sessions, I've had compiz either segfault or hang after a few minutes, leaving you either with a window that no longer accepts keyboard input or a hung x-session.
Comment 23 Julien Moragny 2012-04-13 23:42:02 CEST
I just pushed compiz-0.9.7.6-2 which I hope should fix this bug.

I can't modify compiz itself so I modified compiz-fusion (a script used by drak3d and other tools) in order to test for a config file in user profile. If none is found (or one with a zero size), a new config file is created with some core plugins :
core, composite, opengl, decor, compiztoolbox, switcher, copytex, fade, place, resize and move.

It should provide a sane default.

morrigan w > For crash or hang, Can you please open a specific bug report (here or upstream on launchpad).
Comment 24 Manuel Hiebel 2012-04-15 15:12:39 CEST
*** Bug 5416 has been marked as a duplicate of this bug. ***
Comment 25 morrigan w 2012-04-15 15:59:18 CEST
(In reply to comment #24)
> *** Bug 5416 has been marked as a duplicate of this bug. ***

This bug was about compiz not starting, which has been resolved by now. So I'm closing this one and will reopen the other one, which centers on background wallpapers not working correctly.

Status: ASSIGNED => RESOLVED
Resolution: (none) => FIXED