You are not logged in.

#1 2018-04-09 20:58:28

anno2100
Member
Registered: 2016-10-22
Posts: 15

[SOLVED] ALSA/pulseaudio: internal sound card not recognized anymore

Hi everyone

I'm running an up-to-date Arch Linux with i3wm. Today I tried to configure my UE Megaboom as an external bluetooth speaker following the bluetooth headset article in the wiki (https://wiki.archlinux.org/index.php/Bluetooth_headset).

This worked all nicely. After I disconnected them though, my system does not play sound through my laptop's sound card anymore, but only recognizes the external HDMI monitors sound.

I checked aslamixer and pavucontrol but cannot get it to work anymore. I checked the PulseAudio/Troubleshooting (https://wiki.archlinux.org/index.php/Pu … leshooting) article, but with no luck. I hope someone can point me in the right direction.

Following I will print some hopefully useful command outputs, while spotify is playing through the HDMI monitor:

> sudo fuser -v /dev/snd/*
                     USER        PID ACCESS COMMAND
/dev/snd/controlC0:  <user>       1035 F.... pulseaudio
/dev/snd/pcmC0D7p:   <user>       1035 F...m pulseaudio
> pacmd list-cards
1 card(s) available.
    index: 0
	name: <alsa_card.pci-0000_00_1f.3>
	driver: <module-alsa-card.c>
	owner module: 6
	properties:
		alsa.card = "0"
		alsa.card_name = "HDA Intel PCH"
		alsa.long_card_name = "HDA Intel PCH at 0xe1340000 irq 132"
		alsa.driver_name = "snd_hda_intel"
		device.bus_path = "pci-0000:00:1f.3"
		sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
		device.bus = "pci"
		device.vendor.id = "8086"
		device.vendor.name = "Intel Corporation"
		device.product.id = "9d70"
		device.product.name = "Sunrise Point-LP HD Audio"
		device.form_factor = "internal"
		device.string = "0"
		device.description = "Built-in Audio"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	profiles:
		output:hdmi-stereo-extra1: Digital Stereo (HDMI 2) Output (priority 5200, available: unknown)
		output:hdmi-surround-extra1: Digital Surround 5.1 (HDMI 2) Output (priority 100, available: unknown)
		output:hdmi-surround71-extra1: Digital Surround 7.1 (HDMI 2) Output (priority 100, available: unknown)
		output:hdmi-stereo-extra2: Digital Stereo (HDMI 3) Output (priority 5200, available: no)
		output:hdmi-surround-extra2: Digital Surround 5.1 (HDMI 3) Output (priority 100, available: no)
		output:hdmi-surround71-extra2: Digital Surround 7.1 (HDMI 3) Output (priority 100, available: no)
		output:hdmi-stereo-extra3: Digital Stereo (HDMI 4) Output (priority 5200, available: no)
		output:hdmi-surround-extra3: Digital Surround 5.1 (HDMI 4) Output (priority 100, available: no)
		output:hdmi-surround71-extra3: Digital Surround 7.1 (HDMI 4) Output (priority 100, available: no)
		output:hdmi-stereo-extra4: Digital Stereo (HDMI 5) Output (priority 5200, available: no)
		output:hdmi-surround-extra4: Digital Surround 5.1 (HDMI 5) Output (priority 100, available: no)
		output:hdmi-surround71-extra4: Digital Surround 7.1 (HDMI 5) Output (priority 100, available: no)
		off: Off (priority 0, available: unknown)
	active profile: <output:hdmi-stereo-extra1>
	sinks:
		alsa_output.pci-0000_00_1f.3.hdmi-stereo-extra1/#9: Built-in Audio Digital Stereo (HDMI 2)
	sources:
		alsa_output.pci-0000_00_1f.3.hdmi-stereo-extra1.monitor/#9: Monitor of Built-in Audio Digital Stereo (HDMI 2)
	ports:
		hdmi-output-1: HDMI / DisplayPort 2 (priority 5800, latency offset 0 usec, available: yes)
			properties:
				device.icon_name = "video-display"
				device.product.name = "BenQ GL2450H"
		hdmi-output-2: HDMI / DisplayPort 3 (priority 5700, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "video-display"
		hdmi-output-3: HDMI / DisplayPort 4 (priority 5600, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "video-display"
		hdmi-output-4: HDMI / DisplayPort 5 (priority 5500, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "video-display"

Here I can't find anything about the analog/stereo duplex profile that I would like to see.

 pacmd list-sinks
1 sink(s) available.
  * index: 9
	name: <alsa_output.pci-0000_00_1f.3.hdmi-stereo-extra1>
	driver: <module-alsa-card.c>
	flags: HARDWARE DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
	state: RUNNING
	suspend cause: 
	priority: 9030
	volume: front-left: 22932 /  35% / -27.36 dB,   front-right: 22932 /  35% / -27.36 dB
	        balance 0.00
	base volume: 65536 / 100% / 0.00 dB
	volume steps: 65537
	muted: no
	current latency: 30.74 ms
	max request: 5 KiB
	max rewind: 344 KiB
	monitor source: 9
	sample spec: s16le 2ch 44100Hz
	channel map: front-left,front-right
	             Stereo
	used by: 1
	linked by: 4
	configured latency: 30.00 ms; range is 0.50 .. 2000.00 ms
	card: 0 <alsa_card.pci-0000_00_1f.3>
	module: 6
	properties:
		alsa.resolution_bits = "16"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = "HDMI 1"
		alsa.id = "HDMI 1"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "7"
		alsa.card = "0"
		alsa.card_name = "HDA Intel PCH"
		alsa.long_card_name = "HDA Intel PCH at 0xe1340000 irq 132"
		alsa.driver_name = "snd_hda_intel"
		device.bus_path = "pci-0000:00:1f.3"
		sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
		device.bus = "pci"
		device.vendor.id = "8086"
		device.vendor.name = "Intel Corporation"
		device.product.id = "9d70"
		device.product.name = "Sunrise Point-LP HD Audio"
		device.form_factor = "internal"
		device.string = "hdmi:0,1"
		device.buffering.buffer_size = "352800"
		device.buffering.fragment_size = "176400"
		device.access_mode = "mmap+timer"
		device.profile.name = "hdmi-stereo-extra1"
		device.profile.description = "Digital Stereo (HDMI 2)"
		device.description = "Built-in Audio Digital Stereo (HDMI 2)"
		alsa.mixer_name = "Realtek ALC293"
		alsa.components = "HDA:10ec0293,17aa2233,00100003 HDA:80862809,80860101,00100000"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	ports:
		hdmi-output-1: HDMI / DisplayPort 2 (priority 5800, latency offset 0 usec, available: yes)
			properties:
				device.icon_name = "video-display"
				device.product.name = "BenQ GL2450H"
	active port: <hdmi-output-1>
> pacmd list-sink-inputs

1 sink input(s) available.
    index: 21
	driver: <protocol-native.c>
	flags: START_CORKED 
	state: RUNNING
	sink: 9 <alsa_output.pci-0000_00_1f.3.hdmi-stereo-extra1>
	volume: front-left: 34733 /  53% / -16.54 dB,   front-right: 34733 /  53% / -16.54 dB
	        balance 0.00
	muted: no
	current latency: 1010.95 ms
	requested latency: 980.00 ms
	sample spec: s16le 2ch 44100Hz
	channel map: front-left,front-right
	             Stereo
	resample method: (null)
	module: 8
	client: 14369 <Spotify>
	properties:
		media.role = "music"
		media.name = "Spotify"
		application.name = "Spotify"
		native-protocol.peer = "UNIX socket client"
		native-protocol.version = "32"
		application.process.id = "13714"
		application.process.user = "yves"
		application.process.host = "arch"
		application.process.binary = "spotify"
		window.x11.display = ":0"
		application.language = "en_US.UTF8"
		application.process.machine_id = "d81a0018c17f4f25852121de45cbe1d5"
		application.process.session_id = "c1"
		application.icon_name = "spotify-client"
		module-stream-restore.id = "sink-input-by-media-role:music"
> aplay -l                                                                            
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC293 Analog [ALC293 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 10: HDMI 4 [HDMI 4]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

In alsamixer Auto-Mute id disabled and everything else is enabled (green 00).

Additonally, the volume buttons on my notebook are not working anymore. I have them configured as follows:

bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5% # increase sound volume
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5% # decrease sound volume
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle # mute sound
bindsym XF86AudioMicMute exec --no-startup-id amixer set Capture toggle && killall -SIGUSR1 i3status

In pavucontrol I can only select HDMI output's but my laptop does not show at all.

If you have any ideas or need any more logs/outputs please let me know.

Thank you in advance!

Last edited by anno2100 (2018-04-12 08:56:09)

Offline

#2 2018-04-10 00:29:30

obrienanthonyt
Member
Registered: 2013-11-21
Posts: 9

Re: [SOLVED] ALSA/pulseaudio: internal sound card not recognized anymore

Can you give us a view of your hardware?

lspci | grep Audio

Offline

#3 2018-04-10 07:17:49

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

Re: [SOLVED] ALSA/pulseaudio: internal sound card not recognized anymore

That reads quite weird, could you elaborate on which specific path from the wiki you followed?  Your analog card is there, does

speaker-test -Dhw:0,0 -c2

give you sound output? If that works it is likely that the pulse config got corrupted for some reason, try resetting it's settings https://wiki.archlinux.org/index.php/Pu … tion_files

And FWIW, did you explicitly change any system wide pulse configs? You might want to post them if that is the case.

Last edited by V1del (2018-04-10 07:23:10)

Offline

#4 2018-04-10 09:06:58

anno2100
Member
Registered: 2016-10-22
Posts: 15

Re: [SOLVED] ALSA/pulseaudio: internal sound card not recognized anymore

Thanks for your replies!

Now to answer your questions:

@obrienanthonyt:

> lspci | grep Audio

00:1f.3 Audio device: Intel Corporation Sunrise Point-LP HD Audio (rev 21)

@V1del:
You are right. The speaker-test command does actually play a noise on the left and right speaker of my laptop. Nice, at least the hardware is not broken.

V1del wrote:

could you elaborate on which specific path from the wiki you followed?

For the bluetooth configuration? I started from the top at "Headset via Bluez5/PulseAudio", installed the required packages and then did the "Configuration via CLI" until "[bluetooth]# connect 00:1D:43:6D:03:26"

I reset the configuration by deleting ~/.config/pulse and restarting pulseaudio. Unfortunately I still don't see my analog card in pavucontrol.

V1del wrote:

And FWIW, did you explicitly change any system wide pulse configs? You might want to post them if that is the case.

Ah yes, I initially added the following, as was described in the bluetooth headset wiki:

/etc/pulse/default.pa
# automatically switch to newly-connected devices
load-module module-switch-on-connect

After not having sound I removed the line again. Should have mentioned that. Maybe I corrupted the config doing that. Therefore here my complete default.pa file:

 ### loaded modules.
 .ifexists module-gconf.so
 .nofail
 load-module module-gconf
 .fail
 .endif
 
 ### Automatically restore the default sink/source when changed by the user
 ### during runtime
 ### NOTE: This should be loaded as early as possible so that subsequent modules
 ### that look up the default sink/source get the right value
 load-module module-default-device-restore
 
 ### Automatically move streams to the default sink if the sink they are
 ### connected to dies, similar for sources
 load-module module-rescue-streams
 
 ### Make sure we always have a sink around, even if it is a null sink.
 load-module module-always-sink
 
 ### Honour intended role device property
 load-module module-intended-roles
 
 ### Automatically suspend sinks/sources that become idle for too long
 load-module module-suspend-on-idle
 
 ### If autoexit on idle is enabled we want to make sure we only quit
 ### when no local session needs us anymore.
 .ifexists module-console-kit.so
 load-module module-console-kit
 .endif
 .ifexists module-systemd-login.so
 load-module module-systemd-login
 .endif
 
 ### Enable positioned event sounds
 load-module module-position-event-sounds
 
 ### Cork music/video streams when a phone stream is active
 load-module module-role-cork
 
 ### Modules to allow autoloading of filters (such as echo cancellation)
 ### on demand. module-filter-heuristics tries to determine what filters
 ### make sense, and module-filter-apply does the heavy-lifting of
 ### loading modules and rerouting streams.
 load-module module-filter-heuristics
 load-module module-filter-apply
 
 ### Make some devices default
 #set-default-sink output
 #set-default-source input

Thanks a lot for your help!

Offline

#5 2018-04-11 08:41:42

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

Re: [SOLVED] ALSA/pulseaudio: internal sound card not recognized anymore

Is that really your complete default.pa file (e.g. not truncated by the pager or similar)? There are quite a few modules missing I'd usually assume to be there. If it is, try reinstalling pulseaudio and overwritting the .pacnew files and or removing your files and let them be repopulated by the package. Also FWIW if you removed those directories while pulse was still running it might've gone right ahead and saved the incorrect config again. To make sure:

systemctl --user mask pulseaudio.socket
systemctl --user stop pulseaudio.service
rm -r ~/.pulse ~/.pulse-cookie ~/.config/pulse
#And while we are already here and stopped pulse and all
pulseaudio -vvv #Post the output, maybe it contains some hints
#To reenable automatic pulse startup, after that manual test run
systemctl --user unmask pulseaudio.socket

Offline

#6 2018-04-11 10:47:09

anno2100
Member
Registered: 2016-10-22
Posts: 15

Re: [SOLVED] ALSA/pulseaudio: internal sound card not recognized anymore

Oh my bad, I did not realize that it got truncated. Here is the complete file:

#!/usr/bin/pulseaudio -nF
#
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# PulseAudio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.

# This startup script is used only if PulseAudio is started per-user
# (i.e. not in system mode)

.fail

### Automatically restore the volume of streams and devices
load-module module-device-restore
load-module module-stream-restore
load-module module-card-restore

### Automatically augment property information from .desktop files
### stored in /usr/share/application
load-module module-augment-properties

### Should be after module-*-restore but before module-*-detect
load-module module-switch-on-port-available

### Load audio drivers statically
### (it's probably better to not load these drivers manually, but instead
### use module-udev-detect -- see below -- for doing this automatically)
#load-module module-alsa-sink
#load-module module-alsa-source device=hw:1,0
#load-module module-oss device="/dev/dsp" sink_name=output source_name=input
#load-module module-oss-mmap device="/dev/dsp" sink_name=output source_name=input
#load-module module-null-sink
#load-module module-pipe-sink

### Automatically load driver modules depending on the hardware available
.ifexists module-udev-detect.so
load-module module-udev-detect
.else
### Use the static hardware detection module (for systems that lack udev support)
load-module module-detect
.endif

### Automatically connect sink and source if JACK server is present
.ifexists module-jackdbus-detect.so
.nofail
load-module module-jackdbus-detect channels=2
.fail
.endif

### Automatically load driver modules for Bluetooth hardware
.ifexists module-bluetooth-policy.so
load-module module-bluetooth-policy
.endif

.ifexists module-bluetooth-discover.so
load-module module-bluetooth-discover
.endif

### Load several protocols
.ifexists module-esound-protocol-unix.so
load-module module-esound-protocol-unix
.endif
load-module module-native-protocol-unix

### Network access (may be configured with paprefs, so leave this commented
### here if you plan to use paprefs)
#load-module module-esound-protocol-tcp
#load-module module-native-protocol-tcp
#load-module module-zeroconf-publish

### Load the RTP receiver module (also configured via paprefs, see above)
#load-module module-rtp-recv

### Load the RTP sender module (also configured via paprefs, see above)
#load-module module-null-sink sink_name=rtp format=s16be channels=2 rate=44100 sink_properties="device.description='RTP Multicast Sink'"
#load-module module-rtp-send source=rtp.monitor

### Load additional modules from GConf settings. This can be configured with the paprefs tool.
### Please keep in mind that the modules configured by paprefs might conflict with manually
### loaded modules.
.ifexists module-gconf.so
.nofail
load-module module-gconf
.fail
.endif

### Automatically restore the default sink/source when changed by the user
### during runtime
### NOTE: This should be loaded as early as possible so that subsequent modules
### that look up the default sink/source get the right value
load-module module-default-device-restore

### Automatically move streams to the default sink if the sink they are
### connected to dies, similar for sources
load-module module-rescue-streams

### Make sure we always have a sink around, even if it is a null sink.
load-module module-always-sink

### Honour intended role device property
load-module module-intended-roles

### Automatically suspend sinks/sources that become idle for too long
load-module module-suspend-on-idle

### If autoexit on idle is enabled we want to make sure we only quit
### when no local session needs us anymore.
.ifexists module-console-kit.so
load-module module-console-kit
.endif
.ifexists module-systemd-login.so
load-module module-systemd-login
.endif

### Enable positioned event sounds
load-module module-position-event-sounds

### Cork music/video streams when a phone stream is active
load-module module-role-cork

### Modules to allow autoloading of filters (such as echo cancellation)
### on demand. module-filter-heuristics tries to determine what filters
### make sense, and module-filter-apply does the heavy-lifting of
### loading modules and rerouting streams.
load-module module-filter-heuristics
load-module module-filter-apply

### Make some devices default
#set-default-sink output
#set-default-source input


So now I ran your commands:

> pulseaudio -vvv
I: [pulseaudio] main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operation not permitted
I: [pulseaudio] main.c: setrlimit(RLIMIT_RTPRIO, (9, 9)) failed: Operation not permitted
D: [pulseaudio] core-rtclock.c: Timer slack is set to 50 us.
D: [pulseaudio] core-util.c: RealtimeKit worked.
I: [pulseaudio] core-util.c: Successfully gained nice level -11.
I: [pulseaudio] main.c: This is PulseAudio 11.1
D: [pulseaudio] main.c: Compilation host: x86_64-pc-linux-gnu
D: [pulseaudio] main.c: Compilation CFLAGS: -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -Wall -W -Wextra -Wno-long-long -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing -Wwrite-strings -Wno-unused-parameter -ffast-math -fno-common -fdiagnostics-show-option -fdiagnostics-color=auto
D: [pulseaudio] main.c: Running on host: Linux x86_64 4.15.15-1-ARCH #1 SMP PREEMPT Sat Mar 31 23:59:25 UTC 2018
D: [pulseaudio] main.c: Found 4 CPUs.
I: [pulseaudio] main.c: Page size is 4096 bytes
D: [pulseaudio] main.c: Compiled with Valgrind support: no
D: [pulseaudio] main.c: Running in valgrind mode: no
D: [pulseaudio] main.c: Running in VM: no
D: [pulseaudio] main.c: Optimized build: yes
D: [pulseaudio] main.c: FASTPATH defined, only fast path asserts disabled.
I: [pulseaudio] main.c: Machine ID is d81a0018c17f4f25852121de45cbe1d5.
I: [pulseaudio] main.c: Session ID is c1.
I: [pulseaudio] main.c: Using runtime directory /run/user/1000/pulse.
I: [pulseaudio] main.c: Using state directory /home/yves/.config/pulse.
I: [pulseaudio] main.c: Using modules directory /usr/lib/pulse-11.1/modules.
I: [pulseaudio] main.c: Running in system mode: no
E: [pulseaudio] pid.c: Daemon already running.
E: [pulseaudio] main.c: pa_pid_file_create() failed.

Which tells me, that pulseaudio is already running, which is strange,  because systemctl tells me, that it is inactive, as it should be.

> systemctl --user status pulseaudio.service
● pulseaudio.service
   Loaded: masked (/dev/null; masked)
   Active: inactive (dead)

If I then check the processes, I find a pulseaudio one:

 ps aux | grep pulse
<user>      6053  0.8  0.0 800824 10336 ?        S<l  12:15   0:02 /usr/bin/pulseaudio --start --log-target=syslog

I can kill it using "pulseaudio -k" or "kill `pidof pulseaudio`", but it automatically gets started with a new process ID right afterwards.

So to get  you an output I ran "pulseaudio -k && pulseaudio -vvv". This finally resulted in a huge amount of output.
Therefore I put it in a pastebin:
https://pastebin.com/aGCB4FcC

I'm quite confused right now. Uninstalling and removing the configs or stopping the service have no effect.
I'm also unsure how the pulseaudio gets started as soon as it is killed. I run i3wm and start is using the following code in .zprofile

 [[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx

In neither .xinitrc or my i3config file I see any hint at starting pulseaudio. What am I missing?

Offline

#7 2018-04-11 16:21:17

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

Re: [SOLVED] ALSA/pulseaudio: internal sound card not recognized anymore

hmm that's interesting, something is starting your pulse outside of your systemd context, so that might be conflicting (the startup command would be

pulseaudio  --daemonize=no

if it was invoked by the systemd service).  What does your .xinitrc look like? Note the blue box. Alternatively if that wasn't it and you don't find out WTF is starting your pulse manually, you could try to enable the pulseaudio.service, so that it should be the first thing invoked when your user logs on.

From the log, these lines look suspicious

 Unable to find definition 'cards.HDA-Intel.pcm.front.10:CARD=0'

front.10 seems like a weird definition to try and find (but might also be a good hint, grep/find through your system to figure out where such a line might come from), that should be front.0 are there any .asoundrc /etc/asound.conf or similar defintions that might be setting something wonky there? Can you post the outputs of

aplay -L
pacman -Qkk pulseaudio
pacman -Qkk alsa-lib

Another thing to note, though that might only be an aside by now. are you absolutely certain that the <user> you are blanking is always your own user?

Offline

#8 2018-04-12 00:01:48

anno2100
Member
Registered: 2016-10-22
Posts: 15

Re: [SOLVED] ALSA/pulseaudio: internal sound card not recognized anymore

My xinitrc in my home directory looks as follows:

#!/bin/sh

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then


    xrdb -merge $sysresources

fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f "$userresources" ]; then


    xrdb -merge "$userresources"

fi

if [ -f "$usermodmap" ]; then
    xmodmap "$usermodmap"
fi

# start some nice programs

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
 for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
  [ -x "$f" ] && . "$f"
 done
 unset f
fi

exec i3

It's a 1-to-1 copy of the default one, except that i exchanged everything after "twm &" with "exec i3".

To address the blue box:

> /etc/X11/xinit/xinitrc.d  ll
total 8.0K
-rwxr-xr-x 1 root root 318 May  4  2017 40-libcanberra-gtk-module.sh
-rwxr-xr-x 1 root root 203 Mar 22 12:48 50-systemd-user.sh

Libcanberra: Looks like it's obsolete? As "echo $DESKTOP_SESSION" results in "kde" (Used in i3wm to get a dark theme for dolphin and okular working)

#!/bin/sh

case "${DESKTOP_SESSION-}" in
  gnome*) # Done by gnome-settings-daemon
  ;;
  *)
    # Extra check in case DESKTOP_SESSION is not set correctly
    if [ -z "${GNOME_DESKTOP_SESSION_ID-}" ]; then
      GTK_MODULES="${GTK_MODULES:+$GTK_MODULES:}canberra-gtk-module"
      export GTK_MODULES
    fi
  ;;
esac

Systemd-user: Not exactly sure what's going on there tbh (shame on me).

#!/bin/sh

systemctl --user import-environment DISPLAY XAUTHORITY

if command -v dbus-update-activation-environment >/dev/null 2>&1; then
        dbus-update-activation-environment DISPLAY XAUTHORITY
fi

So it does not look like I'm starting anything related to asla/pulseaudio here, if I'm not mistaking.


Alternatively if that wasn't it and you don't find out WTF is starting your pulse manually, you could try to enable the pulseaudio.service, so that it should be the first thing invoked when your user logs on.

I enabled the service for now, as I'm really not figuraing out WTF is starting pulse atm.


Here to outputs from the three commands:

> aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
pulse
    PulseAudio Sound Server
sysdefault:CARD=PCH
    HDA Intel PCH, ALC293 Analog
    Default Audio Device
front:CARD=PCH,DEV=0
    HDA Intel PCH, ALC293 Analog
    Front speakers
surround21:CARD=PCH,DEV=0
    HDA Intel PCH, ALC293 Analog
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=PCH,DEV=0
    HDA Intel PCH, ALC293 Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
    HDA Intel PCH, ALC293 Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
    HDA Intel PCH, ALC293 Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
    HDA Intel PCH, ALC293 Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
    HDA Intel PCH, ALC293 Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
hdmi:CARD=PCH,DEV=0
    HDA Intel PCH, HDMI 0
    HDMI Audio Output
hdmi:CARD=PCH,DEV=1
    HDA Intel PCH, HDMI 1
    HDMI Audio Output
hdmi:CARD=PCH,DEV=2
    HDA Intel PCH, HDMI 2
    HDMI Audio Output
hdmi:CARD=PCH,DEV=3
    HDA Intel PCH, HDMI 3
    HDMI Audio Output
hdmi:CARD=PCH,DEV=4
    HDA Intel PCH, HDMI 4
    HDMI Audio Output
> pacman -Qkk pulseaudio

pulseaudio: 325 total files, 0 altered files
> pacman -Qkk alsa-lib

alsa-lib: 219 total files, 0 altered files

Another thing to note, though that might only be an aside by now. are you absolutely certain that the <user> you are blanking is always your own user?

I used sublime to search/replace my name with <user> in the pastebin. Additionally I re-ran the all other commands that have <user> in them and I only replaced my name. So I'm 99.9% sure, that it's correct.


My .asoundrc only has this in it:
"</home/<user>/.asoundrc.asoundconf>"

The .asoundrc.asoundconf looks as follows:
Note: It states that manual changes will be overwritten, so assuming (?) that this is correct, it should not be of too much interest for us.

# ALSA library configuration file managed by asoundconf(1).
#
# MANUAL CHANGES TO THIS FILE WILL BE OVERWRITTEN!
#
# Manual changes to the ALSA library configuration should be implemented
# by editing the ~/.asoundrc file, not by editing this file.
!defaults.pcm.card PCH
defaults.ctl.card PCH
defaults.pcm.device 10
defaults.pcm.subdevice -1
defaults.pcm.nonblock 1
defaults.pcm.compat 0
defaults.pcm.minperiodtime 5000
defaults.pcm.ipc_key 5678293
defaults.pcm.ipc_gid audio
defaults.pcm.ipc_perm 0660
defaults.pcm.dmix.max_periods 0
defaults.pcm.dmix.rate 48000
defaults.pcm.dmix.format "unchanged"
defaults.pcm.dmix.card defaults.pcm.card
defaults.pcm.dmix.device defaults.pcm.device
defaults.pcm.dsnoop.card defaults.pcm.card
defaults.pcm.dsnoop.device defaults.pcm.device
defaults.pcm.front.card defaults.pcm.card
defaults.pcm.front.device defaults.pcm.device
defaults.pcm.rear.card defaults.pcm.card
defaults.pcm.rear.device defaults.pcm.device
defaults.pcm.center_lfe.card defaults.pcm.card
defaults.pcm.center_lfe.device defaults.pcm.device
defaults.pcm.side.card defaults.pcm.card
defaults.pcm.side.device defaults.pcm.device
defaults.pcm.surround21.card defaults.pcm.card
defaults.pcm.surround21.device defaults.pcm.device
defaults.pcm.surround40.card defaults.pcm.card
defaults.pcm.surround40.device defaults.pcm.device
defaults.pcm.surround41.card defaults.pcm.card
defaults.pcm.surround41.device defaults.pcm.device
defaults.pcm.surround50.card defaults.pcm.card
defaults.pcm.surround50.device defaults.pcm.device
defaults.pcm.surround51.card defaults.pcm.card
defaults.pcm.surround51.device defaults.pcm.device
defaults.pcm.surround71.card defaults.pcm.card
defaults.pcm.surround71.device defaults.pcm.device
defaults.pcm.iec958.card defaults.pcm.card
defaults.pcm.iec958.device defaults.pcm.device
defaults.pcm.modem.card defaults.pcm.card
defaults.pcm.modem.device defaults.pcm.device
defaults.pcm.file_format "raw"
defaults.pcm.file_truncate true
defaults.rawmidi.card 0
defaults.rawmidi.device 0
defaults.rawmidi.subdevice -1
defaults.hwdep.card 0
defaults.hwdep.device 0
defaults.timer.class 2
defaults.timer.sclass 0
defaults.timer.card 0
defaults.timer.device 0
defaults.timer.subdevice 0
defaults.namehint.showall off
defaults.namehint.basic on
defaults.namehint.extended off
pcm.!default { type pulse }
ctl.!default { type pulse }

My "/etc/asound.conf" is this:

# Use PulseAudio by default
pcm.!default {
  type pulse
  fallback "sysdefault"
  hint {
    show on
    description "Default ALSA Output (currently PulseAudio Sound Server)"
  }
}

ctl.!default {
  type pulse
  fallback "sysdefault"
}

# vim:set ft=alsaconf:



Unable to find definition 'cards.HDA-Intel.pcm.front.10:CARD=0'

As for this: My grep through all files is still running (probably a bit overkill). Until now it only found it in the log /journal.

Thanks again for all your help!

Offline

#9 2018-04-12 08:17:13

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

Re: [SOLVED] ALSA/pulseaudio: internal sound card not recognized anymore

Yeah that asoundrc is your problem:

defaults.pcm.device 10

in general running asoundconf (asoundconf is not an official tool, certainly not used by any default setup) creates strange overblown configuration, but is actively harmful while using pulseaudio (well technically as it stands this wouldn't work with an ALSA only system either). Remove that file, and don't run asoundconf again, your /etc/asound.conf should be all configuration you have to do on ALSA's side. Don't mix ALSA and pulseaudio configuration, it usually ends in confusion (as evident wink ).

Last edited by V1del (2018-04-12 08:23:47)

Offline

#10 2018-04-12 08:55:40

anno2100
Member
Registered: 2016-10-22
Posts: 15

Re: [SOLVED] ALSA/pulseaudio: internal sound card not recognized anymore

Oh wow that solved the problem smile Thank you very much! Now I just have to figure out, why I had those file/had asoundconf installed. But I can do that on my own now.

Yes this had me all really confused, but I also learned a lot about how sound works in Linux, so at least I have that.

Last edited by anno2100 (2018-04-12 09:03:26)

Offline

Board footer

Powered by FluxBB