[Pm-utils] code available to solve sound-after-suspend problems

Stefan Seyfried seife at suse.de
Mon Feb 26 05:21:35 PST 2007

On Sat, Feb 24, 2007 at 11:27:05PM -0500, Mark Stosberg wrote:
> Since some sound modules can't survive suspend, it's necessary to unload
> them and reload them. However, some of them won't "let go" as long as
> something is talking to the sound card.
> For this case, Mandriva has had a solution for the last few years that
> has worked reasonable well: They kill all the programs that are talking
> to the sound card and restart them. (It's an option, not the default
> behavior!).
> It makes sense to me to offer to the same option through pm-utils, for
> people would like to make this trade-off. (Personally, it has worked
> well for me).
> Mandriva' GPL code for this available here, and it should be trivial to
> port to pm-utils, it seems:
> http://cvs.mandriva.com/cgi-bin/viewvc.cgi/soft/suspend-scripts/suspend.d/sound?revision=1.5&view=markup

Yes, it is trivial. I also had requests to do something similar in suse
(basically "service alsasound restart" does all this for me, since it
kills the applications and reloads the drivers).


We should not ship such workarounds in pm-utils upstream (and normally no
distro should do this in their default configuration). Just report the
problems with your sound drivers to the kernel developers and have them fix
the drivers.
Until this happens, adding a custom hook to /etc/pm/hooks is trivial.

Papering over the driver issues in userspace is not a sustainable strategy.

> Also see my related bug report and patch here:
> http://qa.mandriva.com/show_bug.cgi?id=28910
> It fixes "resume" for exaile other music players written in interpreted
> languages.
Stefan Seyfried

"Any ideas, John?"
"Well, surrounding them's out." 

More information about the Pm-utils mailing list