You are not logged in.

#1 2015-10-13 14:37:44

tknomanzr
BL Die Hard
From: Around the Bend
Registered: 2015-09-29
Posts: 1,029

Getting Sound working in BL

As you may have noticed, we get frequent help requests on how to get sound working in BunsenLabs. There are some back end issues that I have discovered that are preventing automatic discovery and setup of sound at this time. You can read the details of that discussion here if it interests you.

This walkthrough is more aimed at getting your sound up and running in the interim, while the dev team works on the issues. So you've booted up into your shiny new BunsenLabs and have discovered that you have no sound. Here is what to do in that case:

1)     Check to make sure your sound card is detected by the kernel and that you have sound drivers loaded. You can do that with these two commands respectively:

lspci | grep Audio
lsmod

[b]Edit HoaS Suggests this approach for lspci[/b]
lspci -k|grep -A2 Audio

2)    Once you have determined that you do indeed have proper hardware support for your sound, you will need to check the software side.
First, issue the command 'aplay -l' and look at the devices it lists. Here is an example of mine:

tknomanzr@wtfbox-bl:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: CA0132 Analog [CA0132 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: CA0132 Digital [CA0132 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

As you can see, you are likely to have a list with an Analog out, a Digital out and one or more HDMI outs. Let me explain what each of these means in turn:

  • Analog out: your typical pc to speaker connection. Usually you wil have a green plug that plugs into the back of your pc that hooks your speakers up.

  • Digital Out: Not often used in typical usage scenarios, but commonly used by audio professionals when patching sound, etc.

  • HDMI out: Usually either a tv or HDMI capable monitor with built-in sound.

Once you have figured out which sound connections you need, usually Analog, you will need to do some editing in ~/.config/volti/config. In this section, you will see a card_index directive. This should be card_index = 0 as this is the default that alsa specifies. We need to change that to match the output device you desire from 'aplay -l'. If you look above, at my example, you will see something like this:

card 1: NVidia [HDA NVidia], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1

The device number is the number we are interested in. Set the card_index to be that number in ~/.config/volti/config
Here is an example of mine. As you can see, my analog out is at card_index = 0. Note: This actually means that volti would work out of the box on this hardware. YMMV.

[card-0]
control = Master
mask_lock = 0
mask_control = 33554431

[global]
mixer_show_values = 1
scale_increment = 1.0
card_index = 0
icon_theme = Faenza
scale_show_value = 0
mixer = pavucontrol
show_tooltip = 1
notify_position = 0
keys = 0
toggle = mute
mixer_internal = 0
notify_body = <span font_desc="14" weight="bold">{volume}</span>
	<small>{card}</small>
	<small>{mixer}</small>
keys_backend = xlib
run_in_terminal = 0
notify_timeout = 2.0
show_notify = 0

[card-1]
mask_lock = 0

Now it is time to test it. from the terminal run volti like this:

volti &

If you do not get an error, your volti icon should pop up on your tint2 taskbar. If it does not, you will need to review 'aplay -l' and select another sound device.

3)    As a final bit, I would recommend you go ahead and create a file at /etc/asound.conf as root with the following:

pcm.!default {
    type pulse
    # If defaults.namehint.showall is set to off in alsa.conf, then this is
    # necessary to make this pcm show up in the list returned by
    # snd_device_name_hint or aplay -L
    hint.description "Default Audio Device"
}
ctl.!default {
    type pulse
}
pcm.pulse {
    type pulse
}

ctl.pulse {
    type pulse
}

This bit will instruct alsa to allow pulseaudio to handle your sound device connections, which should, hopefully, stop problems with sound not switching outputs when you unplug headphones, etc.

If you have questions relating to your individual sound setup, you can respond here and I or someone else will do our best to help you with your issue. If you have technical information pertaining to sound setup, please post that info here so that we can keep it all grouped together.

Last edited by damo (2015-10-21 13:57:42)

Offline

#2 2015-10-13 18:52:57

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: Getting Sound working in BL

tknomanzr wrote:

1.) Check to make sure your sound card is detected by the kernel and that you have sound drivers loaded. You can do that with these two command respectively:

lspci | grep Audio
lsmod

You may need to search around with lsmod as I am not sure I can come up with a grep statement that will universally filter all the sound modules out for you.

To determine the kernel driver(s) in use for the audio system, look at the output of:

lspci -k|grep -A2 Audio

“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#3 2015-10-13 19:11:54

hhh
Meep!
Registered: 2015-09-17
Posts: 10,517
Website

Re: Getting Sound working in BL

@tknomanzr, thanks for putting this together, it's appreciated!

Offline

#4 2015-10-13 20:50:28

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 6,404

Re: Getting Sound working in BL

@ tknomanzr

Hey, thanks ... Love your explanations of things.  Things I didn't know before reading.
@ HoaS - that an good one too - a keeper.


The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.
_______________________________
Debian 10 Buster = SharpBang ♯!

Online

#5 2015-10-14 04:40:56

roger72
New Member
From: Switzerland
Registered: 2015-09-29
Posts: 4

Re: Getting Sound working in BL

Hi there

I was also facing the problem, that Volti did not start, resulting in that there was no speaker icon in the sys tray and that I had no sound on line out.
My finding was, that HDMI sound got assigned with card_index=0 and analog sound always got card_index=1. Volti therefore did not start, sound was per default played on the HDMI output.

I while searching the net, I stumbled over the follwoing: link

Accordingly I created a file sound.conf in /etc/modprobe.d/ with the follwoing entries:

#	PCH
options snd-hda-intel index=0 model=auto vid=8086 pid=8c20
#	HDMI
options snd-hda-intel index=1 model=auto vid=8086 pid=0c0c

vid and pid I worked out with:

lspci -nn |grep -i audio

That did the trick for me, Volit starts now and sound is now working as expected.

Offline

#6 2015-10-14 14:35:01

hhh
Meep!
Registered: 2015-09-17
Posts: 10,517
Website

Re: Getting Sound working in BL

That's great feedback, thanks Roger!

Offline

#7 2015-10-27 13:21:20

zv_odd
New Member
Registered: 2015-10-26
Posts: 4

Re: Getting Sound working in BL

I've got an Astro A50 usb  wireless headset, trying to get that working.
In my case I needed to run `lsusb -t |grep -i audio` to find my audio device (yes --tree, because its attached through usb hub and doesn't show up otherwise).

            |__ Port 4: Dev 6, If 0, Class=Audio, Driver=snd-usb-audio, 12M
            |__ Port 4: Dev 6, If 1, Class=Audio, Driver=snd-usb-audio, 12M
            |__ Port 4: Dev 6, If 2, Class=Audio, Driver=snd-usb-audio, 12M

So far I've figured out what my card number is , but I'm still struggling getting volti to work.

user@cruncher:~$ volti
[alsactrl.py:__init__:41] can't open Master control for card HDMI, trying to select first available mixer channel

[alsactrl.py:__init__:49] can't open first available control for card HDMI
error: list index out of range
Xlib.protocol.request.QueryExtension
X protocol error:
<class 'Xlib.error.BadAccess'>: code = 10, resource_id = 705, sequence_number = 10, major_opcode = 33, minor_opcode = 0
X protocol error:
<class 'Xlib.error.BadAccess'>: code = 10, resource_id = 705, sequence_number = 11, major_opcode = 33, minor_opcode = 0
X protocol error:
<class 'Xlib.error.BadAccess'>: code = 10, resource_id = 705, sequence_number = 12, major_opcode = 33, minor_opcode = 0
Traceback (most recent call last):
  File "/usr/bin/volti", line 53, in <module>
    volti = main.VolumeTray()
  File "/usr/lib/volti/volti/main.py", line 124, in __init__
    self.watchid = gobject.io_add_watch(fd, eventmask, self.update)
TypeError: an integer is required

I think I need todo one or both of these:

# ATI GPU HDMI
blacklist snd_hda_codec_hdmi
# Intel onboard HDMI
blacklist snd_hda_intel

Offline

#8 2015-10-30 04:39:31

tknomanzr
BL Die Hard
From: Around the Bend
Registered: 2015-09-29
Posts: 1,029

Re: Getting Sound working in BL

Sorry it has taken me awhile to respond to the above request. I was busy doing some research and testing. Would you mind installing pasystray and help me test out whether it will resolve your issue with USB sound? It is in the debian repos so:

sudo apt install pavucontrol
sudo apt install pasystray
pasystray &

Pasystray also comes with a number of suggests. You can install them or not. However, if you choose not too, several menu entries will apear grayed out.

Here is the debian entry for pasystray

At the bottom, you will see the list of suggested packages. I would be interested in seeing if this volume applet will solve usb issues. Atm, I have no way to test usb sound hardware. If it appears to run correctly, you can edit ~/.config/openbox/autostart and replace the entry for volti with pasystray and it will run at bootup.

Offline

#9 2015-11-23 18:19:09

sm55br
Member
From: Brazil
Registered: 2015-11-20
Posts: 19

Re: Getting Sound working in BL

But HOW (what commands to use) can I open the volti configuration file?


Valar Dohaeris.
All men must serve.

Offline

#10 2015-11-23 18:26:21

damo
....moderator....
Registered: 2015-08-20
Posts: 6,273

Re: Getting Sound working in BL

sm55br wrote:

But HOW (what commands to use) can I open the volti configuration file?

Open `~/.config/volti/config` with your text editor.

NB you can find all files with "volti" in the name with Catfish filesearcher, or in a terminal you can do:
First update the `locate` database (if there have been changes since your last search) with:

sudo updatedb

Then search with

locate volti

Also you may want to read up on how to use the `find` command in a terminal.


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Online

#11 2015-12-07 10:07:17

kabotage
Member
From: ::1
Registered: 2015-10-03
Posts: 71
Website

Re: Getting Sound working in BL

I want to add on clean install of BL then after update/upgrade, the system does not have an audio. I check all the missing link, the audio was muted on the pavucontrol. I also do not have a /etc/asound.conf

Additional info http://pastebin.com/B43PutUf

Audio works fine. Thanks!


Keeping an empty milk jar is great for piss break if you can't stop the game!

Offline

#12 2015-12-07 13:20:48

damo
....moderator....
Registered: 2015-08-20
Posts: 6,273

Re: Getting Sound working in BL

kabotage wrote:

I want to add on clean install of BL then after update/upgrade, the system does not have an audio. I check all the missing link, the audio was muted on the pavucontrol. I also do not have a /etc/asound.conf

Additional info http://pastebin.com/B43PutUf

Audio works fine. Thanks!

Is this a help request? If so, could you open a new thread about it please, because this thread is meant to be a HowTo and not for individual issues.

PS you don't generally need pastebin unless there is a LOT of output; use [ code ] tags.


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Online

#13 2015-12-07 23:47:48

kabotage
Member
From: ::1
Registered: 2015-10-03
Posts: 71
Website

Re: Getting Sound working in BL

damo wrote:

Is this a help request? If so, could you open a new thread about it please, because this thread is meant to be a HowTo and not for individual issues.

PS you don't generally need pastebin unless there is a LOT of output; use [ code ] tags.

I do understand that damo. Just adding info about it since I also have encountered the issue after a clean install so others can see this as well. My audio works fine. Thanks! big_smile


Keeping an empty milk jar is great for piss break if you can't stop the game!

Offline

#14 2015-12-07 23:52:12

damo
....moderator....
Registered: 2015-08-20
Posts: 6,273

Re: Getting Sound working in BL

^ Ah, OK. No problem.

It wasn't very clear to me, sorry hmm


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Online

#15 2016-01-07 08:34:34

johanv
New Member
From: Belgium
Registered: 2016-01-04
Posts: 4
Website

Re: Getting Sound working in BL

Hi,

Reconfiguring volti, like tknomanzr suggested, made volti start, but although I could move volti's sliders up and down, there was still no sound.

I fixed it running pavucontrol. It showed two output devices, HDMI and analog, but the volume control sliders of the analog device were grayed out.

Clicking on the mute icon fixed this. The mute icon seems a little broken, because it looks the same if the device is muted or not. But clicking it toggles the volume sliders; if they are not grayed, there is sound.

Offline

#16 2016-01-08 12:52:37

colejones
New Member
Registered: 2015-12-26
Posts: 1

Re: Getting Sound working in BL

tknomanzr wrote:

Sorry it has taken me awhile to respond to the above request. I was busy doing some research and testing. Would you mind installing pasystray and help me test out whether it will resolve your issue with USB sound? It is in the debian repos so:

sudo apt install pavucontrol
sudo apt install pasystray
pasystray &

Pasystray also comes with a number of suggests. You can install them or not. However, if you choose not too, several menu entries will apear grayed out.

Here is the debian entry for pasystray

At the bottom, you will see the list of suggested packages. I would be interested in seeing if this volume applet will solve usb issues. Atm, I have no way to test usb sound hardware. If it appears to run correctly, you can edit ~/.config/openbox/autostart and replace the entry for volti with pasystray and it will run at bootup.

johanv wrote:

Hi,

Reconfiguring volti, like tknomanzr suggested, made volti start, but although I could move volti's sliders up and down, there was still no sound.

I fixed it running pavucontrol. It showed two output devices, HDMI and analog, but the volume control sliders of the analog device were grayed out.

Clicking on the mute icon fixed this. The mute icon seems a little broken, because it looks the same if the device is muted or not. But clicking it toggles the volume sliders; if they are not grayed, there is sound.

Thanks tknomanzr and johanv...i faced a similar problem and haven't had a chance to try all the various steps that you guys have very clearly outlined above. Will give it a shot asap. I appreciate this is not a thread for individual issues, and wanted to mention my case as well to ID the helpful nature of this thread. Thanks guys!

Offline

#17 2016-07-04 02:24:11

hhh
Meep!
Registered: 2015-09-17
Posts: 10,517
Website

Re: Getting Sound working in BL

Unstickying this, it's getting crufty. If anyone objects, just say so.

Offline

#18 2016-07-16 10:05:44

ibilata_bingbingbing
Member
Registered: 2016-07-16
Posts: 6

Re: Getting Sound working in BL

tknomanzr wrote:

As you can see, you are likely to have a list with an Analog out, a Digital out and one or more HDMI outs. Let me explain what each of these means in turn:

Hi!

with

lspci | grep Audio

I get "Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller (rev 04)"

but with

aplay -l

I get "no soundcards found"

I'll search around, but it might be good to update the tutorial for the case where nothing comes up, and how to make it...

Offline

#19 2016-07-16 10:23:11

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: Getting Sound working in BL

Hello!

ibilata_bingbingbing wrote:

with

lspci | grep Audio

I get "Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller (rev 04)"

That device should be supported.

Try running this command:

sudo update-pciids

Then please post the full output of these commands:

lspci -knn | grep -iA2 audio
cat /proc/asound/cards

“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#20 2016-07-16 11:21:17

ibilata_bingbingbing
Member
Registered: 2016-07-16
Posts: 6

Re: Getting Sound working in BL

Thanks for the quick answer.

lspci -knn | grep -iA2 audio

00:1b.0 Audio device [0403]: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller [8086:1e20] (rev 04)
	Subsystem: Acer Incorporated [ALI] Device [1025:0742]
	Kernel driver in use: oss_hdaudio
00:1c.0 PCI bridge [0604]: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 [8086:1e10] (rev c4)
	Kernel driver in use: pcieport8

cat /proc/asound/cards

cat: /proc/asound/cards: No such file or directory

I just checked out "/proc" and "/asound" isn't there. But "/opensound" is...

In my first couple of hours I did some footling because the sound wasn't working... and probably installed opensound, which uninstalled asound? but opensound can't find the hardware?

Offline

#21 2016-07-16 11:39:47

xaos52
The Good Doctor
From: Planet of the @pes
Registered: 2015-09-30
Posts: 695

Re: Getting Sound working in BL

You have kernel driver oss_hdaudio driving your sound card. That should be snd_hda_intel.
PLease post output of:

sudo apt-get install alsa-utils pulseaudio

Offline

#22 2016-07-16 11:49:07

ibilata_bingbingbing
Member
Registered: 2016-07-16
Posts: 6

Re: Getting Sound working in BL

sudo apt-get install alsa-utils pulseaudio
alsa-utils is already the newest version.
pulseaudio is already the newest version.
The following packages were automatically installed and are no longer required:
  libdbus-glib2.0-cil libdbus2.0-cil libflickrnet2.2-cil libgconf2.0-cil
  libgdata2.1-cil libgkeyfile1.0-cil libglib2.0-cil libgnome-desktop-2-17
  libgnome-keyring1.0-cil libgnome-vfs2.0-cil libgtk2.0-cil
  libmono-addins0.2-cil libmono-cairo4.0-cil libmono-corlib4.0-cil
  libmono-data-tds4.0-cil libmono-posix4.0-cil libmono-sharpzip4.84-cil
  libmono-sqlite4.0-cil libmono-system-core4.0-cil libmono-system-data4.0-cil
  libmono-system-enterpriseservices4.0-cil libmono-system-numerics4.0-cil
  libmono-system-runtime-serialization-formatters-soap4.0-cil
  libmono-system-runtime-serialization4.0-cil libmono-system-transactions4.0-cil
  libmono-system-web-applicationservices4.0-cil
  libmono-system-web-services4.0-cil libmono-system-web4.0-cil
  libmono-system-xml-linq4.0-cil libmono-web4.0-cil libnewtonsoft-json5.0-cil
  libnotify0.4-cil libnunit-framework2.6.3-cil libwnck-common libwnck2.20-cil
  libwnck22 libxres1
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

So, alsa/pulse is just setup incorrectly?

Offline

#23 2016-07-16 12:49:19

xaos52
The Good Doctor
From: Planet of the @pes
Registered: 2015-09-30
Posts: 695

Re: Getting Sound working in BL

All  the necessary packages seem to be there.
Yet, the wrong driver is/was loaded.
I suppose you can't give us a list of exactly what commands tou used to try and resolve the situation.

Try rebooting and see if you still have that oss_hdaudio driver loaded.

Offline

#24 2016-07-16 13:01:37

ibilata_bingbingbing
Member
Registered: 2016-07-16
Posts: 6

Re: Getting Sound working in BL

No, sorry. I have no idea. But I'm a total newbie to anything not Windows/Mac, so I definitely did it by way of Synapse or apt-get. Both of which, as far as I understand are relatively responsible in terms of what they put in/take out.

I just restarted though, and the system seems to be aware that something is up with the audio. It said something like "oss_hdaudio codec not known yet".

Is there not just some file somewhere where I can just change oss_hdaudio to snd_hda_intel?

Also, when I open up pulseaudio, the only available device is dummy output...

Super strange.

EDIT: Is there maybe a way to uninstall all of the drivers and stuff and then re-install them?

Last edited by ibilata_bingbingbing (2016-07-16 13:05:28)

Offline

#25 2016-07-16 13:14:25

xaos52
The Good Doctor
From: Planet of the @pes
Registered: 2015-09-30
Posts: 695

Re: Getting Sound working in BL

The system should be detecting the correct driver for your sound card automatically.

If it does not do this, several things may cause this:

1. The correct driver has been blacklisted (by what you did earlier)
2. the automatic detection fails because your card is too new (BL is based on Debian stable branch, which is not always up-to-date with new hardware being introduced)
3. etc ...

Can you capture the output of command

dmesg 

in a file, post it on a pastebin site and post the link to it here?

Offline

Board footer

Powered by FluxBB