Results 1 to 4 of 4

Thread: howto block suspend on OS 12.3 host when virtualbox running

  1. #1
    Join Date
    Aug 2008
    Location
    London, UK
    Posts
    168

    Question howto block suspend on OS 12.3 host when virtualbox running

    I'm running VirtualBox 4.2.18 as host under KDE4 on openSUSE 12.3 on 64bit Intel. I'm running a couple of 32 bit guests (Vista, Slackware).

    I've had guest lockups when the host suspends.

    How can I stop suspend under KDE4.10.5 when VirtualBox is running?
    On 11.3 I knew how to do it - add it to the blacklist, but I can't find that now, and it seems to depend on services accessible through qdbus ...

    Thanks for any help
    David

  2. #2
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: howto block suspend on OS 12.3 host when virtualbox running

    On 2013-09-22 15:16, jetojedno wrote:
    >
    > I'm running VirtualBox 4.2.18 as host under KDE4 on openSUSE 12.3 on
    > 64bit Intel. I'm running a couple of 32 bit guests (Vista, Slackware).
    >
    > I've had guest lockups when the host suspends.
    >
    > How can I stop suspend under KDE4.10.5 when VirtualBox is running?
    > On 11.3 I knew how to do it - add it to the blacklist, but I can't find
    > that now, and it seems to depend on services accessible through qdbus


    Try this:

    Code:
    Telcontar:~ # cat /etc/pm/sleep.d/5inhibit
    #!/bin/bash
    
    
    .. /usr/lib/pm-utils/functions
    
    
    RETVAL=0
    
    case "$1" in
    suspend)
    RETVAL=1
    #This does not abort.
    touch $INHIBIT
    #This does.
    MESSAGE="Aborting suspend to RAM because it crashes system. "
    /bin/logger -t pm-utils -p syslog.warn $MESSAGE
    echo "$MESSAGE  Touched $INHIBIT"
    ;;
    hibernate)
    ;;
    thaw|resume)
    ;;
    *)
    ;;
    esac
    exit $RETVAL
    
    # Idea for $INHIBIT in /usr/lib/pm-utils/sleep.d/30s2disk-check
    Telcontar:~ #

    I'm unsure if it works or not.


    --
    Cheers / Saludos,

    Carlos E. R.
    (from 12.3 x86_64 "Dartmouth" at Telcontar)

  3. #3
    Join Date
    Sep 2012
    Posts
    5,202

    Default Re: howto block suspend on OS 12.3 host when virtualbox running

    Quote Originally Posted by jetojedno View Post
    How can I stop suspend under KDE4.10.5 when VirtualBox is running?
    Look at systemd-inhibit. It would be something like
    Code:
    systemd-inhibit --mode=block --what=sleep vritualbox ...
    (I do not know how actual virtual box command is called.)

  4. #4
    Join Date
    Aug 2008
    Location
    London, UK
    Posts
    168

    Default Re: howto block suspend on OS 12.3 host when virtualbox running

    Perfect! Thanks.

Tags for this Thread

Posting Permissions

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