snd_cs46xx does not work after suspend/resume cycle

Bug #11149 reported by Chris Halls on 2004-12-12
66
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Ubuntu
Undecided
Unassigned
Nominated for Feisty by Mark Stosberg
Nominated for Gutsy by Mark Stosberg
Nominated for Hardy by Mark Stosberg
linux (Ubuntu)
Medium
Unassigned
Nominated for Feisty by Mark Stosberg
Nominated for Gutsy by Mark Stosberg
Nominated for Hardy by Mark Stosberg
linux-source-2.6.15 (Ubuntu)
Undecided
Unassigned
Nominated for Feisty by Mark Stosberg
Nominated for Gutsy by Mark Stosberg
Nominated for Hardy by Mark Stosberg
linux-source-2.6.20 (Ubuntu)
Medium
Unassigned
Nominated for Feisty by Mark Stosberg
Nominated for Gutsy by Mark Stosberg
Nominated for Hardy by Mark Stosberg

Bug Description

As discussed on IRC. I have no sound after a suspend/resume cycle. Laptop is
an IBM T20.

chris@shawn:~$ lspci
0000:00:00.0 Host bridge: Intel Corp. 440BX/ZX/DX - 82443BX/ZX/DX Host bridge
(rev 03)
0000:00:01.0 PCI bridge: Intel Corp. 440BX/ZX/DX - 82443BX/ZX/DX AGP bridge (rev 03)
0000:00:02.0 CardBus bridge: Texas Instruments PCI1450 (rev 03)
0000:00:02.1 CardBus bridge: Texas Instruments PCI1450 (rev 03)
0000:00:03.0 Ethernet controller: 3Com Corporation 3c556B CardBus [Tornado] (rev 20)
0000:00:03.1 Communication controller: 3Com Corporation Mini PCI 56k Winmodem
(rev 20)
0000:00:05.0 Multimedia audio controller: Cirrus Logic CS 4614/22/24
[CrystalClear SoundFusionAudio Accelerator] (rev 01)
0000:00:07.0 Bridge: Intel Corp. 82371AB/EB/MB PIIX4 ISA (rev 02)
0000:00:07.1 IDE interface: Intel Corp. 82371AB/EB/MB PIIX4 IDE (rev 01)
0000:00:07.2 USB Controller: Intel Corp. 82371AB/EB/MB PIIX4 USB (rev 01)
0000:00:07.3 Bridge: Intel Corp. 82371AB/EB/MB PIIX4 ACPI (rev 03)
0000:01:00.0 VGA compatible controller: S3 Inc. 86C270-294 Savage/IX-MV (rev 11)
chris@shawn:~$ lsmod
Module Size Used by
tun 8960 1
proc_intf 3876 0
cpufreq_userspace 5112 0
cpufreq_ondemand 6012 0
cpufreq_powersave 1600 0
af_packet 21992 2
orinoco_cs 8968 1
orinoco 42732 1 orinoco_cs
hermes 8416 2 orinoco_cs,orinoco
ds 18308 5 orinoco_cs
nfsd 225056 2
exportfs 6048 1 nfsd
lockd 67560 2 nfsd
sunrpc 151012 2 nfsd,lockd
lp 10600 0
button 6448 0
ac 4644 0
ipv6 256352 16
battery 9188 0
usbhid 31744 0
uhci_hcd 31792 0
usbcore 116036 4 usbhid,uhci_hcd
snd_cs46xx 86696 0
snd_rawmidi 24420 1 snd_cs46xx
snd_seq_device 7848 1 snd_rawmidi
snd_ac97_codec 70448 1 snd_cs46xx
snd_pcm_oss 51912 0
snd_mixer_oss 19552 1 snd_pcm_oss
snd_pcm 95176 2 snd_cs46xx,snd_pcm_oss
snd_timer 24932 1 snd_pcm
snd 54916 8
snd_cs46xx,snd_rawmidi,snd_seq_device,snd_ac97_codec,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer
soundcore 9984 1 snd
snd_page_alloc 9736 2 snd_cs46xx,snd_pcm
gameport 4416 1 snd_cs46xx
3c59x 39080 0
yenta_socket 20960 1
pcmcia_core 67780 3 orinoco_cs,ds,yenta_socket
pci_hotplug 33456 0
intel_agp 22080 1
agpgart 33608 1 intel_agp
floppy 59024 0
parport_pc 36580 1
parport 40584 2 lp,parport_pc
irtty_sir 8832 0
sir_dev 18796 1 irtty_sir
irda 191392 2 irtty_sir,sir_dev
crc_ccitt 1888 1 irda
pcspkr 3464 0
rtc 12440 0
nls_iso8859_1 3904 1
nls_cp437 5568 1
vfat 14176 1
fat 45696 1 vfat
reiserfs 242032 1
ext2 68744 1
md 47532 0
dm_mod 57756 5
capability 4392 0
commoncap 6880 1 capability
speedstep_smi 5584 0
speedstep_lib 3908 1 speedstep_smi
freq_table 3972 1 speedstep_smi
ide_cd 41536 0
evdev 9344 0
tsdev 7488 0
cdrom 39676 1 ide_cd
mousedev 11288 1
psmouse 24332 0
ext3 122792 3
jbd 62264 1 ext3
mbcache 8964 2 ext2,ext3
ide_generic 1280 0
piix 12896 1
ide_disk 19968 6
ide_core 139248 4 ide_cd,ide_generic,piix,ide_disk
unix 27988 779
thermal 13064 0
processor 17288 1 thermal
fan 3812 0
fbcon 39264 0
font 8160 1 fbcon
vesafb 6592 0
cfbcopyarea 3776 1 vesafb
cfbimgblt 2880 1 vesafb
cfbfillrect 3456 1 vesafb

Thomas Hood (jdthood) wrote :

Upstream bug.

Matt Zimmerman (mdz) wrote :

Which kernel are you using? Can you try with the latest Hoary kernel (2.6.10)?

Thomas Hood (jdthood) wrote :
Dennis Kaarsemaker (dennis) wrote :

Upstream bugtracker is timing out on me - can anyone confirm this bug still exists?

Daniel T Chen (crimsun) wrote :
Changed in acpi-support:
status: Unconfirmed → Fix Committed
Changed in linux-source-2.6.15:
status: Fix Committed → Fix Released

Despite the referenced kernel patch from 6/2006, I still reproduced this with Edgy and the 2.6.17 kernel.

I'm contributing that fix that has worked reliably for me with Mandriva on T20 for the last couple years. The Mandriva code is under the GPL, and I've modified some myself for use with Ubuntu.

Here's the overview of how the solution works:

A new option, "RESTORE_SOUND" is added to /etc/default/acpi-support/. If enabled, all programs that are using the sound card at suspend time are unceremoniously killed. This allows the sound modules to be properly removed from the kernel, for which there is already support elsewhere. Upon resume, the programs are all restarted. It's not ideal (that's why it's an option!), but it has worked well enough for me. Realize there is what I find to be a tolerable amount of possible "data loss" involved. For example, the playlist you have in Exaile may not be saved through the kill/restart. It's a good rule of thumb to save work before suspending anyway!

Together with this patch I use the following line for MODULES in /etc/default/acpi-support:

MODULES="sb uart401 sound soundcore maestro cs4281 snd-cs46xx"

I realize the /best/ fix for the sound hardware drivers or kernel to work better in this case, but I think including Mandriva's solution as /option/ would be very helpful for people who still have the sound-after-suspend problem without a better solution.

I'll be attaching the needed patch attachments shortly.

It's a little confusing that there is already a "sound.sh" file in this directory where the attached file goes. I think the existing "sound.sh" file should be renamed "alsa-state.sh" to better express what it actually does, and to be consistent with the suspend script already named 85-alsa-state.sh.

Here's the patch to /etc/default/acpi-support to add the RESTORE_SOUND option.

I hope it's not a problem that these are acpi-support patches, but this bug is now associated with the linux-source package.

  Mark

Mark Stosberg (markstos) wrote :

I'm not sure why this bug is marked as "Fix Released".

It was present in Edgy, and I just confirmed it's present in Feisty. The workaround/fix I supplied earlier in this bug report works in Feisty as well as Edgy.

Changed in linux-source-2.6.15:
status: Fix Released → Confirmed
Changed in linux-source-2.6.15:
status: New → Fix Released
Dima Ryazanov (dima-gmail) wrote :
Mark Stosberg (markstos) wrote :

The above comment suggest a kernel newer than 2.6.23-rc1 would would fix this.

However, a test with a newer kernel shows the bug still to be present.

I tested with a T21 on a 2.6.24-rc3 Kernel, available in binary format from here:
http://www.mattparnell.com/zen-kernel.html

Using "Suspend" button in Ubuntu's logout menu, the computer would successfully suspend and resume, but sound was still broken after suspend.

   Mark

komputes (komputes) wrote :

Tested a T21 using Ubuntu 7.10 and I am experiencing the same issue. There is no audio out after suspend.

Philip Ganchev (philip-cs) wrote :

Yes, the same hardware and driver are on my Thinkpad A21m, and have the same problem on Feisty (7.10), Linux 2.6.20-16-generic #2 SMP. If it's an upstream bug, where should we submit a bug report?

mättu (matthias-puffin) wrote :

Patch does not work. Neither manually unloading / loading snd-intel8x0 module; it is always in use..
This is xubuntu feisty.

lsmod | grep snd
snd_intel8x0 34332 1

I cannot identify the process using it, there is no name. Bug? I found out that there is "1" as soon as an x-session is started and "0" if not. Shutting down x & reload module works, which is not an option to me..

:m)

Hi All,

The Hardy Heron Alpha series is currently under development and contains an updated version of the kernel. It would be helpful if you could test the latest Hardy Alpha release: http://www.ubuntu.com/testing . You should be able to then test the new kernel via the LiveCD. If you can, please verify if this bug still exists or not and report back your results. We'll keep this open against the actively developed kernel bug against 2.6.20 this will be closed. Thanks.

Changed in linux:
status: New → Incomplete
Changed in linux-source-2.6.20:
status: Confirmed → Won't Fix
Petr Dlouhý (petr-dlouhy) wrote :

I can confirm, that the bug is still present on latest Hardy. (it can be bring back to work after rmmod & lsmoding the snd_cs43xx module)

# cat /proc/version
Linux version 2.6.24-12-generic (buildd@palmer) (gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu4)) #1 SMP Wed Mar 12 23:01:54 UTC 2008

# lspci
00:0b.0 Multimedia audio controller: Cirrus Logic CS 4614/22/24/30 [CrystalClear SoundFusion Audio Accelerator] (rev 01)

Satyaki Sharma (it-is-satyaki) wrote :

Hi,
I can confirm the same bug in Hardy Heron. Sound fails after resuming after a suspend. It does not recover even on restarting X, I have to do a hard reboot.

I'm using Gnome 2.22 with kernel 2.6.24-12-generic on a NEC Versa E6300 laptop with Intel 965 motherboard and integrated sound card (HDA Intel 82810H).

Please let me know if there are any further tests I can run.

Petr Dlouhý (petr-dlouhy) wrote :

Satyaki Sharma: Are you sure, that you are, that you are using snd_cs46xx module for your soundcard? Try to run "lsmod" under root, if the module is in output, if not, you should make new bug (if the bug is not preset yet).

Hi Petr,

Care to attach your dmesg output after a Suspend/Resume cycle and needing to rmmod/modprobe.

I'm also removing the linux-source-2.6.24 task since beginning with the Hardy development cycle the kernel source package naming convention changed from linux-source-2.6.24 to just 'linux'. Sorry for any confusion. Thanks.

Changed in linux-source-2.6.24:
status: New → Invalid
Petr Dlouhý (petr-dlouhy) wrote :

Leann Ogasawara: Of course, here it is.

Changed in linux:
assignee: nobody → ubuntu-kernel-team
importance: Undecided → Medium
status: Incomplete → Triaged
Mike Kelly (pioto) wrote :

I'd like to weigh in on this one, too. I have a Thinkpad T21 using snd_cs46xx.

Using the acpi workaround scripts posted above, I have no luck. When I had Gentoo on this system before, I was able to work around this by stopping the alsasound service before suspend, and starting it again when restarting. That killed all apps that use alsa and unloaded all alsa modules before, then reloaded the modules again afterwards.

Of course, this isn't a nice solution, it'd be much nicer if the kernel cound handle this...

But, since I thought that the two scripts above were supposed to do essentially what I was doing in Gentoo, I'm a little surprised they aren't working for me w/ Ubuntu 8.04

Axel Pospischil (apos) wrote :

Hi Mike, please read post at bug #198218 (https://bugs.launchpad.net/ubuntu/+bug/198218/comments/28). Hardy uses pm-utils for suspend/hibernation.

Needed to reload alsa-utils with this: https://bugs.launchpad.net/ubuntu/+bug/198218/comments/29

Good night ;)

The Ubuntu Kernel Team is planning to move to the 2.6.27 kernel for the upcoming Intrepid Ibex 8.10 release. As a result, the kernel team would appreciate it if you could please test this newer 2.6.27 Ubuntu kernel. There are one of two ways you should be able to test:

1) If you are comfortable installing packages on your own, the linux-image-2.6.27-* package is currently available for you to install and test.

--or--

2) The upcoming Alpha5 for Intrepid Ibex 8.10 will contain this newer 2.6.27 Ubuntu kernel. Alpha5 is set to be released Thursday Sept 4. Please watch http://www.ubuntu.com/testing for Alpha5 to be announced. You should then be able to test via a LiveCD.

Please let us know immediately if this newer 2.6.27 kernel resolves the bug reported here or if the issue remains. More importantly, please open a new bug report for each new bug/regression introduced by the 2.6.27 kernel and tag the bug report with 'linux-2.6.27'. Also, please specifically note if the issue does or does not appear in the 2.6.26 kernel. Thanks again, we really appreicate your help and feedback.

Petr Dlouhý (petr-dlouhy) wrote :

Yes, I can confirm, that the issue remains in Intrepid with following kernel:
uname -a
Linux petr 2.6.27-1-generic #1 SMP Sat Aug 23 23:20:09 UTC 2008 i686 GNU/Linux

Mike Kelly (pioto) wrote :

The only way I'm able to get sound back after resuming is to kill the mixer panel applet, disable ESD / pulseaudio, and kill its processes. Then, if i modprobe -r snd_cs46xx; modprobe snd_cs46xx, I'm able to get sound back.

Unfortunately, adding:

MODULES="snd_cs46xx"
STOP_SERVICES="alsa-utils"

to /etc/default/acpi-support doesn't seem to do the trick... I'm not sure why.

I haven't yet tried it on 2.6.27, but I assume it will still be an issue.

Mike Kelly (pioto) wrote :

Sorry, my old T21 finally kicked the bucket, so I won't be able to help with this bug any more.

On Sun, 26 Oct 2008 05:42:12 -0000
Mike Kelly <email address hidden> wrote:

> Sorry, my old T21 finally kicked the bucket, so I won't be able to help
> with this bug any more.

Of the T21s and T20s I've helped maintained, most have all died
or been replaced at this point. (My wife still uses a T22).

This seems like a good time to check-in about this old bug:

Of the people subscribed to this bug report, how many of you still
have a T20 to T21 in service so that this bug matters to you?
( I'm not sure if it affects the T22. T23's seem not to be affected ).

My T20 is still working but archived somewhere in my office. If needed
i can use it.

nandhp (nandhp) wrote :

This bug matters to me, since my T22 is affected by this issue and I use it every day.

Petr Dlouhý (petr-dlouhy) wrote :

I am still using pci soundcard, which uses that module in my desktop.

Mark Stosberg (markstos) wrote :

After a suspend/resume on a T22 on Ubuntu Hardy Heron, This is seen in /var/log/syslog. All the sound preferences were moved from "Automatic" to "ALSA"

/build/buildd/linux-ubuntu-modules-2.6.24-2.6.24/debian/build/build-generic/sound/alsa-driver/pci/cs46xx/../../alsa-kernel/pci/cs46xx/dsp_spos.c:1867: dsp_spos: SPIOWriteTask not responding

Sound no longer works after resuming. The "ACPI" scripts for "suspend.d" and "resume.d" mentioned above were also in place.

Per a decision made by the Ubuntu Kernel Team, bugs will longer be assigned to the ubuntu-kernel-team in Launchpad as part of the bug triage process. The ubuntu-kernel-team is being unassigned from this bug report. Refer to https://wiki.ubuntu.com/KernelTeamBugPolicies for more information. Thanks.

TJ (tj) wrote :

If this is still happening on Hardy, Intrepid, or Jaunty could you please report/attach the following information:

Q. Does this happen for hibernation (a.k.a. suspend to disk) ?
Q. Does this happen for suspend/resume (suspend to RAM) ?

If you answered Yes to either of these questions please attach /var/log/dmesg after doing a start-up, suspend/hibernate, resume cycle. Name the resulting files dmesg-hibernate.log and dmesg-suspend.log, respectively.

sudo lspci -vvnn >/tmp/lspci.log

uname -a
lsb_release -a

worldzfree (arosette) wrote :

suspend log attached

worldzfree (arosette) wrote :

sorry. forgot.

2.6.27-11-generic #1 SMP Thu Jan 29 19:24:39 UTC 2009 i686 GNU/Linux

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 8.10
Release: 8.10
Codename: intrepid

Colin Ian King (colin-king) wrote :

Unfortunately it seems this bug is still an issue. Can you confirm this issue exists with the most recent Jaunty Jackalope 9.04 release - http://www.ubuntu.com/news/ubuntu-9.04-desktop . Please let us know your results. Thanks.

Changed in linux (Ubuntu):
assignee: nobody → colin-king
status: Triaged → Incomplete
axoin (axoin) wrote :

Unfortunately this is still a bug, confirming on Thinkpad T21 with 9.04 final. Did Suspend to Ram and attached log. Hope this helps.

2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:57:59 UTC 2009 i686 GNU/Linux

Distributor ID: Ubuntu
Description: Ubuntu 9.04
Release: 9.04
Codename: jaunty

axoin (axoin) wrote :

On Tue, 28 Apr 2009 19:40:36 -0000
axoin <email address hidden> wrote:

> Unfortunately this is still a bug, confirming on Thinkpad T21 with 9.04
> final. Did Suspend to Ram and attached log. Hope this helps.

How did you suspend?

Option 1: Through the graphical "Suspend" button on the logout menu
Option 2: Fn-F4 ?

When I have gotten this to work on these kinds of laptops, it has always been
with Fn-F4.

    Mark

axoin (axoin) wrote :

I tried both FN-F4 and Suspend through gnome menu. What Ubuntu version did succeed? Do you still have a T2x laptop to test that? I am using Ubuntu since 8.04 and never brought that to work.

I also tried the sudo alsa force-reload as mentioned in other comments to similar bugs. This brings sound back, however it kills every application that uses sound. So this is not an option.
I tried to add all modules "snd-seq-dummy snd-seq-oss snd-seq-midi snd-seq-midi-event snd-seq snd-pcm-oss snd-mixer-oss snd-cs46xx snd-ac97-codec snd-pcm snd-rawmidi snd-timer snd-seq-device snd-page-alloc" to SUSPEND_MODULES="$SUSPEND_MODULES <modules>" in a file in /etc/pm/config.d/ because i had worked with my wireless driver, but that didn't help.

Mark Stosberg (markstos) wrote :

On Wed, 29 Apr 2009 15:43:13 -0000
axoin <email address hidden> wrote:

> I tried both FN-F4 and Suspend through gnome menu. What Ubuntu version
> did succeed? Do you still have a T2x laptop to test that? I am using
> Ubuntu since 8.04 and never brought that to work.

I don't have any T2x now, but I formally used or help people use the T20, T21,
T22 and T23 with Ubuntu. I sold my last T23 just a couple of weeks ago, and was
running Hardy on it at the time.

I believe I got sound-after-suspend to work on all of them, with the T23 seeming to have
less problems.

What I know I documented on the "Installing Ubuntu..." pages for each model on
http://www.thinkwiki.org/

I recommend looking through the pages for all of the model numbers there, as
many tips apply to all the models, but may not be mentioned on every page.
Again, as I recall, the T20,21 and T22 seem to have a lot in common, with the
T23 being a little different.

    Mark

axoin (axoin) wrote :

I tried all your tips on the site but nothing worked. sudo alsa force-reload brings sound back, however, this is not an elegeant solution.

Colin Ian King (colin-king) wrote :

Unfortunately it seems this bug is still an issue. Can you confirm this issue exists with the most recent Karmic Koala 9.10 release - http://www.ubuntu.com/getubuntu/download . Please let us know your results. Thanks.

Aliaksandr Dzeshchanka (lazy) wrote :

Yes it still exists in 9.10.

Aliaksandr Dzeshchanka (lazy) wrote :

dmesg says dsp_spos: SPIOWriteTask not responding

Colin Ian King (colin-king) wrote :

Aliaksandr can you attach the full dmesg log? Thanks.

Aliaksandr Dzeshchanka (lazy) wrote :

I've attached syslog with boot, suspend, resume and so on. Messages with
[ 2075.406386] uhci_hcd 0000:02:00.1: host system error, PCI problems?
[ 2075.406405] uhci_hcd 0000:02:00.1: host controller process error, something bad happened!
still appears all the time

Colin Ian King (colin-king) wrote :

Aliaksandr,

Hi, looks like the problem is caused by removing an interrupt handler on IRQ 11 which has already been removed.

The problem seems to start when the vortex 3c59x driver is suspended. There seems to be an upstream fix to this, namely in commits:

commit 7bfc4ab5620d8169d2effc0dbb644f207f75a9e3
Author: Anton Vorontsov <email address hidden>
Date: Wed Sep 30 20:11:11 2009 -0700

    3c59x: Rework suspend and resume

commit 704cc92e9ffe29458ea8831ae097c631b1160c01
Author: Anton Vorontsov <email address hidden>
Date: Thu Sep 24 08:31:52 2009 +0000

    3c59x: Get rid of "Trying to free already-free IRQ"

Changed in linux (Ubuntu):
assignee: Colin King (colin-king) → nobody
Changed in linux (Ubuntu):
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.