Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: using the cuberotate-hack patch - updated

  1. #1
    Join Date
    Jun 2007
    Beans
    13,064

    using the cuberotate-hack patch - updated

    Edit:
    The flashing has been fixed, hopefully will be in a compiz* upgrade before release. (have tested & am using - works fine
    When this bug shows 'fix released' the packages should be available

    https://bugs.launchpad.net/compiz-core/+bug/862430

    (- has been merged finally - expect to see after release in compiz-0.9.8


    I know there are going to be people wanting to use that hack as posted here
    http://ubuntuforums.org/showpost.php...5&postcount=77
    And just to again mention - this is a hack not a 100% fix, may work well, may show some issue.
    Additionally there is no desire to represent this as a real fix, so if sharing please don't do so.

    Edit: have also added a patch for scale to allow limited window group picking from all WS's see post 15, can be built at the same time - both of these hacks will survive upcoming compiz upgrade to compiz-0.9.7.2 (ABI-20120305), though plugins will need to be rebuilt yet again

    I'm very happy with it here, get a flash once & a very rare while, ymmv

    There has been an api change so using the bzr source will currently fail
    So in light of that an alternate means to build the plugin, anyone feel free to suggest otherwise
    (one could build a dependency package to install then remove the ton of dev packages, not today... or build as debian packages

    Code:
    sudo apt-get build-dep compiz
    Code:
    mkdir -p compiz && cd compiz && apt-get source compiz
    Place the patch from post 77 directly in the compiz folder as seen in screen, adjust red to match source folder

    Code:
    cd compiz-0.9.7.4 && patch -Np0 -i ../cuberotate-hack.patch.txt

    Code:
    mkdir build && cd build
    cmake .. 
    make
    After the make completes
    Code:
    sudo mv /usr/lib/compiz/libcube.so{,-bak}
    sudo cp plugins/cube/libcube.so /usr/lib/compiz/

    Edit:
    When compiz (compiz-core, compiz-plugins, ect. ) updates -
    let it update, this will overwrite your modified libcube.so

    If the flashing returns then you may be able to use the previous libcube.so that was built, assuming you hung on to it, if the ABI matches

    To tell look in synaptic under compiz-core > installed files, see screen 2

    Then ck. the ABI of your modded libcube.so,
    Ex. of the current one, for the moment I've left in place, will probably save it elsewhere

    Code:
    doug@doug-XPS-M1330:~$ ldd  /home/doug/compiz/compiz-0.9.7.4/build/plugins/cube/libcube.so  |grep libcompiz_core
    	libcompiz_core.so.ABI-20120216 => /usr/lib/libcompiz_core.so.ABI-20120216 (0xb764f000)
    Notice the ABI of libcube.so matches the ABI of what's in screen 2, so they're compatable

    If the ABI of the updated libcompiz_core is different then the one of your previously built libcube.so then you'd would need to get a new source, rebuild ect.

    (there may be a different way to find an ABI of an .so, I just use the 1st. that works
    Attached Images Attached Images
    Last edited by mc4man; April 24th, 2012 at 07:40 AM. Reason: fixed for real...

  2. #2
    Join Date
    Sep 2010
    Location
    Beta Testing in Canada
    Beans
    5,543
    Distro
    Ubuntu Development Release

    Re: using the cuberotate-hack patch - updated

    @ mac4man,

    Thanks for keeping us apprised of these changes.
    This is Rolling Release
    Warnings for New Beta Testers& Helpful Terminal Commands:
    Running Trusty /devel/@ 5.120GHz32bit/ Please put [ prefix] on New Threads!

  3. #3
    Join Date
    Nov 2005
    Location
    Leeds, UK
    Beans
    1,634
    Distro
    Ubuntu Development Release

    Re: using the cuberotate-hack patch - updated

    Does this patch also work when you're using the Desktop Wall instead of the Cube? The flashes are actually driving me completely insane.

    Thanks!

  4. #4
    Join Date
    Jun 2007
    Beans
    13,064

    Re: using the cuberotate-hack patch - updated

    Quote Originally Posted by durand View Post
    Does this patch also work when you're using the Desktop Wall instead of the Cube? The flashes are actually driving me completely insane.

    Thanks!
    Not at all.

    If you're getting flashing while using wall directly then file a bug on.

    If you're getting flashing in the workspace switcher (expo), then I've had a bug on that for 2 months, no progress

  5. #5
    Join Date
    Nov 2005
    Location
    Leeds, UK
    Beans
    1,634
    Distro
    Ubuntu Development Release

    Re: using the cuberotate-hack patch - updated

    Ah ok, I do get the flashes with Expo as well :/ I've commented on the relevant bug report for Desktop Wall. Thanks for the heads up!

  6. #6
    Join Date
    Nov 2008
    Location
    Oita, Japan
    Beans
    419
    Distro
    Ubuntu

    Re: using the cuberotate-hack patch - updated

    Quote Originally Posted by mc4man View Post
    After the make completes
    Code:
    sudo mv /usr/lib/compiz/libcube.so{,-bak}
    sudo cp plugins/cube/libcube.so /usr/lib/compiz/
    There is a better and safer way to do that (no sudo)!

    If you put the plugin in your home directory, it will override the default one.

    Better, Safer (and fixed!):
    Code:
    mkdir -p ~/.compiz-1/plugins
    cp plugins/cube/libcube.so ~/.compiz-1/plugins/
    Restart compiz:
    Code:
    [ALT] + [F2]
    compiz --replace
    This is safer because you don't need to make any changes to the current compiz install.

    This is also better, as the file will not be overwritten with compiz upgrades.

    Caveats:

    This file will become outdated, eventually.

    Since compiz seems to be going through daily ABI changes, in the future this plugin may become incompatible and may crash compiz.

    In that event, or should anything else go wrong, delete the file ~/.compiz-1/plugins/libcube.so

    After that, until the bug gets fixed, rebuild from source as shown by mc4man.
    Last edited by quequotion; March 16th, 2012 at 01:54 AM. Reason: .compiz-1 NOT compiz-1

  7. #7
    Join Date
    Jun 2007
    Beans
    13,064

    Re: using the cuberotate-hack patch - updated

    Quote Originally Posted by quequotion View Post
    There is a better and safer way to do that (no sudo)!

    If you put the plugin in your home directory, it will override the default one.

    Better, Safer:
    Code:
    mkdir ~/compiz-1 && mkdir ~/compiz-1/plugins
    cp plugins/cube/libcube.so ~/compiz-1/plugins/
    [B].
    That sounds good, except I'd think more like
    Code:
    mkdir -p  ~/.compiz-1/plugins
    cp plugins/cube/libcube.so ~/.compiz-1/plugins/
    I usually just log out in, BwackNinja has an alternate restart command in his post that works well also
    Code:
    bash -c 'compiz --replace ccp &'
    Anyway - how's it working out - I'm fairly pleased other than unfold is a disaster here, not because of the patch, it just is atm
    Last edited by mc4man; March 15th, 2012 at 09:22 AM.

  8. #8
    Join Date
    Nov 2008
    Location
    Oita, Japan
    Beans
    419
    Distro
    Ubuntu

    Re: using the cuberotate-hack patch - updated

    Quote Originally Posted by mc4man View Post
    Code:
    mkdir -p  ~/.compiz-1/plugins
    cp plugins/cube/libcube.so ~/.compiz-1/plugins/
    Yes, that's better and more simple. I didn't know about "-p"

    Code:
    bash -c 'compiz --replace ccp &'
    This command definitely works, but it's overkill.

    "bash" is not necessary, unless you are not using the default shell.
    Ubuntu's default shell is bash.

    "ccp" is the settings plugin.
    Since ages ago, "compiz --replace ccp" has been copypasta'd all over the internet, but as far as I can tell it has not been necessary to manually load this plugin for quite some time.

    "&" runs a process in the background, opening the terminal for another command.
    This is unnecessary when using [ALT] + [F2]; Unity or Gnome's "Run a command" dialog.

    how's it working out
    So far so good.

    I haven't tried unfold yet, although I want to use it in place of expose which is also badly broken lately...

    I noticed another benefit with the cube/rotate patch:
    Some animations, particularly airplane and explode, look better.
    Before patching, these animations showed some kind of corruption in which certain sides of the 3d objects they generate would not be textured with the window content or would not be drawn at all.

    Nevermind, still having that problem.

    Just how dirty is this hack?
    Last edited by quequotion; March 16th, 2012 at 01:57 AM.

  9. #9
    Join Date
    Jun 2007
    Beans
    13,064

    Re: using the cuberotate-hack patch - updated

    Just how dirty is this hack?
    BwackNinja would be the one to comment on that, I've seen no ill or unintended effects so in that regard not bad.

    One thing I was 'correcting' about your command was you used compiz-1 instead of .compiz-1, you probably should edit

  10. #10
    Join Date
    Sep 2007
    Beans
    498

    Re: using the cuberotate-hack patch - updated

    Quote Originally Posted by quequotion View Post
    Yes, that's better and more simple. I didn't know about "-p"


    This command definitely works, but it's overkill.

    "bash" is not necessary, unless you are not using the default shell.
    Ubuntu's default shell is bash.

    "ccp" is the settings plugin.
    Since ages ago, "compiz --replace ccp" has been copypasta'd all over the internet, but as far as I can tell it has not been necessary to manually load this plugin for quite some time.

    "&" runs a process in the background, opening the terminal for another command.
    This is unnecessary when using [ALT] + [F2]; Unity or Gnome's "Run a command" dialog.



    So far so good.

    I haven't tried unfold yet, although I want to use it in place of expose which is also badly broken lately...

    I noticed another benefit with the cube/rotate patch:
    Some animations, particularly airplane and explode, look better.
    Before patching, these animations showed some kind of corruption in which certain sides of the 3d objects they generate would not be textured with the window content or would not be drawn at all.

    Just how dirty is this hack?
    First, on the command. For just Alt+F2, just "compiz --replace ccp" is sufficient. On the terminal, I do that so that it double-forks and is no longer tied to the terminal I run it from and I can close that terminal at any time without worrying about that also closing compiz. And I keep ccp because I'm pretty sure I've had problems with it not loading at one time, and its just habit to be safe and a few extra characters to type.


    Now, on the lack of cleanliness of this hack. Without the patch, compiz displays the previous workspace's contents (for 1 - 2 frames) when rotating the cube. To mitigate this, I:
    - found the place where it draws using the wrong workspace value
    - stored the last workspace value when redrawing
    - set it up to use the last workspace value instead of the current wrong workspace value at the point where it is done rotating

    An interesting thing though is the fact that I say 1 - 2 frames, not just 1 frame. I actually always see 2 frames that were wrong but only end up compensating for 1 in my patch. This works out anyway (making this even worse of a hack) because more than 1 thread is in the draw function at the same time where I do the check and use the last workspace value.

    If that made any sense to you, you can see why I have made absolutely no effort and explicitly go against any attempts to upstream a patch like this.

    Oh, and while I'm happy that other things are working better for you, I find it hard to take credit for those.

    Once I have a good chunk of time to devote to it again, I'll try to see if I can find and fix the actual problem and/or take a look at rotating with a window. Both with the mouse and keyboard ways of doing that don't work well at all >.<



    Special thanks to mc4man for making this thread. I haven't even tested this patch on ubuntu, and I always build all of compiz from bzr for myself.
    Last edited by BwackNinja; March 15th, 2012 at 07:50 PM.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •