Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Howto control what's being restarted when changing runlevel?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
wookie2
n00b
n00b


Joined: 21 Nov 2005
Posts: 6

PostPosted: Mon Nov 21, 2005 4:14 pm    Post subject: Howto control what's being restarted when changing runlevel? Reply with quote

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
View user's profile Send private message
wookie2
n00b
n00b


Joined: 21 Nov 2005
Posts: 6

PostPosted: Tue Nov 22, 2005 12:59 am    Post subject: Reply with quote

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
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Tue Nov 22, 2005 4:43 am    Post subject: Reply with quote

Runlevels - hopefully useful.
_________________
Improve your font rendering and ALSA sound
Back to top
View user's profile Send private message
widremann
Veteran
Veteran


Joined: 14 Mar 2005
Posts: 1314

PostPosted: Tue Nov 22, 2005 5:08 am    Post subject: Reply with quote

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
View user's profile Send private message
wookie2
n00b
n00b


Joined: 21 Nov 2005
Posts: 6

PostPosted: Tue Nov 22, 2005 5:59 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum