The Cookie Machine - Click here to drag window

DUMMY TEXT - Real text set in assets/js/theCookieMachine.js

If you can read me, I'm broken!

Views: 3,494β€…    Votes:  2β€…
Tags: 18.04   sound   suspend  
Link: πŸ” See Original Answer on Ask Ubuntu ⧉ πŸ”—

URL: https://askubuntu.com/q/1158638
Title: sound problem (Ubuntu 18.04): no sound after suspend
ID: /2019/07/16/sound-problem-_Ubuntu-18.04__-no-sound-after-suspend
Created: July 16, 2019    Edited:  June 12, 2020
Upload: April 8, 2024    Layout:  post
TOC: false    Navigation:  false    Copy to clipboard:  false


Edit: July 18, 2019

Question has been revised with new information:

after waking up from suspend it says (thereβ€˜s only one number
different in the third line, donβ€˜t know what that means):

The third line has changed from IRQ 134 to IRQ 25.

IRQ stands for Interrupt Request. It’s basically a telephone number where the device calls the CPU (Central Processing Unit) to have work done. Because the telephone number has changed between suspend and resume the sound card can’t call the CPU to get work done.


Here’s a script I used a few years ago /lib/systemd/system-sleep/sound:

#!/bin/sh

# NAME: sound
# PATH: /lib/systemd/system-sleep
# CALL: Called from SystemD automatically

# DESC: PulseAudo 8 sets sound to laptop when going to sleep.
#       This script sets sound back to TV.

# DATE: Sep 23 2016. Modified: Oct 28, 2018.

# NOTE: Test psmouse for askubuntu.com "Touchpad not working after suspending laptop"

# Aug 5, 2018  -    Turn off executition bit. As per AU turn off automatic switching:
# https://askubuntu.com/questions/1061414/how-to-disable-pulseaudio-automatic-device-switch/1061578#1061578
#                   Turn execution bit back on as there is no sound at all.
case $1/$2 in
  pre/*)
    echo "$0: Going to $2..."
    # Place your pre suspend commands here, or `exit 0` if no pre suspend action required
    #    modprobe -r psmouse
    sleep 1
    ;;
  post/*)
    echo "$0: Waking up from $2..."
    # Place your post suspend (resume) commands here, or `exit 0` if no post suspend action required
    sleep 2
    # modprobe psmouse
    export PULSE_RUNTIME_PATH="/run/user/1000/pulse/"
    sudo -u UserName -E pacmd set-card-profile 0 output:hdmi-stereo
    ;;
esac

Note my new system doesn’t need to use this script anymore. Not sure if it will work in your case but it might.

⇧ Can we disable cron services in desktop? 18.04 and Samsung: Scan to PC not available  β‡©