On 20140219_115052, Redalert Commander wrote:
> Hi again,
> 
> The bad news is that no one answered my e-mail, the good news is that
> I managed to solve this myself.
> More below.
> 
> 2014-02-17 23:53 GMT+01:00 Steven Post <redalert.comman...@gmail.com>:
> > I have a script that starts and kills pacat (pulseaudio cat) in order to
> > get my USB turntable to work.
> > It is a rather simple script, reproduced below for reference.
> > I want to run this script at boot, but whatever I try, it doesn't seem
> > to work. When started at boot (using an init script, or rc.local) the
> > log it produces is always "pa_stream_drain(): Bad state".
> > When running the script manually it works perfectly.
> > The script is invoked with this command:
> > su username -l -c /path/to/vinyl.sh
> >
> This is now fixed by adding the following cron job (crontab -e)
> @reboot sleep 10; /path/to/vinyl.sh
> 
> I think the issue was that pacat was started too soon (before
> pulseaudio), and thus the sleep makes sure that the system is fully
> operational.
> If you do this yourself, you may find that 10 seconds is not enough,
> since this was a pretty minimal system with a SSD.
> 
> A better approach would be to check 'ps' for the pulseaudio existence
> in a loop with a sleep 1,
> thus minimizing the time between full boot and starting pacat, while
> still being sure it doesn't launch to soon (even on slow systems).
> I'll have a go at that tomorrow.
> 
> Best regards,
> Steven

This problem might be a good use-case for the benefits of systemd ;-)
But caution, I don't really understand systemd very well yet.

-- 
Paul E Condon           
pecon...@mesanetworks.net


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20140219202718.gb19...@big.lan.gnu

Reply via email to