[SOLVED] I have to run alsactl init after every reboot
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I've had this problem with this laptop for a while now, but it's now a problem as I'm giving it away to someone else. It's a Panasonic Cf-C1 running 14.2. Every reboot needs to run alsactl init (as root) for the sound to work.
00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 04)
When I run alsactl init, it outputs
Code:
Found hardware: "HDA-Intel" "Realtek ALC269VB" "HDA:10ec0269,10f70300,00100100 HDA:14f12c06,10f70000,00100000 HDA:80862805,80860101,00100000" "0x10f7" "0x8338"
Hardware is initialized using a generic method
..and starts working.
Any ideas? I've tried a bunch of google results, like adding "options snd-hda-intel model=auto" to /etc/modeprobe.d/alsa.conf, running alsactl store after the init, setting the +x permission on rc.alsa, and some other stuff too that I've already forgotten, but nothing sticks.
Have you purposefully tried to remove/disable pulseaudio? Because 14.2 introduced pulseaudio, which handles all sound on the system. If you happened to tweak alsa files (like /etc/asound.conf), it could potentially disable pulseaudio and could cause you to need to run various tweaks like the one you mentioned.
If you just want it to run the command and be done with it without figuring out how to get pulseaudio working properly, you should be able to add that command into /etc/rc.d/rc.local and it will be one of the last things ran before the system finishes booting. However, if you want to get pulseaudio working, you'd probably want to first restore your various files back to default and we can start figuring things outs.
Have you purposefully tried to remove/disable pulseaudio? Because 14.2 introduced pulseaudio, which handles all sound on the system. If you happened to tweak alsa files (like /etc/asound.conf), it could potentially disable pulseaudio and could cause you to need to run various tweaks like the one you mentioned.
If you just want it to run the command and be done with it without figuring out how to get pulseaudio working properly, you should be able to add that command into /etc/rc.d/rc.local and it will be one of the last things ran before the system finishes booting. However, if you want to get pulseaudio working, you'd probably want to first restore your various files back to default and we can start figuring things outs.
Pretty sure I didn't tweak anything. I remember when I did the initial install and discovered the sound didn't work. I made a thread about it here, actually. Immediately discovered that alsactl init fixed the problem and stopped thinking about it.
Does rc.local run as root, or do I have to setup the regular user to be able to sudo?
Maybe that's just that you don't have an audio equipment on the HDMI output, used by default.
There are several ways to do change that, to find out which one is better, please provide the output of this command, typed as root
Code:
lpsci -knn |grep -iA3 audio
Also, I don't have two sound cards to check, but I think that the preferred sound card can be set though pavucontrol.
And, if you made any change in a sound config fie, like /etc/asound.conf, ~/.asoundrc, /etc/pulse/default.pa, please attach this file with the txt extension or paste it in your next post.
EDIT I made a typo in the command, now fixed.
Last edited by Didier Spaier; 12-18-2018 at 06:06 PM.
Maybe that's just that you don't have an audio equipment on the HDMI output, used by default.
Huh, there isn't anything running soundwise through HDMI. This laptop doesn't even have an HDMI out. Weird!
Here's the result of your kindly supplied command:
Code:
00:1b.0 Audio device [0403]: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller [8086:1c20] (rev 04)
Subsystem: Matsushita Electric Industrial Co., Ltd. 6 Series/C200 Series Chipset Family High Definition Audio Controller [10f7:8338]
Kernel driver in use: snd_hda_intel
Kernel modules: snd_hda_intel
00:1c.0 PCI bridge [0604]: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 [8086:1c10] (rev b4)
On my desktop, which works fine and has normal onboard intel audio and HDMI out through the video card, I can switch back and forth between those using pulseaudio mixer, under configuration. I am able to choose other configs on this laptop, but it does nothing.
asound.conf
Code:
# ALSA system-wide config file
# By default, redirect to PulseAudio:
pcm.default pulse
ctl.default pulse
~/.asoundrc is empty
Code:
#!/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 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
The name of the file doesn't matter, but it should end in .conf
PS Maybe this won't work as the dummy second output is also named PCH... Anyway let's try this first.
Also do alsamixer and pavucontrol "see" this dummy output?
No luck. It changed my configuration in pavucontrol to "digital stereo (HDMI) output" though for some reason. So I tried it the other way around and it did the same thing.
I don't see a dummy output in either alsamixer or pavucontrol. If I select all outputs in pavucontrol, I see "speakers" and "headphones (unplugged)".
From my reading, the ALC269 should be supported without needing to add additional parameters to the snd-hda-intel kernel module. (See /usr/src/linux/Documentation/sound/alsa/HD-Audio-Models.txt for the available options.) A web search for your hardware and snd-hda-intel did not produce much, suggesting that this is not a problem faced by others.
Does the file /var/lib/alsa/asound.state actually change after running 'alsactl -store'? Check with 'ls -l'. I would try deleting this file then running 'alsactl -store'.
It may be that you have a rogue entry in your /etc/modprobe.d/ directory. The output from 'grep -v "^#" /etc/modprobe.d/*' may be informative.
From my reading, the ALC269 should be supported without needing to add additional parameters to the snd-hda-intel kernel module. (See /usr/src/linux/Documentation/sound/alsa/HD-Audio-Models.txt for the available options.) A web search for your hardware and snd-hda-intel did not produce much, suggesting that this is not a problem faced by others.
Does the file /var/lib/alsa/asound.state actually change after running 'alsactl -store'? Check with 'ls -l'. I would try deleting this file then running 'alsactl -store'.
It may be that you have a rogue entry in your /etc/modprobe.d/ directory. The output from 'grep -v "^#" /etc/modprobe.d/*' may be informative.
alsactl store does change the modified date of the file, so it seems to be writing. [When I nano it though, it's empty. Is that normal?] Never mind I am an idiot. Here's asound.state post init:
Code:
state.PCH {
control.1 {
iface MIXER
name 'Headphone Playback Volume'
value.0 0
value.1 0
comment {
access 'read write'
type INTEGER
count 2
range '0 - 87'
dbmin -6525
dbmax 0
dbvalue.0 -6525
dbvalue.1 -6525
}
}
control.2 {
iface MIXER
name 'Headphone Playback Switch'
value.0 false
value.1 false
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.3 {
iface MIXER
name 'Speaker Playback Volume'
value.0 87
value.1 87
comment {
access 'read write'
type INTEGER
count 2
range '0 - 87'
dbmin -6525
dbmax 0
dbvalue.0 0
dbvalue.1 0
}
}
control.4 {
iface MIXER
name 'Speaker Playback Switch'
value.0 true
value.1 true
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.5 {
iface MIXER
name 'Loopback Mixing'
value Enabled
comment {
access 'read write'
type ENUMERATED
count 1
item.0 Disabled
item.1 Enabled
}
}
control.6 {
iface MIXER
name 'Mic Playback Volume'
value.0 0
value.1 0
comment {
access 'read write'
type INTEGER
count 2
range '0 - 31'
dbmin -3450
dbmax 1200
dbvalue.0 -3450
dbvalue.1 -3450
}
}
control.7 {
iface MIXER
name 'Mic Playback Switch'
value.0 false
value.1 false
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.8 {
iface MIXER
name 'Auto-Mute Mode'
value Enabled
comment {
access 'read write'
type ENUMERATED
count 1
item.0 Disabled
item.1 Enabled
}
}
control.9 {
iface MIXER
name 'Capture Volume'
value.0 19
value.1 19
comment {
access 'read write'
type INTEGER
count 2
range '0 - 31'
dbmin -1650
dbmax 3000
dbvalue.0 1200
dbvalue.1 1200
}
}
control.10 {
iface MIXER
name 'Capture Switch'
value.0 true
value.1 true
comment {
access 'read write'
type BOOLEAN
count 2
}
}
control.11 {
iface MIXER
name 'Mic Boost Volume'
value.0 0
value.1 0
comment {
access 'read write'
type INTEGER
count 2
range '0 - 3'
dbmin 0
dbmax 3600
dbvalue.0 0
dbvalue.1 0
}
}
control.12 {
iface MIXER
name 'Internal Mic Boost Volume'
value.0 0
value.1 0
comment {
access 'read write'
type INTEGER
count 2
range '0 - 3'
dbmin 0
dbmax 3600
dbvalue.0 0
dbvalue.1 0
}
}
control.13 {
iface MIXER
name 'Master Playback Volume'
value 86
comment {
access 'read write'
type INTEGER
count 1
range '0 - 87'
dbmin -6525
dbmax 0
dbvalue.0 -75
}
}
control.14 {
iface MIXER
name 'Master Playback Switch'
value true
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.15 {
iface CARD
name 'Mic Jack'
value false
comment {
access read
type BOOLEAN
count 1
}
}
control.16 {
iface CARD
name 'Internal Mic Phantom Jack'
value true
comment {
access read
type BOOLEAN
count 1
}
}
control.17 {
iface CARD
name 'Front Headphone Jack'
value false
comment {
access read
type BOOLEAN
count 1
}
}
control.18 {
iface CARD
name 'Speaker Phantom Jack'
value true
comment {
access read
type BOOLEAN
count 1
}
}
control.19 {
iface PCM
name 'Playback Channel Map'
value.0 0
value.1 0
comment {
access read
type INTEGER
count 2
range '0 - 36'
}
}
control.20 {
iface PCM
name 'Capture Channel Map'
value.0 0
value.1 0
comment {
access read
type INTEGER
count 2
range '0 - 36'
}
}
control.21 {
iface CARD
name 'HDMI/DP,pcm=3 Jack'
value false
comment {
access read
type BOOLEAN
count 1
}
}
control.22 {
iface MIXER
name 'IEC958 Playback Con Mask'
value '0fff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
comment {
access read
type IEC958
count 1
}
}
control.23 {
iface MIXER
name 'IEC958 Playback Pro Mask'
value '0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
comment {
access read
type IEC958
count 1
}
}
control.24 {
iface MIXER
name 'IEC958 Playback Default'
value '0400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
comment {
access 'read write'
type IEC958
count 1
}
}
control.25 {
iface MIXER
name 'IEC958 Playback Switch'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.26 {
iface PCM
device 3
name ELD
value ''
comment {
access 'read volatile'
type BYTES
count 0
}
}
control.27 {
iface PCM
device 3
name 'Playback Channel Map'
value.0 0
value.1 0
value.2 0
value.3 0
value.4 0
value.5 0
value.6 0
value.7 0
comment {
access 'read write'
type INTEGER
count 8
range '0 - 36'
}
}
control.28 {
iface MIXER
name 'PCM Playback Volume'
value.0 255
value.1 255
comment {
access 'read write user'
type INTEGER
count 2
range '0 - 255'
tlv '0000000100000008ffffec1400000014'
dbmin -5100
dbmax 0
dbvalue.0 0
dbvalue.1 0
}
}
}
Only things in modprobe.d are the README and the blacklist, and the blacklist has no entries.
Incidentally, adding alsactl init to rc.local doesn't work. I can see it initialize the hardware on boot before XFCE loads, but there is no audio until I run it again within XFCE.
Last edited by The Sego Sago Kid; 12-19-2018 at 04:19 PM.
as root? This may be silly since pulse apparently controls your system but it is one major difference between the two - Pulse is run as User and ALSA as root... that is for any persistence.
Just to make sure: /etc/rc.d/rc.local is executable, right?
Yep, I could see the output from alsactl init in the console before XFCE loaded.
Quote:
Originally Posted by enorbet
Re: running "alsactl store" as root? This may be silly since pulse apparently controls your system but it is one major difference between the two - Pulse is run as User and ALSA as root... that is for any persistence.
Correct, I am running it as root (using su root, not sudo).
Quote:
Originally Posted by abga
In your first post you mentioned:
Just to keep things clean, try using the file /etc/modprobe.d/snd-hda-intel.conf for:
Code:
options snd-hda-intel model=auto
I removed all that stuff after I discovered it didn't work. But if I throw it back in there, I'll be sure to use that file.
Quote:
Originally Posted by abga
If you have sound through the jack output but not through the internal laptop speaker, then you might want to try:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.