Page 1 of 4 123 ... LastLast
Results 1 to 10 of 39

Thread: HOWTO suspend/hibernate with compiz and aiglx

  1. #1
    Join Date
    Jun 2006
    Location
    Italy
    Beans
    29

    HOWTO suspend/hibernate with compiz and aiglx

    When I installed AIGLX and Compiz I have had problem on resume from suspend and hibernate (never properly wakes up). I think that it's a problem of compiz. To resolve this, just add two simple scripts to acpi: the idea is to kill compiz and to load metacity on suspend/hibernate and to reload compiz after resume.

    First script is "/etc/acpi/suspend.d/25-compiz-stop.sh"

    #!/bin/bash
    #/etc/acpi/suspend.d/25-compiz-stop.sh

    PID_COMPIZ_REAL=`ps -Ao pid,comm | grep compiz.real | awk '{print $1}'`
    if [ "$PID_COMPIZ_REAL" == "" ]; then PID_COMPIZ_REAL=0; fi
    if [ "$PID_COMPIZ_REAL" -gt 0 ]; then
    export COMPIZUSER=`ps -Ao user,comm | grep compiz.real | awk '{print $1}'`
    sudo -b -H -u $COMPIZUSER /usr/bin/metacity --display=:0.0 --replace gconf &
    PID_COMPIZ_TRAY=`ps -Ao pid,comm | grep compiz-tray | awk '{print $1}'`
    if [ "$PID_COMPIZ_TRAY" -gt 0 ]; then
    kill -s 15 $PID_COMPIZ_TRAY &
    fi
    fi
    if [ "$PID_COMPIZ_REAL" == 0 ]; then
    export COMPIZUSER=`ps -Ao user,comm | grep gnome-power-man | awk '{print $1}'`
    fi




    The second one is "/etc/acpi/resume.d/99-compiz-resume.sh"

    #!/bin/bash
    #/etc/acpi/resume.d/99-compiz-resume.sh

    export DISPLAY=:0.0
    if test -z $COMPIZUSER;then
    echo "Setting COMPIZUSER....."
    PID_COMPIZ_REAL=`ps -Ao pid,comm | grep compiz.real | awk '{print $1}'`
    if [ "$PID_COMPIZ_REAL" == "" ]; then PID_COMPIZ_REAL=0; fi
    if [ "$PID_COMPIZ_REAL" -gt 0 ]; then
    export COMPIZUSER=`ps -Ao user,comm | grep compiz.real | awk '{print $1}'`
    fi
    if [ "$PID_COMPIZ_REAL" == 0 ]; then
    export COMPIZUSER=`ps -Ao user,comm | grep gnome-power-man | awk '{print $1}'`
    fi
    fi
    PID_COMPIZ_TRAY=`ps -Ao pid,comm | grep compiz-tray | awk '{print $1}'`
    if [ "$PID_COMPIZ_TRAY" == "" ]; then PID_COMPIZ_TRAY=0; fi
    if [ "$PID_COMPIZ_TRAY" == 0 ]; then
    echo "Starting compiz-tray-icon...."
    sudo -H -b -u $COMPIZUSER /usr/bin/compiz-tray-icon &
    fi


    Hope this could help someone with the same problem!

  2. #2
    Join Date
    Jan 2006
    Location
    Prato, Italy
    Beans
    12

    Re: HOWTO suspend/hibernate with compiz and aiglx

    Great, this seems to work with latest aiglx from beerorkid repos on my i915 laptop! Thanks!!

  3. #3
    Join Date
    Apr 2006
    Beans
    9
    Distro
    Ubuntu Karmic Koala (testing)

    Red face Re: HOWTO suspend/hibernate with compiz and aiglx

    Tried with same setup as Kecci, but after last big update of Compiz (today/yesterday). Still working for you guys? Or could you update the scripts to work with the new version?

    If it is still working for you after the Quinnstorm repo update, how's that ;o) Did: "sudo gedit /path/to/file1" and dito for file 2. Hiber and startup enden in a black screen. So i did: "sudo chmod +x /path/to/file" hiber and startup ended in black screen ... Anything I'm missing?

    Thx for the effort btw! Would realy like the fix. After fixing the wlan today the hiber is all that stands in the way for a compleat Ubuntu laptop ;o)

  4. #4
    Join Date
    Jun 2006
    Location
    Italy
    Beans
    29

    Re: HOWTO suspend/hibernate with compiz and aiglx

    The compiz development team changes everything everytime!
    Now the gnome-compiz-manager (and compiz-tray-icon) doesn't work anymore with the latest update: they switch from gconf to csm (a new utility to configure compiz, plugins, etc) and they modify binaries names and options.

    I'm trying to change my scripts to fix things.


    #!/bin/bash
    #/etc/acpi/suspend.d/25-compiz-stop.sh

    PID_COMPIZ_REAL=""
    PID_COMPIZ_CGWD=""
    PID_COMPIZ_REAL=`ps aux | grep compiz | grep -v grep | head -n 1 | awk '{print $2}'`
    if [ "$PID_COMPIZ_REAL" == "" ]; then PID_COMPIZ_REAL=0; fi
    if [ "$PID_COMPIZ_REAL" -gt 0 ]
    then
    export COMPIZUSER=`ps aux | grep compiz | grep -v grep | head -n 1 | awk '{print $1}'`
    sudo -b -H -u $COMPIZUSER /usr/bin/metacity --display=:0.0 --replace gconf &
    PID_COMPIZ_CGWD=`ps aux | grep compiz | grep -v grep | head -n 1 | awk '{print $2}'`
    if [ "$PID_COMPIZ_CGWD" == "" ]; then PID_COMPIZ_CGWD=0; fi
    if [ "$PID_COMPIZ_CGWD" -gt 0 ]
    then
    kill -s 15 $PID_COMPIZ_CGWD &
    fi
    fi
    if [ "$PID_COMPIZ_REAL" == 0 ]; then
    export COMPIZUSER=` ps aux | grep gnome-power-man | grep -v grep | head -n 1 | awk '{print $2}'`
    fi



    The resume script has some problems....in my ubuntu if you enable the last line, compiz crashes...I don't know why! If you try it on a terminal works perfectly....so I decided to leave alive metacity after suspend/hibernate. If you want compiz, open a terminal and write 'compiz-start' to start compiz!


    #!/bin/bash
    #/etc/acpi/resume.d/99-compiz-resume.sh

    export DISPLAY=:0.0
    if test -z $COMPIZUSER;then
    PID_COMPIZ_REAL=""
    PID_COMPIZ_REAL=`ps aux | grep compiz | grep -v grep | head -n 1 | awk '{print $2}'`
    if [ "$PID_COMPIZ_REAL" == "" ]; then PID_COMPIZ_REAL=0; fi
    if [ "$PID_COMPIZ_REAL" -gt 0 ]; then
    export COMPIZUSER=`ps aux | grep compiz | grep -v grep | head -n 1 | awk '{print $1}'`
    fi
    if [ "$PID_COMPIZ_REAL" == 0 ]; then
    export COMPIZUSER=` ps aux | grep gnome-power-man | grep -v grep | head -n 1 | awk '{print $2}'`
    fi
    fi
    #sudo -H -b -u $COMPIZUSER /usr/bin/compiz-start &



    I'll wait for the next release hoping THEY fix things....
    With Compiz and AIGLX I'm unable also to switch console with Ctrl+Alt+Fn: when I return on X with Ctrl+Alt+F7 the screen hangs! The only thing I can do is reboot with Ctrl+Alt+Canc!! Do you have the same problem?

  5. #5
    Join Date
    Jun 2005
    Location
    China
    Beans
    91
    Distro
    Ubuntu Karmic Koala (testing)

    Re: HOWTO suspend/hibernate with compiz and aiglx

    u try the line compiz-start without the '&' ?

  6. #6
    Join Date
    Jun 2006
    Location
    Italy
    Beans
    29

    Re: HOWTO suspend/hibernate with compiz and aiglx

    Sure! No difference with or without '&' and the end of the line. So I decide to comment it out by adding a "#" at the beginning of the line and wait for next releases....
    I have also tried to add a sleep command before 'compiz-start', to launch compiz after n seconds....no way....

  7. #7
    Join Date
    Apr 2006
    Beans
    9
    Distro
    Ubuntu Karmic Koala (testing)

    Wink Second run.

    Tried the "without &" above. Didn't work. Compiz doesn't crach but it doesn't start eather.

    So, now I can hiber (cinda). Tnx! How about the "blank screen" funktion? Related probelm. Compiz cant get the screen to reinitiate on sleep or blank screen (closing the lid or when it turns off the screen when the screensaver has be on for to long) ... Any help to be had here?

    Tried the Alt+Ctrl+Fn to, didn't get the screent back. Think it hang or smthn... Any fix would be great. But right now the blank screen and compiz-start not working on resume is more urgent. What does the options to sudo do in the last line (call me lazy)?

  8. #8
    Join Date
    Jan 2005
    Location
    Leeds
    Beans
    22

    Re: Second run.

    Bump ....please..

  9. #9
    Join Date
    Oct 2006
    Beans
    1

    HOWTO suspend/hibernate with beryl and aiglx (kubuntu)

    This (simplified) version of the same scripts
    works for me, using kubuntu dapper, aiglx and beryl:

    ---------------------------
    #!/bin/bash
    #/etc/acpi/suspend.d/07-compiz-stop.sh

    PID_BERYL=`ps -Ao pid,comm | grep beryl | awk '{print $1}'`
    if [ "$PID_BERYL" != "" ]; then
    kill -s 15 $PID_BERYL &
    fi
    ------------------------------

    ------------------------------
    #!/bin/bash
    #/etc/acpi/resume.d/99-beryl-resume.sh

    export DISPLAY=:0.0
    BERYLUSER=`ps -Ao user,comm | grep startkde | awk '{print $1}'`
    PID_BERYL=`ps -Ao pid,comm | grep beryl-manager | awk '{print $1}'`
    if [ "$PID_BERYL" == "" ]; then PID_BERYL=0; fi
    if [ "$PID_BERYL" == 0 ]; then
    echo "Starting beryl-manager...."
    sudo -H -b -u $BERYLUSER /usr/bin/beryl-manager &
    fi
    ------------------------

    N.B.
    Since the first script uses "grep beryl" to find the pids of
    beryl and beryl-manager it is important that the script name does not contain "beryl" .... (this is why it is still called *compiz-stop.sh)

  10. #10
    Join Date
    Aug 2005
    Location
    Ikast, Denmark,
    Beans
    14
    Distro
    Ubuntu 6.10 Edgy

    Re: HOWTO suspend/hibernate with compiz and aiglx

    Have anyone made the resume script for aiglx and beryl work??? I'm running Ubuntu (gnome) and it doesn't work... I even tried adding beryl-manager in the end of the script, but no luck... Have anyone got it working???

    The suspend script works great, it just isn't nice to start beryl manually without another window-manager

Page 1 of 4 123 ... 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
  •