Results 1 to 7 of 7

Thread: Computer suspends when rhythmbox is playing

  1. #1
    Join Date
    Jul 2013
    Beans
    11

    Computer suspends when rhythmbox is playing

    Hi

    First, I'm using Xubuntu Trusty . I have configured power management to suspend my computer after 15 minutes if inactive, but it also suspends if rhythmbox is playing. So if I'm listening to music but away from my computer, it will stop playing and suspend after 15 minutes.

    I think that Xubuntu shouldn't "be" inactive when pulseaudio or a media player is running. It should only be inactive after the playlist is over and nothing else happens.

    How can I prevent this from happening? Is there something wrong with my pulseaudio/rhythmbox install or config?

    Thank you for your help,
    Cheers
    ASENSIO

  2. #2
    Join Date
    Feb 2007
    Location
    West Hills CA
    Beans
    10,044
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Computer suspends when rhythmbox is playing

    Inactive is generally defined as no user input (keyboard or mouse). So change your system not to suspend.

    You would have to write a script to specifically prevent suspend under certain conditions as in this thread: http://ubuntuforums.org/showthread.p...+playing+video
    Last edited by tgalati4; June 13th, 2014 at 04:31 PM.
    -------------------------------------
    Oooh Shiny: PopularPages

    Unumquodque potest reparantur. Patientia sit virtus.

  3. #3
    Join Date
    Nov 2008
    Location
    Alaska U.S.A.
    Beans
    384
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: Computer suspends when rhythmbox is playing

    An app called Caffeine used to, ahem, suspend suspend (Thanks! I'll be here all day! ) but, the developer has butchered the app to the point of being beyond useless. I'm looking into alternatives, like tgalati4 mentioned, such as scripting myself.

  4. #4
    Join Date
    Feb 2007
    Location
    West Hills CA
    Beans
    10,044
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Computer suspends when rhythmbox is playing

    I did not mention caffeine because it seems to cause more issues than it solves, but if it works for you then great. Otherwise, you will need to spend some time scripting to get your computer to do what you want.

    If you just want the screen to turn off, then check the monitor's settings or your computer's BIOS and check the DPMS settings.
    -------------------------------------
    Oooh Shiny: PopularPages

    Unumquodque potest reparantur. Patientia sit virtus.

  5. #5
    Join Date
    Jul 2013
    Beans
    11

    Re: Computer suspends when rhythmbox is playing

    thanks for your replies,
    Ok, there's nothing wrong with my xubuntu, good. So caffeine is useless and I can't code...

    Well, I thought something like this: monitor rhythmbox, if it's running then I need a keystroke to keep my computer active. Did some searching and found this:
    How to continuously monitor rhythmbox for track change using bash
    How to inject keystrokes via a shell script?

    I think I'm way over my head here, but... is this usable? (remember I can't code )
    Code:
    #!/bin/bash
    
    interface=org.gnome.Rhythmbox.Player
    member=playingUriChanged
    dbus-monitor --profile "interface='$interface',member='$member'" |
    while read -r line; do
    xdotool key space
    done
    Again, thank you for your help
    Cheers
    ASENSIO

    P.S. - "suspend suspend" ahahahah

  6. #6
    Join Date
    Feb 2007
    Location
    West Hills CA
    Beans
    10,044
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Computer suspends when rhythmbox is playing

    Yes, that's one way to do it. Let us know if it works. The script looks OK and xdotool seems to be installed on my 12.10 system as part of the base system.

    Some players (not rhythmbox) allow a preplay script to run before a track is played. That allows you to use xdotool or some other script to keep awake during playback.

    There are some dbus plug-ins for rhythmbox and perhaps you can use a direct dbus command to keep the system awake.
    Last edited by tgalati4; June 14th, 2014 at 05:57 AM.
    -------------------------------------
    Oooh Shiny: PopularPages

    Unumquodque potest reparantur. Patientia sit virtus.

  7. #7
    Join Date
    Jul 2013
    Beans
    11

    Re: Computer suspends when rhythmbox is playing

    it didn't work. i tried it with the <super> key that opens my wisker menu and, even if rhythmox is off, the script opened de menu. so I think that the "monitor dbus" part has something wrong. I tried it with rhythmbox on and my computer suspended after 15 minutes.
    there should be a RB plugin to do this

Tags for this Thread

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
  •