You are not logged in.

#1 2016-07-25 11:57:19

brunomalone
Member
Registered: 2016-06-30
Posts: 7

[SOLVED] Need to reset audio everytime I start in order to have sound

Hello.
Bruno from Spain here. I'm starting with BL after trying other distros since CB ended. And have a problem. When I start the system, the default audio settings in audio mixer are:
Configuration> Buil-in audio> Digital Stereo(HDMI) Output+Analog Stereo Input
Output Devices> Built-in Audio Digital Stereo (HDMI)> Port: HDMI/DisplayPort 2 (plugged in) [I use the HDMI out for video]
However, if I want to hear something I need to change it to:
Configuration> Buil-in audio> Analog Stereo Output
Output Devices> Built-in Audio Analog Stereo> Port: Headphones.
I have to change the settings every time I boot the system, so the question is: Is there any way to make this last configuration the default one?
Thanks for your help, I loved CB and I love BL but I need a lot of help.

Last edited by brunomalone (2016-07-26 04:04:33)

Offline

#2 2016-07-25 14:26:23

Horizon_Brave
Operating System: Linux-Nettrix
Registered: 2015-10-18
Posts: 1,473

Re: [SOLVED] Need to reset audio everytime I start in order to have sound

Hi Bruno, and Welcome! I'm still looking into this myself, as I experience a roughly similar issue.  I *seems* like modifying the /etc/pulse/default.pa  file  with the  card that you want as default. Likewise you could create a user specific pulseaudio config file with ~/.pulse/default.pa. The exact syntax i'm still looking for and will reply when I find it..(Unless someone beats me to it) 

Can you post the output of

lspci -k | grep -A Audio  

"I have not failed, I have found 10,000 ways that will not work" -Edison

Offline

#3 2016-07-25 14:45:50

Horizon_Brave
Operating System: Linux-Nettrix
Registered: 2015-10-18
Posts: 1,473

Re: [SOLVED] Need to reset audio everytime I start in order to have sound

in the meantime, have a look here Bruno:

https://wiki.archlinux.org/index.php/Pu … o/Examples


"I have not failed, I have found 10,000 ways that will not work" -Edison

Offline

#4 2016-07-25 15:19:09

Horizon_Brave
Operating System: Linux-Nettrix
Registered: 2015-10-18
Posts: 1,473

Re: [SOLVED] Need to reset audio everytime I start in order to have sound

Okay so this worked for me:

For your input devices: (microphone)
pacmd list-sources | grep -e device.string -e 'name:'


For your output devices (the speakers, headphones, hdmi)
pacmd list-sinks | grep -e 'name:' -e 'index'


What both of the above will output what the devices are "known as" to pulseaudio.  For example mine looks like:

   * index: 0
                    name: <alsa_output.pci-0000_00_05.0.0iec958-stereo>

I only have one output sink, because its a VM. Your output will probably have 3 or 4 outputs.

So copy the name (without the <  > ) and now open up:

/etc/pulse/default.pa

Scroll down to the very very bottom and uncomment the line  #set-default-sink source

Make it so it looks like this:

set-default-sink <name_of_your_device>

Use the name that you copied earlier in place of the <name_of_your_device>.

Write and quit the file, and reboot.  You may have to play around with the device name, if you have multiple outputs.  But generally if you want the speakers on your computer, they'll be labeled like analog.monitor at the end or something similar.  Just try different combinations but this one worked for me!


"I have not failed, I have found 10,000 ways that will not work" -Edison

Offline

#5 2016-07-25 17:42:42

brunomalone
Member
Registered: 2016-06-30
Posts: 7

Re: [SOLVED] Need to reset audio everytime I start in order to have sound

Thank you very much for the quick reply Horizon_Brave.
This is what I get for the first thing you asked me. I guess there's something wrong in there.

mil@j1900:~$ lspci -k | grep -A Audio  
grep: Audio: invalid context length argument

As for the second part, this is what I get:

mil@j1900:~$ pacmd list-sources | grep -e device.string -e 'name:'
	name: <alsa_output.pci-0000_00_1b.0.hdmi-stereo-extra1.monitor>
		device.string = "0"
	name: <alsa_input.pci-0000_00_1b.0.analog-stereo>
		device.string = "front:0"
mil@j1900:~$ pacmd list-sinks | grep -e 'name:' -e 'index'
  * index: 0
	name: <alsa_output.pci-0000_00_1b.0.hdmi-stereo-extra1>


So, it looks like there's not analog output... However, after manually changing the settings in the mixer I get this:

mil@j1900:~$ pacmd list-sinks | grep -e 'name:' -e 'index'
    index: 0
	name: <alsa_output.pci-0000_00_1b.0.hdmi-stereo-extra1>
  * index: 1
	name: <alsa_output.pci-0000_00_1b.0.analog-stereo>

But, changing #set-default-sink source to set-default-sink alsa_output.pci-0000_00_1b.0.analog-stereo and rebooting does not make it any better...

Am I doing something wrong?

Offline

#6 2016-07-25 19:41:55

Horizon_Brave
Operating System: Linux-Nettrix
Registered: 2015-10-18
Posts: 1,473

Re: [SOLVED] Need to reset audio everytime I start in order to have sound

Whoops, I meant to give you the command :

lspci -k | grep -A2 Audio

Alternatively you can use the command:

aplay -l

Both give you pretty much the same information.

What Volume tool are you using to call the mixer?  Do you use volti?   if you could post the contents of your file:

~/.config/openbox/autostart


that may help..

Last edited by Horizon_Brave (2016-07-25 19:50:38)


"I have not failed, I have found 10,000 ways that will not work" -Edison

Offline

#7 2016-07-25 20:40:29

Horizon_Brave
Operating System: Linux-Nettrix
Registered: 2015-10-18
Posts: 1,473

Re: [SOLVED] Need to reset audio everytime I start in order to have sound

Also, I see that in /etc/pulse/default.pa There's a section about loading modules by default or static.  Bruno, if you sound card isn't being detected at boot up and or the wrong driver is being loaded, you may have to edit this line:

load-module module-udev-detect

I don't have any experience with this, but there is a section in that default.pa file that specifies loading the audio drivers statically. It appears that you can add the device name (from the earlier post) to the
#load-module
line, but again I'm not sure of this. But from your previous post it *sounds* like udev isn't automatically picking up your card...


"I have not failed, I have found 10,000 ways that will not work" -Edison

Offline

#8 2016-07-26 04:03:41

brunomalone
Member
Registered: 2016-06-30
Posts: 7

Re: [SOLVED] Need to reset audio everytime I start in order to have sound

Here we go.

mil@j1900:~$ lspci -k | grep -A2 Audio
00:1b.0 Audio device: Intel Corporation Atom Processor Z36xxx/Z37xxx Series High Definition Audio Controller (rev 0e)
	Subsystem: Intel Corporation Atom Processor Z36xxx/Z37xxx Series High Definition Audio Controller
	Kernel driver in use: snd_hda_intel
00:1c.0 PCI bridge: Intel Corporation Device 0f48 (rev 0e)
mil@j1900:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC662 rev1 Analog [ALC662 rev1 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: 1/1
  Subdevice #0: subdevice #0

The volume tool is volti, I didn't change anything in the default autostart.sh apart from adding numlockx.

## Openbox autostart
## ====================
## When you login to your BunsenLabs Openbox session, this autostart script
## will be executed to set-up your environment and launch any applications
## you want to run at startup.
##
## Note: some programs, such as 'nm-applet' are run via XDG autostart.
## Run
## /usr/lib/i386-linux-gnu/openbox-xdg-autostart --list
## or
## /usr/lib/x86_64-linux-gnu/openbox-xdg-autostart --list
## to list any XDG autostarted programs.
##
## More information about this can be found at:
## http://openbox.org/wiki/Help:Autostart
##
## If you do something cool with your autostart script and you think others
## could benefit from your hack, please consider sharing it at:
## http://forums.bunsenlabs.org (registration required)
##

## SETTINGS START

## Configure touchpad. See 'man synaptics' for more info.
synclient VertEdgeScroll=1 HorizEdgeScroll=1 TapButton1=1 2>/dev/null

## Set keyboard settings - 250 ms delay and 25 cps (characters per second) repeat rate.
## Adjust the values according to your preferances.
xset r rate 250 25

## Turn on/off system beep.
xset b off

## Add keyboard mapping.
#xmodmap -e "keysym Insert = Multi_key"

## SETTINGS END

## GNOME PolicyKit authentication
/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1 &

nitrogen --restore &

bl-compositor --start &

## Start the tint2 session (the default tint2 will run if no sessions have been set)
(sleep 2s; bl-tint2-session) &

## Start the Conky session (the default conkyrc will run if no sessions have been set)
(sleep 2s; bl-conky-session --autostart) &

## Volume control for systray
(sleep 2; volti) &

## Volume keys daemon
xfce4-volumed &

## Start Clipboard manager
(sleep 3; clipit) &

## Start Thunar Daemon, if set as bl-file-manager
if [ "$(readlink -f $(which bl-file-manager))" = "$(which thunar)" ]
then
    thunar --daemon &
fi

## Enable power management
xfce4-power-manager &

## Start the battery applet
#(sleep 2; fdpowermon) &

## Start xscreensaver (light-locker now used by default, run via XDG autostart.)
#xscreensaver -no-splash &

## bl-welcome - post-installation script, will not run in a live session and
## only runs once. Safe to remove.
(sleep 10; bl-welcome --firstrun) &

## bl-fortune - have the system come up with a little adage (not yet enabled)
#(sleep 120; bl-fortune) &

# Autostart the Dropbox daemon
(sleep 60s; /home/mil/bin/dropbox.py start) &

numlockx &

Also I commented the section about module-udev in /etc/pulse/default.pa like this:

### Automatically load driver modules depending on the hardware available
#.ifexists module-udev-detect.so
#load-module module-udev-detect
#.else

and changed the other one like this

### 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 alsa_output.pci-0000_00_1b.0.analog-stereo
#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

As a result of this I have sound after rebooting. So you were right. The only thing is that when I try to open the mixer I get this:

screenshot-260716-055306.php

I don't think I actually need access to the mixer, so I consider the main problem solved. If there's a simple way of bringing it back would be nice, though.

Thanks again, Horizon_Brave. You have solved it.

Offline

#9 2016-07-26 04:31:14

brunomalone
Member
Registered: 2016-06-30
Posts: 7

Re: [SOLVED] Need to reset audio everytime I start in order to have sound

Hi again. I did some trial and error on my own and finally everything works fine. Actually, the only modification that is needed in the /etc/pulse/default.pa is to uncoment the load-module module-alsa-sink line. Nothing else apart from the previous

#set-default-sink source to set-default-sink alsa_output.pci-0000_00_1b.0.analog-stereo  

Problem solved! Nice way to start the day. Thanks a lot Horizon_Brave!

Offline

#10 2016-07-26 16:40:39

Horizon_Brave
Operating System: Linux-Nettrix
Registered: 2015-10-18
Posts: 1,473

Re: [SOLVED] Need to reset audio everytime I start in order to have sound

No problem! Glad my fumbling helped both of us!


"I have not failed, I have found 10,000 ways that will not work" -Edison

Offline

#11 2016-09-26 23:32:13

malvidx
Member
Registered: 2016-08-05
Posts: 32

Re: [SOLVED] Need to reset audio everytime I start in order to have sound

that worked perfectly for me, brunomalone!
thanks i was too lazy to fix it and it just annoyed me to the point of where i finally fixed it today. haha.

Offline

Board footer

Powered by FluxBB