You are not logged in.

#1 2008-09-05 12:45:10

Kane
Member
Registered: 2006-10-08
Posts: 220

pm-utils oss4 and openbox

Hi guys,
Being bored i thought id try and get pm-utils to work, after previously failed attempts it now seems to be working (almost) flawlessly. So far so good, but ive got a couple of questions.

OSS4:
After resuming sound doesnt appear to work, i think this may be something to do with oss4 not being able to unload as its being used by mpd.
Would there be a way to force it to shutdown?

Openbox:
On the wiki page http://wiki.archlinux.org/index.php/Pm-utils is suggests a way of enabling the suspend options using sudo, im just wondering if theres a way to run the suspend scripts without sudo? (i've never been a fan of it tongue)

One last thing, after resuming i get a flash of orange/white stripes on my lcd monitors for a second or so before the display comes up. Is there anyway to stop this?

Thanks
Kane

Offline

#2 2008-09-16 12:29:49

jiyunatori
Member
Registered: 2008-07-04
Posts: 54

Re: pm-utils oss4 and openbox

Kane wrote:

OSS4:
After resuming sound doesnt appear to work, i think this may be something to do with oss4 not being able to unload as its being used by mpd.
Would there be a way to force it to shutdown?

Same here. If anyone found a workaround, I'm interested !

Offline

#3 2008-09-16 16:50:15

Dheart
Member
From: Sofia, Bulgaria
Registered: 2006-10-26
Posts: 956

Re: pm-utils oss4 and openbox

I wrote a hook about oss4 and mpd:

#!/bin/bash
case $1 in
    hibernate)
    echo "Killing mpd and stopping oss4"
         mpd --kill & /etc/rc.d/oss-linux-free stop
        ;;
    suspend)
    echo "Killing mpd and stopping oss4"
        mpd --kill & /etc/rc.d/oss-linux-free stop
        ;;
    thaw)
    echo "Starting oss4 and mpd"
        /etc/rc.d/oss-linux-free start & mpd
        ;;
    resume)
    echo "Starting oss4 and mpd"
        /etc/rc.d/oss-linux-free start & mpd
        ;;
    *)  echo "Wrong call"
        ;;

Create a file /etc/pm/sleep.d/66oss_mpd and put that text in it. Note that the file MUST start with 66 (That's the order sleep scripts are executed in)
Than chmod +x /etc/pm/sleep.d/66oss_mpd and voila Now when the computer goes to sleep it kills mpd and stops oss4 and on resume it starts oss4 and starts mpd.
P.P.Just remove the mpd part if you don't use mpd...


My victim you are meant to be
No, you cannot hide nor flee
You know what I'm looking for
Pleasure your torture, I will endure...

Offline

#4 2008-09-17 20:14:36

jiyunatori
Member
Registered: 2008-07-04
Posts: 54

Re: pm-utils oss4 and openbox

I made a try and it didn't work - but maybe I should try harder. Nonetheless,

/etc/rc.d/oss stop

this command won't work if any program using oss4 is running - such as mocp (playing or not) or firefox with some flash content opened.

EDIT : my mistake, I had oss-testing installed. with oss-linux-free, /etc/rc.d/oss-linux-free restart will kill all processes using OSS. that's what I call playing the hard way ... smile

Last edited by jiyunatori (2008-09-17 20:33:46)

Offline

Board footer

Powered by FluxBB