Hibernation and sound 'ticking'

OSS specific Linux discussion (x86/amd64)

Moderators: cesium, dev, kodachi, hannu

Hibernation and sound 'ticking'

Postby Lockheed » Sun Apr 04, 2010 8:20 am

Two things. I often need to hibernate my laptop but after I do so, there is no more sound after resume.
As I understand it, OSS needs to be put down before system suspends but soundoff command will not work if there is any sound-using programme running (mixer, for example). Is there a way to force it to stop?
Which file do I need to put these suspend commands in so they execute at hibernation?

Second problem is with sound itself. Sometimes, it starts quietly 'ticking' regularly (say, every 0.7 second) like a vinyl record with perpendicular scratch.
Lockheed
Member
 
Posts: 18
Joined: Thu Mar 25, 2010 5:55 pm

Re: Hibernation and sound 'ticking'

Postby cesium » Sun Apr 04, 2010 6:18 pm

You can kill the sound using programs ('fuser -k' etc. see /usr/lib/oss/scripts/killprocs.sh for a method to do this). Alternatively, you can remove the oss modules with 'rmmod -f', but that's probably not best for the using programs. As for ticking, maybe an input is unmuted? Try muting stuff in the mixer...
cesium
Developer
 
Posts: 902
Joined: Sun Aug 12, 2007 12:51 am

Re: Hibernation and sound 'ticking'

Postby Lockheed » Sun Apr 04, 2010 6:45 pm

Well, instead, I could use a command to restart oss after resume. Is there such command?
Lockheed
Member
 
Posts: 18
Joined: Thu Mar 25, 2010 5:55 pm

Re: Hibernation and sound 'ticking'

Postby nuckinfuts » Sun Apr 04, 2010 6:51 pm

Lockheed wrote:Well, instead, I could use a command to restart oss after resume. Is there such command?


restart OSS:
Code: Select all
sudo soundoff
sudo soundon
nuckinfuts
Member
 
Posts: 18
Joined: Sat Apr 03, 2010 7:22 am

Re: Hibernation and sound 'ticking'

Postby Lockheed » Mon Apr 05, 2010 11:22 pm

Vicious circle. OSS really needs to get laptop-minded if it is to replace ALSA.
Lockheed
Member
 
Posts: 18
Joined: Thu Mar 25, 2010 5:55 pm

Re: Hibernation and sound 'ticking'

Postby igorzwx » Tue Apr 06, 2010 11:46 am

Lockheed wrote:Vicious circle. OSS really needs to get laptop-minded if it is to replace ALSA.


If you pretend to be an ALSA expert, you should, perhaps, know a few Linux commands, such as command "kill"
http://en.wikipedia.org/wiki/Kill_(command)

If you hate "command line", you may better install Windows and learn how to use Google and GUI-applications. Then, you may try Ubuntu once more.
igorzwx
Known Member
 
Posts: 1000
Joined: Sun Jun 28, 2009 9:31 pm

Re: Hibernation and sound 'ticking'

Postby Lockheed » Tue Apr 06, 2010 12:44 pm

igorzwx wrote:
Lockheed wrote:Vicious circle. OSS really needs to get laptop-minded if it is to replace ALSA.


If you pretend to be an ALSA expert, you should, perhaps, know a few Linux commands, such as command "kill"
http://en.wikipedia.org/wiki/Kill_(command)

If you hate "command line", you may better install Windows and learn how to use Google and GUI-applications. Then, you may try Ubuntu once more.

If you not pretend to be an irritating person, you might start doing so. It will take you longer way than what you are doing right now.

1. Where did I pretend I am an ALSA expert?
2. Kill is not a solution because if I am running something like Virtualbox, it will just kill the guest system instead of closing it gracefully.
3. And why would I hate command line, fanboy?

Next time you decide to reply someone, don't make an ass of yourself.
Lockheed
Member
 
Posts: 18
Joined: Thu Mar 25, 2010 5:55 pm

Re: Hibernation and sound 'ticking'

Postby tl1 » Sat Apr 17, 2010 6:43 am

It might be possible to gracefully quit VirtualBox by using some custom signal in kill (SIGSTOP?) Then you have to wait until it closes using something like while [ `ps -A | grep VirtualBox`..... (I never can remember the stupid bash syntax).
tl1
Member
 
Posts: 11
Joined: Tue May 30, 2006 8:58 pm

Re: Hibernation and sound 'ticking'

Postby musv » Sat Nov 20, 2010 5:26 pm

I don't know if there already has been found a solution for that problem. Just a few days ago I tried Hibernate. And I was running into the same problems like Lockheed.

OSS gives me some mixer errors when I play a sound after resume from hibernate. Only solution to solve that problem is to restart oss. Restarting oss means also killing all apps that have access to a sound device. And that means in many cases, hibernate is useless when you have to restart all relevant programs.
musv
Member
 
Posts: 12
Joined: Tue Oct 14, 2008 12:00 pm

Re: Hibernation and sound 'ticking'

Postby igorzwx » Sat Nov 20, 2010 6:59 pm

musv wrote:I don't know if there already has been found a solution for that problem. Just a few days ago I tried Hibernate. And I was running into the same problems like Lockheed.

OSS gives me some mixer errors when I play a sound after resume from hibernate. Only solution to solve that problem is to restart oss. Restarting oss means also killing all apps that have access to a sound device. And that means in many cases, hibernate is useless when you have to restart all relevant programs.


There is a script...

Suspend and Hibernation
OSS does not automatically support suspend meaning that OSS must be manually stopped prior to suspending or hibernating.
OSS provides soundon and soundoff to enable and disable OSS, although any processes that use sound must be terminated first.
The following script is a rather basic method of automatically unloading OSS prior to suspending and reloading afterwards...
https://wiki.archlinux.org/index.php/OS ... ibernation
igorzwx
Known Member
 
Posts: 1000
Joined: Sun Jun 28, 2009 9:31 pm

Re: Hibernation and sound 'ticking'

Postby musv » Sun Nov 21, 2010 11:02 pm

Killing all apps that access a sound device before hibernate shouldn't be a real solution.

Nevertheless I use hibernate only when the battery is going empty. So it's more preventing a data loss.
musv
Member
 
Posts: 12
Joined: Tue Oct 14, 2008 12:00 pm


Return to Linux

Who is online

Users browsing this forum: No registered users and 1 guest

cron