openSUSE Forums > Archives > SF Archives > ARCHIVES - Hardware » How To Restart Sound After Hibernation / Suspend To Disk?

Go Back   openSUSE Forums > Archives > SF Archives > ARCHIVES - Hardware
Forums FAQ Members List Search Today's Posts Mark Forums Read

ARCHIVES - Hardware Questions about hardware installation or configuration in SUSE Linux

 
Page 2 of 2 1 2
 
LinkBack Thread Tools Display Modes
  #11 (permalink)  
Old 02-Jun-2008, 15:45
Dean
Guest
 
Posts: n/a
Default

Starting with the 'suspend' section first, your script will need to take care of any dependent modules first. So investigate the commands one at a time from a root console. Look for errors.

kmixctrl -s
killall kmix
/etc/init.d/alsasound unload
modprobe -r snd-intel8x0

For example, after trying to stop alsasound, I get

Quote:
linux:/home/dean # /etc/init.d/alsasound unload
Shutting down sound driverERROR: Module snd_hda_codec is in use by hsfhda
ERROR: Module snd_pcm is in use by snd_hda_codec
ERROR: Module snd_timer is in use by snd_pcm
ERROR: Module snd is in use by snd_hda_codec,snd_pcm,snd_timer[/b]
So , I would need to unload my hsfhda (modem) driver first with

Quote:
linux:/home/dean # modprobe -r hsfhda
linux:/home/dean # /etc/init.d/alsasound unload
Shutting down sound driver done
linux:/home/dean # [/b]
As you can see, now alsaound unloaded ok. So it is quite possible, you will need to remove your modem driver (snd-intel8x0m) first as well.






  #12 (permalink)  
Old 04-Jun-2008, 02:30
homoludens1000
Guest
 
Posts: n/a
Default

Pooh, I've gone through each part of my script manually, but everything seems to work fine. That is, until I actually put the laptop into hibernation ...

Both /etc/init.d/alsasound unload / start and rcalsasound produce no problems. The sound card seems to work fine after unloading the sound driver.

For some reason (unknown to myself), I also tried the commands not from root level but from my user account level.
I got the following errors:
Code:
homoludens@linux-chameleon:~> /etc/init.d/alsasound unload
Shutting down sound driverERROR: Removing 'snd_seq_dummy': Operation not permitted
ERROR: Removing 'snd_pcm_oss': Operation not permitted
ERROR: Module snd_mixer_oss is in use by snd_pcm_oss
ERROR: Module snd_seq is in use by snd_seq_dummy
ERROR: Module snd_seq_device is in use by snd_seq_dummy,snd_seq
ERROR: Removing 'snd_intel8x0': Operation not permitted
ERROR: Module snd_ac97_codec is in use by snd_intel8x0
ERROR: Module snd_pcm is in use by snd_pcm_oss,snd_intel8x0,snd_ac97_codec
ERROR: Module snd_timer is in use by snd_seq,snd_pcm
ERROR: Module snd is in use by snd_seq_dummy,snd_pcm_oss,snd_mixer_oss,snd_seq,snd_seq_device,snd_intel8x0,snd_ac97_codec,snd_pcm,snd_timer
I added lines for snd_seq_dummy, snd_pcm_oss, snd_intel8x0 and snd_intel8x0m to my hibernation script, but didn't help. Below the script (I also changed the hibernation script order, putting the modprobe -r commands before alsasound unload, seems to make more sense to me):
Code:
#!/bin/bash

case "$1" in
****resume|thaw)
********modprobe snd-intel8x0
********modprobe snd-intel8x0m
********modprobe snd_pcm_oss
********modprobe snd_seq_dummy
********/etc/init.d/alsasound start
********kmix
********kmixctrl -r
****;;
****suspend|hibernate)
********kmixctrl -s
********killall kmix
********modprobe -r snd_seq_dummy
********modprobe -r snd_pcm_oss
********modprobe -r snd-intel8x0m
********modprobe -r snd-intel8x0
********/etc/init.d/alsasound unload
****;;
esac

exit $?
I think my next step will be to look into the system log file for error messages after invoking hibernation. Perhaps that'll help.

  #13 (permalink)  
Old 04-Jun-2008, 18:00
Dean
Guest
 
Posts: n/a
Default


Quote:
I think my next step will be to look into the system log file for error messages after invoking hibernation. Perhaps that'll help.[/b]
Yes, it is quite possible it is other modules causing the hibernation problem. It is well known that graphics and network chipsets can also be problematic.

The sound modules need to be unloaded before alsasound service is stopped, because it depends on them. You can test this easily, as I have demonstrated in previous post from a root console. You should get no errors after each command is executed if there are no dependencies to sort out. The script just automates this process.
  #14 (permalink)  
Old 04-Jun-2008, 19:06
homoludens1000
Guest
 
Posts: n/a
Default

As it happened, I was using my headphones yesterday while working on the hibernation problem, which made it easier to recognize when the sound card was activated and when not.

Interestingly, I got the distinct impression that the sound card came back on without problems right after restarting from hibernation mode, but that it got switched off / deactivated / whatever shortly before the process was over.

Is it possible to save all the screen output during entering / leaving hibernation to a file? I looked at the system log, but it doesn't seem to contain anything significant.
  #15 (permalink)  
Old 05-Jun-2008, 02:44
oldcpu
Guest
 
Posts: n/a
Default

Quote:
Is it possible to save all the screen output during entering / leaving hibernation to a file? I looked at the system log, but it doesn't seem to contain anything significant.[/b]
Offhand, not sure :unsure: ... does "dmesg" show anything? You can pipe it to a text file: <span style="font-family:Courier New">dmesg > dmesg.txt</span>
  #16 (permalink)  
Old 06-Jun-2008, 03:24
homoludens1000
Guest
 
Posts: n/a
Default

Thanks, oldcpu, dmesg worked well.

I looked through the printout, hmmmmmm ... frankly, I don't have enough Linux background knowledge to recognize what might be causing my sound card problems. Can someone help me out?

Thanks!

(In fact, I'm also trying to figure out why my laptop tries to connect to LAN (eth0) after hibernation, rather than WLAN (eth1), which was active before hibernation. Perhaps that problem can be detected as well ... ?)

Code:
ACPI: PCI interrupt for device 0000:00:1f.6 disabled
ACPI: PCI interrupt for device 0000:00:1f.5 disabled
swsusp: Basic memory bitmaps created
Stopping tasks ... done.
Shrinking memory...**-\|/-\|/-\done (103932 pages freed)
Freed 415728 kbytes in 4.59 seconds (90.57 MB/s)
Suspending console(s)
sd 0:0:0:0: [sda] Synchronizing SCSI cache
eth1: Going into suspend...
ACPI: PCI interrupt for device 0000:02:04.0 disabled
ACPI: PCI interrupt for device 0000:00:1f.1 disabled
ACPI: PCI interrupt for device 0000:00:1d.7 disabled
ACPI: PCI interrupt for device 0000:00:1d.0 disabled
Disabling non-boot CPUs ...
swsusp: critical section: 
swsusp: Need to copy 83789 pages
Intel machine check architecture supported.
Intel machine check reporting enabled on CPU#0.
ACPI: PCI Interrupt 0000:00:1d.0[A] -> Link [LNKA] -> GSI 9 (level, low) -> IRQ 9
PCI: Setting latency timer of device 0000:00:1d.0 to 64
usb usb1: root hub lost power or was reset
ACPI: PCI Interrupt 0000:00:1d.7[D] -> Link [LNKH] -> GSI 11 (level, low) -> IRQ 11
PCI: Setting latency timer of device 0000:00:1d.7 to 64
usb usb2: root hub lost power or was reset
ehci_hcd 0000:00:1d.7: debug port 1
PCI: cache line size of 32 is not supported by device 0000:00:1d.7
PM: Writing back config space on device 0000:00:1e.0 at offset 6 (was 20030200, writing 20060200)
PCI: Setting latency timer of device 0000:00:1e.0 to 64
PM: Writing back config space on device 0000:00:1f.1 at offset 1 (was 2800003, writing 2800007)
ACPI: PCI Interrupt 0000:00:1f.1[A] -> Link [LNKC] -> GSI 9 (level, low) -> IRQ 9
PCI: Setting latency timer of device 0000:00:1f.1 to 64
PM: Writing back config space on device 0000:00:1f.5 at offset 1 (was 2900007, writing 2900003)
eth1: Coming out of suspend...
ACPI: PCI Interrupt 0000:02:04.0[A] -> Link [LNKF] -> GSI 7 (level, low) -> IRQ 7
PM: Writing back config space on device 0000:02:05.0 at offset f (was 78001ff, writing 58001ff)
PM: Writing back config space on device 0000:02:05.0 at offset 3 (was 824000, writing 82a800)
ata1.00: configured for UDMA/100
sd 0:0:0:0: [sda] 117210240 512-byte hardware sectors (60012 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
pnp: Failed to activate device 00:07.
pnp: Failed to activate device 00:08.
sd 0:0:0:0: [sda] Starting disk
usb_endpoint usbdev2.2_ep00: PM: resume from 0, parent 2-1 still 1
hub 2-1:1.0: PM: resume from 1, parent 2-1 still 1
usb_endpoint usbdev2.2_ep81: PM: resume from 0, parent 2-1:1.0 still 1
usb_endpoint usbdev2.3_ep00: PM: resume from 0, parent 2-2 still 1
usb-storage 2-2:1.0: PM: resume from 1, parent 2-2 still 1
usb_endpoint usbdev2.3_ep81: PM: resume from 0, parent 2-2:1.0 still 1
usb_endpoint usbdev2.3_ep02: PM: resume from 0, parent 2-2:1.0 still 1
 host2: PM: resume from 0, parent 2-2:1.0 still 1
usb 2-1.4: PM: resume from 1, parent 2-1 still 1
usb_endpoint usbdev2.4_ep00: PM: resume from 0, parent 2-1.4 still 1
usbhid 2-1.4:1.0: PM: resume from 1, parent 2-1.4 still 1
usb_endpoint usbdev2.4_ep81: PM: resume from 0, parent 2-1.4:1.0 still 1
Restarting tasks ... done.
ata2.00: configured for UDMA/33
swsusp: Basic memory bitmaps freed
usb 2-1: USB disconnect, address 2
usb 2-1.4: USB disconnect, address 4
usb 2-1: new high speed USB device using ehci_hcd and address 5
usb 2-1: new device found, idVendor=0409, idProduct=0059
usb 2-1: new device strings: Mfr=0, Product=0, SerialNumber=0
usb 2-1: configuration #1 chosen from 1 choice
hub 2-1:1.0: USB hub found
hub 2-1:1.0: 4 ports detected
usb 2-2: USB disconnect, address 3
usb 2-2: new high speed USB device using ehci_hcd and address 6
usb 2-2: new device found, idVendor=04bb, idProduct=0114
usb 2-2: new device strings: Mfr=2, Product=3, SerialNumber=1
usb 2-2: Product: HDPG-SU
usb 2-2: Manufacturer: I-O DATA DEVICE,INC.
usb 2-2: SerialNumber: 000709B70353
usb 2-2: configuration #1 chosen from 1 choice
scsi3 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 6
usb-storage: waiting for device to settle before scanning
scsi 3:0:0:0: Direct-Access**** I-O DATA HDPG-SU**********2.00 PQ: 0 ANSI: 2
sd 3:0:0:0: [sdc] 300681808 512-byte hardware sectors (153949 MB)
sd 3:0:0:0: [sdc] Write Protect is off
sd 3:0:0:0: [sdc] Mode Sense: 4b 00 00 00
sd 3:0:0:0: [sdc] Assuming drive cache: write through
sd 3:0:0:0: [sdc] 300681808 512-byte hardware sectors (153949 MB)
sd 3:0:0:0: [sdc] Write Protect is off
sd 3:0:0:0: [sdc] Mode Sense: 4b 00 00 00
sd 3:0:0:0: [sdc] Assuming drive cache: write through
 sdc: sdc1
sd 3:0:0:0: [sdc] Attached SCSI disk
sd 3:0:0:0: Attached scsi generic sg2 type 0
usb-storage: device scan complete
ACPI: PCI Interrupt 0000:00:1f.5[B] -> Link [LNKB] -> GSI 9 (level, low) -> IRQ 9
PCI: Setting latency timer of device 0000:00:1f.5 to 64
intel8x0_measure_ac97_clock: measured 55451 usecs
intel8x0: clocking to 48000
ACPI: PCI Interrupt 0000:00:1f.6[B] -> Link [LNKB] -> GSI 9 (level, low) -> IRQ 9
PCI: Setting latency timer of device 0000:00:1f.6 to 64
i8042.c: Detected active multiplexing controller, rev 1.1.
serio: i8042 KBD port at 0x60,0x64 irq 1
serio: i8042 AUX0 port at 0x60,0x64 irq 12
serio: i8042 AUX1 port at 0x60,0x64 irq 12
serio: i8042 AUX2 port at 0x60,0x64 irq 12
serio: i8042 AUX3 port at 0x60,0x64 irq 12
input: AT Translated Set 2 keyboard as /class/input/input7
Synaptics Touchpad, model: 1, fw: 5.9, id: 0x396eb2, caps: 0x804753/0x0
input: SynPS/2 Synaptics TouchPad as /class/input/input8
ADDRCONF(NETDEV_UP): eth1: link is not ready
eth0: link up, 100Mbps, full-duplex, lpa 0xFFFF
NETDEV WATCHDOG: eth0: transmit timed out
eth0: Transmit timeout, status ff ffff ffff media ff.
eth0: Tx queue start entry 4**dirty entry 0.
eth0:**Tx descriptor 0 is ffffffff. (queue head)
eth0:**Tx descriptor 1 is ffffffff.
eth0:**Tx descriptor 2 is ffffffff.
eth0:**Tx descriptor 3 is ffffffff.
eth0: link up, 100Mbps, full-duplex, lpa 0xFFFF
usb 2-1.4: new low speed USB device using ehci_hcd and address 7
usb 2-1.4: new device found, idVendor=0458, idProduct=0007
usb 2-1.4: new device strings: Mfr=1, Product=2, SerialNumber=0
usb 2-1.4: Product: BUFFALO Optical Combo Mouse
usb 2-1.4: Manufacturer: KYE
usb 2-1.4: configuration #1 chosen from 1 choice
input: KYE BUFFALO Optical Combo Mouse as /class/input/input9
input: USB HID v1.10 Mouse [KYE BUFFALO Optical Combo Mouse] on usb-0000:00:1d.7-1.4
NETDEV WATCHDOG: eth0: transmit timed out
eth0: Transmit timeout, status ff ffff ffff media ff.
eth0: Tx queue start entry 4**dirty entry 0.
eth0:**Tx descriptor 0 is ffffffff. (queue head)
eth0:**Tx descriptor 1 is ffffffff.
eth0:**Tx descriptor 2 is ffffffff.
eth0:**Tx descriptor 3 is ffffffff.
eth0: link up, 100Mbps, full-duplex, lpa 0xFFFF
NETDEV WATCHDOG: eth0: transmit timed out
eth0: no IPv6 routers present
eth0: Transmit timeout, status ff ffff ffff media ff.
eth0: Tx queue start entry 4**dirty entry 0.
eth0:**Tx descriptor 0 is ffffffff. (queue head)
eth0:**Tx descriptor 1 is ffffffff.
eth0:**Tx descriptor 2 is ffffffff.
eth0:**Tx descriptor 3 is ffffffff.
eth0: link up, 100Mbps, full-duplex, lpa 0xFFFF
NETDEV WATCHDOG: eth0: transmit timed out
eth0: Transmit timeout, status ff ffff ffff media ff.
eth0: Tx queue start entry 4**dirty entry 0.
eth0:**Tx descriptor 0 is ffffffff. (queue head)
eth0:**Tx descriptor 1 is ffffffff.
eth0:**Tx descriptor 2 is ffffffff.
eth0:**Tx descriptor 3 is ffffffff.
eth0: link up, 100Mbps, full-duplex, lpa 0xFFFF
NETDEV WATCHDOG: eth0: transmit timed out
eth0: Transmit timeout, status ff ffff ffff media ff.
eth0: Tx queue start entry 4**dirty entry 0.
eth0:**Tx descriptor 0 is ffffffff. (queue head)
eth0:**Tx descriptor 1 is ffffffff.
eth0:**Tx descriptor 2 is ffffffff.
eth0:**Tx descriptor 3 is ffffffff.
eth0: link up, 100Mbps, full-duplex, lpa 0xFFFF
NETDEV WATCHDOG: eth0: transmit timed out
eth0: Transmit timeout, status ff ffff ffff media ff.
eth0: Tx queue start entry 4**dirty entry 0.
eth0:**Tx descriptor 0 is ffffffff. (queue head)
eth0:**Tx descriptor 1 is ffffffff.
eth0:**Tx descriptor 2 is ffffffff.
eth0:**Tx descriptor 3 is ffffffff.
eth0: link up, 100Mbps, full-duplex, lpa 0xFFFF
NETDEV WATCHDOG: eth0: transmit timed out
  #17 (permalink)  
Old 06-Jun-2008, 05:44
oldcpu
Guest
 
Posts: n/a
Default

Quote:
I looked through the printout, hmmmmmm ... frankly, I don't have enough Linux background knowledge to recognize what might be causing my sound card problems. Can someone help me out?.... snipped ....
Code:
ACPI: PCI Interrupt 0000:00:1f.5[B] -> Link [LNKB] -> GSI 9 (level, low) -> IRQ 9
PCI: Setting latency timer of device 0000:00:1f.5 to 64
intel8x0_measure_ac97_clock: measured 55451 usecs
intel8x0: clocking to 48000
ACPI: PCI Interrupt 0000:00:1f.6 -> Link [LNKB] -> GSI 9 (level, low) -> IRQ 9
PCI: Setting latency timer of device 0000:00:1f.6 to 64
i8042.c: Detected active multiplexing controller, rev 1.1.
Well, looks like I have good company, as I typically don't understand a dmesg very well either, although sometimes there is a "jem of information" that helps.

My thoughts on this are:
a. do you have to unload the snd_ac97_codec module as part of the suspend? I notice from previous posts you had errors relating to this snd_ac97_codec, and it is also mentioned in the dmesg.
b. could you also be having an interrupt problem. A number of interrupts are mentioned in the dmesg, but I don't know which one your sound card is using. What interrupt is your sound card using?

Again, I know nothing re: the supend/resume part ... and so apologies if my speculations are way off the mark.
 
Page 2 of 2 1 2

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




 

Search Engine Friendly URLs by vBSEO 3.3.0 RC2