We do not appear to have /etc/modprobe.d dir or /etc/modprobe.conf
this post has been EDITTED
I always try to run my private stuff outside of /usr/bin. But on openbox, I have no /usr/local/bin
so I used root power to create it
[ -d /usr/local/bin ] || sudo mkdir -p /usr/local/bin
2) I adjust my ~/.bashrc_profile so it reads
# Personal environment variables and startup programs.
# Personal aliases and functions should go in ~/.bashrc. System wide
# environment variables and startup programs are in /etc/profile.
# System wide aliases and functions are in /etc/bashrc.
export PATH=/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin:
if [ -f "$HOME/.bashrc" ] ; then
source $HOME/.bashrc
fi
# unset append
# End ~/.bash_profile
EDIT I forgot to add /usr/sbin
logout and login to test
echo $PATH
/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin:
3) Now I can create my intel sound file assumes that aplay -l -> reports first device is hdmi which I do not use,
I use desktop analog 3.55 mm lead speakers from line out on a tower,
its same as laptop speakers.
use root powers to create file and make it executable
sudo cat >> /usr/local/bin/sound<<'EOF'
#!/bin/bash
/bin/modprobe -r snd_hda_intel
/bin/modprobe snd_hda_intel enable=0
/usr/sbin/alsactl restore
date > /tmp/date
EOF
sudo chmod 755 /usr/local/bin/sound
You need to install alsa-utils to get command=aplay -l
to test it works....
enable=0 part says disable hdmi but keep other card devices (I have only analog left so it grabs index=0)
sudo sound
gor [ ~ ]$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Generic [HD-Audio Generic], device 0: ALC892 Analog [ALC892 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
alsamixer
I have previously saved my mixer levels
sudo alsactl store
and the alsamixer command confirms they are correct YMMV