View previous topic :: View next topic |
Author |
Message |
wookie2 n00b

Joined: 21 Nov 2005 Posts: 6
|
Posted: Mon Nov 21, 2005 4:14 pm Post subject: Howto control what's being restarted when changing runlevel? |
|
|
Hi folks!
I've upgraded my kernel from 2.6.11-gentoo-r9 to 2.6.13-suspend-r4. When booted with the new kernel, switching runlevels causes alsasound to get restarted. Now that's no very good for me, because I switch to a battery runlevel everytime i unplug the AC adapter and stopping alsasound causes XMMS and xfce4-panel to crash (the latter has a volume control on it, that's probably why). How do I make sure that alsasound is left the way it is?
The interesting thing is that with the previous kernel "/sbin/rc battery" says only:
* Loading ALSA modules... [ok]
No unloading at all.
Any help appreciated. |
|
Back to top |
|
 |
wookie2 n00b

Joined: 21 Nov 2005 Posts: 6
|
Posted: Tue Nov 22, 2005 12:59 am Post subject: |
|
|
For now I'm using a truly horrible workaround - a tweak of the /sbin/rc script. When switching to the battery runlevel it skips the whole service stopping section. Still hoping someone would show me how to do it properly . |
|
Back to top |
|
 |
PaulBredbury Watchman


Joined: 14 Jul 2005 Posts: 7310
|
|
Back to top |
|
 |
widremann Veteran

Joined: 14 Mar 2005 Posts: 1314
|
Posted: Tue Nov 22, 2005 5:08 am Post subject: |
|
|
You need to have alsasound either in the boot runlevel or have it in both your default and your battery runlevels. If a service isn't in a runlevel and it isn't a boot service, it will be shut down when changing runlevels. |
|
Back to top |
|
 |
wookie2 n00b

Joined: 21 Nov 2005 Posts: 6
|
Posted: Tue Nov 22, 2005 5:59 pm Post subject: |
|
|
Thanks for your help. I have alsasound in both default and battery runlevels, also tried adding it to boot - that didn't help.
But I managed to work out what was happening. The cause was hotplug - present in default runlevel, but not in battery, so when switching it got stopped. In /etc/init.d/alsasound I had "after (...) hotplug" and that's why alsa was being restarted. I removed hotplug from there and everything works fine. |
|
Back to top |
|
 |
|