LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-19-2014, 07:49 AM   #1
plotino
LQ Newbie
 
Registered: May 2014
Posts: 25

Rep: Reputation: Disabled
to launch a script to restart alsa after boot of kxstudio


Hello
Due to potential uncorrect boot of alsa and jackd in KXStudio, i need to restart alsa with
$sudo alsa force-restart
after the system has completed its boot sequence.
HOw to do it?
if a write a bash scriopt and put in /etc/init.d/,
how to know if it will processed after completion of the boot preocderure?

thanx

plotino
 
Old 05-19-2014, 07:52 AM   #2
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,326

Rep: Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920
would one of these options help you:
http://www.linuxquestions.org/questi...3/#post5106743
 
Old 05-19-2014, 11:42 AM   #3
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
good advice from schneidz, but shouldn't we take a step back and try to solve the underlying problem?

are you using kxstudio as a standalone distribution or as a collection of apps installed into an already installed linux system?
 
Old 05-30-2014, 03:16 PM   #4
plotino
LQ Newbie
 
Registered: May 2014
Posts: 25

Original Poster
Rep: Reputation: Disabled
to launch a script to restart alsa after boot of kxstudio

Im using kxstudio as stand alone distro
 
Old 05-31-2014, 01:02 AM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
In that case i do not know if schneidz' advice applies because i do not know what sort of start-up kxstudio uses (whether it uses /etc/rc.local).
just tell us what major distro kxstudio is based on.

if you want to solve the underlying problem, you have to expand on this:
Quote:
Originally Posted by plotino View Post
Due to potential uncorrect boot of alsa and jackd in KXStudio, i need to restart alsa
because I don't see how this could go wrong on a preconfigured multimedia production distro.
 
Old 06-04-2014, 02:40 AM   #6
plotino
LQ Newbie
 
Registered: May 2014
Posts: 25

Original Poster
Rep: Reputation: Disabled
to launch a script to restart alsa after boot of kxstudio

ondoho, it deals with ir_enable option of alsa. fir some unknown reasons, in the normal start up process of kxstudio, the ir interface of creative livedrive is not working.
but if I restart alsa after boot, ir interface starts working.
 
Old 06-05-2014, 01:27 PM   #7
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
well then i guess schneidz advice is the way to go.
you might need to add a delay, maybe sth like
Code:
( sleep 5 && alsa force-restart ) &
and then it really depends where you put the script - in rc.local you wouldn't need sudo.
but, to further help with that some information requested is still missing.
 
Old 06-08-2014, 01:09 PM   #8
plotino
LQ Newbie
 
Registered: May 2014
Posts: 25

Original Poster
Rep: Reputation: Disabled
ondoho,
rc.local is actually present in kxstudio distro.
so i have to put the call to script here, isnt it?
i think it's based on ubuntu distro.
if you need more info to help me, please ask

ciao

Last edited by plotino; 06-08-2014 at 01:11 PM.
 
Old 06-08-2014, 03:36 PM   #9
plotino
LQ Newbie
 
Registered: May 2014
Posts: 25

Original Poster
Rep: Reputation: Disabled
i have tried to put "alsa force-reload" in rc.local
ma the ir interface dont seem to work anyway ..
how to know when the script in rc.local have been execute during the boot process?
is there any log for that?

thanx
 
Old 06-09-2014, 08:40 AM   #10
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,326

Rep: Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920
i think so but i dont know what it is (i think it goes to ~/.xsession-errors). i usually do something like this:
Code:
date >> /home/schneidz/rc-local.test && echo calling program from rc.local >> /home/schneidz/rc-local.test
 
Old 06-10-2014, 07:10 AM   #11
plotino
LQ Newbie
 
Registered: May 2014
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by schneidz View Post
i think so but i dont know what it is (i think it goes to ~/.xsession-errors). i usually do something like this:
Code:
date >> /home/schneidz/rc-local.test && echo calling program from rc.local >> /home/schneidz/rc-local.test

sorry not so expert about shell comands ...

let me understand ...

&& is a sqeuence of comands (the second will be run only the first one is executed seuccessfully)

date >> is appending date to rc-local.test

echo calling program from rc.local is aappending the string "calling program from rc.local" to file rc-local.test

i suppose after that i need to rename rc-local.test in rc.local
but im still wondering where the date and log string will be output after boot ....
 
Old 06-10-2014, 08:02 AM   #12
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,326

Rep: Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920
this is the file it would create for me:
/home/schneidz/rc-local.test

generally speaking it would be: /home/<user>/whatever/floats/your/boat

it just gives a display of whats going on under-the-hood.
 
Old 06-10-2014, 01:16 PM   #13
plotino
LQ Newbie
 
Registered: May 2014
Posts: 25

Original Poster
Rep: Reputation: Disabled
to launch a script to restart alsa after boot of kxstudio

but if the file is under your home dir, how can the system launch it automatically?
 
Old 06-10-2014, 01:20 PM   #14
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by plotino View Post
i have tried to put "alsa force-reload" in rc.local
how exactly did you do that? did you mark it executable?
Quote:
ma the ir interface dont seem to work anyway ..
me no savvy???

you can add the line schneidz suggested into that script (the one in /etc/rc.local), that would create a file in your home directory if the script was executed.

Last edited by ondoho; 06-10-2014 at 01:21 PM.
 
Old 06-10-2014, 01:33 PM   #15
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,326

Rep: Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920
Quote:
Originally Posted by plotino View Post
but if the file is under your home dir, how can the system launch it automatically?
sorry, i should explain that i add a line like that to the end of my /etc/rc.local. when the system boots up it executes the lines in /etc/rc.local and the last line would instruct it to append output to a file in my home directory that i can then check the output for errors and such.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to restart sound drivers and alsa firekage Slackware 11 01-29-2015 02:40 PM
LXer: KXStudio 12.04.1 Screenshot Tour LXer Syndicated Linux News 0 06-21-2013 03:20 PM
How to add script on mandriva to restart samba when boot up? tailinlinux Linux - Newbie 9 05-02-2012 11:02 AM
how do you restart alsa in slack? tintilin Linux - Software 1 11-22-2004 11:04 AM
Audio stutter - how to restart ALSA? axelsharper Linux - Software 3 07-16-2004 01:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration