Page 3 of 3 FirstFirst 123
Results 21 to 27 of 27

Thread: No sound after suspend/hibernate

  1. #21
    Join Date
    May 2008
    Location
    Ohio, USA
    Beans
    6,883
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: No sound after suspend/hibernate

    From alsa documentation
    reloading modules across APM suspend-and-resume
    -----------------------------------------------
    During suspension many peripherals are switched off; on resuming the
    machine these peripherals need to be re-initialized. Many ALSA
    drivers do this properly but some still do not.

    If this problem affects you and if your ALSA drivers are built as
    loadable modules and your kernel supports module unloading then you
    can work around the problem by unloading the driver before suspending
    and loading it again after resuming. This will be done for you
    automatically if you add the name of the problematic sound card driver
    module to the variable force_unload_modules_before_suspend variable in
    /etc/default/alsa. E.g., if your CS46XX and AZX cards don't work
    properly after resuming from APM suspend, add the names of their
    driver modules to the list:

    force_unload_modules_before_suspend="snd-cs46xx snd-azx"


    restoring sound volumes across APM suspend-and-resume
    -----------------------------------------------------
    alsa-base provides an APM script in /etc/apm/scripts.d/alsa to
    automatically store/restore sound volumes during APM suspension.
    Since this option relies on alsactl, please install the recommended
    alsa-utils package.

    unloading modules
    -----------------
    If you want to unload ALSA driver modules then you will have to stop
    all applications that are using ALSA device files. You can do both
    in one step by running:

    alsa force-unload

  2. #22
    Join Date
    Mar 2011
    Beans
    14

    Re: No sound after suspend/hibernate

    "restoring sound volumes across APM suspend-and-resume
    -----------------------------------------------------
    alsa-base provides an APM script in /etc/apm/scripts.d/alsa to
    automatically store/restore sound volumes during APM suspension.
    Since this option relies on alsactl, please install the recommended
    alsa-utils package."

    I'd love to try the quoted fix, but...

    How do I find which sound card driver is loaded?

    How can I install alsa-utils package. A web search doesn't return much. Once it's installed, how do I automate the sound restoration upon resume?

  3. #23
    Join Date
    May 2008
    Location
    Ohio, USA
    Beans
    6,883
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: No sound after suspend/hibernate

    Try the simple version first. You can just specify "all" and all the modules will be unloaded. To edit:
    Code:
    gksu gedit /etc/default/alsa
    Add all between the quotes in this line:
    Code:
    force_unload_modules_before_suspend=""
    So now it looks like this:
    Code:
    force_unload_modules_before_suspend="all"
    Save the file and close. Now suspend/resume and see if it worked.

    BTW alsa-utils is in the default ubuntu install.

  4. #24
    Join Date
    Mar 2011
    Beans
    14

    Re: No sound after suspend/hibernate

    Thanks for the tips. I did what you said, but still get the same behavior on suspend/resume. Hibernate/resume works though.

    It doesn't really belong in this thread, but my touchpad doesn't work after suspend/resume either.

  5. #25
    Join Date
    May 2008
    Location
    Ohio, USA
    Beans
    6,883
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: No sound after suspend/hibernate

    Reload alsa as a work-around:
    Code:
    sudo alsa force-reload

  6. #26
    Join Date
    Sep 2011
    Beans
    54
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: No sound after suspend/hibernate

    I had the same problem with my maudio 2496 card (snd_ice1712). After coming out of hibernation it would not work at all. I tried the solutions proposed in earlier posts but none worked.

    I also have a USB headset (snd_usb_audio) and a creative xfi card (snd_ctxfi), which both work fine. After much searching I found a solution for me (on 12.04) on a German site at:

    http://forum.ubuntuusers.de/topic/su...audiophile-24/

    The script I used is below, called resume_maudio in /etc/pm/sleep.d

    Code:
    !/bin/bash
    
    . /usr/lib/pm-utils/functions
    
    resume_maudio() {
        sudo rmmod -w snd_ice1712 snd_usb_audio snd_ctxfi &
        sudo fuser -s -k /dev/snd/*
        sudo modprobe snd_ice1712
        sudo modprobe snd_usb_audio
        sudo modprobe snd_ctxfi
        sudo killall pulseaudio
        sudo pulseaudio --system -D
    
        amixer -q -c 0 set 'DAC',0 100%
        amixer -q -c 0 set 'DAC',1 100%
    }
    
    case "$1" in
            hibernate|suspend)
                    # Stopping is not required
                    ;;
            thaw|resume)
                    resume_maudio
                    ;;
            *) exit $NA
                    ;;
    esac
    
    exit $?
    then

    Code:
    sudo chmod +x /etc/pm/sleep.d/resume_maudio
    I was concerned that the adjustment of the maudio DAC levels would not always work because the card numbers vary, but since the maudio card is the first to be re-instated, the scripts appears to work OK.

    To see which snd_... modules you have, you can use lsmod.

    On coming out of hibernation all cards are muted, but unmuting them isn't hard, and least they work .

  7. #27
    Join Date
    Jul 2005
    Location
    Finland
    Beans
    6

    Re: No sound after suspend/hibernate

    Thanks pastim!

    Seems that this ice1712 bug dates back a long time: https://bugs.launchpad.net/ubuntu/+s....20/+bug/93273

    Same solution also here: http://ubuntuforums.org/showthread.php?t=1282745

Page 3 of 3 FirstFirst 123

Tags for this Thread

Bookmarks

Posting Permissions

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