Bugzilla – Bug 130131
snd-cs4236 Broken After Suspend2RAM
Last modified: 2007-08-11 15:20:13 UTC
Hello, I've got an IBM Thinkpad 600, which works very well with SUSE 10.0 except for this major problem: sound absolutely refuses to work after resuming from a suspend to RAM. This machine has an Crystal Labs ISA *non*-PNP soundcard, that uses ALSA module snd-cs4236. It works fine until I suspend2RAM (ACPI). But when I resume, I get "unable to write to device" type of errors. I'll post the exact error later. I have tried /etc/init.d/alsasound restart and reload, I've tried stopping ACPI and powersave services and then restarting sound, I've tried manually modprobing the sound driver. Nothing works. The modprobe "Works" in that it doesn't give me "device not found" errors, and it re-creates the devices in /dev/snd/, but they are totally unusable. The mixer devices does appear to still work fine. I even tried restarting udev, dbus, resmgr, coldboot, almost every service that might even remotely apply, but nothing works. I have no problems with sound and suspend to RAM on this machine when running Ubuntu 5.04 and Mandriva 2006. However, both of those systems use APM by default, and ACPI doesn't work. With SUSE, ACPI works out of the box (first ever!) and for some reason my hardrive is unusable when I boot with ACPI turned off. I'll post a hardware list soon. Please let me know what I can do to help get this resolved. SUSE 10.0 works SO well with tihs this laptop, that this sound issue is a major bummer. Thanks for the help!
Created attachment 55146 [details] YaST Hardware Report for Thinkpad 600
Created attachment 55147 [details] dmesg after resuming
Here's the error when I use aplay (or playmus) from the command line: aplay: pcm_write:1182: write error: Input/output error
There's definitely a rather deep-lying problem here. I tried swsusp on a totally different old computer (which doesn't support suspend2ram) with SUSE 10.0 and a cmi8330 isapnp soundcard. It gives me the exact same error, pcm_write:1182: write error: Input/output error. However it's important to note that on the laptop for which this report is filed, the sound system survives a swsusp, but fails after a suspend2ram. Is there some service that can be re-started that will reset something? I have tried all the obvious ones. Thanks!
Do you get any kernel error messages? I guess you see something about IRQ. Does the sound work again after you run "rcalsasound restart" ? Comment #4: cmi8330 driver doesn't support the suspend/resume at all yet.
Thanks for your help! Unfortunately "rcalsasound restart" doesn't fix the problem. I even tried unloading alsa before suspending, then resuming, shutting down acpi, restarting alsa. No luck. The only mention I see about IRQ's something about IRQ 9, which is not being used by alsa or acpi to the best of my knowledge. Please see the dmesg I attached. Please let me know what I can do to help. Thanks!
Usually when you get -EIO error, you likely see a kernel message "playback write error (DMA or IRQ trouble?)". It's often the irq routing problem indeed. Anyway, if suspend2disk is OK but suspend2ram is not, it's rather a problem of kernel core stuff than a driver problem. Or do I misunderstand the comment #4?
Hi, thanks again for working on this. I get both errors you mentioned afrer suspend2ram on my laptop. When I run "aplay sound.wav" from a command line, it pauses for a few seconds, and then finishes with "aplay: pcm_write:1182: write error: Input/output error" appearing in the terminal. Then, dmesg also shows: "Device 'snd_generic_pm.0' does not have a release() function, it is broken and must be fixed. Badness in device_release at drivers/base/core.c:83 [<c01ee6bb>] kobject_cleanup+0x3b/0x70 [<c01ee6f0>] kobject_release+0x0/0x10 [<c01eee96>] kref_put+0x26/0x60 [<c8da8438>] snd_generic_device_unregister+0x8/0x20 [snd] [<c8da7a49>] snd_card_free+0x49/0x210 [snd] [<c01ee6f0>] kobject_release+0x0/0x10 [<c01eee96>] kref_put+0x26/0x60 [<c8d97830>] alsa_card_cs423x_exit+0x20/0x27 [snd_cs4236] [<c0132478>] sys_delete_module+0x118/0x150 [<c014d617>] do_munmap+0xb7/0xf0 [<c0102d1b>] sysenter_past_esp+0x54/0x79 snd_cs4231_lib: module not supported by Novell, setting U taint flag. snd_cs4236_lib: module not supported by Novell, setting U taint flag. snd_cs4236: module not supported by Novell, setting U taint flag. ALSA sound/core/pcm_lib.c:2126: playback write error (DMA or IRQ trouble? " The attachments I added were created right after resuming from suspend2ram and playing a sound, so especially the dmesg should be clear. At least to you guys. :-) Thanks again!
Well, the main question is whether PM works with suspend2disk. Is it right?
Ok, good question. On the Thinkpad 600 for which this report is filed, I did "swsusp" and it shutdown and resumed correctly, and the snd-cs4236 was still working, with no restarting of alsa necessary. So the bug only exists with suspend2ram on the Thinkpad 600. The computer I mentioned in comment #4 will have to be addressed in another bug report! ;-) So it appears that a kernel level fix will be required on this bug? Thanks for your help!
It sounds like a problem of suspend2ram indeed. Pavel, any clue?
Well, his logs contain, among other stuff: ...so I'm not quite surprised stuff is broken. And I do not think we officially support suspend2ram. Having similar machine to play with would make debugging possible. Otherwise we can blidnly ask him to try 2.6.14, and start looking for thinkpad 600 to play with... ALSA sound/core/pcm_lib.c:2126: playback write error (DMA or IRQ trouble?) ------------[ cut here ]------------ kernel BUG at drivers/serial/8250.c:1364! invalid operand: 0000 [#1] Modules linked in: uhci_hcd lp parport_pc parport sg st sd_mod sr_mod scsi_mod joydev ppp_deflate zlib_deflate bsd_comp ppp_async crc_ccitt ppp_generic slhc speedstep_lib freq_table button battery ipv6 ac edd snd_pcm_oss snd_mixer_oss snd_cs4236 snd_opl3_lib snd_hwdep snd_cs4236_lib snd_mpu401_uart snd_rawmidi snd_seq_device snd_cs4231_lib snd_pcm snd_timer snd soundcore snd_page_alloc pcmcia firmware_class i2c_piix4 i2c_core generic usbcore yenta_socket rsrc_nonstatic pcmcia_core mwave dm_mod reiserfs fan thermal ide_cd cdrom processor piix ide_disk ide_core CPU: 0 EIP: 0060:[<c0252334>] Tainted: G U VLI
Oh, I do not think this is severity = major. Module in question is unsupported, suspend to ram is unsupported, and unrelated subsystem (serial) BUGs() before that. I guess that filing separate bug for serial problem might help a bit, but as this is suspend to ram... this is better debugged on mainline.
Is there anything I can do to facilitate the fixing of this bug? Should I change the status to "assigned" or something? Would it make sense to simply make available a separate kernel for old hardware? The Mandriva 2006 kernel 2.6.12-12mdk-i586-up-4GB is by far the most friendly kernel for old hardware- and this applies to many computers I've tried, not just my Thinkpad 600. Could you simply figure out their kernel config and patches, and then compile it for SuSE? Or would it make sense for me to try any of the other kernels that are available in the SuSE repos? Thanks for your help!
Does this bug still persist on the recent distros?
No reaction since more than 5 months, therefore closing as CANTFIX (aka WONTFIX). If you can provide the needed information, feel free to reopen the bug.