Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

So far, suspending to ram and waking up from it works. My laptop's external display (connected via HDMI) works, too.

However, what doesn't work is the sound, which works before suspending, of course. I'm using my external monitor's speakers and have made the corresponding settings in Ubuntu's sound menu (switched to "Digital Stereo (HDMI) Output + Analog Stereo Input" in "Hardware" tab).

What can I do to fix it?

Edit: when I ran ubuntu-bug, it tested sound output with and without using pulse. Without pulse, it worked, however I still heard the noise. With pulse it was only noise.

Edit: works fine with natty and oneiric now. Updating to latest Ubuntu solves the problem.

share|improve this question
    
Have you tried running sudo killall -9 pulseaudio from the command line? –  Marco Ceppi Oct 16 '10 at 5:41
    
yes but it doesn't kill pulseaudio. When I log out and log back in, it does kill pulse but it doesn't help either. –  Florian Heinle Oct 16 '10 at 9:35
1  
Please see wiki.ubuntu.com/Audio/AlsaInfo and wiki.ubuntu.com/PulseAudio/Log. Be sure to follow both procedures before suspend (from a fresh boot) and after resume. Please then attach the requested information in your question. –  Daniel T Chen Dec 18 '10 at 19:55
    
I'm running 11.10 same problem here. I have to restart to get sound working on HDMI. On windows I had no such issue. –  Kugel Feb 11 '12 at 14:54

2 Answers 2

Hardware malfunctioning after suspend sounds like a driver bug to me. ubuntu-bug -s audio

In the meantime, as a workaround, you can try sudo alsa force-reload to force your drivers to unload and reload (will kill all running sound apps in the process though).

share|improve this answer
    
I'd add to Mackenzie's response that normally it's a driver issue such that we can hack around a hardware issue, but sometimes it's also a hardware issue that can't be worked around. Please see wiki.ubuntu.com/Audio/InstallingLinuxAlsaDriverModules. –  Daniel T Chen Nov 24 '10 at 19:40
    
Thanks Maco for your suggestion but I'm afraid it didn't help at all. However, when I run the audio testing it does play sound without pulse. With pulse, however, it doesn't. –  Florian Heinle Dec 17 '10 at 13:11

Determine which kernel module is handling HDMI audio. On my XBMC box, it is "snd_hda_codec_nvhdmi", then unload that module before the laptop sleeps via a script in /etc/pm/sleep.d. The command "lsmod | grep hdmi" may give you some clues. You may have to unload more than one module for this to work properly (like "snd"), but if you can find the right combination, it will be just like you shutdown and rebooted each time you sleep your laptop.

Here is what your script should look like:

#!/bin/sh

# Script to disable hdmi audio before suspend and restart after wake.

case "${1}" in
        suspend|hibernate)
            rmmod snd_hda_codec_nvhdmi
            rmmod snd
                ;;
        resume|thaw)
            modprobe snd
            modprobe snd_hda_codec_nvhdmi
                ;;
esac
share|improve this answer
    
Hi,I tried it but I'm afraid it didn't work either. The problem persists. –  Florian Heinle Dec 23 '10 at 12:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.