WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: suspend - after resume sound stops working (OSS)  (Read 3934 times)

Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
suspend - after resume sound stops working (OSS)
« on: December 03, 2011, 10:26:02 AM »
hi juanito,

although my hardware offers all kind of working suspends to ram or disk on different distributions,
(everything works fine after resume: sound, lan, wifi, cpufreq, sd-card-reader and so on)
with tinycore i had problems to get a working xvesa-screen after resume until now.

today i used following command:

sudo s2ram --force --vbe_save

and the resume returned to a working display.
i use 4.1 on a usbstick onboot and ondemand-configuration, so my loaded tczs are looped  under /tmp/tcloop.

after the resume everything seemed to work fine, but my sound stopped working (oss).
i'm not sure whether it has something to do with my dev-system
or with loaded modules that should be unloaded before suspending!?

would you have an idea?
every help is welcomed.

later i will give you actual hw-informations that i get with sudo s2ram -n...
« Last Edit: December 03, 2011, 10:49:04 AM by netnomad »

Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
Re: suspend - after resume sound stops working (OSS)
« Reply #1 on: December 03, 2011, 01:18:45 PM »
i solved the problem quick & dirty:

Code: [Select]
#!/bin/sh
sudo rmmod oss_usb &&
sudo rmmod oss_ich &&
sudo rmmod osscore &&
sudo s2ram --force --vbe_save
sudo modprobe osscore
sudo modprobe oss_usb
sudo modprobe oss_ich

with this script the sound works also after the resume...
does someone knows a more elegant way?

thanks for every proposal or suggestion for improvement!

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: suspend - after resume sound stops working (OSS)
« Reply #2 on: December 04, 2011, 03:43:42 AM »
It's a known issue, OSS does not support suspend right now. Instead of modules, you can use soundoff and soundon.
The only barriers that can stop you are the ones you create yourself.

Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
Re: suspend - after resume sound stops working (OSS)
« Reply #3 on: December 04, 2011, 12:30:43 PM »
hi curaga,

thank you for your reply, i will test this soundon/off hard and will report my experiences.
another thing: on some workstations my live-usbstick with my tce-dir doesn't  work properly after a resume:
so i can't load additional tcz and perhaps some more strange dev-behavior.
after remounting another partition of this live-usbstick, f.e. the boot partition,
the whole device is freshly initialized, so everything works fine again...
would you know a tool or a command for refreshing the dev-relationship or some modules or daemons?

thank you for sharing your knowledge, bye.

Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
Re: suspend - after resume sound stops working (OSS)
« Reply #4 on: December 04, 2011, 03:58:10 PM »
hi curaga,

it can happen that the command
sudo soundoff
stops with a conflict, f.e. flit or ossxmix or sgmixer is still busy on the sound-device,
so it's not possible to stop the sound over this command.

tc@box:~$ sudo soundoff
Some applications are still using OSS - cannot unload
16102 /usr/local/bin/ossxmix
Please stop these applications and run soundoff again

on the other hand, different hardware loads different modules.
f.e. i started my usbstick on a workstation that loads additionally a further module:
oss_hdaudio
beside the other common three modules
oss_core, oss_ich, oss_usb.

so soundoff/on would be much more flexible, despite of that risk to have a conflict!
how can i solve this or make a workaround for programs that hold the device busy?

« Last Edit: December 04, 2011, 06:37:09 PM by netnomad »

Offline hiro

  • Hero Member
  • *****
  • Posts: 1229
Re: suspend - after resume sound stops working (OSS)
« Reply #5 on: December 04, 2011, 07:00:38 PM »
If soundoff doesn't work before suspend it will probably work afterwards...

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: suspend - after resume sound stops working (OSS)
« Reply #6 on: December 05, 2011, 10:22:14 AM »
Yes, you would need to kill the sound-using apps too before suspend/soundoff. It can probably be scripted, see how soundon uses fuser.

You could even make a custom copy of OSS where soundoff directly kills those instead of showing that message.
The only barriers that can stop you are the ones you create yourself.

Offline j0m

  • Newbie
  • *
  • Posts: 2
Re: suspend - after resume sound stops working (OSS)
« Reply #7 on: January 28, 2018, 04:09:03 PM »
Load the alsa app on apps

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: suspend - after resume sound stops working (OSS)
« Reply #8 on: January 29, 2018, 06:10:31 AM »
j0m, you're very much sounding like a bot, responding to ancient topics with non-relevant posts. Give some indication you're a human, or I'm deleting the account.
The only barriers that can stop you are the ones you create yourself.

Online patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 710
Re: suspend - after resume sound stops working (OSS)
« Reply #9 on: January 29, 2018, 07:33:48 AM »
@netnomad

If TC loads modules you don't want to load, just blacklist them in the blacklist kernel command line(bootcodes in tc) with Comma Separated list.

See http://distro.ibiblio.org/tinycorelinux/faq.html#bootcodes

Because when tc boots:

It builds MODPROBE Blacklist Config (/etc/modeprobe.d/blacklist.conf)
And adds all modules listed in BLACKLIST boot parameter