To create the following script, Copy and paste the text at bottom as the file alsarset into your home area bin folder (~/bin/alsarset).
Run the following terminal command to make the file executable:
$ chmod +x ~/bin/alsarset
DO NO RUN the script as root, but as normal user. The script, when it sees you are not root, reruns itself, with the sudo command, asking for the root password. The script then runs the Alsa Stop and then the Alsa Start and completes. As the script exists the second run, it drops back as a normal user and runs kmix. It does work, if done right.
#: Title : /home/james/bin/alsarset
#: Date Created: Sat Oct 30 09:45:27 CDT 2010
#: Last Edit : Sat Oct 30 10:12:27 CDT 2010
#: Author : J. McDaniel
#: Version : 1.00
#: Description : Stop/Start Alsa, reload kwin
#: Options : none
# Written for the openSUSE forums on Saturday October 30, 2010
# Copy and paste this text as the file alsarset into the ~/bin folder.
# Run the terminal command: chmod +x ~/bin/alsarset, to make the file executable
# Open up a terminal session and type: alsarset, to start the program
# Check to see if we are root, Do not run as root since we need to run kmix as a normal user
echo "Reset (Stop/Start) Alsa Sound Sound System - Start KMIX (For KDE Desktop Systems)"
if [[ $UID -ne 0 ]]; then
echo "Root User Permissions are required, Please Enter the ..."
read -p "Alsa Sound has been Started. Press
read -p "Press
echo "Alsa Sound has been Stopped. Just Select NO to Removed Sound Devices Window."
read -p "Press
# End Of Script