Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: No Sound After Resume From Suspend

  1. #1
    trippinnik Guest

    Default

    I've got an IBM Thinkpad X22 and when I resume from suspend there is no sound. I read about the pm-utilshttp://en.opensuse.org/Pm-utils and this I need to add a hook to unload my sound module and then reload it on resume. I'm just not sure how to find out the name of the sound module for unloading it. Can someone help me out with this?

  2. #2
    trippinnik Guest

    Default

    I tried putting this
    Code:
    SUSPEND_MODULES="snd_intel8x0"
    in
    Code:
    /etc/pm/sleep.d/sound
    but no luck...

  3. #3
    trippinnik Guest

    Default

    I tried putting this
    Code:
    SUSPEND_MODULES="snd_intel8x0"
    in
    Code:
    /etc/pm/sleep.d/sound
    but no luck...
    [/b]
    I've also got this bug report:https://bugzilla.novell.com/show_bug.cgi?id=391939

  4. #4
    Dean Guest

    Default

    Have a look at '/etc/pm/hooks'. You could use one of the existing scripts as a template to create a script that restarts your sound system with 'modprobe snd_intel8x0' command upon resume (thawing). Note: You may need to pass additional options when loading the driver as per your '/etc/modprobe.d/sound' configuration. Name the script file 'sound' or similar.

    Example:

    #!/bin/bash

    case "$1" in
    resume|thaw)
    modprobe snd_intel8x0
    ;;
    suspend|hibernate)
    modprobe -r snd_intel8x0
    ;;
    esac

    exit $?

    I've seen similar approaches used to restart network hardware.

    EDIT: Some more thoughts...

    I tried putting this

    SUSPEND_MODULES="snd_intel8x0"[/b]
    1) Now that I think about it, maybe you just need to add additional options specific to your hardware here. As mentioned before, look at cat '/etc/modprobe.d/sound' for these options. For example, I need to do:

    linux:/home/dean # modprobe snd-hda-intel enable=1 index=0 position_fix=1

    2) This may (or may not) be relevant. I know that kmix must be terminated before attempting to unload the sound driver. Demonstrated here:

    linux:/home/dean # modprobe -r snd-hda-intel
    FATAL: Module snd_hda_intel is in use.

    I wonder if this might be an issue...

  5. #5
    trippinnik Guest

    Default

    Have a look at '/etc/pm/hooks'. You could use one of the existing scripts as a template to create a script that restarts your sound system with 'modprobe snd_intel8x0' command upon resume (thawing). Note: You may need to pass additional options when loading the driver as per your '/etc/modprobe.d/sound' configuration. Name the script file 'sound' or similar.

    Example:

    #!/bin/bash

    case "$1" in
    resume|thaw)
    modprobe snd_intel8x0
    ;;
    suspend|hibernate)
    modprobe -r snd_intel8x0
    ;;
    esac

    exit $?

    I've seen similar approaches used to restart network hardware.

    EDIT: Some more thoughts...
    1) Now that I think about it, maybe you just need to add additional options specific to your hardware here. As mentioned before, look at cat '/etc/modprobe.d/sound' for these options. For example, I need to do:

    linux:/home/dean # modprobe snd-hda-intel enable=1 index=0 position_fix=1

    2) This may (or may not) be relevant. I know that kmix must be terminated before attempting to unload the sound driver. Demonstrated here:

    linux:/home/dean # modprobe -r snd-hda-intel
    FATAL: Module snd_hda_intel is in use.

    I wonder if this might be an issue...
    [/b]
    thanks for the tips. I tried doing it manually before making the script. I can load the module but no sound comes out...
    nik@linux:~/mlb/mlbviewer> sudo /sbin/modprobe -r snd_intel8x0
    nik@linux:~/mlb/mlbviewer> sudo /sbin/modprobe -l snd_intel8x0
    /lib/modules/2.6.25.3-2-pae/kernel/sound/pci/snd-intel8x0.ko

    also there's no directory /etc/pm/hooks ... You've given me a great start though, I have a lot more stuff I can keep trying now, thanks!


  6. #6
    elsewhere Guest

    Default

    Trying to unload the sound module isn't enough, it may not even happen since alsa is hooked into it.
    You should check Dean's advice and look into the pm scripts, I suggest looking to shutdown/restart alsa-sound during a suspend cycle, that may help the sound system get a clean restart.

    Just a thought...

    Cheers,
    KV

  7. #7
    Dean Guest

    Default

    also there's no directory /etc/pm/hooks ...[/b]
    This pm-utils how to mentions

    The hooks for suspend are placed in

    * /usr/lib/pm-utils/sleep.d (distribution / package provided hooks)
    * /etc/pm/sleep.d (hooks added by the system administrator) [/b]
    So have a look in '/usr/lib/pm-utils/sleep.d' instead.

    I had a look at sound processes running on my system (with ps -A), and could only find 'esd' and 'kmix'. From experience, I know that if kmix is killed first, I can then remove my sound driver module. You will need to modify the script to remove any dependent processes.

    Good luck.

  8. #8
    trippinnik Guest

    Default

    cool thanks for the not about kmix. I've come up with this
    Code:
    #!/bin/bash
     
    case "$1" in
       resume|thaw)
          modprobe snd_intel8x0
          /etc/init.d/alsasound start
         ;;
       suspend|hibernate)
          killall kmix
          /etc/init.d/alsasound stop
          modprobe -r snd_intel8x0
         ;;
    esac
     
    exit $?
    so far no luck. I'd tried reloading alsa manually before. kde notify popped up with a message about switching back to my intel sound, but no actual sound came out.

  9. #9
    trippinnik Guest

    Default

    cool thanks for the not about kmix. I've come up with this
    Code:
    #!/bin/bash
     
    case "$1" in
       resume|thaw)
          modprobe snd_intel8x0
          /etc/init.d/alsasound start
        ;;
       suspend|hibernate)
          killall kmix
          /etc/init.d/alsasound stop
          modprobe -r snd_intel8x0
        ;;
    esac
     
    exit $?
    so far no luck. I'd tried reloading alsa manually before. kde notify popped up with a message about switching back to my intel sound, but no actual sound came out.
    [/b]
    All good now. Somehow while I was working on the problem I lost sound all the time, so after I reinstalled from Beta3 DVD and used this script sound comes back on. Thanks for the help everyone. The next thing is that sometimes after suspend and resume it won'r suspend again, there's no option in the menu and Fn-F4 doesn't work. I guess I'll start a new thread though.

  10. #10
    Dean Guest

    Default



    All good now. Somehow while I was working on the problem I lost sound all the time, so after I reinstalled from Beta3 DVD and used this script sound comes back on. [/b]
    Good work. I'm sure this script will be of help to others, even if just to demonstrate how to generate a custom hibernate script.

    The next thing is that sometimes after suspend and resume it won'r suspend again, there's no option in the menu and Fn-F4 doesn't work. I guess I'll start a new thread though.[/b]
    Depending on how often this occurs, I'm not sure what can be done to fix this. I have this happen about 5% of the time as well, and have just accepted it.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Search Engine Friendly URLs by vBSEO 3.5.2