Siduction Forum
Siduction Forum => Software - Support => Topic started by: effo on 2018/12/01, 12:16:04
-
Two weeks ago I did a huge d-u. No errors, all worked fine. But I can not get any sound in alsa anymore. Sound works fine in KDE.
/home/effo> speaker-test
speaker-test 1.1.7
Playback device is default
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
ALSA lib pcm_dmix.c:1099:(snd_pcm_dmix_open) unable to open slave
Playback open error: -2,No such file or directory
This part look suspicious:
Playback open error: -2,No such file or directory
/home/effo> cat /proc/asound/cards
0 [HDMI ]: HDA-Intel - HDA ATI HDMI
HDA ATI HDMI at 0xfeb44000 irq 42
1 [Generic ]: HDA-Intel - HD-Audio Generic
HD-Audio Generic at 0xfeb40000 irq 16
/home/effo> aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: HDMI [HDA ATI HDMI], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Generic [HD-Audio Generic], device 0: ALC887-VD Analog [ALC887-VD Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
Any ideas on how to fix this?
-
Did you check levels in alsamixer?
-
Yes, levels in mixer are ok.
This is something else here that not is ok. When I try to start mocp I see these errors:
home/effo> mocp
Running the server...
Trying JACK...
Trying ALSA...
Trying OSS...
FATAL_ERROR: No valid sound driver!
FATAL_ERROR: Server exited!
If I open qmmp and try to play a track, I see this:
ALSA lib pcm_dmix.c:1099:(snd_pcm_dmix_open) unable to open slave
OutputALSA: Error opening PCM device default
OutputWriter: unable to initialize output
StateHandler: Current state: FatalError; previous state: Stopped
DecoderMAD: deleting input_buf
OutputALSA: setupMixer()
OutputALSA: Failed to find mixer element
StateHandler: Current state: Stopped; previous state: FatalError
-
I lost audio on one of my laptops, an LXQt desktop, about 3 weeks ago now. Troubleshooting did not find any problem, but sound was gone.
I finally reinstalled all the alsa-related packages, out of X, and then rebooted and it was fixed.
-
This is a long shot (considering this happened November 03)
You can try and backup
/etc/alsa/conf.d
to a different folder/partition/whatever
Then
mv /etc/alsa/conf.d{,_bak}
login/reboot
Probably won't work, but worth a try
-
Unfortunately you are right piper, it did't help.
I purged alsa-utils and gstreamer1.0-plugins and re-install with no luck. There are libasound2-stuff too, but if I try to purge anything there, there is a lot to be removed.
Are there other packages to re-install...?
root@siductionbox:~# dpkg -l | grep -i alsa
ii alsa-utils 1.1.7-1 amd64 Utilities for configuring and using ALSA
ii gstreamer1.0-alsa:amd64 1.14.4-1 amd64 GStreamer plugin for ALSA
ii libasound2:amd64 1.1.7-1+b1 amd64 shared library for ALSA applications
ii libasound2:i386 1.1.7-1+b1 i386 shared library for ALSA applications
ii libasound2-data 1.1.7-1 all Configuration files and profiles for ALSA drivers
ii libasound2-plugins:amd64 1.1.7-3 amd64 ALSA library additional plugins
ii libasound2-plugins:i386 1.1.7-3 i386 ALSA library additional plugins
-
On a working system (amd64 only) my alsa packages are exactly the same as yours except I don't have the i386 versions.
What does
inxi -A
show?
You say sound works fine in KDE -- do you mean in the systemsettings > hardware > multimedia > Audio and Video setting?
-
/home/effo> inxi -A
Audio: Device-1: Advanced Micro Devices [AMD/ATI] Trinity HDMI Audio driver: snd_hda_intel
Device-2: Advanced Micro Devices [AMD] FCH Azalia driver: snd_hda_intel
Sound Server: ALSA v: k4.19.5-towo.3-siduction-amd64
I have sound in Chromium and VLC, but no sound in qmmp and mocp
-
If the sound test in KDE's systemsettings > hardware > multimedia > Audio and Video setting works (verify that the correct sound playback device for the Music category is at the top of the list), and also since VLC and the browser play sound, it is beginning to sound like bugs in qmmp and mocp, which I do not use and don't know anything about.
-
There is a moc bug report with similar symptoms: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=913277
-
Last resort
killall -9 pulseaudio
apt purge pulseaudio
apt clean; apt autoremove
reboot.
rm -r ~/.pulse ~/.asound* ~/.pulse-cookie ~/.config/pulse
apt install pulseaudio
alsa force-reload
-
I did read the bug report on moc and it looks like the same problem. But my guess is that this is not moc related, more an ALSA thing as I have problem with speaker-test:
/home/effo> speaker-test
speaker-test 1.1.7
Playback device is default
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
ALSA lib pcm_dmix.c:1099:(snd_pcm_dmix_open) unable to open slave
Playback open error: -2,No such file or directory
/home/effo/.config/pulse>
Hmm, "unable to open slave", are we trying to use the wrong device or something like that...?
Let's look at all cards:
/home/effo> aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
hdmi:CARD=HDMI,DEV=0
HDA ATI HDMI, HDMI 0
HDMI Audio Output
dmix:CARD=HDMI,DEV=3
HDA ATI HDMI, HDMI 0
Direct sample mixing device
dsnoop:CARD=HDMI,DEV=3
HDA ATI HDMI, HDMI 0
Direct sample snooping device
hw:CARD=HDMI,DEV=3
HDA ATI HDMI, HDMI 0
Direct hardware device without any conversions
plughw:CARD=HDMI,DEV=3
HDA ATI HDMI, HDMI 0
Hardware device with all software conversions
default:CARD=Generic
HD-Audio Generic, ALC887-VD Analog
Default Audio Device
sysdefault:CARD=Generic
HD-Audio Generic, ALC887-VD Analog
Default Audio Device
front:CARD=Generic,DEV=0
HD-Audio Generic, ALC887-VD Analog
Front speakers
surround21:CARD=Generic,DEV=0
HD-Audio Generic, ALC887-VD Analog
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Generic,DEV=0
HD-Audio Generic, ALC887-VD Analog
4.0 Surround output to Front and Rear speakers
surround41:CARD=Generic,DEV=0
HD-Audio Generic, ALC887-VD Analog
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Generic,DEV=0
HD-Audio Generic, ALC887-VD Analog
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Generic,DEV=0
HD-Audio Generic, ALC887-VD Analog
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Generic,DEV=0
HD-Audio Generic, ALC887-VD Analog
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
dmix:CARD=Generic,DEV=0
HD-Audio Generic, ALC887-VD Analog
Direct sample mixing device
dsnoop:CARD=Generic,DEV=0
HD-Audio Generic, ALC887-VD Analog
Direct sample snooping device
hw:CARD=Generic,DEV=0
HD-Audio Generic, ALC887-VD Analog
Direct hardware device without any conversions
plughw:CARD=Generic,DEV=0
HD-Audio Generic, ALC887-VD Analog
Hardware device with all software conversions
Ok, I want to use default:CARD=Generic
I'll try it with speaker-test:
/home/effo> speaker-test -Ddefault:Generic
speaker-test 1.1.7
Playback device is default:Generic
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 2048 to 16384
Period size range from 1024 to 1024
Using max buffer size 16384
Periods = 4
was set period_size = 1024
was set buffer_size = 16384
0 - Front Left
Time per period = 2,654912
0 - Front Left
Time per period = 2,986484
YES - sound!
I can even play music with aplay:
/home/effo> aplay --device default:CARD=Generic Muse_-_Please,_Please,_Please,_Let_Me_Get_What_I_Want.wav
Playing WAVE 'Muse_-_Please,_Please,_Please,_Let_Me_Get_What_I_Want.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
So I guess that alsa uses the wrong device as the default one. But why? And how to change that?
Did some googling and found https://www.alsa-project.org/main/index.php/Setting_the_default_device
So listed my cards:
/home/effo> cat /proc/asound/cards
0 [HDMI ]: HDA-Intel - HDA ATI HDMI
HDA ATI HDMI at 0xfeb44000 irq 42
1 [Generic ]: HDA-Intel - HD-Audio Generic
HD-Audio Generic at 0xfeb40000 irq 16
Then created /etc/asound.conf and added
defaults.pcm.card 1
defaults.ctl.card 1
And now mocp and qmmp works!
But I don't like adding random config-files, this feels like a cludge :(
Shall I report my findings somewhere?
-
I lot of people have to use a /.asoundrc or /etc/asound.conf
Probably the best wiki for sound
https://wiki.archlinux.org/index.php/PulseAudio
https://wiki.archlinux.org/index.php/PulseAudio/Troubleshooting
https://wiki.archlinux.org/index.php/PulseAudio/Examples
https://wiki.archlinux.org/index.php/ALSA_configuration_examples
https://wiki.archlinux.org/index.php/ALSA_troubleshooting
https://wiki.archlinux.org/index.php/Sound_system
https://wiki.archlinux.org/index.php/PC_speaker
https://wiki.archlinux.org/index.php/Open_Sound_System
https://wiki.debian.org/PulseAudio
https://wiki.debian.org/Sound
https://wiki.debian.org/ALSA = This page is outdated. 2017-09-30
-
Using KDE/Plasma, it has been a long time since I had much trouble with audio. With phonon, phonon-backend-gstreamer, and pulseaudio installed along with the list of alsa packages shown above, you use systemsettings > hardware > multimedia > Audio and Video, choose "Music" under Audio Playback, then under the "Backend" tab you make sure phonon-gstreamer is selected, and under the "Device Preference" tab you use the "Test" button to see which works, and use the up-down adjustment to put the desired device on top of the list.