You are not logged in.

#1 2017-03-25 13:37:52

peanut_0
Member
Registered: 2016-03-20
Posts: 16

Sometimes the sound stops and is only fixed on reboot

I believe I'm using alsa and pulseaudio.

Sometimes the sound will suddenly stop working. When I check with alsamixer, it shows that sound card "HDA Intel PCH" isn't a selectable option anymore. Sometimes "HDA Intel HDMI" is there, sometimes it's not.
Occasionally it'll happily work with "HDA Intel PCH", but sometimes it will only let me play sound through the speakers and not headphones (only the speaker option shows up in output devices in pavucontrol).

Usually a reboot will fix it, so I'm guessing it might be a kernel thing?

I'm hoping that there's a command to just reboot whatever is screwing up the sound rather than the whole machine. pulseaudio -k does nothing to solve this problem.

Last edited by peanut_0 (2017-03-26 15:08:41)

Offline

#2 2017-03-25 13:46:25

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: Sometimes the sound stops and is only fixed on reboot


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2017-03-25 15:10:54

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,668

Re: Sometimes the sound stops and is only fixed on reboot

look at the output of

sudo fuser -v /dev/snd/*

it will tell you which programs are actively using the soundcard if anything else other than pulseaudio is listed then that's likely to be wrong. What you will also want to do is install pulseaudio-alsa and lib32-alsa-plugins

Offline

#4 2017-03-26 14:56:33

peanut_0
Member
Registered: 2016-03-20
Posts: 16

Re: Sometimes the sound stops and is only fixed on reboot

V1del wrote:

look at the output of

sudo fuser -v /dev/snd/*

it will tell you which programs are actively using the soundcard if anything else other than pulseaudio is listed then that's likely to be wrong. What you will also want to do is install pulseaudio-alsa and lib32-alsa-plugins

Just pulseaudio is using it. Both of those are installed.

Offline

#5 2017-03-26 15:05:55

peanut_0
Member
Registered: 2016-03-20
Posts: 16

Re: Sometimes the sound stops and is only fixed on reboot

I've also just had another issue with the sound. Both cards appeared in alsamixer, and I was able to select either of them. Unfortunately no sound came out of anywhere, even though pavucontrol was showing that it was playing sound fine.

This was fixed with a reboot.

> ~ cat /proc/asound/modules
 0 snd_hda_intel
 1 snd_hda_intel

so i'm not sure that adding a .conf will do anything...

Last edited by peanut_0 (2017-03-26 15:07:53)

Offline

#6 2017-03-26 17:56:19

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: Sometimes the sound stops and is only fixed on reboot

About your question how to avoid a reboot, you can use this script to restart the audio device:

#!/bin/bash

[[ $UID = 0 ]] || exec sudo "$0"

echo 1 > '/sys/bus/pci/devices/0000:00:1b.0/remove'
sleep 1
echo 1 > /sys/bus/pci/rescan

You might have to customize the device id there. You can see it in the output of "lspci".

About your problem, something similar happens here for me after using suspend. With some kernel versions it happens often, and with other kernel version only very rarely (or maybe never). I have this in a file in "/etc/modprobe.d/":

options snd_hda_intel power_save=0

Maybe that's why it only happens for me when I suspend, but not in normal use like for you? Perhaps try this and see if your problems go away.

Last edited by Ropid (2017-03-26 18:02:04)

Offline

Board footer

Powered by FluxBB